@marimo-team/frontend 0.13.7-dev3 → 0.13.7-dev32
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/assets/ConnectedDataExplorerComponent-CwhdlFHz.js +19 -0
- package/dist/assets/VegaLite-0t_AbYQh.js +189 -0
- package/dist/assets/_baseEach-DzdwhOu_.js +1 -0
- package/dist/assets/_baseMap-C3AAYU2N.js +1 -0
- package/dist/assets/_baseUniq-D-v_zqTJ.js +1 -0
- package/dist/assets/_createAggregator-CJY6-b_V.js +1 -0
- package/dist/assets/{any-language-editor-CyITx6h-.js → any-language-editor-NTcv_KOF.js} +3 -1
- package/dist/assets/apl-CXdQSnD-.js +1 -1
- package/dist/assets/arc-Cuwikxov.js +1 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-CPwY-DHp.js +36 -0
- package/dist/assets/asciiarmor-D5V0T9Cu.js +1 -1
- package/dist/assets/asn1-DWPaVWf6.js +1 -1
- package/dist/assets/asterisk-B46aRdXb.js +1 -1
- package/dist/assets/blockDiagram-JOT3LUYC-CxJCjTRC.js +121 -0
- package/dist/assets/brainfuck-CtZaYBKt.js +1 -1
- package/dist/assets/c4Diagram-VJAJSXHY-I2YxPF4o.js +10 -0
- package/dist/assets/channel-BuFYSelt.js +1 -0
- package/dist/assets/chunk-4BMEZGHF-C8dnzfo3.js +1 -0
- package/dist/assets/chunk-A2AXSNBT-CAGSI4u1.js +164 -0
- package/dist/assets/chunk-AEK57VVT-CLoclE-n.js +220 -0
- package/dist/assets/chunk-D6G4REZN-xvBcwtYi.js +1 -0
- package/dist/assets/chunk-RZ5BOZE2-ByeF198q.js +1 -0
- package/dist/assets/chunk-XZIHB7SX-BZdbJE2b.js +1 -0
- package/dist/assets/{circle-play-DfTVgygt.js → circle-play-C48cOuxi.js} +1 -2
- package/dist/assets/classDiagram-GIVACNV2-Dm9gJkPO.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-Dm9gJkPO.js +1 -0
- package/dist/assets/clike-BgBwzOhw.js +1 -1
- package/dist/assets/clojure-DR_hEDJv.js +1 -1
- package/dist/assets/clone-D4DobUqq.js +1 -0
- package/dist/assets/cmake-DXn5xaP-.js +1 -1
- package/dist/assets/cobol-stawOqaz.js +1 -1
- package/dist/assets/coffeescript-BTDxI-eT.js +1 -1
- package/dist/assets/colors-bszWmPJw.js +1 -1
- package/dist/assets/commonlisp-vq6DHwts.js +1 -1
- package/dist/assets/compile-D4pIXnyO.js +10 -0
- package/dist/assets/crystal-CRzZ78HM.js +1 -1
- package/dist/assets/css-ZjFoif2m.js +1 -1
- package/dist/assets/cypher-gJDei3ni.js +1 -1
- package/dist/assets/cytoscape.esm-C5gjFiAL.js +10 -0
- package/dist/assets/d-BShv7fp-.js +1 -1
- package/dist/assets/dagre-OKDRZEBW-CtkKmxMl.js +4 -0
- package/dist/assets/data-editor-CyGUZCcc.js +142 -0
- package/dist/assets/diagram-SSKATNLV-LPmiELkj.js +43 -0
- package/dist/assets/diagram-VNBRO52H-Ddp9UUOs.js +24 -0
- package/dist/assets/diff-UJJ5BM9S.js +1 -1
- package/dist/assets/dockerfile-knGOOxt4.js +1 -1
- package/dist/assets/dtd-DI9Herc-.js +1 -1
- package/dist/assets/dylan-CHJ5qNM_.js +1 -1
- package/dist/assets/ebnf-B-Df8AvO.js +1 -1
- package/dist/assets/ecl-DPFc0Uaf.js +1 -1
- package/dist/assets/edit-page-CoqTjWyF.js +134 -0
- package/dist/assets/eiffel-DR5c0IrL.js +1 -1
- package/dist/assets/elm-D7xaZ7Da.js +1 -1
- package/dist/assets/erDiagram-Q7BY3M3F-COJzBc92.js +60 -0
- package/dist/assets/erlang-BuqgqA5h.js +1 -1
- package/dist/assets/fcl-CVaBTCzQ.js +1 -1
- package/dist/assets/flowDiagram-4HSFHLVR-DXPSb7WN.js +161 -0
- package/dist/assets/forth-Dri_5nFc.js +1 -1
- package/dist/assets/fortran-DL7KluxX.js +1 -1
- package/dist/assets/ganttDiagram-APWFNJXF-0zaYH1Ss.js +257 -0
- package/dist/assets/gas-5kEe4nk0.js +1 -1
- package/dist/assets/gherkin-B6X1vGSW.js +1 -1
- package/dist/assets/gitGraphDiagram-7IBYFJ6S-aDQBIRnK.js +65 -0
- package/dist/assets/graph-BoYOx8i_.js +1 -0
- package/dist/assets/groovy-DnIzCrpZ.js +1 -1
- package/dist/assets/haskell-CmdsSjFB.js +1 -1
- package/dist/assets/haxe-D25e-2l-.js +1 -1
- package/dist/assets/home-page-jXJkDXJM.js +9 -0
- package/dist/assets/http-BKJkqRj4.js +1 -1
- package/dist/assets/idl-pcmmZuaN.js +1 -1
- package/dist/assets/index-1iB_upgk.js +1 -0
- package/dist/assets/index-4lcwlcnH.js +1 -0
- package/dist/assets/index-BETqzh-g.js +1 -0
- package/dist/assets/index-BRb-eFZS.js +1 -0
- package/dist/assets/index-BT434pQG.js +1 -0
- package/dist/assets/index-B_yV5Zox.js +1 -0
- package/dist/assets/index-CT5nZ7L8.js +1 -0
- package/dist/assets/index-CeOxNcrd.js +7 -0
- package/dist/assets/index-Cl8zJdkv.js +1 -0
- package/dist/assets/index-CoDUayIx.js +1 -0
- package/dist/assets/index-D6gn6L72.js +1 -0
- package/dist/assets/index-DAFSCUuA.js +19 -0
- package/dist/assets/index-DMUPkki0.css +1 -0
- package/dist/assets/index-DSneGJSv.js +1 -0
- package/dist/assets/index-DnCD15mK.js +1 -0
- package/dist/assets/index-IH-fy0cB.js +1 -0
- package/dist/assets/index-WD8L4CW_.js +1 -0
- package/dist/assets/index-qWj4P6x1.js +1 -0
- package/dist/assets/index-q_ih74fb.js +1 -0
- package/dist/assets/index-v4rxTLvD.js +476 -0
- package/dist/assets/infoDiagram-PH2N3AL5-BNgea5Oj.js +2 -0
- package/dist/assets/init-DLRA0X12.js +1 -1
- package/dist/assets/javascript-D48wDJXV.js +1 -1
- package/dist/assets/jinja2-DhgKlfW7.js +1 -1
- package/dist/assets/journeyDiagram-U35MCT3I-CAllxFLp.js +138 -0
- package/dist/assets/julia-DjdwvFuI.js +1 -1
- package/dist/assets/kanban-definition-NDS4AKOZ-CTIlcsDi.js +88 -0
- package/dist/assets/katex-BsnJiHtx.js +261 -0
- package/dist/assets/layout-yl0vuG7-.js +1 -0
- package/dist/assets/linear-D9AXjT5a.js +1 -0
- package/dist/assets/livescript-HO6ttBFx.js +1 -1
- package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
- package/dist/assets/lua-8DXOpKDz.js +1 -1
- package/dist/assets/mathematica-IIbmv7SK.js +1 -1
- package/dist/assets/mbox-z_N2Mo3d.js +1 -0
- package/dist/assets/mermaid-BcNb5_j3.js +152 -0
- package/dist/assets/mhchem-C_nT2J_7.js +1 -0
- package/dist/assets/min-DsoOVNay.js +1 -0
- package/dist/assets/mindmap-definition-ALO5MXBD-DNKPNZeh.js +95 -0
- package/dist/assets/mirc-DkvFAiy5.js +1 -1
- package/dist/assets/mllike-3c2dg9RT.js +1 -1
- package/dist/assets/modelica-DSrSSXCg.js +1 -1
- package/dist/assets/mscgen-B2igx18G.js +1 -1
- package/dist/assets/mumps-zvxmGV4l.js +1 -1
- package/dist/assets/nginx-B4hAVlXN.js +1 -1
- package/dist/assets/ntriples-FFvkTduk.js +1 -1
- package/dist/assets/octave-C4hdQ5Hf.js +1 -1
- package/dist/assets/ordinal-DDUp3AbE.js +1 -1
- package/dist/assets/oz-qQq7irPq.js +1 -1
- package/dist/assets/pascal-CafrKXZF.js +1 -1
- package/dist/assets/perl-tdMlh9QA.js +1 -1
- package/dist/assets/pieDiagram-IB7DONF6-5uih_LJ6.js +30 -0
- package/dist/assets/pig-CwGJVRC4.js +1 -1
- package/dist/assets/powershell-D1ly3AHC.js +1 -1
- package/dist/assets/properties-_nPj978X.js +1 -1
- package/dist/assets/protobuf-B4y9do6W.js +1 -1
- package/dist/assets/pug-_kJOm_E2.js +1 -1
- package/dist/assets/puppet-Bc-yJKzi.js +1 -1
- package/dist/assets/python-DD-Q2bae.js +1 -1
- package/dist/assets/q-B0kTJ4cI.js +1 -1
- package/dist/assets/quadrantDiagram-7GDLP6J5-BCU_o7me.js +7 -0
- package/dist/assets/r-BA4EbLKE.js +1 -1
- package/dist/assets/radar-MK3ICKWK-BXU_E7K_.js +126 -0
- package/dist/assets/range-CtcPcB_L.js +1 -1
- package/dist/assets/react-plotly-DeIwHm30.js +4074 -0
- package/dist/assets/requirementDiagram-KVF5MWMF-CFhB1fDW.js +64 -0
- package/dist/assets/rpm-DI_rRufH.js +1 -1
- package/dist/assets/ruby-CR-u2WLS.js +1 -1
- package/dist/assets/run-page-Dkr9xj3J.js +1 -0
- package/dist/assets/sankeyDiagram-QLVOVGJD-Ciz3L58n.js +10 -0
- package/dist/assets/sas-Bqaci40L.js +1 -1
- package/dist/assets/save-worker-D7xNPs7e.js +1 -0
- package/dist/assets/scheme-qjP0V5Ag.js +1 -1
- package/dist/assets/sequenceDiagram-X6HHIX6F-FoHK-SX0.js +122 -0
- package/dist/assets/shell-BLav31RL.js +1 -1
- package/dist/assets/sieve-r025o_jW.js +1 -1
- package/dist/assets/simple-mode-C3vEBAcb.js +1 -1
- package/dist/assets/slides-component-PduY-a-R.js +1 -0
- package/dist/assets/smalltalk-C7J3IyEP.js +1 -1
- package/dist/assets/solr-78MBEUkU.js +1 -1
- package/dist/assets/sortBy-C7fuIjRp.js +1 -0
- package/dist/assets/sparql-BRLJFz69.js +1 -1
- package/dist/assets/spreadsheet-CGlWr0eM.js +1 -1
- package/dist/assets/sql-B3SPsWL6.js +1 -1
- package/dist/assets/stateDiagram-DGXRK772-DbjU6K1W.js +1 -0
- package/dist/assets/stateDiagram-v2-YXO3MK2T-n5aNLLCf.js +1 -0
- package/dist/assets/step-BwsUM5iJ.js +1 -1
- package/dist/assets/stylus-OdhglgkO.js +1 -1
- package/dist/assets/swift-B_XXVlXX.js +1 -1
- package/dist/assets/tcl-B2fODqDH.js +1 -1
- package/dist/assets/terminal-D9-SvZ7Y.js +9 -0
- package/dist/assets/terminal-WqMRJt5Z.css +1 -0
- package/dist/assets/textile-BuVhTOzU.js +1 -1
- package/dist/assets/tiddlywiki-BgR6AEZu.js +1 -1
- package/dist/assets/tiki-CI-ztowC.js +1 -1
- package/dist/assets/time-H9q7ZR6t.js +1 -0
- package/dist/assets/timeline-definition-BDJGKUSR-CQ0mKj-r.js +61 -0
- package/dist/assets/timer-DFzT7np-.js +1 -1
- package/dist/assets/toml-BQXy8elZ.js +1 -1
- package/dist/assets/tracing-BMtadLGa.js +2 -0
- package/dist/assets/transform-Cyp0GDF-.js +1 -0
- package/dist/assets/tree-6x6wUdKP.js +17 -0
- package/dist/assets/troff-Ce85hlLp.js +1 -1
- package/dist/assets/ttcn-BxnYHtq8.js +1 -1
- package/dist/assets/ttcn-cfg-CKJxb-l2.js +1 -1
- package/dist/assets/turtle-BkSuIpt-.js +1 -1
- package/dist/assets/useMarimoWebSocket-COx5dRPl.js +27 -0
- package/dist/assets/vb-BHgjm0DN.js +1 -1
- package/dist/assets/vbscript-Dawdd5GZ.js +1 -1
- package/dist/assets/vega-component-bun-wMR1.js +1 -0
- package/dist/assets/velocity-BdD_26Jv.js +1 -1
- package/dist/assets/verilog-B4LBqg_1.js +1 -1
- package/dist/assets/vhdl-CWWH2SUo.js +1 -1
- package/dist/assets/web-vitals-Buym0gfC.js +1 -0
- package/dist/assets/webidl-CGwyPRYs.js +1 -1
- package/dist/assets/worker-BWN2kUSa.js +1 -0
- package/dist/assets/worker-D-UG5-wL.js +1 -0
- package/dist/assets/xquery-CVDBqZPY.js +1 -1
- package/dist/assets/xychartDiagram-VJFVF3MP-BoCc2WC7.js +7 -0
- package/dist/assets/yacas-I8QjZlxf.js +1 -1
- package/dist/assets/z80-D8p3gKXp.js +1 -1
- package/dist/assets/zoom-COrs4lFh.js +1 -1
- package/dist/index.html +2 -2
- package/package.json +5 -4
- package/dist/assets/ConnectedDataExplorerComponent-th_i__dG.js +0 -22
- package/dist/assets/VegaLite-0KIipZoB.js +0 -11
- package/dist/assets/_baseEach-DMa5jqoU.js +0 -1
- package/dist/assets/_baseMap-pUcN7Rpu.js +0 -1
- package/dist/assets/_baseUniq-BVoEUTG_.js +0 -1
- package/dist/assets/_createAggregator-Djppx6_O.js +0 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-OoEkDt5O.js +0 -1
- package/dist/assets/blockDiagram-JOT3LUYC-CGnlM4UU.js +0 -1
- package/dist/assets/c4Diagram-VJAJSXHY-DcwqEhJp.js +0 -1
- package/dist/assets/channel-C3LrtOq9.js +0 -1
- package/dist/assets/chunk-4BMEZGHF-DOK1C4SQ.js +0 -1
- package/dist/assets/chunk-A2AXSNBT-tcqF3UW3.js +0 -1
- package/dist/assets/chunk-AEK57VVT-CMGGH9xn.js +0 -1
- package/dist/assets/chunk-D6G4REZN-DXlJF2Bk.js +0 -1
- package/dist/assets/chunk-RZ5BOZE2-COQMYHlq.js +0 -1
- package/dist/assets/chunk-XZIHB7SX-Bhxm0x2M.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-Dx1tK0j4.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-Dx1tK0j4.js +0 -1
- package/dist/assets/clone-C11ag5RZ.js +0 -1
- package/dist/assets/compile-R0u9cqWP.js +0 -1
- package/dist/assets/cytoscape.esm-bH-fs5wT.js +0 -9
- package/dist/assets/dagre-OKDRZEBW-CtqjM5h9.js +0 -1
- package/dist/assets/data-editor-Bfcrqyi2.js +0 -1
- package/dist/assets/diagram-SSKATNLV-DNt52Sk_.js +0 -1
- package/dist/assets/diagram-VNBRO52H-xUNKnAoh.js +0 -1
- package/dist/assets/edit-page-NmKprqkt.js +0 -8
- package/dist/assets/erDiagram-Q7BY3M3F-io1sgtPU.js +0 -1
- package/dist/assets/flowDiagram-4HSFHLVR-CAcDVF45.js +0 -1
- package/dist/assets/ganttDiagram-APWFNJXF-CCNkQyYO.js +0 -1
- package/dist/assets/gitGraphDiagram-7IBYFJ6S-S-DIg2KO.js +0 -1
- package/dist/assets/graph-CPvBoehR.js +0 -1
- package/dist/assets/home-page-DUROE-6l.js +0 -7
- package/dist/assets/index-1hj486rU.js +0 -1
- package/dist/assets/index-33Q7xM_A.css +0 -1
- package/dist/assets/index-9Y5po83T.js +0 -1
- package/dist/assets/index-B1R-kky3.js +0 -1
- package/dist/assets/index-BHjEpXuR.js +0 -1
- package/dist/assets/index-BLyYnOxb.js +0 -1
- package/dist/assets/index-BVOgGu7j.js +0 -1
- package/dist/assets/index-Bi8fVNBD.js +0 -1
- package/dist/assets/index-CBRsR4hm.js +0 -1
- package/dist/assets/index-CBe39OqR.js +0 -1
- package/dist/assets/index-CCmIqGps.js +0 -87
- package/dist/assets/index-Cq97_EnG.js +0 -1
- package/dist/assets/index-Cv0v8nkj.js +0 -1
- package/dist/assets/index-D3r87Dua.js +0 -1
- package/dist/assets/index-DTd9oqZ1.js +0 -1
- package/dist/assets/index-DeDcyKGD.js +0 -1
- package/dist/assets/index-W5H1wa8v.js +0 -1
- package/dist/assets/index-g5NcpOqf.js +0 -1
- package/dist/assets/index-jkcjZbio.js +0 -1
- package/dist/assets/index-pCY6hO1c.js +0 -1
- package/dist/assets/infoDiagram-PH2N3AL5-C_3rp1aS.js +0 -1
- package/dist/assets/journeyDiagram-U35MCT3I-JTAqngR8.js +0 -1
- package/dist/assets/kanban-definition-NDS4AKOZ-CIEmg2CK.js +0 -1
- package/dist/assets/katex-Blph-pX_.js +0 -1
- package/dist/assets/layout-5_9nD7xG.js +0 -1
- package/dist/assets/linear-DtkRsldv.js +0 -1
- package/dist/assets/mbox-DoeuZPxA.js +0 -1
- package/dist/assets/mermaid-Cuo5gmPJ.js +0 -7
- package/dist/assets/mhchem-9pkdwevO.js +0 -1
- package/dist/assets/min-DZ6t4OQo.js +0 -1
- package/dist/assets/mindmap-definition-ALO5MXBD-BIjqJBz_.js +0 -1
- package/dist/assets/pieDiagram-IB7DONF6-Bgy76ci6.js +0 -1
- package/dist/assets/quadrantDiagram-7GDLP6J5-DtmO_lJs.js +0 -1
- package/dist/assets/radar-MK3ICKWK-CQnq_RTY.js +0 -1
- package/dist/assets/react-plotly-ytz-JCC5.js +0 -71
- package/dist/assets/requirementDiagram-KVF5MWMF-CW5hk-fu.js +0 -1
- package/dist/assets/run-page-DhpeWfS6.js +0 -1
- package/dist/assets/sankeyDiagram-QLVOVGJD-DMJOShtL.js +0 -1
- package/dist/assets/save-worker-CQvBUha3.js +0 -1
- package/dist/assets/sequenceDiagram-X6HHIX6F-Cs8tv4LH.js +0 -1
- package/dist/assets/slides-component-Dfd2iboP.js +0 -1
- package/dist/assets/sortBy-BKdwAT3U.js +0 -1
- package/dist/assets/stateDiagram-DGXRK772-CvA7Y-cH.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-BFZJg-21.js +0 -1
- package/dist/assets/terminal-DVzybcfs.css +0 -1
- package/dist/assets/terminal-DX8mzLZW.js +0 -1
- package/dist/assets/time-L5VRVaeJ.js +0 -1
- package/dist/assets/timeline-definition-BDJGKUSR-C2OBlRUS.js +0 -1
- package/dist/assets/tracing-MU76FYLw.js +0 -8
- package/dist/assets/transform-DjHZbYKP.js +0 -1
- package/dist/assets/tree-CfXwrtHg.js +0 -8
- package/dist/assets/useMarimoWebSocket-B5Kqyjii.js +0 -15
- package/dist/assets/vega-component-D7BFIY4g.js +0 -1
- package/dist/assets/web-vitals-rCWRSGQR.js +0 -1
- package/dist/assets/worker-DMKWnagd.js +0 -1
- package/dist/assets/worker-DXe6aoib.js +0 -1
- package/dist/assets/xychartDiagram-VJFVF3MP-CYdhGX5A.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as a,l as e,I as s,d as p,K as n}from"./mermaid-BcNb5_j3.js";import{p as m}from"./radar-MK3ICKWK-BXU_E7K_.js";import"./index-v4rxTLvD.js";import"./transform-Cyp0GDF-.js";import"./timer-DFzT7np-.js";import"./step-BwsUM5iJ.js";import"./_baseEach-DzdwhOu_.js";import"./_baseUniq-D-v_zqTJ.js";import"./min-DsoOVNay.js";import"./_baseMap-C3AAYU2N.js";import"./clone-D4DobUqq.js";import"./_createAggregator-CJY6-b_V.js";var d={parse:a(async r=>{const t=await m("info",r);e.debug(t)},"parse")},g={version:n.version},v={parser:d,db:{getVersion:a(()=>g.version,"getVersion")},renderer:{draw:a((r,t,i)=>{e.debug(`rendering info diagram
|
|
2
|
+
`+r);const o=s(t);p(o,100,400,!0),o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${i}`)},"draw")}};export{v as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function n(t,e){switch(arguments.length){case 0:break;case 1:typeof t=="function"?this.interpolator(t):this.range(t);break;default:this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e)}return this}export{n as a,a as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){var t,r,n=e.statementIndent,a=e.jsonld,i=e.json||a,o=e.typescript,u=e.wordCharacters||/[\w$\xa1-\uffff]/,c=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),s=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function l(e,n,a){return t=e,r=a,n}function d(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,i=!1;if(a&&"@"==e.peek()&&e.match(f))return t.tokenize=d,l("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||i);)i=!i&&"\\"==n;return i||(t.tokenize=d),l("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return l("number","number");if("."==n&&e.match(".."))return l("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return l(n);if("="==n&&e.eat(">"))return l("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return l("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),l("number","number");if("/"==n)return e.eat("*")?(t.tokenize=m,m(e,t)):e.eat("/")?(e.skipToEnd(),l("comment","comment")):function(e,t,r){return t.tokenize==d&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-r))}(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),l("regexp","string.special")):(e.eat("="),l("operator","operator",e.current()));if("`"==n)return t.tokenize=p,p(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),l("meta","meta");if("#"==n&&e.eatWhile(u))return l("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),l("comment","comment");if(s.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?l("."):l("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var i=e.current();if("."!=t.lastType){if(c.propertyIsEnumerable(i)){var o=c[i];return l(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return l("async","keyword",i)}return l("variable","variable",i)}}function m(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=d;break}n="*"==r}return l("comment","comment")}function p(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=d;break}n=!n&&"\\"==r}return l("quasi","string.special",e.current())}function k(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(o){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,c=r-1;c>=0;--c){var s=e.string.charAt(c),f="([{}])".indexOf(s);if(f>=0&&f<3){if(!a){++c;break}if(0==--a){"("==s&&(i=!0);break}}else if(f>=3&&f<6)++a;else if(u.test(s))i=!0;else if(/["'\/`]/.test(s))for(;;--c){if(0==c)return;if(e.string.charAt(c-1)==s&&"\\"!=e.string.charAt(c-2)){c--;break}}else if(i&&!a){++c;break}}i&&!a&&(t.fatArrowAt=c)}}var v={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function y(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function w(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var b={state:null,marked:null,cc:null};function h(){for(var e=arguments.length-1;e>=0;e--)b.cc.push(arguments[e])}function x(){return h.apply(null,arguments),!0}function g(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function V(t){var r=b.state;if(b.marked="def",r.context)if("var"==r.lexical.info&&r.context&&r.context.block){var n=A(t,r.context);if(null!=n)return void(r.context=n)}else if(!g(t,r.localVars))return void(r.localVars=new j(t,r.localVars));e.globalVars&&!g(t,r.globalVars)&&(r.globalVars=new j(t,r.globalVars))}function A(e,t){if(t){if(t.block){var r=A(e,t.prev);return r?r==t.prev?t:new T(r,t.vars,!0):null}return g(e,t.vars)?t:new T(t.prev,new j(e,t.vars),!1)}return null}function z(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function T(e,t,r){this.prev=e,this.vars=t,this.block=r}function j(e,t){this.name=e,this.next=t}var $=new j("this",new j("arguments",null));function O(){b.state.context=new T(b.state.context,b.state.localVars,!1),b.state.localVars=$}function _(){b.state.context=new T(b.state.context,b.state.localVars,!0),b.state.localVars=null}function q(){b.state.localVars=b.state.context.vars,b.state.context=b.state.context.prev}function E(e,t){var r=function(){var r=b.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new y(n,b.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function I(){var e=b.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function S(e){return function t(r){return r==e?x():";"==e||"}"==r||")"==r||"]"==r?h():x(t)}}function N(e,t){return"var"==e?x(E("vardef",t),be,S(";"),I):"keyword a"==e?x(E("form"),B,N,I):"keyword b"==e?x(E("form"),N,I):"keyword d"==e?b.stream.match(/^\s*$/,!1)?x():x(E("stat"),F,S(";"),I):"debugger"==e?x(S(";")):"{"==e?x(E("}"),_,ne,I,q):";"==e?x():"if"==e?("else"==b.state.lexical.info&&b.state.cc[b.state.cc.length-1]==I&&b.state.cc.pop()(),x(E("form"),B,N,I,ze)):"function"==e?x(Oe):"for"==e?x(E("form"),_,Te,N,q,I):"class"==e||o&&"interface"==t?(b.marked="keyword",x(E("form","class"==e?e:t),Se,I)):"variable"==e?o&&"declare"==t?(b.marked="keyword",x(N)):o&&("module"==t||"enum"==t||"type"==t)&&b.stream.match(/^\s*\w/,!1)?(b.marked="keyword","enum"==t?x(Ke):"type"==t?x(qe,S("operator"),ce,S(";")):x(E("form"),he,S("{"),E("}"),ne,I,I)):o&&"namespace"==t?(b.marked="keyword",x(E("form"),C,N,I)):o&&"abstract"==t?(b.marked="keyword",x(N)):x(E("stat"),R):"switch"==e?x(E("form"),B,S("{"),E("}","switch"),_,ne,I,I,q):"case"==e?x(C,S(":")):"default"==e?x(S(":")):"catch"==e?x(E("form"),O,P,N,I,q):"export"==e?x(E("stat"),We,I):"import"==e?x(E("stat"),De,I):"async"==e?x(N):"@"==t?x(C,N):h(E("stat"),C,S(";"),I)}function P(e){if("("==e)return x(Ee,S(")"))}function C(e,t){return D(e,t,!1)}function W(e,t){return D(e,t,!0)}function B(e){return"("!=e?h():x(E(")"),F,S(")"),I)}function D(e,t,r){if(b.state.fatArrowAt==b.stream.start){var n=r?L:K;if("("==e)return x(O,E(")"),te(Ee,")"),I,S("=>"),n,q);if("variable"==e)return h(O,he,S("=>"),n,q)}var a=r?G:U;return v.hasOwnProperty(e)?x(a):"function"==e?x(Oe,a):"class"==e||o&&"interface"==t?(b.marked="keyword",x(E("form"),Ie,I)):"keyword c"==e||"async"==e?x(r?W:C):"("==e?x(E(")"),F,S(")"),I,a):"operator"==e||"spread"==e?x(r?W:C):"["==e?x(E("]"),Je,I,a):"{"==e?re(Y,"}",null,a):"quasi"==e?h(H,a):"new"==e?x(function(e){return function(t){return"."==t?x(e?Q:M):"variable"==t&&o?x(ve,e?G:U):h(e?W:C)}}(r)):x()}function F(e){return e.match(/[;\}\)\],]/)?h():h(C)}function U(e,t){return","==e?x(F):G(e,t,!1)}function G(e,t,r){var n=0==r?U:G,a=0==r?C:W;return"=>"==e?x(O,r?L:K,q):"operator"==e?/\+\+|--/.test(t)||o&&"!"==t?x(n):o&&"<"==t&&b.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?x(E(">"),te(ce,">"),I,n):"?"==t?x(C,S(":"),a):x(a):"quasi"==e?h(H,n):";"!=e?"("==e?re(W,")","call",n):"."==e?x(X,n):"["==e?x(E("]"),F,S("]"),I,n):o&&"as"==t?(b.marked="keyword",x(ce,n)):"regexp"==e?(b.state.lastType=b.marked="operator",b.stream.backUp(b.stream.pos-b.stream.start-1),x(a)):void 0:void 0}function H(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?x(H):x(F,J)}function J(e){if("}"==e)return b.marked="string.special",b.state.tokenize=p,x(H)}function K(e){return k(b.stream,b.state),h("{"==e?N:C)}function L(e){return k(b.stream,b.state),h("{"==e?N:W)}function M(e,t){if("target"==t)return b.marked="keyword",x(U)}function Q(e,t){if("target"==t)return b.marked="keyword",x(G)}function R(e){return":"==e?x(I,N):h(U,S(";"),I)}function X(e){if("variable"==e)return b.marked="property",x()}function Y(e,t){return"async"==e?(b.marked="property",x(Y)):"variable"==e||"keyword"==b.style?(b.marked="property","get"==t||"set"==t?x(Z):(o&&b.state.fatArrowAt==b.stream.start&&(r=b.stream.match(/^\s*:\s*/,!1))&&(b.state.fatArrowAt=b.stream.pos+r[0].length),x(ee))):"number"==e||"string"==e?(b.marked=a?"property":b.style+" property",x(ee)):"jsonld-keyword"==e?x(ee):o&&z(t)?(b.marked="keyword",x(Y)):"["==e?x(C,ae,S("]"),ee):"spread"==e?x(W,ee):"*"==t?(b.marked="keyword",x(Y)):":"==e?h(ee):void 0;var r}function Z(e){return"variable"!=e?h(ee):(b.marked="property",x(Oe))}function ee(e){return":"==e?x(W):"("==e?h(Oe):void 0}function te(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=b.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),x((function(r,n){return r==t||n==t?h():h(e)}),n)}return a==t||i==t?x():r&&r.indexOf(";")>-1?h(e):x(S(t))}return function(r,a){return r==t||a==t?x():h(e,n)}}function re(e,t,r){for(var n=3;n<arguments.length;n++)b.cc.push(arguments[n]);return x(E(t,r),te(e,t),I)}function ne(e){return"}"==e?x():h(N,ne)}function ae(e,t){if(o){if(":"==e)return x(ce);if("?"==t)return x(ae)}}function ie(e,t){if(o&&(":"==e||"in"==t))return x(ce)}function oe(e){if(o&&":"==e)return b.stream.match(/^\s*\w+\s+is\b/,!1)?x(C,ue,ce):x(ce)}function ue(e,t){if("is"==t)return b.marked="keyword",x()}function ce(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(b.marked="keyword",x("typeof"==t?W:ce)):"variable"==e||"void"==t?(b.marked="type",x(ke)):"|"==t||"&"==t?x(ce):"string"==e||"number"==e||"atom"==e?x(ke):"["==e?x(E("]"),te(ce,"]",","),I,ke):"{"==e?x(E("}"),fe,I,ke):"("==e?x(te(pe,")"),se,ke):"<"==e?x(te(ce,">"),ce):"quasi"==e?h(de,ke):void 0}function se(e){if("=>"==e)return x(ce)}function fe(e){return e.match(/[\}\)\]]/)?x():","==e||";"==e?x(fe):h(le,fe)}function le(e,t){return"variable"==e||"keyword"==b.style?(b.marked="property",x(le)):"?"==t||"number"==e||"string"==e?x(le):":"==e?x(ce):"["==e?x(S("variable"),ie,S("]"),le):"("==e?h(_e,le):e.match(/[;\}\)\],]/)?void 0:x()}function de(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?x(de):x(ce,me)}function me(e){if("}"==e)return b.marked="string.special",b.state.tokenize=p,x(de)}function pe(e,t){return"variable"==e&&b.stream.match(/^\s*[?:]/,!1)||"?"==t?x(pe):":"==e?x(ce):"spread"==e?x(pe):h(ce)}function ke(e,t){return"<"==t?x(E(">"),te(ce,">"),I,ke):"|"==t||"."==e||"&"==t?x(ce):"["==e?x(ce,S("]"),ke):"extends"==t||"implements"==t?(b.marked="keyword",x(ce)):"?"==t?x(ce,S(":"),ce):void 0}function ve(e,t){if("<"==t)return x(E(">"),te(ce,">"),I,ke)}function ye(){return h(ce,we)}function we(e,t){if("="==t)return x(ce)}function be(e,t){return"enum"==t?(b.marked="keyword",x(Ke)):h(he,ae,Ve,Ae)}function he(e,t){return o&&z(t)?(b.marked="keyword",x(he)):"variable"==e?(V(t),x()):"spread"==e?x(he):"["==e?re(ge,"]"):"{"==e?re(xe,"}"):void 0}function xe(e,t){return"variable"!=e||b.stream.match(/^\s*:/,!1)?("variable"==e&&(b.marked="property"),"spread"==e?x(he):"}"==e?h():"["==e?x(C,S("]"),S(":"),xe):x(S(":"),he,Ve)):(V(t),x(Ve))}function ge(){return h(he,Ve)}function Ve(e,t){if("="==t)return x(W)}function Ae(e){if(","==e)return x(be)}function ze(e,t){if("keyword b"==e&&"else"==t)return x(E("form","else"),N,I)}function Te(e,t){return"await"==t?x(Te):"("==e?x(E(")"),je,I):void 0}function je(e){return"var"==e?x(be,$e):"variable"==e?x($e):h($e)}function $e(e,t){return")"==e?x():";"==e?x($e):"in"==t||"of"==t?(b.marked="keyword",x(C,$e)):h(C,$e)}function Oe(e,t){return"*"==t?(b.marked="keyword",x(Oe)):"variable"==e?(V(t),x(Oe)):"("==e?x(O,E(")"),te(Ee,")"),I,oe,N,q):o&&"<"==t?x(E(">"),te(ye,">"),I,Oe):void 0}function _e(e,t){return"*"==t?(b.marked="keyword",x(_e)):"variable"==e?(V(t),x(_e)):"("==e?x(O,E(")"),te(Ee,")"),I,oe,q):o&&"<"==t?x(E(">"),te(ye,">"),I,_e):void 0}function qe(e,t){return"keyword"==e||"variable"==e?(b.marked="type",x(qe)):"<"==t?x(E(">"),te(ye,">"),I):void 0}function Ee(e,t){return"@"==t&&x(C,Ee),"spread"==e?x(Ee):o&&z(t)?(b.marked="keyword",x(Ee)):o&&"this"==e?x(ae,Ve):h(he,ae,Ve)}function Ie(e,t){return"variable"==e?Se(e,t):Ne(e,t)}function Se(e,t){if("variable"==e)return V(t),x(Ne)}function Ne(e,t){return"<"==t?x(E(">"),te(ye,">"),I,Ne):"extends"==t||"implements"==t||o&&","==e?("implements"==t&&(b.marked="keyword"),x(o?ce:C,Ne)):"{"==e?x(E("}"),Pe,I):void 0}function Pe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||o&&z(t))&&b.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(b.marked="keyword",x(Pe)):"variable"==e||"keyword"==b.style?(b.marked="property",x(Ce,Pe)):"number"==e||"string"==e?x(Ce,Pe):"["==e?x(C,ae,S("]"),Ce,Pe):"*"==t?(b.marked="keyword",x(Pe)):o&&"("==e?h(_e,Pe):";"==e||","==e?x(Pe):"}"==e?x():"@"==t?x(C,Pe):void 0}function Ce(e,t){if("!"==t||"?"==t)return x(Ce);if(":"==e)return x(ce,Ve);if("="==t)return x(W);var r=b.state.lexical.prev;return h(r&&"interface"==r.info?_e:Oe)}function We(e,t){return"*"==t?(b.marked="keyword",x(He,S(";"))):"default"==t?(b.marked="keyword",x(C,S(";"))):"{"==e?x(te(Be,"}"),He,S(";")):h(N)}function Be(e,t){return"as"==t?(b.marked="keyword",x(S("variable"))):"variable"==e?h(W,Be):void 0}function De(e){return"string"==e?x():"("==e?h(C):"."==e?h(U):h(Fe,Ue,He)}function Fe(e,t){return"{"==e?re(Fe,"}"):("variable"==e&&V(t),"*"==t&&(b.marked="keyword"),x(Ge))}function Ue(e){if(","==e)return x(Fe,Ue)}function Ge(e,t){if("as"==t)return b.marked="keyword",x(Fe)}function He(e,t){if("from"==t)return b.marked="keyword",x(C)}function Je(e){return"]"==e?x():h(te(W,"]"))}function Ke(){return h(E("form"),he,S("{"),E("}"),te(Le,"}"),I,I)}function Le(){return h(he,Ve)}return O.lex=_.lex=!0,q.lex=!0,I.lex=!0,{name:e.name,startState:function(t){var r={tokenize:d,lastType:"sof",cc:[],lexical:new y(-t,0,"block",!1),localVars:e.localVars,context:e.localVars&&new T(null,null,!1),indented:0};return e.globalVars&&"object"==typeof e.globalVars&&(r.globalVars=e.globalVars),r},token:function(e,n){if(e.sol()&&(n.lexical.hasOwnProperty("align")||(n.lexical.align=!1),n.indented=e.indentation(),k(e,n)),n.tokenize!=m&&e.eatSpace())return null;var a=n.tokenize(e,n);return"comment"==t?a:(n.lastType="operator"!=t||"++"!=r&&"--"!=r?t:"incdec",function(e,t,r,n,a){var o=e.cc;for(b.state=e,b.stream=a,b.marked=null,b.cc=o,b.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():i?C:N)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return b.marked?b.marked:"variable"==r&&w(e,n)?"variableName.local":t}}(n,a,t,r,e))},indent:function(t,r,a){if(t.tokenize==m||t.tokenize==p)return null;if(t.tokenize!=d)return 0;var i,o=r&&r.charAt(0),u=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var f=t.cc[c];if(f==I)u=u.prev;else if(f!=ze&&f!=q)break}for(;("stat"==u.type||"form"==u.type)&&("}"==o||(i=t.cc[t.cc.length-1])&&(i==U||i==G)&&!/^[,\.=+\-*:?[\(]/.test(r));)u=u.prev;n&&")"==u.type&&"stat"==u.prev.type&&(u=u.prev);var l=u.type,k=o==l;return"vardef"==l?u.indented+("operator"==t.lastType||","==t.lastType?u.info.length+1:0):"form"==l&&"{"==o?u.indented:"form"==l?u.indented+a.unit:"stat"==l?u.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||s.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?n||a.unit:0):"switch"!=u.info||k||0==e.doubleIndentSwitch?u.align?u.column+(k?0:1):u.indented+(k?0:a.unit):u.indented+(/^(?:case|default)\b/.test(r)?a.unit:2*a.unit)},languageData:{indentOnInput:/^\s*(?:case .*?:|default:|\{|\})$/,commentTokens:i?void 0:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]},wordChars:"$"}}}const t=e({name:"javascript"}),r=e({name:"json",json:!0}),n=e({name:"json",jsonld:!0}),a=e({name:"typescript",typescript:!0});export{t as javascript,r as json,n as jsonld,a as typescript};
|
|
1
|
+
function ir(x){var F,L,kr=x.statementIndent,or=x.jsonld,vr=x.json||or,v=x.typescript,M=x.wordCharacters||/[\w$\xa1-\uffff]/,yr=function(){function r(k){return{type:k,style:"keyword"}}var e=r("keyword a"),a=r("keyword b"),i=r("keyword c"),u=r("keyword d"),o=r("operator"),f={type:"atom",style:"atom"};return{if:r("if"),while:e,with:e,else:a,do:a,try:a,finally:a,return:u,break:u,continue:u,new:r("new"),delete:i,void:i,throw:i,debugger:r("debugger"),var:r("var"),const:r("var"),let:r("var"),function:r("function"),catch:r("catch"),for:r("for"),switch:r("switch"),case:r("case"),default:r("default"),in:o,typeof:o,instanceof:o,true:f,false:f,null:f,undefined:f,NaN:f,Infinity:f,this:r("this"),class:r("class"),super:r("atom"),yield:i,export:r("export"),import:r("import"),extends:i,await:i}}(),wr=/[+\-*&%=<>!?|~^@]/,Nr=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function w(r,e,a){return F=r,L=a,e}function _(r,e){var a,i=r.next();if(i=='"'||i=="'")return e.tokenize=(a=i,function(f,k){var m,V=!1;if(or&&f.peek()=="@"&&f.match(Nr))return k.tokenize=_,w("jsonld-keyword","meta");for(;(m=f.next())!=null&&(m!=a||V);)V=!V&&m=="\\";return V||(k.tokenize=_),w("string","string")}),e.tokenize(r,e);if(i=="."&&r.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return w("number","number");if(i=="."&&r.match(".."))return w("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(i))return w(i);if(i=="="&&r.eat(">"))return w("=>","operator");if(i=="0"&&r.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return w("number","number");if(/\d/.test(i))return r.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),w("number","number");if(i=="/")return r.eat("*")?(e.tokenize=Q,Q(r,e)):r.eat("/")?(r.skipToEnd(),w("comment","comment")):function(f,k,m){return k.tokenize==_&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(k.lastType)||k.lastType=="quasi"&&/\{\s*$/.test(f.string.slice(0,f.pos-m))}(r,e,1)?(function(f){for(var k,m=!1,V=!1;(k=f.next())!=null;){if(!m){if(k=="/"&&!V)return;k=="["?V=!0:V&&k=="]"&&(V=!1)}m=!m&&k=="\\"}}(r),r.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),w("regexp","string.special")):(r.eat("="),w("operator","operator",r.current()));if(i=="`")return e.tokenize=U,U(r,e);if(i=="#"&&r.peek()=="!")return r.skipToEnd(),w("meta","meta");if(i=="#"&&r.eatWhile(M))return w("variable","property");if(i=="<"&&r.match("!--")||i=="-"&&r.match("->")&&!/\S/.test(r.string.slice(0,r.start)))return r.skipToEnd(),w("comment","comment");if(wr.test(i))return i==">"&&e.lexical&&e.lexical.type==">"||(r.eat("=")?i!="!"&&i!="="||r.eat("="):/[<>*+\-|&?]/.test(i)&&(r.eat(i),i==">"&&r.eat(i))),i=="?"&&r.eat(".")?w("."):w("operator","operator",r.current());if(M.test(i)){r.eatWhile(M);var u=r.current();if(e.lastType!="."){if(yr.propertyIsEnumerable(u)){var o=yr[u];return w(o.type,o.style,u)}if(u=="async"&&r.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return w("async","keyword",u)}return w("variable","variable",u)}}function Q(r,e){for(var a,i=!1;a=r.next();){if(a=="/"&&i){e.tokenize=_;break}i=a=="*"}return w("comment","comment")}function U(r,e){for(var a,i=!1;(a=r.next())!=null;){if(!i&&(a=="`"||a=="$"&&r.eat("{"))){e.tokenize=_;break}i=!i&&a=="\\"}return w("quasi","string.special",r.current())}function ur(r,e){e.fatArrowAt&&(e.fatArrowAt=null);var a=r.string.indexOf("=>",r.start);if(!(a<0)){if(v){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(r.string.slice(r.start,a));i&&(a=i.index)}for(var u=0,o=!1,f=a-1;f>=0;--f){var k=r.string.charAt(f),m="([{}])".indexOf(k);if(m>=0&&m<3){if(!u){++f;break}if(--u==0){k=="("&&(o=!0);break}}else if(m>=3&&m<6)++u;else if(M.test(k))o=!0;else if(/["'\/`]/.test(k))for(;;--f){if(f==0)return;if(r.string.charAt(f-1)==k&&r.string.charAt(f-2)!="\\"){f--;break}}else if(o&&!u){++f;break}}o&&!u&&(e.fatArrowAt=f)}}var Pr={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function br(r,e,a,i,u,o){this.indented=r,this.column=e,this.type=a,this.prev=u,this.info=o,i!=null&&(this.align=i)}function Cr(r,e){for(var a=r.localVars;a;a=a.next)if(a.name==e)return!0;for(var i=r.context;i;i=i.prev)for(a=i.vars;a;a=a.next)if(a.name==e)return!0}var n={state:null,marked:null,cc:null};function c(){for(var r=arguments.length-1;r>=0;r--)n.cc.push(arguments[r])}function t(){return c.apply(null,arguments),!0}function sr(r,e){for(var a=e;a;a=a.next)if(a.name==r)return!0;return!1}function N(r){var e=n.state;if(n.marked="def",e.context){if(e.lexical.info=="var"&&e.context&&e.context.block){var a=hr(r,e.context);if(a!=null)return void(e.context=a)}else if(!sr(r,e.localVars))return void(e.localVars=new H(r,e.localVars))}x.globalVars&&!sr(r,e.globalVars)&&(e.globalVars=new H(r,e.globalVars))}function hr(r,e){if(e){if(e.block){var a=hr(r,e.prev);return a?a==e.prev?e:new G(a,e.vars,!0):null}return sr(r,e.vars)?e:new G(e.prev,new H(r,e.vars),!1)}return null}function R(r){return r=="public"||r=="private"||r=="protected"||r=="abstract"||r=="readonly"}function G(r,e,a){this.prev=r,this.vars=e,this.block=a}function H(r,e){this.name=r,this.next=e}var Wr=new H("this",new H("arguments",null));function q(){n.state.context=new G(n.state.context,n.state.localVars,!1),n.state.localVars=Wr}function X(){n.state.context=new G(n.state.context,n.state.localVars,!0),n.state.localVars=null}function A(){n.state.localVars=n.state.context.vars,n.state.context=n.state.context.prev}function l(r,e){var a=function(){var i=n.state,u=i.indented;if(i.lexical.type=="stat")u=i.lexical.indented;else for(var o=i.lexical;o&&o.type==")"&&o.align;o=o.prev)u=o.indented;i.lexical=new br(u,n.stream.column(),r,null,i.lexical,e)};return a.lex=!0,a}function s(){var r=n.state;r.lexical.prev&&(r.lexical.type==")"&&(r.indented=r.lexical.indented),r.lexical=r.lexical.prev)}function d(r){return function e(a){return a==r?t():r==";"||a=="}"||a==")"||a=="]"?c():t(e)}}function b(r,e){return r=="var"?t(l("vardef",e),mr,d(";"),s):r=="keyword a"?t(l("form"),cr,b,s):r=="keyword b"?t(l("form"),b,s):r=="keyword d"?n.stream.match(/^\s*$/,!1)?t():t(l("stat"),P,d(";"),s):r=="debugger"?t(d(";")):r=="{"?t(l("}"),X,rr,s,A):r==";"?t():r=="if"?(n.state.lexical.info=="else"&&n.state.cc[n.state.cc.length-1]==s&&n.state.cc.pop()(),t(l("form"),cr,b,s,jr)):r=="function"?t(O):r=="for"?t(l("form"),X,Tr,b,A,s):r=="class"||v&&e=="interface"?(n.marked="keyword",t(l("form",r=="class"?r:e),Or,s)):r=="variable"?v&&e=="declare"?(n.marked="keyword",t(b)):v&&(e=="module"||e=="enum"||e=="type")&&n.stream.match(/^\s*\w/,!1)?(n.marked="keyword",e=="enum"?t(Er):e=="type"?t($r,d("operator"),p,d(";")):t(l("form"),z,d("{"),l("}"),rr,s,s)):v&&e=="namespace"?(n.marked="keyword",t(l("form"),y,b,s)):v&&e=="abstract"?(n.marked="keyword",t(b)):t(l("stat"),Gr):r=="switch"?t(l("form"),cr,d("{"),l("}","switch"),X,rr,s,s,A):r=="case"?t(y,d(":")):r=="default"?t(d(":")):r=="catch"?t(l("form"),q,Br,b,s,A):r=="export"?t(l("stat"),te,s):r=="import"?t(l("stat"),ne,s):r=="async"?t(b):e=="@"?t(y,b):c(l("stat"),y,d(";"),s)}function Br(r){if(r=="(")return t(S,d(")"))}function y(r,e){return xr(r,e,!1)}function g(r,e){return xr(r,e,!0)}function cr(r){return r!="("?c():t(l(")"),P,d(")"),s)}function xr(r,e,a){if(n.state.fatArrowAt==n.stream.start){var i=a?Vr:gr;if(r=="(")return t(q,l(")"),h(S,")"),s,d("=>"),i,A);if(r=="variable")return c(q,z,d("=>"),i,A)}var u=a?C:E;return Pr.hasOwnProperty(r)?t(u):r=="function"?t(O,u):r=="class"||v&&e=="interface"?(n.marked="keyword",t(l("form"),ee,s)):r=="keyword c"||r=="async"?t(a?g:y):r=="("?t(l(")"),P,d(")"),s,u):r=="operator"||r=="spread"?t(a?g:y):r=="["?t(l("]"),ie,s,u):r=="{"?J(Z,"}",null,u):r=="quasi"?c(Y,u):r=="new"?t(function(o){return function(f){return f=="."?t(o?Ur:Fr):f=="variable"&&v?t(Rr,o?C:E):c(o?g:y)}}(a)):t()}function P(r){return r.match(/[;\}\)\],]/)?c():c(y)}function E(r,e){return r==","?t(P):C(r,e,!1)}function C(r,e,a){var i=a==0?E:C,u=a==0?y:g;return r=="=>"?t(q,a?Vr:gr,A):r=="operator"?/\+\+|--/.test(e)||v&&e=="!"?t(i):v&&e=="<"&&n.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?t(l(">"),h(p,">"),s,i):e=="?"?t(y,d(":"),u):t(u):r=="quasi"?c(Y,i):r!=";"?r=="("?J(g,")","call",i):r=="."?t(Hr,i):r=="["?t(l("]"),P,d("]"),s,i):v&&e=="as"?(n.marked="keyword",t(p,i)):r=="regexp"?(n.state.lastType=n.marked="operator",n.stream.backUp(n.stream.pos-n.stream.start-1),t(u)):void 0:void 0}function Y(r,e){return r!="quasi"?c():e.slice(e.length-2)!="${"?t(Y):t(P,Dr)}function Dr(r){if(r=="}")return n.marked="string.special",n.state.tokenize=U,t(Y)}function gr(r){return ur(n.stream,n.state),c(r=="{"?b:y)}function Vr(r){return ur(n.stream,n.state),c(r=="{"?b:g)}function Fr(r,e){if(e=="target")return n.marked="keyword",t(E)}function Ur(r,e){if(e=="target")return n.marked="keyword",t(C)}function Gr(r){return r==":"?t(s,b):c(E,d(";"),s)}function Hr(r){if(r=="variable")return n.marked="property",t()}function Z(r,e){return r=="async"?(n.marked="property",t(Z)):r=="variable"||n.style=="keyword"?(n.marked="property",e=="get"||e=="set"?t(Jr):(v&&n.state.fatArrowAt==n.stream.start&&(a=n.stream.match(/^\s*:\s*/,!1))&&(n.state.fatArrowAt=n.stream.pos+a[0].length),t(I))):r=="number"||r=="string"?(n.marked=or?"property":n.style+" property",t(I)):r=="jsonld-keyword"?t(I):v&&R(e)?(n.marked="keyword",t(Z)):r=="["?t(y,W,d("]"),I):r=="spread"?t(g,I):e=="*"?(n.marked="keyword",t(Z)):r==":"?c(I):void 0;var a}function Jr(r){return r!="variable"?c(I):(n.marked="property",t(O))}function I(r){return r==":"?t(g):r=="("?c(O):void 0}function h(r,e,a){function i(u,o){if(a?a.indexOf(u)>-1:u==","){var f=n.state.lexical;return f.info=="call"&&(f.pos=(f.pos||0)+1),t(function(k,m){return k==e||m==e?c():c(r)},i)}return u==e||o==e?t():a&&a.indexOf(";")>-1?c(r):t(d(e))}return function(u,o){return u==e||o==e?t():c(r,i)}}function J(r,e,a){for(var i=3;i<arguments.length;i++)n.cc.push(arguments[i]);return t(l(e,a),h(r,e),s)}function rr(r){return r=="}"?t():c(b,rr)}function W(r,e){if(v){if(r==":")return t(p);if(e=="?")return t(W)}}function Kr(r,e){if(v&&(r==":"||e=="in"))return t(p)}function Ar(r){if(v&&r==":")return n.stream.match(/^\s*\w+\s+is\b/,!1)?t(y,Lr,p):t(p)}function Lr(r,e){if(e=="is")return n.marked="keyword",t()}function p(r,e){return e=="keyof"||e=="typeof"||e=="infer"||e=="readonly"?(n.marked="keyword",t(e=="typeof"?g:p)):r=="variable"||e=="void"?(n.marked="type",t(j)):e=="|"||e=="&"?t(p):r=="string"||r=="number"||r=="atom"?t(j):r=="["?t(l("]"),h(p,"]",","),s,j):r=="{"?t(l("}"),lr,s,j):r=="("?t(h(dr,")"),Mr,j):r=="<"?t(h(p,">"),p):r=="quasi"?c(fr,j):void 0}function Mr(r){if(r=="=>")return t(p)}function lr(r){return r.match(/[\}\)\]]/)?t():r==","||r==";"?t(lr):c(K,lr)}function K(r,e){return r=="variable"||n.style=="keyword"?(n.marked="property",t(K)):e=="?"||r=="number"||r=="string"?t(K):r==":"?t(p):r=="["?t(d("variable"),Kr,d("]"),K):r=="("?c(D,K):r.match(/[;\}\)\],]/)?void 0:t()}function fr(r,e){return r!="quasi"?c():e.slice(e.length-2)!="${"?t(fr):t(p,Qr)}function Qr(r){if(r=="}")return n.marked="string.special",n.state.tokenize=U,t(fr)}function dr(r,e){return r=="variable"&&n.stream.match(/^\s*[?:]/,!1)||e=="?"?t(dr):r==":"?t(p):r=="spread"?t(dr):c(p)}function j(r,e){return e=="<"?t(l(">"),h(p,">"),s,j):e=="|"||r=="."||e=="&"?t(p):r=="["?t(p,d("]"),j):e=="extends"||e=="implements"?(n.marked="keyword",t(p)):e=="?"?t(p,d(":"),p):void 0}function Rr(r,e){if(e=="<")return t(l(">"),h(p,">"),s,j)}function er(){return c(p,Xr)}function Xr(r,e){if(e=="=")return t(p)}function mr(r,e){return e=="enum"?(n.marked="keyword",t(Er)):c(z,W,$,Zr)}function z(r,e){return v&&R(e)?(n.marked="keyword",t(z)):r=="variable"?(N(e),t()):r=="spread"?t(z):r=="["?J(Yr,"]"):r=="{"?J(zr,"}"):void 0}function zr(r,e){return r!="variable"||n.stream.match(/^\s*:/,!1)?(r=="variable"&&(n.marked="property"),r=="spread"?t(z):r=="}"?c():r=="["?t(y,d("]"),d(":"),zr):t(d(":"),z,$)):(N(e),t($))}function Yr(){return c(z,$)}function $(r,e){if(e=="=")return t(g)}function Zr(r){if(r==",")return t(mr)}function jr(r,e){if(r=="keyword b"&&e=="else")return t(l("form","else"),b,s)}function Tr(r,e){return e=="await"?t(Tr):r=="("?t(l(")"),re,s):void 0}function re(r){return r=="var"?t(mr,B):r=="variable"?t(B):c(B)}function B(r,e){return r==")"?t():r==";"?t(B):e=="in"||e=="of"?(n.marked="keyword",t(y,B)):c(y,B)}function O(r,e){return e=="*"?(n.marked="keyword",t(O)):r=="variable"?(N(e),t(O)):r=="("?t(q,l(")"),h(S,")"),s,Ar,b,A):v&&e=="<"?t(l(">"),h(er,">"),s,O):void 0}function D(r,e){return e=="*"?(n.marked="keyword",t(D)):r=="variable"?(N(e),t(D)):r=="("?t(q,l(")"),h(S,")"),s,Ar,A):v&&e=="<"?t(l(">"),h(er,">"),s,D):void 0}function $r(r,e){return r=="keyword"||r=="variable"?(n.marked="type",t($r)):e=="<"?t(l(">"),h(er,">"),s):void 0}function S(r,e){return e=="@"&&t(y,S),r=="spread"?t(S):v&&R(e)?(n.marked="keyword",t(S)):v&&r=="this"?t(W,$):c(z,W,$)}function ee(r,e){return r=="variable"?Or(r,e):tr(r,e)}function Or(r,e){if(r=="variable")return N(e),t(tr)}function tr(r,e){return e=="<"?t(l(">"),h(er,">"),s,tr):e=="extends"||e=="implements"||v&&r==","?(e=="implements"&&(n.marked="keyword"),t(v?p:y,tr)):r=="{"?t(l("}"),T,s):void 0}function T(r,e){return r=="async"||r=="variable"&&(e=="static"||e=="get"||e=="set"||v&&R(e))&&n.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(n.marked="keyword",t(T)):r=="variable"||n.style=="keyword"?(n.marked="property",t(nr,T)):r=="number"||r=="string"?t(nr,T):r=="["?t(y,W,d("]"),nr,T):e=="*"?(n.marked="keyword",t(T)):v&&r=="("?c(D,T):r==";"||r==","?t(T):r=="}"?t():e=="@"?t(y,T):void 0}function nr(r,e){if(e=="!"||e=="?")return t(nr);if(r==":")return t(p,$);if(e=="=")return t(g);var a=n.state.lexical.prev;return c(a&&a.info=="interface"?D:O)}function te(r,e){return e=="*"?(n.marked="keyword",t(pr,d(";"))):e=="default"?(n.marked="keyword",t(y,d(";"))):r=="{"?t(h(_r,"}"),pr,d(";")):c(b)}function _r(r,e){return e=="as"?(n.marked="keyword",t(d("variable"))):r=="variable"?c(g,_r):void 0}function ne(r){return r=="string"?t():r=="("?c(y):r=="."?c(E):c(ar,qr,pr)}function ar(r,e){return r=="{"?J(ar,"}"):(r=="variable"&&N(e),e=="*"&&(n.marked="keyword"),t(ae))}function qr(r){if(r==",")return t(ar,qr)}function ae(r,e){if(e=="as")return n.marked="keyword",t(ar)}function pr(r,e){if(e=="from")return n.marked="keyword",t(y)}function ie(r){return r=="]"?t():c(h(g,"]"))}function Er(){return c(l("form"),z,d("{"),l("}"),h(oe,"}"),s,s)}function oe(){return c(z,$)}return q.lex=X.lex=!0,A.lex=!0,s.lex=!0,{name:x.name,startState:function(r){var e={tokenize:_,lastType:"sof",cc:[],lexical:new br(-r,0,"block",!1),localVars:x.localVars,context:x.localVars&&new G(null,null,!1),indented:0};return x.globalVars&&typeof x.globalVars=="object"&&(e.globalVars=x.globalVars),e},token:function(r,e){if(r.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=r.indentation(),ur(r,e)),e.tokenize!=Q&&r.eatSpace())return null;var a=e.tokenize(r,e);return F=="comment"?a:(e.lastType=F!="operator"||L!="++"&&L!="--"?F:"incdec",function(i,u,o,f,k){var m=i.cc;for(n.state=i,n.stream=k,n.marked=null,n.cc=m,n.style=u,i.lexical.hasOwnProperty("align")||(i.lexical.align=!0);;)if((m.length?m.pop():vr?y:b)(o,f)){for(;m.length&&m[m.length-1].lex;)m.pop()();return n.marked?n.marked:o=="variable"&&Cr(i,f)?"variableName.local":u}}(e,a,F,L,r))},indent:function(r,e,a){if(r.tokenize==Q||r.tokenize==U)return null;if(r.tokenize!=_)return 0;var i,u=e&&e.charAt(0),o=r.lexical;if(!/^\s*else\b/.test(e))for(var f=r.cc.length-1;f>=0;--f){var k=r.cc[f];if(k==s)o=o.prev;else if(k!=jr&&k!=A)break}for(;(o.type=="stat"||o.type=="form")&&(u=="}"||(i=r.cc[r.cc.length-1])&&(i==E||i==C)&&!/^[,\.=+\-*:?[\(]/.test(e));)o=o.prev;kr&&o.type==")"&&o.prev.type=="stat"&&(o=o.prev);var m=o.type,V=u==m;return m=="vardef"?o.indented+(r.lastType=="operator"||r.lastType==","?o.info.length+1:0):m=="form"&&u=="{"?o.indented:m=="form"?o.indented+a.unit:m=="stat"?o.indented+(function(Ir,Sr){return Ir.lastType=="operator"||Ir.lastType==","||wr.test(Sr.charAt(0))||/[,.]/.test(Sr.charAt(0))}(r,e)?kr||a.unit:0):o.info!="switch"||V||x.doubleIndentSwitch==0?o.align?o.column+(V?0:1):o.indented+(V?0:a.unit):o.indented+(/^(?:case|default)\b/.test(e)?a.unit:2*a.unit)},languageData:{indentOnInput:/^\s*(?:case .*?:|default:|\{|\})$/,commentTokens:vr?void 0:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]},wordChars:"$"}}}const ue=ir({name:"javascript"}),se=ir({name:"json",json:!0}),ce=ir({name:"json",jsonld:!0}),le=ir({name:"typescript",typescript:!0});export{ue as javascript,se as json,ce as jsonld,le as typescript};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var i=["and","as","block","endblock","by","cycle","debug","else","elif","extends","filter","endfilter","firstof","do","for","endfor","if","endif","ifchanged","endifchanged","ifequal","endifequal","ifnotequal","set","raw","endraw","endifnotequal","in","include","load","not","now","or","parsed","regroup","reversed","spaceless","call","endcall","macro","endmacro","endspaceless","ssi","templatetag","openblock","closeblock","openvariable","closevariable","without","context","openbrace","closebrace","opencomment","closecomment","widthratio","url","with","endwith","get_current_language","trans","endtrans","noop","blocktrans","endblocktrans","get_available_languages","get_current_language_bidi","pluralize","autoescape","endautoescape"],r=/^[+\-*&%=<>!?|~^]/,s=/^[:\[\(\{]/,a=["true","false"],c=/^(\d[+\-\*\/])?\d+(\.\d+)?/;function l(e,n){var t=e.peek();if(n.incomment)return e.skipTo("#}")?(e.eatWhile(/\#|}/),n.incomment=!1):e.skipToEnd(),"comment";if(n.intag){if(n.operator){if(n.operator=!1,e.match(a))return"atom";if(e.match(c))return"number"}if(n.sign){if(n.sign=!1,e.match(a))return"atom";if(e.match(c))return"number"}if(n.instring)return t==n.instring&&(n.instring=!1),e.next(),"string";if(t=="'"||t=='"')return n.instring=t,e.next(),"string";if(n.inbraces>0&&t==")")e.next(),n.inbraces--;else if(t=="(")e.next(),n.inbraces++;else if(n.inbrackets>0&&t=="]")e.next(),n.inbrackets--;else if(t=="[")e.next(),n.inbrackets++;else{if(!n.lineTag&&(e.match(n.intag+"}")||e.eat("-")&&e.match(n.intag+"}")))return n.intag=!1,"tag";if(e.match(r))return n.operator=!0,"operator";if(e.match(s))n.sign=!0;else{if(e.column()==1&&n.lineTag&&e.match(i))return"keyword";if(e.eat(" ")||e.sol()){if(e.match(i))return"keyword";if(e.match(a))return"atom";if(e.match(c))return"number";e.sol()&&e.next()}else e.next()}}return"variable"}if(e.eat("{")){if(e.eat("#"))return n.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),n.incomment=!1):e.skipToEnd(),"comment";if(t=e.eat(/\{|%/))return n.intag=t,n.inbraces=0,n.inbrackets=0,t=="{"&&(n.intag="}"),e.eat("-"),"tag"}else if(e.eat("#")){if(e.peek()=="#")return e.skipToEnd(),"comment";if(!e.eol())return n.intag=!0,n.lineTag=!0,n.inbraces=0,n.inbrackets=0,"tag"}e.next()}i=new RegExp("(("+i.join(")|(")+"))\\b"),a=new RegExp("(("+a.join(")|(")+"))\\b");const o={name:"jinja2",startState:function(){return{tokenize:l,inbrackets:0,inbraces:0}},token:function(e,n){var t=n.tokenize(e,n);return e.eol()&&n.lineTag&&!n.instring&&n.inbraces==0&&n.inbrackets==0&&(n.intag=!1,n.lineTag=!1),t},languageData:{commentTokens:{block:{open:"{#",close:"#}",line:"##"}}}};export{o as jinja2};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import{a as ut,g as J,f as pt,d as yt}from"./chunk-D6G4REZN-xvBcwtYi.js";import{_ as s,g as dt,s as ft,a as gt,b as mt,q as xt,p as kt,c as A,d as _t,y as bt}from"./mermaid-BcNb5_j3.js";import{s as K}from"./transform-Cyp0GDF-.js";import{d as Q}from"./arc-Cuwikxov.js";import"./index-v4rxTLvD.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";var z=function(){var t=s(function(n,p,a,u){for(a=a||{},u=n.length;u--;a[n[u]]=p);return a},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],l=[1,10],i=[1,11],o=[1,12],h=[1,13],d=[1,14],y={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(n,p,a,u,f,c,v){var x=c.length-1;switch(f){case 1:return c[x-1];case 2:case 6:case 7:this.$=[];break;case 3:c[x-1].push(c[x]),this.$=c[x-1];break;case 4:case 5:this.$=c[x];break;case 8:u.setDiagramTitle(c[x].substr(6)),this.$=c[x].substr(6);break;case 9:this.$=c[x].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=c[x].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(c[x].substr(8)),this.$=c[x].substr(8);break;case 13:u.addTask(c[x-1],c[x]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:l,14:i,16:o,17:h,18:d},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:l,14:i,16:o,17:h,18:d},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(n,p){if(!p.recoverable){var a=new Error(n);throw a.hash=p,a}this.trace(n)},"parseError"),parse:s(function(n){var p=this,a=[0],u=[],f=[null],c=[],v=this.table,x="",L=0,X=0,lt=c.slice.call(arguments,1),k=Object.create(this.lexer),M={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(M.yy[N]=this.yy[N]);k.setInput(n,M.yy),M.yy.lexer=k,M.yy.parser=this,k.yylloc===void 0&&(k.yylloc={});var R=k.yylloc;c.push(R);var ht=k.options&&k.options.ranges;function G(){var w;return typeof(w=u.pop()||k.lex()||1)!="number"&&(w instanceof Array&&(w=(u=w).pop()),w=p.symbols_[w]||w),w}typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s(function(w){a.length=a.length-2*w,f.length=f.length-w,c.length=c.length-w},"popStack"),s(G,"lex");for(var _,E,b,U,O,T,H,B,P={};;){if(E=a[a.length-1],this.defaultActions[E]?b=this.defaultActions[E]:(_==null&&(_=G()),b=v[E]&&v[E][_]),b===void 0||!b.length||!b[0]){var Z="";for(O in B=[],v[E])this.terminals_[O]&&O>2&&B.push("'"+this.terminals_[O]+"'");Z=k.showPosition?"Parse error on line "+(L+1)+`:
|
|
2
|
+
`+k.showPosition()+`
|
|
3
|
+
Expecting `+B.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(L+1)+": Unexpected "+(_==1?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Z,{text:k.match,token:this.terminals_[_]||_,line:k.yylineno,loc:R,expected:B})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(b[0]){case 1:a.push(_),f.push(k.yytext),c.push(k.yylloc),a.push(b[1]),_=null,X=k.yyleng,x=k.yytext,L=k.yylineno,R=k.yylloc;break;case 2:if(T=this.productions_[b[1]][1],P.$=f[f.length-T],P._$={first_line:c[c.length-(T||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(T||1)].first_column,last_column:c[c.length-1].last_column},ht&&(P._$.range=[c[c.length-(T||1)].range[0],c[c.length-1].range[1]]),(U=this.performAction.apply(P,[x,X,L,M.yy,b[1],f,c].concat(lt)))!==void 0)return U;T&&(a=a.slice(0,-1*T*2),f=f.slice(0,-1*T),c=c.slice(0,-1*T)),a.push(this.productions_[b[1]][0]),f.push(P.$),c.push(P._$),H=v[a[a.length-2]][a[a.length-1]],a.push(H);break;case 3:return!0}}return!0},"parse")},m=function(){return{EOF:1,parseError:s(function(n,p){if(!this.yy.parser)throw new Error(n);this.yy.parser.parseError(n,p)},"parseError"),setInput:s(function(n,p){return this.yy=p||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var n=this._input[0];return this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n,n.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:s(function(n){var p=n.length,a=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===u.length?this.yylloc.first_column:0)+u[u.length-a.length].length-a[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:s(function(n){this.unput(this.match.slice(n))},"less"),pastInput:s(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var n=this.pastInput(),p=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
5
|
+
`+p+"^"},"showPosition"),test_match:s(function(n,p){var a,u,f;if(this.options.backtrack_lexer&&(f={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(f.yylloc.range=this.yylloc.range.slice(0))),(u=n[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],a=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var c in f)this[c]=f[c];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;var n,p,a,u;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),c=0;c<f.length;c++)if((a=this._input.match(this.rules[f[c]]))&&(!p||a[0].length>p[0].length)){if(p=a,u=c,this.options.backtrack_lexer){if((n=this.test_match(a,f[c]))!==!1)return n;if(this._backtrack){p=!1;continue}return!1}if(!this.options.flex)break}return p?(n=this.test_match(p,f[u]))!==!1&&n:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var n=this.next();return n||this.lex()},"lex"),begin:s(function(n){this.conditionStack.push(n)},"begin"),popState:s(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:s(function(n){this.begin(n)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(n,p,a,u){switch(a){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function g(){this.yy={}}return y.lexer=m,s(g,"Parser"),g.prototype=y,y.Parser=g,new g}();z.parser=z;var wt=z,C="",Y=[],j=[],V=[],$t=s(function(){Y.length=0,j.length=0,C="",V.length=0,bt()},"clear"),vt=s(function(t){C=t,Y.push(t)},"addSection"),Tt=s(function(){return Y},"getSections"),St=s(function(){let t=tt(),e=0;for(;!t&&e<100;)t=tt(),e++;return j.push(...V),j},"getTasks"),Mt=s(function(){const t=[];return j.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),Et=s(function(t,e){const r=e.substr(1).split(":");let l=0,i=[];r.length===1?(l=Number(r[0]),i=[]):(l=Number(r[0]),i=r[1].split(","));const o=i.map(d=>d.trim()),h={section:C,type:C,people:o,task:t,score:l};V.push(h)},"addTask"),At=s(function(t){const e={section:C,type:C,description:t,task:t,classes:[]};j.push(e)},"addTaskOrg"),tt=s(function(){const t=s(function(r){return V[r].processed},"compileTask");let e=!0;for(const[r,l]of V.entries())t(r),e=e&&l.processed;return e},"compileTasks"),It=s(function(){return Mt()},"getActors"),et={getConfig:s(()=>A().journey,"getConfig"),clear:$t,setDiagramTitle:kt,getDiagramTitle:xt,setAccTitle:mt,getAccTitle:gt,setAccDescription:ft,getAccDescription:dt,addSection:vt,getSections:Tt,getTasks:St,addTask:Et,addTaskOrg:At,getActors:It},Pt=s(t=>`.label {
|
|
7
|
+
font-family: ${t.fontFamily};
|
|
8
|
+
color: ${t.textColor};
|
|
9
|
+
}
|
|
10
|
+
.mouth {
|
|
11
|
+
stroke: #666;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
line {
|
|
15
|
+
stroke: ${t.textColor}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.legend {
|
|
19
|
+
fill: ${t.textColor};
|
|
20
|
+
font-family: ${t.fontFamily};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.label text {
|
|
24
|
+
fill: #333;
|
|
25
|
+
}
|
|
26
|
+
.label {
|
|
27
|
+
color: ${t.textColor}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.face {
|
|
31
|
+
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
|
|
32
|
+
stroke: #999;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.node rect,
|
|
36
|
+
.node circle,
|
|
37
|
+
.node ellipse,
|
|
38
|
+
.node polygon,
|
|
39
|
+
.node path {
|
|
40
|
+
fill: ${t.mainBkg};
|
|
41
|
+
stroke: ${t.nodeBorder};
|
|
42
|
+
stroke-width: 1px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.node .label {
|
|
46
|
+
text-align: center;
|
|
47
|
+
}
|
|
48
|
+
.node.clickable {
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.arrowheadPath {
|
|
53
|
+
fill: ${t.arrowheadColor};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.edgePath .path {
|
|
57
|
+
stroke: ${t.lineColor};
|
|
58
|
+
stroke-width: 1.5px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.flowchart-link {
|
|
62
|
+
stroke: ${t.lineColor};
|
|
63
|
+
fill: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.edgeLabel {
|
|
67
|
+
background-color: ${t.edgeLabelBackground};
|
|
68
|
+
rect {
|
|
69
|
+
opacity: 0.5;
|
|
70
|
+
}
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.cluster rect {
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.cluster text {
|
|
78
|
+
fill: ${t.titleColor};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
div.mermaidTooltip {
|
|
82
|
+
position: absolute;
|
|
83
|
+
text-align: center;
|
|
84
|
+
max-width: 200px;
|
|
85
|
+
padding: 2px;
|
|
86
|
+
font-family: ${t.fontFamily};
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
background: ${t.tertiaryColor};
|
|
89
|
+
border: 1px solid ${t.border2};
|
|
90
|
+
border-radius: 2px;
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
z-index: 100;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.task-type-0, .section-type-0 {
|
|
96
|
+
${t.fillType0?`fill: ${t.fillType0}`:""};
|
|
97
|
+
}
|
|
98
|
+
.task-type-1, .section-type-1 {
|
|
99
|
+
${t.fillType0?`fill: ${t.fillType1}`:""};
|
|
100
|
+
}
|
|
101
|
+
.task-type-2, .section-type-2 {
|
|
102
|
+
${t.fillType0?`fill: ${t.fillType2}`:""};
|
|
103
|
+
}
|
|
104
|
+
.task-type-3, .section-type-3 {
|
|
105
|
+
${t.fillType0?`fill: ${t.fillType3}`:""};
|
|
106
|
+
}
|
|
107
|
+
.task-type-4, .section-type-4 {
|
|
108
|
+
${t.fillType0?`fill: ${t.fillType4}`:""};
|
|
109
|
+
}
|
|
110
|
+
.task-type-5, .section-type-5 {
|
|
111
|
+
${t.fillType0?`fill: ${t.fillType5}`:""};
|
|
112
|
+
}
|
|
113
|
+
.task-type-6, .section-type-6 {
|
|
114
|
+
${t.fillType0?`fill: ${t.fillType6}`:""};
|
|
115
|
+
}
|
|
116
|
+
.task-type-7, .section-type-7 {
|
|
117
|
+
${t.fillType0?`fill: ${t.fillType7}`:""};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.actor-0 {
|
|
121
|
+
${t.actor0?`fill: ${t.actor0}`:""};
|
|
122
|
+
}
|
|
123
|
+
.actor-1 {
|
|
124
|
+
${t.actor1?`fill: ${t.actor1}`:""};
|
|
125
|
+
}
|
|
126
|
+
.actor-2 {
|
|
127
|
+
${t.actor2?`fill: ${t.actor2}`:""};
|
|
128
|
+
}
|
|
129
|
+
.actor-3 {
|
|
130
|
+
${t.actor3?`fill: ${t.actor3}`:""};
|
|
131
|
+
}
|
|
132
|
+
.actor-4 {
|
|
133
|
+
${t.actor4?`fill: ${t.actor4}`:""};
|
|
134
|
+
}
|
|
135
|
+
.actor-5 {
|
|
136
|
+
${t.actor5?`fill: ${t.actor5}`:""};
|
|
137
|
+
}
|
|
138
|
+
`,"getStyles"),q=s(function(t,e){return yt(t,e)},"drawRect"),Ct=s(function(t,e){const l=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function o(y){const m=Q().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function h(y){const m=Q().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function d(y){y.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s(o,"smile"),s(h,"sad"),s(d,"ambivalent"),e.score>3?o(i):e.score<3?h(i):d(i),l},"drawFace"),nt=s(function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),it=s(function(t,e){return pt(t,e)},"drawText"),jt=s(function(t,e){function r(i,o,h,d,y){return i+","+o+" "+(i+h)+","+o+" "+(i+h)+","+(o+d-y)+" "+(i+h-1.2*y)+","+(o+d)+" "+i+","+(o+d)}s(r,"genPoints");const l=t.append("polygon");l.attr("points",r(e.x,e.y,50,20,7)),l.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,it(t,e)},"drawLabel"),Vt=s(function(t,e,r){const l=t.append("g"),i=J();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,q(l,i),at(r)(e.text,l,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),st=-1,Ft=s(function(t,e,r){const l=e.x+r.width/2,i=t.append("g");st++,i.append("line").attr("id","task"+st).attr("x1",l).attr("y1",e.y).attr("x2",l).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Ct(i,{cx:l,cy:300+30*(5-e.score),score:e.score});const o=J();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,q(i,o);let h=e.x+14;e.people.forEach(d=>{const y=e.actors[d].color,m={cx:h,cy:e.y,r:7,fill:y,stroke:"#000",title:d,pos:e.actors[d].position};nt(i,m),h+=10}),at(r)(e.task,i,o.x,o.y,o.width,o.height,{class:"task"},r,e.colour)},"drawTask"),Lt=s(function(t,e){ut(t,e)},"drawBackgroundRect"),at=function(){function t(i,o,h,d,y,m,g,n){l(o.append("text").attr("x",h+y/2).attr("y",d+m/2+5).style("font-color",n).style("text-anchor","middle").text(i),g)}function e(i,o,h,d,y,m,g,n,p){const{taskFontSize:a,taskFontFamily:u}=n,f=i.split(/<br\s*\/?>/gi);for(let c=0;c<f.length;c++){const v=c*a-a*(f.length-1)/2,x=o.append("text").attr("x",h+y/2).attr("y",d).attr("fill",p).style("text-anchor","middle").style("font-size",a).style("font-family",u);x.append("tspan").attr("x",h+y/2).attr("dy",v).text(f[c]),x.attr("y",d+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(x,g)}}function r(i,o,h,d,y,m,g,n){const p=o.append("switch"),a=p.append("foreignObject").attr("x",h).attr("y",d).attr("width",y).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");a.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,h,d,y,m,g,n),l(a,g)}function l(i,o){for(const h in o)h in o&&i.attr(h,o[h])}return s(t,"byText"),s(e,"byTspan"),s(r,"byFo"),s(l,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),F={drawRect:q,drawCircle:nt,drawSection:Vt,drawText:it,drawLabel:jt,drawTask:Ft,drawBackgroundRect:Lt,initGraphics:s(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics")},Ot=s(function(t){Object.keys(t).forEach(function(e){D[e]=t[e]})},"setConf"),S={};function rt(t){const e=A().journey;let r=60;Object.keys(S).forEach(l=>{const i=S[l].color,o={cx:20,cy:r,r:7,fill:i,stroke:"#000",pos:S[l].position};F.drawCircle(t,o);const h={x:40,y:r+7,fill:"#666",text:l,textMargin:5|e.boxTextMargin};F.drawText(t,h),r+=20})}s(rt,"drawActorLegend");var D=A().journey,I=D.leftMargin,Bt=s(function(t,e,r,l){const i=A().journey,o=A().securityLevel;let h;o==="sandbox"&&(h=K("#i"+e));const d=K(o==="sandbox"?h.nodes()[0].contentDocument.body:"body");$.init();const y=d.select("#"+e);F.initGraphics(y);const m=l.db.getTasks(),g=l.db.getDiagramTitle(),n=l.db.getActors();for(const v in S)delete S[v];let p=0;n.forEach(v=>{S[v]={color:i.actorColours[p%i.actorColours.length],position:p},p++}),rt(y),$.insert(0,0,I,50*Object.keys(S).length),Dt(y,m,0);const a=$.getBounds();g&&y.append("text").text(g).attr("x",I).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const u=a.stopy-a.starty+2*i.diagramMarginY,f=I+a.stopx+2*i.diagramMarginX;_t(y,u,f,i.useMaxWidth),y.append("line").attr("x1",I).attr("y1",4*i.height).attr("x2",f-I-4).attr("y2",4*i.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const c=g?70:0;y.attr("viewBox",`${a.startx} -25 ${f} ${u+c}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",u+c+25)},"draw"),$={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,r,l){t[e]===void 0?t[e]=r:t[e]=l(r,t[e])},"updateVal"),updateBounds:s(function(t,e,r,l){const i=A().journey,o=this;let h=0;function d(y){return s(function(m){h++;const g=o.sequenceItems.length-h+1;o.updateVal(m,"starty",e-g*i.boxMargin,Math.min),o.updateVal(m,"stopy",l+g*i.boxMargin,Math.max),o.updateVal($.data,"startx",t-g*i.boxMargin,Math.min),o.updateVal($.data,"stopx",r+g*i.boxMargin,Math.max),y!=="activation"&&(o.updateVal(m,"startx",t-g*i.boxMargin,Math.min),o.updateVal(m,"stopx",r+g*i.boxMargin,Math.max),o.updateVal($.data,"starty",e-g*i.boxMargin,Math.min),o.updateVal($.data,"stopy",l+g*i.boxMargin,Math.max))},"updateItemBounds")}s(d,"updateFn"),this.sequenceItems.forEach(d())},"updateBounds"),insert:s(function(t,e,r,l){const i=Math.min(t,r),o=Math.max(t,r),h=Math.min(e,l),d=Math.max(e,l);this.updateVal($.data,"startx",i,Math.min),this.updateVal($.data,"starty",h,Math.min),this.updateVal($.data,"stopx",o,Math.max),this.updateVal($.data,"stopy",d,Math.max),this.updateBounds(i,h,o,d)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},W=D.sectionFills,ot=D.sectionColours,Dt=s(function(t,e,r){const l=A().journey;let i="";const o=r+(2*l.height+l.diagramMarginY);let h=0,d="#CCC",y="black",m=0;for(const[g,n]of e.entries()){if(i!==n.section){d=W[h%W.length],m=h%W.length,y=ot[h%ot.length];let a=0;const u=n.section;for(let c=g;c<e.length&&e[c].section==u;c++)a+=1;const f={x:g*l.taskMargin+g*l.width+I,y:50,text:n.section,fill:d,num:m,colour:y,taskCount:a};F.drawSection(t,f,l),i=n.section,h++}const p=n.people.reduce((a,u)=>(S[u]&&(a[u]=S[u]),a),{});n.x=g*l.taskMargin+g*l.width+I,n.y=o,n.width=l.diagramMarginX,n.height=l.diagramMarginY,n.colour=y,n.fill=d,n.num=m,n.actors=p,F.drawTask(t,n,l),$.insert(n.x,n.y,n.x+n.width+l.taskMargin,450)}},"drawTasks"),ct={setConf:Ot,draw:Bt},Nt={parser:wt,db:et,renderer:ct,styles:Pt,init:s(t=>{ct.setConf(t.journey),et.clear()},"init")};export{Nt as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function i(n,e,t){return t===void 0&&(t=""),e===void 0&&(e="\\b"),new RegExp("^"+t+"(("+n.join(")|(")+"))"+e)}var m=["[<>]:","[<>=]=","<<=?",">>>?=?","=>","--?>","<--[->]?","\\/\\/","\\.{2,3}","[\\.\\\\%*+\\-<>!\\/^|&]=?","\\?","\\$","~",":"],g=i(["[<>]:","[<>=]=","[!=]==","<<=?",">>>?=?","=>?","--?>","<--[->]?","\\/\\/","[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),v=/^[;,()[\]{}]/,x=/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,A=i(["\\\\[0-7]{1,3}","\\\\x[A-Fa-f0-9]{1,2}",`\\\\[abefnrtv0%?'"\\\\]`,"([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])"],"'"),f=["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","where","macro","module","baremodule","struct","type","mutable","immutable","quote","typealias","abstract","primitive","bitstype"],p=["true","false","nothing","NaN","Inf"],z=i(["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"]),E=i(["end","else","elseif","catch","finally"]),_=i(f),D=i(p),T=/^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,y=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,w=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/,C=i(m,"","@"),P=i(m,"",":");function h(n){return n.nestedArrays>0}function d(n,e){return e===void 0&&(e=0),n.scopes.length<=e?null:n.scopes[n.scopes.length-(e+1)]}function o(n,e){if(n.match("#=",!1))return e.tokenize=$,e.tokenize(n,e);var t=e.leavingExpr;if(n.sol()&&(t=!1),e.leavingExpr=!1,t&&n.match(/^'+/))return"operator";if(n.match(/\.{4,}/))return"error";if(n.match(/\.{1,3}/))return"operator";if(n.eatSpace())return null;var r,a=n.peek();if(a==="#")return n.skipToEnd(),"comment";if(a==="["&&(e.scopes.push("["),e.nestedArrays++),a==="("&&(e.scopes.push("("),e.nestedGenerators++),h(e)&&a==="]"){for(;e.scopes.length&&d(e)!=="[";)e.scopes.pop();e.scopes.pop(),e.nestedArrays--,e.leavingExpr=!0}if(function(u){return u.nestedGenerators>0}(e)&&a===")"){for(;e.scopes.length&&d(e)!=="(";)e.scopes.pop();e.scopes.pop(),e.nestedGenerators--,e.leavingExpr=!0}if(h(e)){if(e.lastToken=="end"&&n.match(":"))return"operator";if(n.match("end"))return"number"}if((r=n.match(z,!1))&&e.scopes.push(r[0]),n.match(E,!1)&&e.scopes.pop(),n.match(/^::(?![:\$])/))return e.tokenize=B,e.tokenize(n,e);if(!t&&(n.match(y)||n.match(P)))return"builtin";if(n.match(g))return"operator";if(n.match(/^\.?\d/,!1)){var F=RegExp(/^im\b/),s=!1;if(n.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(s=!0),n.match(/^0x[0-9a-f_]+/i)&&(s=!0),n.match(/^0b[01_]+/i)&&(s=!0),n.match(/^0o[0-7_]+/i)&&(s=!0),n.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(s=!0),n.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(s=!0),s)return n.match(F),e.leavingExpr=!0,"number"}if(n.match("'"))return e.tokenize=G,e.tokenize(n,e);if(n.match(w))return e.tokenize=function(u){u.substr(-3)==='"""'?u='"""':u.substr(-1)==='"'&&(u='"');function b(c,l){if(c.eat("\\"))c.next();else{if(c.match(u))return l.tokenize=o,l.leavingExpr=!0,"string";c.eat(/[`"]/)}return c.eatWhile(/[^\\`"]/),"string"}return b}(n.current()),e.tokenize(n,e);if(n.match(T)||n.match(C))return"meta";if(n.match(v))return null;if(n.match(_))return"keyword";if(n.match(D))return"builtin";var k=e.isDefinition||e.lastToken=="function"||e.lastToken=="macro"||e.lastToken=="type"||e.lastToken=="struct"||e.lastToken=="immutable";return n.match(x)?k?n.peek()==="."?(e.isDefinition=!0,"variable"):(e.isDefinition=!1,"def"):(e.leavingExpr=!0,"variable"):(n.next(),"error")}function B(n,e){return n.match(/.*?(?=[,;{}()=\s]|$)/),n.match("{")?e.nestedParameters++:n.match("}")&&e.nestedParameters>0&&e.nestedParameters--,e.nestedParameters>0?n.match(/.*?(?={|})/)||n.next():e.nestedParameters==0&&(e.tokenize=o),"builtin"}function $(n,e){return n.match("#=")&&e.nestedComments++,n.match(/.*?(?=(#=|=#))/)||n.skipToEnd(),n.match("=#")&&(e.nestedComments--,e.nestedComments==0&&(e.tokenize=o)),"comment"}function G(n,e){var t,r=!1;if(n.match(A))r=!0;else if(t=n.match(/\\u([a-f0-9]{1,4})(?=')/i))((a=parseInt(t[1],16))<=55295||a>=57344)&&(r=!0,n.next());else if(t=n.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var a;(a=parseInt(t[1],16))<=1114111&&(r=!0,n.next())}return r?(e.leavingExpr=!0,e.tokenize=o,"string"):(n.match(/^[^']+(?=')/)||n.skipToEnd(),n.match("'")&&(e.tokenize=o),"error")}const I={name:"julia",startState:function(){return{tokenize:o,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,firstParenPos:-1}},token:function(n,e){var t=e.tokenize(n,e),r=n.current();return r&&t&&(e.lastToken=r),t},indent:function(n,e,t){var r=0;return(e==="]"||e===")"||/^end\b/.test(e)||/^else/.test(e)||/^catch\b/.test(e)||/^elseif\b/.test(e)||/^finally/.test(e))&&(r=-1),(n.scopes.length+r)*t.unit},languageData:{indentOnInput:/^\s*(end|else|catch|finally)\b$/,commentTokens:{line:"#",block:{open:"#=",close:"=#"}},closeBrackets:{brackets:["(","[","{",'"']},autocomplete:f.concat(p)}};export{I as julia};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import{_ as a,l as V,c as W,I as gt,Y as ut,$ as dt,a0 as pt,S as yt,G as K,h as B,t as ft,J as mt,T as bt,V as rt,W as at}from"./mermaid-BcNb5_j3.js";import"./index-v4rxTLvD.js";import"./transform-Cyp0GDF-.js";import"./timer-DFzT7np-.js";import"./step-BwsUM5iJ.js";var q=function(){var t=a(function(e,l,r,o){for(r=r||{},o=e.length;o--;r[e[o]]=l);return r},"o"),d=[1,4],u=[1,13],s=[1,12],f=[1,15],p=[1,16],g=[1,20],y=[1,19],D=[6,7,8],v=[1,26],N=[1,24],A=[1,25],i=[6,7,11],G=[1,31],L=[6,7,11,24],F=[1,6,13,16,17,20,23],U=[1,35],M=[1,36],w=[1,6,7,11,13,16,17,20,23],E=[1,38],I={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:a(function(e,l,r,o,h,n,j){var c=n.length-1;switch(h){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",n[c-1].id),o.addNode(n[c-2].length,n[c-1].id,n[c-1].descr,n[c-1].type,n[c]);break;case 16:o.getLogger().info("Node: ",n[c].id),o.addNode(n[c-1].length,n[c].id,n[c].descr,n[c].type);break;case 17:o.getLogger().trace("Icon: ",n[c]),o.decorateNode({icon:n[c]});break;case 18:case 23:o.decorateNode({class:n[c]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",n[c-1].id),o.addNode(0,n[c-1].id,n[c-1].descr,n[c-1].type,n[c]);break;case 21:o.getLogger().trace("Node: ",n[c].id),o.addNode(0,n[c].id,n[c].descr,n[c].type);break;case 22:o.decorateNode({icon:n[c]});break;case 27:o.getLogger().trace("node found ..",n[c-2]),this.$={id:n[c-1],descr:n[c-1],type:o.getType(n[c-2],n[c])};break;case 28:this.$={id:n[c],descr:n[c],type:0};break;case 29:o.getLogger().trace("node found ..",n[c-3]),this.$={id:n[c-3],descr:n[c-1],type:o.getType(n[c-2],n[c])};break;case 30:this.$=n[c-1]+n[c];break;case 31:this.$=n[c]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:u,7:[1,10],9:9,12:11,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},t(D,[2,3]),{1:[2,2]},t(D,[2,4]),t(D,[2,5]),{1:[2,6],6:u,12:21,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},{6:u,9:22,12:11,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},{6:v,7:N,10:23,11:A},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:g,23:y}),t(i,[2,19]),t(i,[2,21],{15:30,24:G}),t(i,[2,22]),t(i,[2,23]),t(L,[2,25]),t(L,[2,26]),t(L,[2,28],{20:[1,32]}),{21:[1,33]},{6:v,7:N,10:34,11:A},{1:[2,7],6:u,12:21,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},t(F,[2,14],{7:U,11:M}),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(i,[2,16],{15:37,24:G}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:E}),t(L,[2,31]),{21:[1,39]},{22:[1,40]},t(F,[2,13],{7:U,11:M}),t(w,[2,11]),t(w,[2,12]),t(i,[2,15],{24:E}),t(L,[2,30]),{22:[1,41]},t(L,[2,27]),t(L,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(e,l){if(!l.recoverable){var r=new Error(e);throw r.hash=l,r}this.trace(e)},"parseError"),parse:a(function(e){var l=this,r=[0],o=[],h=[null],n=[],j=this.table,c="",H=0,et=0,lt=n.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(T.yy[Y]=this.yy[Y]);b.setInput(e,T.yy),T.yy.lexer=b,T.yy.parser=this,b.yylloc===void 0&&(b.yylloc={});var J=b.yylloc;n.push(J);var ht=b.options&&b.options.ranges;function nt(){var S;return typeof(S=o.pop()||b.lex()||1)!="number"&&(S instanceof Array&&(S=(o=S).pop()),S=l.symbols_[S]||S),S}typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(S){r.length=r.length-2*S,h.length=h.length-S,n.length=n.length-S},"popStack"),a(nt,"lex");for(var _,R,k,it,z,C,st,X,P={};;){if(R=r[r.length-1],this.defaultActions[R]?k=this.defaultActions[R]:(_==null&&(_=nt()),k=j[R]&&j[R][_]),k===void 0||!k.length||!k[0]){var ot="";for(z in X=[],j[R])this.terminals_[z]&&z>2&&X.push("'"+this.terminals_[z]+"'");ot=b.showPosition?"Parse error on line "+(H+1)+`:
|
|
2
|
+
`+b.showPosition()+`
|
|
3
|
+
Expecting `+X.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(H+1)+": Unexpected "+(_==1?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(ot,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:J,expected:X})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+_);switch(k[0]){case 1:r.push(_),h.push(b.yytext),n.push(b.yylloc),r.push(k[1]),_=null,et=b.yyleng,c=b.yytext,H=b.yylineno,J=b.yylloc;break;case 2:if(C=this.productions_[k[1]][1],P.$=h[h.length-C],P._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},ht&&(P._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),(it=this.performAction.apply(P,[c,et,H,T.yy,k[1],h,n].concat(lt)))!==void 0)return it;C&&(r=r.slice(0,-1*C*2),h=h.slice(0,-1*C),n=n.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),h.push(P.$),n.push(P._$),st=j[r[r.length-2]][r[r.length-1]],r.push(st);break;case 3:return!0}}return!0},"parse")},O=function(){return{EOF:1,parseError:a(function(e,l){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,l)},"parseError"),setInput:a(function(e,l){return this.yy=l||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:a(function(e){var l=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===o.length?this.yylloc.first_column:0)+o[o.length-r.length].length-r[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:a(function(e){this.unput(this.match.slice(e))},"less"),pastInput:a(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var e=this.pastInput(),l=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
|
5
|
+
`+l+"^"},"showPosition"),test_match:a(function(e,l){var r,o,h;if(this.options.backtrack_lexer&&(h={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(h.yylloc.range=this.yylloc.range.slice(0))),(o=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in h)this[n]=h[n];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;var e,l,r,o;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),n=0;n<h.length;n++)if((r=this._input.match(this.rules[h[n]]))&&(!l||r[0].length>l[0].length)){if(l=r,o=n,this.options.backtrack_lexer){if((e=this.test_match(r,h[n]))!==!1)return e;if(this._backtrack){l=!1;continue}return!1}if(!this.options.flex)break}return l?(e=this.test_match(l,h[o]))!==!1&&e:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var e=this.next();return e||this.lex()},"lex"),begin:a(function(e){this.conditionStack.push(e)},"begin"),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:a(function(e){this.begin(e)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(e,l,r,o){switch(r){case 0:return this.pushState("shapeData"),l.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const h=/\n\s*/g;return l.yytext=l.yytext.replace(h,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return e.getLogger().trace("Found comment",l.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",l.yytext),"NODE_DESCR";case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",l.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return e.getLogger().trace("Long description:",l.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function $(){this.yy={}}return I.lexer=O,a($,"Parser"),$.prototype=I,I.Parser=$,new $}();q.parser=q;var Et=q,x=[],Q=[],Z=0,tt={},_t=a(()=>{x=[],Q=[],Z=0,tt={}},"clear"),kt=a(t=>{if(x.length===0)return null;const d=x[0].level;let u=null;for(let s=x.length-1;s>=0;s--)if(x[s].level!==d||u||(u=x[s]),x[s].level<d)throw new Error('Items without section detected, found section ("'+x[s].label+'")');return t===(u==null?void 0:u.level)?null:u},"getSection"),ct=a(function(){return Q},"getSections"),St=a(function(){const t=[],d=ct(),u=W();for(const s of d){const f={id:s.id,label:B(s.label??"",u),isGroup:!0,ticket:s.ticket,shape:"kanbanSection",level:s.level,look:u.look};t.push(f);const p=x.filter(g=>g.parentId===s.id);for(const g of p){const y={id:g.id,parentId:s.id,label:B(g.label??"",u),isGroup:!1,ticket:g==null?void 0:g.ticket,priority:g==null?void 0:g.priority,assigned:g==null?void 0:g.assigned,icon:g==null?void 0:g.icon,shape:"kanbanItem",level:g.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(y)}}return{nodes:t,edges:[],other:{},config:W()}},"getData"),xt=a((t,d,u,s,f)=>{var v,N;const p=W();let g=((v=p.mindmap)==null?void 0:v.padding)??K.mindmap.padding;switch(s){case m.ROUNDED_RECT:case m.RECT:case m.HEXAGON:g*=2}const y={id:B(d,p)||"kbn"+Z++,level:t,label:B(u,p),width:((N=p.mindmap)==null?void 0:N.maxNodeWidth)??K.mindmap.maxNodeWidth,padding:g,isGroup:!1};if(f!==void 0){let A;A=f.includes(`
|
|
7
|
+
`)?f+`
|
|
8
|
+
`:`{
|
|
9
|
+
`+f+`
|
|
10
|
+
}`;const i=ft(A,{schema:mt});if(i.shape&&(i.shape!==i.shape.toLowerCase()||i.shape.includes("_")))throw new Error(`No such shape: ${i.shape}. Shape names should be lowercase.`);i!=null&&i.shape&&i.shape==="kanbanItem"&&(y.shape=i==null?void 0:i.shape),i!=null&&i.label&&(y.label=i==null?void 0:i.label),i!=null&&i.icon&&(y.icon=i==null?void 0:i.icon.toString()),i!=null&&i.assigned&&(y.assigned=i==null?void 0:i.assigned.toString()),i!=null&&i.ticket&&(y.ticket=i==null?void 0:i.ticket.toString()),i!=null&&i.priority&&(y.priority=i==null?void 0:i.priority)}const D=kt(t);D?y.parentId=D.id||"kbn"+Z++:Q.push(y),x.push(y)},"addNode"),m={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Nt={clear:_t,addNode:xt,getSections:ct,getData:St,nodeType:m,getType:a((t,d)=>{switch(V.debug("In get type",t,d),t){case"[":return m.RECT;case"(":return d===")"?m.ROUNDED_RECT:m.CLOUD;case"((":return m.CIRCLE;case")":return m.CLOUD;case"))":return m.BANG;case"{{":return m.HEXAGON;default:return m.DEFAULT}},"getType"),setElementForId:a((t,d)=>{tt[t]=d},"setElementForId"),decorateNode:a(t=>{if(!t)return;const d=W(),u=x[x.length-1];t.icon&&(u.icon=B(t.icon,d)),t.class&&(u.cssClasses=B(t.class,d))},"decorateNode"),type2Str:a(t=>{switch(t){case m.DEFAULT:return"no-border";case m.RECT:return"rect";case m.ROUNDED_RECT:return"rounded-rect";case m.CIRCLE:return"circle";case m.CLOUD:return"cloud";case m.BANG:return"bang";case m.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:a(()=>V,"getLogger"),getElementById:a(t=>tt[t],"getElementById")},Lt={draw:a(async(t,d,u,s)=>{var L,F,U,M,w;V.debug(`Rendering kanban diagram
|
|
11
|
+
`+t);const f=s.db.getData(),p=W();p.htmlLabels=!1;const g=gt(d),y=g.append("g");y.attr("class","sections");const D=g.append("g");D.attr("class","items");const v=f.nodes.filter(E=>E.isGroup);let N=0;const A=[];let i=25;for(const E of v){const I=((L=p==null?void 0:p.kanban)==null?void 0:L.sectionWidth)||200;N+=1,E.x=I*N+10*(N-1)/2,E.width=I,E.y=0,E.height=3*I,E.rx=5,E.ry=5,E.cssClasses=E.cssClasses+" section-"+N;const O=await ut(y,E);i=Math.max(i,(F=O==null?void 0:O.labelBBox)==null?void 0:F.height),A.push(O)}let G=0;for(const E of v){const I=A[G];G+=1;const O=((U=p==null?void 0:p.kanban)==null?void 0:U.sectionWidth)||200,$=3*-O/2+i;let e=$;const l=f.nodes.filter(h=>h.parentId===E.id);for(const h of l){if(h.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");h.x=E.x,h.width=O-15;const n=(await dt(D,h,{config:p})).node().getBBox();h.y=e+n.height/2,await pt(h),e=h.y+n.height/2+5}const r=I.cluster.select("rect"),o=Math.max(e-$+30,50)+(i-25);r.attr("height",o)}yt(void 0,g,((M=p.mindmap)==null?void 0:M.padding)??K.kanban.padding,((w=p.mindmap)==null?void 0:w.useMaxWidth)??K.kanban.useMaxWidth)},"draw")},Dt=a(t=>{let d="";for(let s=0;s<t.THEME_COLOR_LIMIT;s++)t["lineColor"+s]=t["lineColor"+s]||t["cScaleInv"+s],bt(t["lineColor"+s])?t["lineColor"+s]=rt(t["lineColor"+s],20):t["lineColor"+s]=at(t["lineColor"+s],20);const u=a((s,f)=>t.darkMode?at(s,f):rt(s,f),"adjuster");for(let s=0;s<t.THEME_COLOR_LIMIT;s++){const f=""+(17-3*s);d+=`
|
|
12
|
+
.section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
|
|
13
|
+
fill: ${u(t["cScale"+s],10)};
|
|
14
|
+
stroke: ${u(t["cScale"+s],10)};
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
.section-${s-1} text {
|
|
18
|
+
fill: ${t["cScaleLabel"+s]};
|
|
19
|
+
}
|
|
20
|
+
.node-icon-${s-1} {
|
|
21
|
+
font-size: 40px;
|
|
22
|
+
color: ${t["cScaleLabel"+s]};
|
|
23
|
+
}
|
|
24
|
+
.section-edge-${s-1}{
|
|
25
|
+
stroke: ${t["cScale"+s]};
|
|
26
|
+
}
|
|
27
|
+
.edge-depth-${s-1}{
|
|
28
|
+
stroke-width: ${f};
|
|
29
|
+
}
|
|
30
|
+
.section-${s-1} line {
|
|
31
|
+
stroke: ${t["cScaleInv"+s]} ;
|
|
32
|
+
stroke-width: 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.disabled, .disabled circle, .disabled text {
|
|
36
|
+
fill: lightgray;
|
|
37
|
+
}
|
|
38
|
+
.disabled text {
|
|
39
|
+
fill: #efefef;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.node rect,
|
|
43
|
+
.node circle,
|
|
44
|
+
.node ellipse,
|
|
45
|
+
.node polygon,
|
|
46
|
+
.node path {
|
|
47
|
+
fill: ${t.background};
|
|
48
|
+
stroke: ${t.nodeBorder};
|
|
49
|
+
stroke-width: 1px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.kanban-ticket-link {
|
|
53
|
+
fill: ${t.background};
|
|
54
|
+
stroke: ${t.nodeBorder};
|
|
55
|
+
text-decoration: underline;
|
|
56
|
+
}
|
|
57
|
+
`}return d},"genSections"),It={db:Nt,renderer:Lt,parser:Et,styles:a(t=>`
|
|
58
|
+
.edge {
|
|
59
|
+
stroke-width: 3;
|
|
60
|
+
}
|
|
61
|
+
${Dt(t)}
|
|
62
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
63
|
+
fill: ${t.git0};
|
|
64
|
+
}
|
|
65
|
+
.section-root text {
|
|
66
|
+
fill: ${t.gitBranchLabel0};
|
|
67
|
+
}
|
|
68
|
+
.icon-container {
|
|
69
|
+
height:100%;
|
|
70
|
+
display: flex;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
align-items: center;
|
|
73
|
+
}
|
|
74
|
+
.edge {
|
|
75
|
+
fill: none;
|
|
76
|
+
}
|
|
77
|
+
.cluster-label, .label {
|
|
78
|
+
color: ${t.textColor};
|
|
79
|
+
fill: ${t.textColor};
|
|
80
|
+
}
|
|
81
|
+
.kanban-label {
|
|
82
|
+
dy: 1em;
|
|
83
|
+
alignment-baseline: middle;
|
|
84
|
+
text-anchor: middle;
|
|
85
|
+
dominant-baseline: middle;
|
|
86
|
+
text-align: center;
|
|
87
|
+
}
|
|
88
|
+
`,"getStyles")};export{It as diagram};
|