notebook 7.4.0a0__py3-none-any.whl → 7.4.0a1__py3-none-any.whl
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.
Potentially problematic release.
This version of notebook might be problematic. Click here for more details.
- notebook/__main__.py +1 -0
- notebook/_version.py +2 -1
- notebook/app.py +1 -0
- notebook/static/{131.55bd57735ee0c4d14637.js → 131.ae628045345ebd7a085c.js} +2 -2
- notebook/static/{131.55bd57735ee0c4d14637.js.map → 131.ae628045345ebd7a085c.js.map} +1 -1
- notebook/static/{1326.9297038a97bfe38e02c5.js → 1326.b2bcd2a6b79aff2cfe24.js} +2 -2
- notebook/static/{1326.9297038a97bfe38e02c5.js.map → 1326.b2bcd2a6b79aff2cfe24.js.map} +1 -1
- notebook/static/{1650.df34987fc8eaf3b37523.js → 1650.3402646efba92ae6a53b.js} +4 -4
- notebook/static/{1650.df34987fc8eaf3b37523.js.map → 1650.3402646efba92ae6a53b.js.map} +1 -1
- notebook/static/{1684.4dfc6f1843a8ab766dbd.js → 1684.23040b2ad13602718f7a.js} +5 -5
- notebook/static/{1684.4dfc6f1843a8ab766dbd.js.map → 1684.23040b2ad13602718f7a.js.map} +1 -1
- notebook/static/{1871.c3f107a3e71d9ea2d7ad.js → 1871.29951b77779d94d726d1.js} +2 -2
- notebook/static/{1871.c3f107a3e71d9ea2d7ad.js.map → 1871.29951b77779d94d726d1.js.map} +1 -1
- notebook/static/{1961.b54eef29d061b04dc70f.js → 1961.6938cff7d2934e7dd1a2.js} +2 -2
- notebook/static/{1961.b54eef29d061b04dc70f.js.map → 1961.6938cff7d2934e7dd1a2.js.map} +1 -1
- notebook/static/{2228.ee70ff7f4a891eeeced0.js → 2228.4829c4be5d1369fc8c08.js} +3 -3
- notebook/static/{2228.ee70ff7f4a891eeeced0.js.map → 2228.4829c4be5d1369fc8c08.js.map} +1 -1
- notebook/static/{7796.ea7106c833e81e2e6a6d.js → 2399.f8d66ab30f0f6de8d150.js} +2 -2
- notebook/static/{7796.ea7106c833e81e2e6a6d.js.map → 2399.f8d66ab30f0f6de8d150.js.map} +1 -1
- notebook/static/{2666.d98786f639a4e4e03168.js → 2666.39e11f71d749eca59f8e.js} +2 -2
- notebook/static/{2666.d98786f639a4e4e03168.js.map → 2666.39e11f71d749eca59f8e.js.map} +1 -1
- notebook/static/{28.63a50d509daa9a6995a0.js → 28.b5145a84e3a511427e72.js} +2 -2
- notebook/static/{28.63a50d509daa9a6995a0.js.map → 28.b5145a84e3a511427e72.js.map} +1 -1
- notebook/static/{3146.fb93a3deb51be976c36d.js → 3146.9f529e0ff6e31eb5518c.js} +3 -3
- notebook/static/{3146.fb93a3deb51be976c36d.js.map → 3146.9f529e0ff6e31eb5518c.js.map} +1 -1
- notebook/static/{3197.def6d3f0b40502a5df32.js → 3197.34f9a9d229aae83d71c9.js} +2 -2
- notebook/static/{3197.def6d3f0b40502a5df32.js.map → 3197.34f9a9d229aae83d71c9.js.map} +1 -1
- notebook/static/{3384.400a8b102177562c57df.js → 3384.d46675e1fed1d8bf9f38.js} +2 -2
- notebook/static/{3384.400a8b102177562c57df.js.map → 3384.d46675e1fed1d8bf9f38.js.map} +1 -1
- notebook/static/{3768.8a962f4a4770b8932b99.js → 3768.6e9e84205fad3066441f.js} +19 -19
- notebook/static/{7302.fc9ff4960b3b13d19800.js.map → 3768.6e9e84205fad3066441f.js.map} +1 -1
- notebook/static/{4382.56f61de9f4f08fc638d9.js → 4382.1136208d0e9fb970644d.js} +3 -3
- notebook/static/{4382.56f61de9f4f08fc638d9.js.map → 4382.1136208d0e9fb970644d.js.map} +1 -1
- notebook/static/{4406.51eddbcbc4572f499aa2.js → 4406.aa6e48d547067e1f6a24.js} +7 -7
- notebook/static/{4406.51eddbcbc4572f499aa2.js.map → 4406.aa6e48d547067e1f6a24.js.map} +1 -1
- notebook/static/{4499.69ddcc73939e5bacc11c.js → 4499.e3ec143a848073477e6b.js} +4 -4
- notebook/static/{4499.69ddcc73939e5bacc11c.js.map → 4499.e3ec143a848073477e6b.js.map} +1 -1
- notebook/static/{4645.3686d8b1f57c2819b28f.js → 4645.c7ed5a641519793aefb5.js} +5 -5
- notebook/static/{4645.3686d8b1f57c2819b28f.js.map → 4645.c7ed5a641519793aefb5.js.map} +1 -1
- notebook/static/{4837.1e3d20a9312c550cc265.js → 4837.945fb4e5f3f036911365.js} +3 -3
- notebook/static/{4837.1e3d20a9312c550cc265.js.map → 4837.945fb4e5f3f036911365.js.map} +1 -1
- notebook/static/{5135.26ec75383c5954392ac1.js → 5135.29921731e7b2c4519aaf.js} +11 -11
- notebook/static/{5135.26ec75383c5954392ac1.js.map → 5135.29921731e7b2c4519aaf.js.map} +1 -1
- notebook/static/{5573.b1294e2fbf9c3b28e234.js → 5573.f8598d637f69cf666699.js} +17 -17
- notebook/static/{5573.b1294e2fbf9c3b28e234.js.map → 5573.f8598d637f69cf666699.js.map} +1 -1
- notebook/static/{9415.f6b04bc507d720890d12.js → 5585.a3337a5147385302486f.js} +3 -3
- notebook/static/{9415.f6b04bc507d720890d12.js.map → 5585.a3337a5147385302486f.js.map} +1 -1
- notebook/static/{5601.c31a2a26a6a1b64fc046.js → 5601.831ce332550c2f0b5f29.js} +5 -5
- notebook/static/{5601.c31a2a26a6a1b64fc046.js.map → 5601.831ce332550c2f0b5f29.js.map} +1 -1
- notebook/static/{6345.1b9c41d5eec22662b13e.js → 6345.5299bed2b46f21adfe22.js} +5 -5
- notebook/static/{6345.1b9c41d5eec22662b13e.js.map → 6345.5299bed2b46f21adfe22.js.map} +1 -1
- notebook/static/{654.4cde6cc75377ee14c2a6.js → 654.40ad9c482d64fddf189e.js} +2 -2
- notebook/static/{654.4cde6cc75377ee14c2a6.js.map → 654.40ad9c482d64fddf189e.js.map} +1 -1
- notebook/static/{7302.fc9ff4960b3b13d19800.js → 7302.a10b6a8f9d3d77c82852.js} +19 -19
- notebook/static/{3768.8a962f4a4770b8932b99.js.map → 7302.a10b6a8f9d3d77c82852.js.map} +1 -1
- notebook/static/{7369.ea736d36d8561480b227.js → 7369.a065dc2ed2f56a44cb0f.js} +2 -2
- notebook/static/{7369.ea736d36d8561480b227.js.map → 7369.a065dc2ed2f56a44cb0f.js.map} +1 -1
- notebook/static/{757.164b32fa534d2d34a15c.js → 757.86f80ac05f38c4f4be68.js} +101 -818
- notebook/static/757.86f80ac05f38c4f4be68.js.map +1 -0
- notebook/static/{7906.9d740da3df9b104b3063.js → 7906.fe1bad7df0cb017ef15e.js} +3 -3
- notebook/static/{7906.9d740da3df9b104b3063.js.map → 7906.fe1bad7df0cb017ef15e.js.map} +1 -1
- notebook/static/{4811.5557a95d5e8b0f4414cf.js → 8076.16a95895bb2edd1e3ea5.js} +10 -10
- notebook/static/8076.16a95895bb2edd1e3ea5.js.map +1 -0
- notebook/static/{8098.ac0eb036234dafc51a8e.js → 8098.b3a09070ceeb3d69ca16.js} +2 -2
- notebook/static/{8098.ac0eb036234dafc51a8e.js.map → 8098.b3a09070ceeb3d69ca16.js.map} +1 -1
- notebook/static/{8579.ce15bee4e632cdfc428a.js → 8579.a6327b63e892ce64f8a1.js} +13 -13
- notebook/static/{8579.ce15bee4e632cdfc428a.js.map → 8579.a6327b63e892ce64f8a1.js.map} +1 -1
- notebook/static/{521.06447e462b57a5eda2e5.js → 8635.ba994ca9aa1be4dca4bc.js} +2 -2
- notebook/static/8635.ba994ca9aa1be4dca4bc.js.map +1 -0
- notebook/static/{8781.b22be85eccfb4f52f996.js → 8781.a6923250466a3a2ab1da.js} +59 -58
- notebook/static/8781.a6923250466a3a2ab1da.js.map +1 -0
- notebook/static/{8875.e2b716b70077938ac46b.js → 8875.f585c718f94e77780f11.js} +4 -4
- notebook/static/{8875.e2b716b70077938ac46b.js.map → 8875.f585c718f94e77780f11.js.map} +1 -1
- notebook/static/{9068.62a90d6ecbf7bbedb6fe.js → 9068.9668bb6059a4eda54d73.js} +3 -3
- notebook/static/{9068.62a90d6ecbf7bbedb6fe.js.map → 9068.9668bb6059a4eda54d73.js.map} +1 -1
- notebook/static/{9294.a00b460070da7492fe36.js → 9294.cd26c4a3945a5c62c172.js} +2 -2
- notebook/static/{9294.a00b460070da7492fe36.js.map → 9294.cd26c4a3945a5c62c172.js.map} +1 -1
- notebook/static/{9343.b544ded0cf21eeaa40dc.js → 9343.95d9c0bad7fb43ed3b96.js} +2 -2
- notebook/static/{9343.b544ded0cf21eeaa40dc.js.map → 9343.95d9c0bad7fb43ed3b96.js.map} +1 -1
- notebook/static/{9380.6e8035da970eef337e28.js → 9380.a0224a14d1d5c21522ac.js} +5 -5
- notebook/static/{9380.6e8035da970eef337e28.js.map → 9380.a0224a14d1d5c21522ac.js.map} +1 -1
- notebook/static/{9619.efb74ffb9ff504a31496.js → 9619.9264baf999dd4a76481d.js} +3 -3
- notebook/static/{9619.efb74ffb9ff504a31496.js.map → 9619.9264baf999dd4a76481d.js.map} +1 -1
- notebook/static/{9945.6c2941fc8ecd71ed2383.js → 9945.11272c82f2d069936636.js} +2 -2
- notebook/static/{9945.6c2941fc8ecd71ed2383.js.map → 9945.11272c82f2d069936636.js.map} +1 -1
- notebook/static/main.37d59bab942ce46a5a65.js +1179 -0
- notebook/static/main.37d59bab942ce46a5a65.js.map +1 -0
- notebook/static/{notebook_core.431537f043a6b970b343.js → notebook_core.d14f9429e0a6feb1770b.js} +1290 -916
- notebook/static/{notebook_core.431537f043a6b970b343.js.map → notebook_core.d14f9429e0a6feb1770b.js.map} +1 -1
- notebook/static/third-party-licenses.json +102 -114
- notebook/templates/consoles.html +1 -1
- notebook/templates/edit.html +1 -1
- notebook/templates/error.html +1 -1
- notebook/templates/notebooks.html +1 -1
- notebook/templates/terminals.html +1 -1
- notebook/templates/tree.html +1 -1
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +15 -15
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +5 -5
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +7 -7
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +10 -10
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +16 -16
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +12 -12
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +11 -11
- notebook-7.4.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/992.1664d3a9fe0cce27b960.js → notebook-7.4.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/186.7cef548fbe44c3aff519.js +1 -1
- notebook-7.4.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.c6d6fb361784b40947be.js → notebook-7.4.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.126be868570d7abfb3dd.js +1 -1
- notebook-7.4.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.6ce0ce278c9940a05f1b.js +1 -0
- notebook-7.4.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.e2ff7e3e0eaf6f0f258c.js → notebook-7.4.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.b04ffebbc052f2c56f27.js +1 -1
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.4.0a0.dist-info → notebook-7.4.0a1.dist-info}/METADATA +1 -1
- {notebook-7.4.0a0.dist-info → notebook-7.4.0a1.dist-info}/RECORD +134 -134
- notebook/static/4811.5557a95d5e8b0f4414cf.js.map +0 -1
- notebook/static/521.06447e462b57a5eda2e5.js.map +0 -1
- notebook/static/757.164b32fa534d2d34a15c.js.map +0 -1
- notebook/static/8781.b22be85eccfb4f52f996.js.map +0 -1
- notebook/static/main.1c2bac8c761cfe5da339.js +0 -1179
- notebook/static/main.1c2bac8c761cfe5da339.js.map +0 -1
- notebook-7.4.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.dcfd24d3e9e3c2595637.js +0 -1
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/full-width-notebook.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
- {notebook-7.4.0a0.data → notebook-7.4.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.4.0a0.dist-info → notebook-7.4.0a1.dist-info}/WHEEL +0 -0
- {notebook-7.4.0a0.dist-info → notebook-7.4.0a1.dist-info}/entry_points.txt +0 -0
- {notebook-7.4.0a0.dist-info → notebook-7.4.0a1.dist-info}/licenses/LICENSE +0 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
/* harmony import */ var _chunk_5HRBRIJM_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(51102);
|
|
12
12
|
/* harmony import */ var _chunk_BO7VGL7K_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33738);
|
|
13
13
|
/* harmony import */ var _chunk_66SQ7PYY_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57823);
|
|
14
|
-
/* harmony import */ var _chunk_7NZE2EM7_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
14
|
+
/* harmony import */ var _chunk_7NZE2EM7_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95527);
|
|
15
15
|
/* harmony import */ var _chunk_OPO4IU42_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22591);
|
|
16
16
|
/* harmony import */ var _chunk_3JNJP5BE_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(37683);
|
|
17
17
|
/* harmony import */ var _chunk_3X56UNUX_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22207);
|
|
@@ -516,4 +516,4 @@ var diagram = {
|
|
|
516
516
|
/***/ })
|
|
517
517
|
|
|
518
518
|
}]);
|
|
519
|
-
//# sourceMappingURL=9945.
|
|
519
|
+
//# sourceMappingURL=9945.11272c82f2d069936636.js.map?v=11272c82f2d069936636
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"9945.6c2941fc8ecd71ed2383.js?v=6c2941fc8ecd71ed2383","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAI8B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAOA;;AAE9B;AAC4B;AAC2C;AACT;;AAE9D;AACsC;;AAEtC;AACA;AACA,0BAA0B,sEAAM;AAChC;AACA,CAAC;AACD,0BAA0B,sEAAM;AAChC,2BAA2B,sEAAM;AACjC,2BAA2B,sEAAM;AACjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,s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AAW,0EAAe;AAC1B;AACA,WAAW,0EAAe;AAC1B;AACA,WAAW,0EAAe;AAC1B;AACA;AACA,GAAG;AACH;AACA;AACA,uBAAuB,oDAAI;AAC3B;AACA,GAAG;AACH;AACA,GAAG,QAAQ,sDAAU;AACrB;AACA;AACA,MAAM,0EAAS;AACf;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,0EAAe;AACxD;AACA;AACA;AACA,YAAY,OAAO,EAAE,wEAAa;AAClC,iBAAiB,0EAAc;AAC/B;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,MAAM,+DAAG;AACT;AACA;AACA;AACA,QAAQ,+DAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F,0EAAS,oDAAoD,0EAAS,qDAAqD,0EAAS,6CAA6C,0EAAS;AACrR,IAAI,+DAAG;AACP;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,8BAA8B,sEAAM;AACpC,CAAC;AACD,oCAAoC,sEAAM;AAC1C;AACA,CAAC;AACD,2BAA2B,sEAAM;AACjC,SAAS,0EAAS;AAClB,wBAAwB,0EAAS;AACjC;AACA;AACA,qBAAqB,qDAAM;AAC3B;AACA,6CAA6C,qDAAM,mDAAmD,qDAAM;AAC5G;AACA,EAAE,+DAAG;AACL,uCAAuC,GAAG;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,gFAAgB;AAClB;AACA;AACA,OAAO,0BAA0B,EAAE,yBAAyB;AAC5D;AACA,CAAC;AACD,oCAAoC,sEAAM;AAC1C;AACA,CAAC;AACD,gCAAgC,sEAAM;AACtC,oBAAoB,8EAAc;AAClC;AACA;AACA,GAAG;AACH;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,EAAE,+DAAG;AACL;AACA;AACA;AACA,IAAI,+DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0EAAc;AACjD;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,EAAE,iFAAW;AACb,EAAE,+DAAG;AACL;AACA;AACA;AACA,MAAM,+DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN,MAAM,+DAAG;AACT;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM,+DAAG;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,+DAAG;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,+EAAoB;AAC9B,MAAM,0EAAe;AACrB;AACA,UAAU,yEAAc;AACxB,wBAAwB,sEAAM;AAC9B;AACA;AACA;AACA;AACA,IAAI,0EAAe;AACnB,GAAG;AACH;AAGE","sources":["webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-MAYHULR4.mjs"],"sourcesContent":["import {\n stateDb_default,\n stateDiagram_default,\n styles_default\n} from \"./chunk-7U56Z5CX.mjs\";\nimport \"./chunk-5HRBRIJM.mjs\";\nimport \"./chunk-BO7VGL7K.mjs\";\nimport \"./chunk-66SQ7PYY.mjs\";\nimport \"./chunk-7NZE2EM7.mjs\";\nimport \"./chunk-OPO4IU42.mjs\";\nimport \"./chunk-3JNJP5BE.mjs\";\nimport \"./chunk-3X56UNUX.mjs\";\nimport \"./chunk-6JOS74DS.mjs\";\nimport {\n utils_default\n} from \"./chunk-7DKRZKHE.mjs\";\nimport {\n __name,\n common_default,\n configureSvgSize,\n getConfig2 as getConfig,\n log\n} from \"./chunk-6DBFFHIP.mjs\";\n\n// src/diagrams/state/stateRenderer.js\nimport { select } from \"d3\";\nimport { layout as dagreLayout } from \"dagre-d3-es/src/dagre/index.js\";\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\n\n// src/diagrams/state/shapes.js\nimport { line, curveBasis } from \"d3\";\n\n// src/diagrams/state/id-cache.js\nvar idCache = {};\nvar set = /* @__PURE__ */ __name((key, val) => {\n idCache[key] = val;\n}, \"set\");\nvar get = /* @__PURE__ */ __name((k) => idCache[k], \"get\");\nvar keys = /* @__PURE__ */ __name(() => Object.keys(idCache), \"keys\");\nvar size = /* @__PURE__ */ __name(() => keys().length, \"size\");\nvar id_cache_default = {\n get,\n set,\n keys,\n size\n};\n\n// src/diagrams/state/shapes.js\nvar drawStartState = /* @__PURE__ */ __name((g) => g.append(\"circle\").attr(\"class\", \"start-state\").attr(\"r\", getConfig().state.sizeUnit).attr(\"cx\", getConfig().state.padding + getConfig().state.sizeUnit).attr(\"cy\", getConfig().state.padding + getConfig().state.sizeUnit), \"drawStartState\");\nvar drawDivider = /* @__PURE__ */ __name((g) => g.append(\"line\").style(\"stroke\", \"grey\").style(\"stroke-dasharray\", \"3\").attr(\"x1\", getConfig().state.textHeight).attr(\"class\", \"divider\").attr(\"x2\", getConfig().state.textHeight * 2).attr(\"y1\", 0).attr(\"y2\", 0), \"drawDivider\");\nvar drawSimpleState = /* @__PURE__ */ __name((g, stateDef) => {\n const state = g.append(\"text\").attr(\"x\", 2 * getConfig().state.padding).attr(\"y\", getConfig().state.textHeight + 2 * getConfig().state.padding).attr(\"font-size\", getConfig().state.fontSize).attr(\"class\", \"state-title\").text(stateDef.id);\n const classBox = state.node().getBBox();\n g.insert(\"rect\", \":first-child\").attr(\"x\", getConfig().state.padding).attr(\"y\", getConfig().state.padding).attr(\"width\", classBox.width + 2 * getConfig().state.padding).attr(\"height\", classBox.height + 2 * getConfig().state.padding).attr(\"rx\", getConfig().state.radius);\n return state;\n}, \"drawSimpleState\");\nvar drawDescrState = /* @__PURE__ */ __name((g, stateDef) => {\n const addTspan = /* @__PURE__ */ __name(function(textEl, txt, isFirst2) {\n const tSpan = textEl.append(\"tspan\").attr(\"x\", 2 * getConfig().state.padding).text(txt);\n if (!isFirst2) {\n tSpan.attr(\"dy\", getConfig().state.textHeight);\n }\n }, \"addTspan\");\n const title = g.append(\"text\").attr(\"x\", 2 * getConfig().state.padding).attr(\"y\", getConfig().state.textHeight + 1.3 * getConfig().state.padding).attr(\"font-size\", getConfig().state.fontSize).attr(\"class\", \"state-title\").text(stateDef.descriptions[0]);\n const titleBox = title.node().getBBox();\n const titleHeight = titleBox.height;\n const description = g.append(\"text\").attr(\"x\", getConfig().state.padding).attr(\n \"y\",\n titleHeight + getConfig().state.padding * 0.4 + getConfig().state.dividerMargin + getConfig().state.textHeight\n ).attr(\"class\", \"state-description\");\n let isFirst = true;\n let isSecond = true;\n stateDef.descriptions.forEach(function(descr) {\n if (!isFirst) {\n addTspan(description, descr, isSecond);\n isSecond = false;\n }\n isFirst = false;\n });\n const descrLine = g.append(\"line\").attr(\"x1\", getConfig().state.padding).attr(\"y1\", getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2).attr(\"y2\", getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2).attr(\"class\", \"descr-divider\");\n const descrBox = description.node().getBBox();\n const width = Math.max(descrBox.width, titleBox.width);\n descrLine.attr(\"x2\", width + 3 * getConfig().state.padding);\n g.insert(\"rect\", \":first-child\").attr(\"x\", getConfig().state.padding).attr(\"y\", getConfig().state.padding).attr(\"width\", width + 2 * getConfig().state.padding).attr(\"height\", descrBox.height + titleHeight + 2 * getConfig().state.padding).attr(\"rx\", getConfig().state.radius);\n return g;\n}, \"drawDescrState\");\nvar addTitleAndBox = /* @__PURE__ */ __name((g, stateDef, altBkg) => {\n const pad = getConfig().state.padding;\n const dblPad = 2 * getConfig().state.padding;\n const orgBox = g.node().getBBox();\n const orgWidth = orgBox.width;\n const orgX = orgBox.x;\n const title = g.append(\"text\").attr(\"x\", 0).attr(\"y\", getConfig().state.titleShift).attr(\"font-size\", getConfig().state.fontSize).attr(\"class\", \"state-title\").text(stateDef.id);\n const titleBox = title.node().getBBox();\n const titleWidth = titleBox.width + dblPad;\n let width = Math.max(titleWidth, orgWidth);\n if (width === orgWidth) {\n width = width + dblPad;\n }\n let startX;\n const graphBox = g.node().getBBox();\n if (stateDef.doc) {\n }\n startX = orgX - pad;\n if (titleWidth > orgWidth) {\n startX = (orgWidth - width) / 2 + pad;\n }\n if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) {\n startX = orgX - (titleWidth - orgWidth) / 2;\n }\n const lineY = 1 - getConfig().state.textHeight;\n g.insert(\"rect\", \":first-child\").attr(\"x\", startX).attr(\"y\", lineY).attr(\"class\", altBkg ? \"alt-composit\" : \"composit\").attr(\"width\", width).attr(\n \"height\",\n graphBox.height + getConfig().state.textHeight + getConfig().state.titleShift + 1\n ).attr(\"rx\", \"0\");\n title.attr(\"x\", startX + pad);\n if (titleWidth <= orgWidth) {\n title.attr(\"x\", orgX + (width - dblPad) / 2 - titleWidth / 2 + pad);\n }\n g.insert(\"rect\", \":first-child\").attr(\"x\", startX).attr(\n \"y\",\n getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n ).attr(\"width\", width).attr(\"height\", getConfig().state.textHeight * 3).attr(\"rx\", getConfig().state.radius);\n g.insert(\"rect\", \":first-child\").attr(\"x\", startX).attr(\n \"y\",\n getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n ).attr(\"width\", width).attr(\"height\", graphBox.height + 3 + 2 * getConfig().state.textHeight).attr(\"rx\", getConfig().state.radius);\n return g;\n}, \"addTitleAndBox\");\nvar drawEndState = /* @__PURE__ */ __name((g) => {\n g.append(\"circle\").attr(\"class\", \"end-state-outer\").attr(\"r\", getConfig().state.sizeUnit + getConfig().state.miniPadding).attr(\n \"cx\",\n getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n ).attr(\n \"cy\",\n getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n );\n return g.append(\"circle\").attr(\"class\", \"end-state-inner\").attr(\"r\", getConfig().state.sizeUnit).attr(\"cx\", getConfig().state.padding + getConfig().state.sizeUnit + 2).attr(\"cy\", getConfig().state.padding + getConfig().state.sizeUnit + 2);\n}, \"drawEndState\");\nvar drawForkJoinState = /* @__PURE__ */ __name((g, stateDef) => {\n let width = getConfig().state.forkWidth;\n let height = getConfig().state.forkHeight;\n if (stateDef.parentId) {\n let tmp = width;\n width = height;\n height = tmp;\n }\n return g.append(\"rect\").style(\"stroke\", \"black\").style(\"fill\", \"black\").attr(\"width\", width).attr(\"height\", height).attr(\"x\", getConfig().state.padding).attr(\"y\", getConfig().state.padding);\n}, \"drawForkJoinState\");\nvar _drawLongText = /* @__PURE__ */ __name((_text, x, y, g) => {\n let textHeight = 0;\n const textElem = g.append(\"text\");\n textElem.style(\"text-anchor\", \"start\");\n textElem.attr(\"class\", \"noteText\");\n let text = _text.replace(/\\r\\n/g, \"<br/>\");\n text = text.replace(/\\n/g, \"<br/>\");\n const lines = text.split(common_default.lineBreakRegex);\n let tHeight = 1.25 * getConfig().state.noteMargin;\n for (const line2 of lines) {\n const txt = line2.trim();\n if (txt.length > 0) {\n const span = textElem.append(\"tspan\");\n span.text(txt);\n if (tHeight === 0) {\n const textBounds = span.node().getBBox();\n tHeight += textBounds.height;\n }\n textHeight += tHeight;\n span.attr(\"x\", x + getConfig().state.noteMargin);\n span.attr(\"y\", y + textHeight + 1.25 * getConfig().state.noteMargin);\n }\n }\n return { textWidth: textElem.node().getBBox().width, textHeight };\n}, \"_drawLongText\");\nvar drawNote = /* @__PURE__ */ __name((text, g) => {\n g.attr(\"class\", \"state-note\");\n const note = g.append(\"rect\").attr(\"x\", 0).attr(\"y\", getConfig().state.padding);\n const rectElem = g.append(\"g\");\n const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem);\n note.attr(\"height\", textHeight + 2 * getConfig().state.noteMargin);\n note.attr(\"width\", textWidth + getConfig().state.noteMargin * 2);\n return note;\n}, \"drawNote\");\nvar drawState = /* @__PURE__ */ __name(function(elem, stateDef) {\n const id = stateDef.id;\n const stateInfo = {\n id,\n label: stateDef.id,\n width: 0,\n height: 0\n };\n const g = elem.append(\"g\").attr(\"id\", id).attr(\"class\", \"stateGroup\");\n if (stateDef.type === \"start\") {\n drawStartState(g);\n }\n if (stateDef.type === \"end\") {\n drawEndState(g);\n }\n if (stateDef.type === \"fork\" || stateDef.type === \"join\") {\n drawForkJoinState(g, stateDef);\n }\n if (stateDef.type === \"note\") {\n drawNote(stateDef.note.text, g);\n }\n if (stateDef.type === \"divider\") {\n drawDivider(g);\n }\n if (stateDef.type === \"default\" && stateDef.descriptions.length === 0) {\n drawSimpleState(g, stateDef);\n }\n if (stateDef.type === \"default\" && stateDef.descriptions.length > 0) {\n drawDescrState(g, stateDef);\n }\n const stateBox = g.node().getBBox();\n stateInfo.width = stateBox.width + 2 * getConfig().state.padding;\n stateInfo.height = stateBox.height + 2 * getConfig().state.padding;\n id_cache_default.set(id, stateInfo);\n return stateInfo;\n}, \"drawState\");\nvar edgeCount = 0;\nvar drawEdge = /* @__PURE__ */ __name(function(elem, path, relation) {\n const getRelationType = /* @__PURE__ */ __name(function(type) {\n switch (type) {\n case stateDb_default.relationType.AGGREGATION:\n return \"aggregation\";\n case stateDb_default.relationType.EXTENSION:\n return \"extension\";\n case stateDb_default.relationType.COMPOSITION:\n return \"composition\";\n case stateDb_default.relationType.DEPENDENCY:\n return \"dependency\";\n }\n }, \"getRelationType\");\n path.points = path.points.filter((p) => !Number.isNaN(p.y));\n const lineData = path.points;\n const lineFunction = line().x(function(d) {\n return d.x;\n }).y(function(d) {\n return d.y;\n }).curve(curveBasis);\n const svgPath = elem.append(\"path\").attr(\"d\", lineFunction(lineData)).attr(\"id\", \"edge\" + edgeCount).attr(\"class\", \"transition\");\n let url = \"\";\n if (getConfig().state.arrowMarkerAbsolute) {\n url = window.location.protocol + \"//\" + window.location.host + window.location.pathname + window.location.search;\n url = url.replace(/\\(/g, \"\\\\(\");\n url = url.replace(/\\)/g, \"\\\\)\");\n }\n svgPath.attr(\n \"marker-end\",\n \"url(\" + url + \"#\" + getRelationType(stateDb_default.relationType.DEPENDENCY) + \"End)\"\n );\n if (relation.title !== void 0) {\n const label = elem.append(\"g\").attr(\"class\", \"stateLabel\");\n const { x, y } = utils_default.calcLabelPosition(path.points);\n const rows = common_default.getRows(relation.title);\n let titleHeight = 0;\n const titleRows = [];\n let maxWidth = 0;\n let minX = 0;\n for (let i = 0; i <= rows.length; i++) {\n const title = label.append(\"text\").attr(\"text-anchor\", \"middle\").text(rows[i]).attr(\"x\", x).attr(\"y\", y + titleHeight);\n const boundsTmp = title.node().getBBox();\n maxWidth = Math.max(maxWidth, boundsTmp.width);\n minX = Math.min(minX, boundsTmp.x);\n log.info(boundsTmp.x, x, y + titleHeight);\n if (titleHeight === 0) {\n const titleBox = title.node().getBBox();\n titleHeight = titleBox.height;\n log.info(\"Title height\", titleHeight, y);\n }\n titleRows.push(title);\n }\n let boxHeight = titleHeight * rows.length;\n if (rows.length > 1) {\n const heightAdj = (rows.length - 1) * titleHeight * 0.5;\n titleRows.forEach((title, i) => title.attr(\"y\", y + i * titleHeight - heightAdj));\n boxHeight = titleHeight * rows.length;\n }\n const bounds = label.node().getBBox();\n label.insert(\"rect\", \":first-child\").attr(\"class\", \"box\").attr(\"x\", x - maxWidth / 2 - getConfig().state.padding / 2).attr(\"y\", y - boxHeight / 2 - getConfig().state.padding / 2 - 3.5).attr(\"width\", maxWidth + getConfig().state.padding).attr(\"height\", boxHeight + getConfig().state.padding);\n log.info(bounds);\n }\n edgeCount++;\n}, \"drawEdge\");\n\n// src/diagrams/state/stateRenderer.js\nvar conf;\nvar transformationLog = {};\nvar setConf = /* @__PURE__ */ __name(function() {\n}, \"setConf\");\nvar insertMarkers = /* @__PURE__ */ __name(function(elem) {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"dependencyEnd\").attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 19,7 L9,13 L14,7 L9,1 Z\");\n}, \"insertMarkers\");\nvar draw = /* @__PURE__ */ __name(function(text, id, _version, diagObj) {\n conf = getConfig().state;\n const securityLevel = getConfig().securityLevel;\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = select(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? select(sandboxElement.nodes()[0].contentDocument.body) : select(\"body\");\n const doc = securityLevel === \"sandbox\" ? sandboxElement.nodes()[0].contentDocument : document;\n log.debug(\"Rendering diagram \" + text);\n const diagram2 = root.select(`[id='${id}']`);\n insertMarkers(diagram2);\n const rootDoc = diagObj.db.getRootDoc();\n renderDoc(rootDoc, diagram2, void 0, false, root, doc, diagObj);\n const padding = conf.padding;\n const bounds = diagram2.node().getBBox();\n const width = bounds.width + padding * 2;\n const height = bounds.height + padding * 2;\n const svgWidth = width * 1.75;\n configureSvgSize(diagram2, height, svgWidth, conf.useMaxWidth);\n diagram2.attr(\n \"viewBox\",\n `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + \" \" + height\n );\n}, \"draw\");\nvar getLabelWidth = /* @__PURE__ */ __name((text) => {\n return text ? text.length * conf.fontSizeFactor : 1;\n}, \"getLabelWidth\");\nvar renderDoc = /* @__PURE__ */ __name((doc, diagram2, parentId, altBkg, root, domDocument, diagObj) => {\n const graph = new graphlib.Graph({\n compound: true,\n multigraph: true\n });\n let i;\n let edgeFreeDoc = true;\n for (i = 0; i < doc.length; i++) {\n if (doc[i].stmt === \"relation\") {\n edgeFreeDoc = false;\n break;\n }\n }\n if (parentId) {\n graph.setGraph({\n rankdir: \"LR\",\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n ranker: \"tight-tree\",\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n isMultiGraph: true\n // ranksep: 5,\n // nodesep: 1\n });\n } else {\n graph.setGraph({\n rankdir: \"TB\",\n multigraph: true,\n compound: true,\n // isCompound: true,\n // acyclicer: 'greedy',\n // ranker: 'longest-path'\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n ranker: \"tight-tree\",\n // ranker: 'network-simplex'\n isMultiGraph: true\n });\n }\n graph.setDefaultEdgeLabel(function() {\n return {};\n });\n diagObj.db.extract(doc);\n const states = diagObj.db.getStates();\n const relations = diagObj.db.getRelations();\n const keys2 = Object.keys(states);\n let first = true;\n for (const key of keys2) {\n const stateDef = states[key];\n if (parentId) {\n stateDef.parentId = parentId;\n }\n let node;\n if (stateDef.doc) {\n let sub = diagram2.append(\"g\").attr(\"id\", stateDef.id).attr(\"class\", \"stateGroup\");\n node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj);\n if (first) {\n sub = addTitleAndBox(sub, stateDef, altBkg);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height + conf.padding / 2;\n transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n } else {\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height;\n }\n } else {\n node = drawState(diagram2, stateDef, graph);\n }\n if (stateDef.note) {\n const noteDef = {\n descriptions: [],\n id: stateDef.id + \"-note\",\n note: stateDef.note,\n type: \"note\"\n };\n const note = drawState(diagram2, noteDef, graph);\n if (stateDef.note.position === \"left of\") {\n graph.setNode(node.id + \"-note\", note);\n graph.setNode(node.id, node);\n } else {\n graph.setNode(node.id, node);\n graph.setNode(node.id + \"-note\", note);\n }\n graph.setParent(node.id, node.id + \"-group\");\n graph.setParent(node.id + \"-note\", node.id + \"-group\");\n } else {\n graph.setNode(node.id, node);\n }\n }\n log.debug(\"Count=\", graph.nodeCount(), graph);\n let cnt = 0;\n relations.forEach(function(relation) {\n cnt++;\n log.debug(\"Setting edge\", relation);\n graph.setEdge(\n relation.id1,\n relation.id2,\n {\n relation,\n width: getLabelWidth(relation.title),\n height: conf.labelHeight * common_default.getRows(relation.title).length,\n labelpos: \"c\"\n },\n \"id\" + cnt\n );\n });\n dagreLayout(graph);\n log.debug(\"Graph after layout\", graph.nodes());\n const svgElem = diagram2.node();\n graph.nodes().forEach(function(v) {\n if (v !== void 0 && graph.node(v) !== void 0) {\n log.warn(\"Node \" + v + \": \" + JSON.stringify(graph.node(v)));\n root.select(\"#\" + svgElem.id + \" #\" + v).attr(\n \"transform\",\n \"translate(\" + (graph.node(v).x - graph.node(v).width / 2) + \",\" + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + \" )\"\n );\n root.select(\"#\" + svgElem.id + \" #\" + v).attr(\"data-x-shift\", graph.node(v).x - graph.node(v).width / 2);\n const dividers = domDocument.querySelectorAll(\"#\" + svgElem.id + \" #\" + v + \" .divider\");\n dividers.forEach((divider) => {\n const parent = divider.parentElement;\n let pWidth = 0;\n let pShift = 0;\n if (parent) {\n if (parent.parentElement) {\n pWidth = parent.parentElement.getBBox().width;\n }\n pShift = parseInt(parent.getAttribute(\"data-x-shift\"), 10);\n if (Number.isNaN(pShift)) {\n pShift = 0;\n }\n }\n divider.setAttribute(\"x1\", 0 - pShift + 8);\n divider.setAttribute(\"x2\", pWidth - pShift - 8);\n });\n } else {\n log.debug(\"No Node \" + v + \": \" + JSON.stringify(graph.node(v)));\n }\n });\n let stateBox = svgElem.getBBox();\n graph.edges().forEach(function(e) {\n if (e !== void 0 && graph.edge(e) !== void 0) {\n log.debug(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(graph.edge(e)));\n drawEdge(diagram2, graph.edge(e), graph.edge(e).relation);\n }\n });\n stateBox = svgElem.getBBox();\n const stateInfo = {\n id: parentId ? parentId : \"root\",\n label: parentId ? parentId : \"root\",\n width: 0,\n height: 0\n };\n stateInfo.width = stateBox.width + 2 * conf.padding;\n stateInfo.height = stateBox.height + 2 * conf.padding;\n log.debug(\"Doc rendered\", stateInfo, graph);\n return stateInfo;\n}, \"renderDoc\");\nvar stateRenderer_default = {\n setConf,\n draw\n};\n\n// src/diagrams/state/stateDiagram.ts\nvar diagram = {\n parser: stateDiagram_default,\n db: stateDb_default,\n renderer: stateRenderer_default,\n styles: styles_default,\n init: /* @__PURE__ */ __name((cnf) => {\n if (!cnf.state) {\n cnf.state = {};\n }\n cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n stateDb_default.clear();\n }, \"init\")\n};\nexport {\n diagram\n};\n"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"9945.11272c82f2d069936636.js?v=11272c82f2d069936636","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAI8B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAOA;;AAE9B;AAC4B;AAC2C;AACT;;AAE9D;AACsC;;AAEtC;AACA;AACA,0BAA0B,sEAAM;AAChC;AACA,CAAC;AACD,0BAA0B,sEAAM;AAChC,2BAA2B,sEAAM;AACjC,2BAA2B,sEAAM;AACjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,sEAAM,kEAAkE,0EAAS,8BAA8B,0EAAS,mBAAmB,0EAAS,8BAA8B,0EAAS,mBAAmB,0EAAS;AAC5P,kCAAkC,sEAAM,2FAA2F,0EAAS,yDAAyD,0EAAS;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AACA,GAAG,QAAQ,sDAAU;AACrB;AACA;AACA,MAAM,0EAAS;AACf;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,0EAAe;AACxD;AACA;AACA;AACA,YAAY,OAAO,EAAE,wEAAa;AAClC,iBAAiB,0EAAc;AAC/B;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,MAAM,+DAAG;AACT;AACA;AACA;AACA,QAAQ,+DAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F,0EAAS,oDAAoD,0EAAS,qDAAqD,0EAAS,6CAA6C,0EAAS;AACrR,IAAI,+DAAG;AACP;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,8BAA8B,sEAAM;AACpC,CAAC;AACD,oCAAoC,sEAAM;AAC1C;AACA,CAAC;AACD,2BAA2B,sEAAM;AACjC,SAAS,0EAAS;AAClB,wBAAwB,0EAAS;AACjC;AACA;AACA,qBAAqB,qDAAM;AAC3B;AACA,6CAA6C,qDAAM,mDAAmD,qDAAM;AAC5G;AACA,EAAE,+DAAG;AACL,uCAAuC,GAAG;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,gFAAgB;AAClB;AACA;AACA,OAAO,0BAA0B,EAAE,yBAAyB;AAC5D;AACA,CAAC;AACD,oCAAoC,sEAAM;AAC1C;AACA,CAAC;AACD,gCAAgC,sEAAM;AACtC,oBAAoB,8EAAc;AAClC;AACA;AACA,GAAG;AACH;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,EAAE,+DAAG;AACL;AACA;AACA;AACA,IAAI,+DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0EAAc;AACjD;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,EAAE,iFAAW;AACb,EAAE,+DAAG;AACL;AACA;AACA;AACA,MAAM,+DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN,MAAM,+DAAG;AACT;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM,+DAAG;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,+DAAG;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,+EAAoB;AAC9B,MAAM,0EAAe;AACrB;AACA,UAAU,yEAAc;AACxB,wBAAwB,sEAAM;AAC9B;AACA;AACA;AACA;AACA,IAAI,0EAAe;AACnB,GAAG;AACH;AAGE","sources":["webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-MAYHULR4.mjs"],"sourcesContent":["import {\n stateDb_default,\n stateDiagram_default,\n styles_default\n} from \"./chunk-7U56Z5CX.mjs\";\nimport \"./chunk-5HRBRIJM.mjs\";\nimport \"./chunk-BO7VGL7K.mjs\";\nimport \"./chunk-66SQ7PYY.mjs\";\nimport \"./chunk-7NZE2EM7.mjs\";\nimport \"./chunk-OPO4IU42.mjs\";\nimport \"./chunk-3JNJP5BE.mjs\";\nimport \"./chunk-3X56UNUX.mjs\";\nimport \"./chunk-6JOS74DS.mjs\";\nimport {\n utils_default\n} from \"./chunk-7DKRZKHE.mjs\";\nimport {\n __name,\n common_default,\n configureSvgSize,\n getConfig2 as getConfig,\n log\n} from \"./chunk-6DBFFHIP.mjs\";\n\n// src/diagrams/state/stateRenderer.js\nimport { select } from \"d3\";\nimport { layout as dagreLayout } from \"dagre-d3-es/src/dagre/index.js\";\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\n\n// src/diagrams/state/shapes.js\nimport { line, curveBasis } from \"d3\";\n\n// src/diagrams/state/id-cache.js\nvar idCache = {};\nvar set = /* @__PURE__ */ __name((key, val) => {\n idCache[key] = val;\n}, \"set\");\nvar get = /* @__PURE__ */ __name((k) => idCache[k], \"get\");\nvar keys = /* @__PURE__ */ __name(() => Object.keys(idCache), \"keys\");\nvar size = /* @__PURE__ */ __name(() => keys().length, \"size\");\nvar id_cache_default = {\n get,\n set,\n keys,\n size\n};\n\n// src/diagrams/state/shapes.js\nvar drawStartState = /* @__PURE__ */ __name((g) => g.append(\"circle\").attr(\"class\", \"start-state\").attr(\"r\", getConfig().state.sizeUnit).attr(\"cx\", getConfig().state.padding + getConfig().state.sizeUnit).attr(\"cy\", getConfig().state.padding + getConfig().state.sizeUnit), \"drawStartState\");\nvar drawDivider = /* @__PURE__ */ __name((g) => g.append(\"line\").style(\"stroke\", \"grey\").style(\"stroke-dasharray\", \"3\").attr(\"x1\", getConfig().state.textHeight).attr(\"class\", \"divider\").attr(\"x2\", getConfig().state.textHeight * 2).attr(\"y1\", 0).attr(\"y2\", 0), \"drawDivider\");\nvar drawSimpleState = /* @__PURE__ */ __name((g, stateDef) => {\n const state = g.append(\"text\").attr(\"x\", 2 * getConfig().state.padding).attr(\"y\", getConfig().state.textHeight + 2 * getConfig().state.padding).attr(\"font-size\", getConfig().state.fontSize).attr(\"class\", \"state-title\").text(stateDef.id);\n const classBox = state.node().getBBox();\n g.insert(\"rect\", \":first-child\").attr(\"x\", getConfig().state.padding).attr(\"y\", getConfig().state.padding).attr(\"width\", classBox.width + 2 * getConfig().state.padding).attr(\"height\", classBox.height + 2 * getConfig().state.padding).attr(\"rx\", getConfig().state.radius);\n return state;\n}, \"drawSimpleState\");\nvar drawDescrState = /* @__PURE__ */ __name((g, stateDef) => {\n const addTspan = /* @__PURE__ */ __name(function(textEl, txt, isFirst2) {\n const tSpan = textEl.append(\"tspan\").attr(\"x\", 2 * getConfig().state.padding).text(txt);\n if (!isFirst2) {\n tSpan.attr(\"dy\", getConfig().state.textHeight);\n }\n }, \"addTspan\");\n const title = g.append(\"text\").attr(\"x\", 2 * getConfig().state.padding).attr(\"y\", getConfig().state.textHeight + 1.3 * getConfig().state.padding).attr(\"font-size\", getConfig().state.fontSize).attr(\"class\", \"state-title\").text(stateDef.descriptions[0]);\n const titleBox = title.node().getBBox();\n const titleHeight = titleBox.height;\n const description = g.append(\"text\").attr(\"x\", getConfig().state.padding).attr(\n \"y\",\n titleHeight + getConfig().state.padding * 0.4 + getConfig().state.dividerMargin + getConfig().state.textHeight\n ).attr(\"class\", \"state-description\");\n let isFirst = true;\n let isSecond = true;\n stateDef.descriptions.forEach(function(descr) {\n if (!isFirst) {\n addTspan(description, descr, isSecond);\n isSecond = false;\n }\n isFirst = false;\n });\n const descrLine = g.append(\"line\").attr(\"x1\", getConfig().state.padding).attr(\"y1\", getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2).attr(\"y2\", getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2).attr(\"class\", \"descr-divider\");\n const descrBox = description.node().getBBox();\n const width = Math.max(descrBox.width, titleBox.width);\n descrLine.attr(\"x2\", width + 3 * getConfig().state.padding);\n g.insert(\"rect\", \":first-child\").attr(\"x\", getConfig().state.padding).attr(\"y\", getConfig().state.padding).attr(\"width\", width + 2 * getConfig().state.padding).attr(\"height\", descrBox.height + titleHeight + 2 * getConfig().state.padding).attr(\"rx\", getConfig().state.radius);\n return g;\n}, \"drawDescrState\");\nvar addTitleAndBox = /* @__PURE__ */ __name((g, stateDef, altBkg) => {\n const pad = getConfig().state.padding;\n const dblPad = 2 * getConfig().state.padding;\n const orgBox = g.node().getBBox();\n const orgWidth = orgBox.width;\n const orgX = orgBox.x;\n const title = g.append(\"text\").attr(\"x\", 0).attr(\"y\", getConfig().state.titleShift).attr(\"font-size\", getConfig().state.fontSize).attr(\"class\", \"state-title\").text(stateDef.id);\n const titleBox = title.node().getBBox();\n const titleWidth = titleBox.width + dblPad;\n let width = Math.max(titleWidth, orgWidth);\n if (width === orgWidth) {\n width = width + dblPad;\n }\n let startX;\n const graphBox = g.node().getBBox();\n if (stateDef.doc) {\n }\n startX = orgX - pad;\n if (titleWidth > orgWidth) {\n startX = (orgWidth - width) / 2 + pad;\n }\n if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) {\n startX = orgX - (titleWidth - orgWidth) / 2;\n }\n const lineY = 1 - getConfig().state.textHeight;\n g.insert(\"rect\", \":first-child\").attr(\"x\", startX).attr(\"y\", lineY).attr(\"class\", altBkg ? \"alt-composit\" : \"composit\").attr(\"width\", width).attr(\n \"height\",\n graphBox.height + getConfig().state.textHeight + getConfig().state.titleShift + 1\n ).attr(\"rx\", \"0\");\n title.attr(\"x\", startX + pad);\n if (titleWidth <= orgWidth) {\n title.attr(\"x\", orgX + (width - dblPad) / 2 - titleWidth / 2 + pad);\n }\n g.insert(\"rect\", \":first-child\").attr(\"x\", startX).attr(\n \"y\",\n getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n ).attr(\"width\", width).attr(\"height\", getConfig().state.textHeight * 3).attr(\"rx\", getConfig().state.radius);\n g.insert(\"rect\", \":first-child\").attr(\"x\", startX).attr(\n \"y\",\n getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n ).attr(\"width\", width).attr(\"height\", graphBox.height + 3 + 2 * getConfig().state.textHeight).attr(\"rx\", getConfig().state.radius);\n return g;\n}, \"addTitleAndBox\");\nvar drawEndState = /* @__PURE__ */ __name((g) => {\n g.append(\"circle\").attr(\"class\", \"end-state-outer\").attr(\"r\", getConfig().state.sizeUnit + getConfig().state.miniPadding).attr(\n \"cx\",\n getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n ).attr(\n \"cy\",\n getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n );\n return g.append(\"circle\").attr(\"class\", \"end-state-inner\").attr(\"r\", getConfig().state.sizeUnit).attr(\"cx\", getConfig().state.padding + getConfig().state.sizeUnit + 2).attr(\"cy\", getConfig().state.padding + getConfig().state.sizeUnit + 2);\n}, \"drawEndState\");\nvar drawForkJoinState = /* @__PURE__ */ __name((g, stateDef) => {\n let width = getConfig().state.forkWidth;\n let height = getConfig().state.forkHeight;\n if (stateDef.parentId) {\n let tmp = width;\n width = height;\n height = tmp;\n }\n return g.append(\"rect\").style(\"stroke\", \"black\").style(\"fill\", \"black\").attr(\"width\", width).attr(\"height\", height).attr(\"x\", getConfig().state.padding).attr(\"y\", getConfig().state.padding);\n}, \"drawForkJoinState\");\nvar _drawLongText = /* @__PURE__ */ __name((_text, x, y, g) => {\n let textHeight = 0;\n const textElem = g.append(\"text\");\n textElem.style(\"text-anchor\", \"start\");\n textElem.attr(\"class\", \"noteText\");\n let text = _text.replace(/\\r\\n/g, \"<br/>\");\n text = text.replace(/\\n/g, \"<br/>\");\n const lines = text.split(common_default.lineBreakRegex);\n let tHeight = 1.25 * getConfig().state.noteMargin;\n for (const line2 of lines) {\n const txt = line2.trim();\n if (txt.length > 0) {\n const span = textElem.append(\"tspan\");\n span.text(txt);\n if (tHeight === 0) {\n const textBounds = span.node().getBBox();\n tHeight += textBounds.height;\n }\n textHeight += tHeight;\n span.attr(\"x\", x + getConfig().state.noteMargin);\n span.attr(\"y\", y + textHeight + 1.25 * getConfig().state.noteMargin);\n }\n }\n return { textWidth: textElem.node().getBBox().width, textHeight };\n}, \"_drawLongText\");\nvar drawNote = /* @__PURE__ */ __name((text, g) => {\n g.attr(\"class\", \"state-note\");\n const note = g.append(\"rect\").attr(\"x\", 0).attr(\"y\", getConfig().state.padding);\n const rectElem = g.append(\"g\");\n const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem);\n note.attr(\"height\", textHeight + 2 * getConfig().state.noteMargin);\n note.attr(\"width\", textWidth + getConfig().state.noteMargin * 2);\n return note;\n}, \"drawNote\");\nvar drawState = /* @__PURE__ */ __name(function(elem, stateDef) {\n const id = stateDef.id;\n const stateInfo = {\n id,\n label: stateDef.id,\n width: 0,\n height: 0\n };\n const g = elem.append(\"g\").attr(\"id\", id).attr(\"class\", \"stateGroup\");\n if (stateDef.type === \"start\") {\n drawStartState(g);\n }\n if (stateDef.type === \"end\") {\n drawEndState(g);\n }\n if (stateDef.type === \"fork\" || stateDef.type === \"join\") {\n drawForkJoinState(g, stateDef);\n }\n if (stateDef.type === \"note\") {\n drawNote(stateDef.note.text, g);\n }\n if (stateDef.type === \"divider\") {\n drawDivider(g);\n }\n if (stateDef.type === \"default\" && stateDef.descriptions.length === 0) {\n drawSimpleState(g, stateDef);\n }\n if (stateDef.type === \"default\" && stateDef.descriptions.length > 0) {\n drawDescrState(g, stateDef);\n }\n const stateBox = g.node().getBBox();\n stateInfo.width = stateBox.width + 2 * getConfig().state.padding;\n stateInfo.height = stateBox.height + 2 * getConfig().state.padding;\n id_cache_default.set(id, stateInfo);\n return stateInfo;\n}, \"drawState\");\nvar edgeCount = 0;\nvar drawEdge = /* @__PURE__ */ __name(function(elem, path, relation) {\n const getRelationType = /* @__PURE__ */ __name(function(type) {\n switch (type) {\n case stateDb_default.relationType.AGGREGATION:\n return \"aggregation\";\n case stateDb_default.relationType.EXTENSION:\n return \"extension\";\n case stateDb_default.relationType.COMPOSITION:\n return \"composition\";\n case stateDb_default.relationType.DEPENDENCY:\n return \"dependency\";\n }\n }, \"getRelationType\");\n path.points = path.points.filter((p) => !Number.isNaN(p.y));\n const lineData = path.points;\n const lineFunction = line().x(function(d) {\n return d.x;\n }).y(function(d) {\n return d.y;\n }).curve(curveBasis);\n const svgPath = elem.append(\"path\").attr(\"d\", lineFunction(lineData)).attr(\"id\", \"edge\" + edgeCount).attr(\"class\", \"transition\");\n let url = \"\";\n if (getConfig().state.arrowMarkerAbsolute) {\n url = window.location.protocol + \"//\" + window.location.host + window.location.pathname + window.location.search;\n url = url.replace(/\\(/g, \"\\\\(\");\n url = url.replace(/\\)/g, \"\\\\)\");\n }\n svgPath.attr(\n \"marker-end\",\n \"url(\" + url + \"#\" + getRelationType(stateDb_default.relationType.DEPENDENCY) + \"End)\"\n );\n if (relation.title !== void 0) {\n const label = elem.append(\"g\").attr(\"class\", \"stateLabel\");\n const { x, y } = utils_default.calcLabelPosition(path.points);\n const rows = common_default.getRows(relation.title);\n let titleHeight = 0;\n const titleRows = [];\n let maxWidth = 0;\n let minX = 0;\n for (let i = 0; i <= rows.length; i++) {\n const title = label.append(\"text\").attr(\"text-anchor\", \"middle\").text(rows[i]).attr(\"x\", x).attr(\"y\", y + titleHeight);\n const boundsTmp = title.node().getBBox();\n maxWidth = Math.max(maxWidth, boundsTmp.width);\n minX = Math.min(minX, boundsTmp.x);\n log.info(boundsTmp.x, x, y + titleHeight);\n if (titleHeight === 0) {\n const titleBox = title.node().getBBox();\n titleHeight = titleBox.height;\n log.info(\"Title height\", titleHeight, y);\n }\n titleRows.push(title);\n }\n let boxHeight = titleHeight * rows.length;\n if (rows.length > 1) {\n const heightAdj = (rows.length - 1) * titleHeight * 0.5;\n titleRows.forEach((title, i) => title.attr(\"y\", y + i * titleHeight - heightAdj));\n boxHeight = titleHeight * rows.length;\n }\n const bounds = label.node().getBBox();\n label.insert(\"rect\", \":first-child\").attr(\"class\", \"box\").attr(\"x\", x - maxWidth / 2 - getConfig().state.padding / 2).attr(\"y\", y - boxHeight / 2 - getConfig().state.padding / 2 - 3.5).attr(\"width\", maxWidth + getConfig().state.padding).attr(\"height\", boxHeight + getConfig().state.padding);\n log.info(bounds);\n }\n edgeCount++;\n}, \"drawEdge\");\n\n// src/diagrams/state/stateRenderer.js\nvar conf;\nvar transformationLog = {};\nvar setConf = /* @__PURE__ */ __name(function() {\n}, \"setConf\");\nvar insertMarkers = /* @__PURE__ */ __name(function(elem) {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"dependencyEnd\").attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 19,7 L9,13 L14,7 L9,1 Z\");\n}, \"insertMarkers\");\nvar draw = /* @__PURE__ */ __name(function(text, id, _version, diagObj) {\n conf = getConfig().state;\n const securityLevel = getConfig().securityLevel;\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = select(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? select(sandboxElement.nodes()[0].contentDocument.body) : select(\"body\");\n const doc = securityLevel === \"sandbox\" ? sandboxElement.nodes()[0].contentDocument : document;\n log.debug(\"Rendering diagram \" + text);\n const diagram2 = root.select(`[id='${id}']`);\n insertMarkers(diagram2);\n const rootDoc = diagObj.db.getRootDoc();\n renderDoc(rootDoc, diagram2, void 0, false, root, doc, diagObj);\n const padding = conf.padding;\n const bounds = diagram2.node().getBBox();\n const width = bounds.width + padding * 2;\n const height = bounds.height + padding * 2;\n const svgWidth = width * 1.75;\n configureSvgSize(diagram2, height, svgWidth, conf.useMaxWidth);\n diagram2.attr(\n \"viewBox\",\n `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + \" \" + height\n );\n}, \"draw\");\nvar getLabelWidth = /* @__PURE__ */ __name((text) => {\n return text ? text.length * conf.fontSizeFactor : 1;\n}, \"getLabelWidth\");\nvar renderDoc = /* @__PURE__ */ __name((doc, diagram2, parentId, altBkg, root, domDocument, diagObj) => {\n const graph = new graphlib.Graph({\n compound: true,\n multigraph: true\n });\n let i;\n let edgeFreeDoc = true;\n for (i = 0; i < doc.length; i++) {\n if (doc[i].stmt === \"relation\") {\n edgeFreeDoc = false;\n break;\n }\n }\n if (parentId) {\n graph.setGraph({\n rankdir: \"LR\",\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n ranker: \"tight-tree\",\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n isMultiGraph: true\n // ranksep: 5,\n // nodesep: 1\n });\n } else {\n graph.setGraph({\n rankdir: \"TB\",\n multigraph: true,\n compound: true,\n // isCompound: true,\n // acyclicer: 'greedy',\n // ranker: 'longest-path'\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n ranker: \"tight-tree\",\n // ranker: 'network-simplex'\n isMultiGraph: true\n });\n }\n graph.setDefaultEdgeLabel(function() {\n return {};\n });\n diagObj.db.extract(doc);\n const states = diagObj.db.getStates();\n const relations = diagObj.db.getRelations();\n const keys2 = Object.keys(states);\n let first = true;\n for (const key of keys2) {\n const stateDef = states[key];\n if (parentId) {\n stateDef.parentId = parentId;\n }\n let node;\n if (stateDef.doc) {\n let sub = diagram2.append(\"g\").attr(\"id\", stateDef.id).attr(\"class\", \"stateGroup\");\n node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj);\n if (first) {\n sub = addTitleAndBox(sub, stateDef, altBkg);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height + conf.padding / 2;\n transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n } else {\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height;\n }\n } else {\n node = drawState(diagram2, stateDef, graph);\n }\n if (stateDef.note) {\n const noteDef = {\n descriptions: [],\n id: stateDef.id + \"-note\",\n note: stateDef.note,\n type: \"note\"\n };\n const note = drawState(diagram2, noteDef, graph);\n if (stateDef.note.position === \"left of\") {\n graph.setNode(node.id + \"-note\", note);\n graph.setNode(node.id, node);\n } else {\n graph.setNode(node.id, node);\n graph.setNode(node.id + \"-note\", note);\n }\n graph.setParent(node.id, node.id + \"-group\");\n graph.setParent(node.id + \"-note\", node.id + \"-group\");\n } else {\n graph.setNode(node.id, node);\n }\n }\n log.debug(\"Count=\", graph.nodeCount(), graph);\n let cnt = 0;\n relations.forEach(function(relation) {\n cnt++;\n log.debug(\"Setting edge\", relation);\n graph.setEdge(\n relation.id1,\n relation.id2,\n {\n relation,\n width: getLabelWidth(relation.title),\n height: conf.labelHeight * common_default.getRows(relation.title).length,\n labelpos: \"c\"\n },\n \"id\" + cnt\n );\n });\n dagreLayout(graph);\n log.debug(\"Graph after layout\", graph.nodes());\n const svgElem = diagram2.node();\n graph.nodes().forEach(function(v) {\n if (v !== void 0 && graph.node(v) !== void 0) {\n log.warn(\"Node \" + v + \": \" + JSON.stringify(graph.node(v)));\n root.select(\"#\" + svgElem.id + \" #\" + v).attr(\n \"transform\",\n \"translate(\" + (graph.node(v).x - graph.node(v).width / 2) + \",\" + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + \" )\"\n );\n root.select(\"#\" + svgElem.id + \" #\" + v).attr(\"data-x-shift\", graph.node(v).x - graph.node(v).width / 2);\n const dividers = domDocument.querySelectorAll(\"#\" + svgElem.id + \" #\" + v + \" .divider\");\n dividers.forEach((divider) => {\n const parent = divider.parentElement;\n let pWidth = 0;\n let pShift = 0;\n if (parent) {\n if (parent.parentElement) {\n pWidth = parent.parentElement.getBBox().width;\n }\n pShift = parseInt(parent.getAttribute(\"data-x-shift\"), 10);\n if (Number.isNaN(pShift)) {\n pShift = 0;\n }\n }\n divider.setAttribute(\"x1\", 0 - pShift + 8);\n divider.setAttribute(\"x2\", pWidth - pShift - 8);\n });\n } else {\n log.debug(\"No Node \" + v + \": \" + JSON.stringify(graph.node(v)));\n }\n });\n let stateBox = svgElem.getBBox();\n graph.edges().forEach(function(e) {\n if (e !== void 0 && graph.edge(e) !== void 0) {\n log.debug(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(graph.edge(e)));\n drawEdge(diagram2, graph.edge(e), graph.edge(e).relation);\n }\n });\n stateBox = svgElem.getBBox();\n const stateInfo = {\n id: parentId ? parentId : \"root\",\n label: parentId ? parentId : \"root\",\n width: 0,\n height: 0\n };\n stateInfo.width = stateBox.width + 2 * conf.padding;\n stateInfo.height = stateBox.height + 2 * conf.padding;\n log.debug(\"Doc rendered\", stateInfo, graph);\n return stateInfo;\n}, \"renderDoc\");\nvar stateRenderer_default = {\n setConf,\n draw\n};\n\n// src/diagrams/state/stateDiagram.ts\nvar diagram = {\n parser: stateDiagram_default,\n db: stateDb_default,\n renderer: stateRenderer_default,\n styles: styles_default,\n init: /* @__PURE__ */ __name((cnf) => {\n if (!cnf.state) {\n cnf.state = {};\n }\n cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n stateDb_default.clear();\n }, \"init\")\n};\nexport {\n diagram\n};\n"],"names":[],"sourceRoot":""}
|