khoj 2.0.0b16.dev0__py3-none-any.whl → 2.0.0b17.dev0__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.
Files changed (134) hide show
  1. khoj/interface/compiled/404/index.html +2 -2
  2. khoj/interface/compiled/_next/static/chunks/02b2f66c-c89cf69943479389.js +53 -0
  3. khoj/interface/compiled/_next/static/chunks/1423.7b1e8bf760d28078.js +1 -0
  4. khoj/interface/compiled/_next/static/chunks/1585.3de407cd92842aed.js +55 -0
  5. khoj/interface/compiled/_next/static/chunks/1822.0cc2f58edae71bbb.js +56 -0
  6. khoj/interface/compiled/_next/static/chunks/1915-6e773cccaf87b915.js +1 -0
  7. khoj/interface/compiled/_next/static/chunks/{2117-080746c8e170c81a.js → 2117-7e4bce55446b5cd3.js} +1 -1
  8. khoj/interface/compiled/_next/static/chunks/2327-115eb57f8f41544b.js +1 -0
  9. khoj/interface/compiled/_next/static/chunks/2526.8ac62b527c9ab703.js +43 -0
  10. khoj/interface/compiled/_next/static/chunks/2626.2125083a1ff3b80a.js +29 -0
  11. khoj/interface/compiled/_next/static/chunks/2684-2abc5091f765c441.js +20 -0
  12. khoj/interface/compiled/_next/static/chunks/273.c2bdf48df1dfc5ef.js +93 -0
  13. khoj/interface/compiled/_next/static/chunks/3.87fb50c162c65241.js +59 -0
  14. khoj/interface/compiled/_next/static/chunks/3192.d7a2786f846fe872.js +148 -0
  15. khoj/interface/compiled/_next/static/chunks/{3260-82d2521fab032ff1.js → 3260-babf79aa1083e03a.js} +18 -63
  16. khoj/interface/compiled/_next/static/chunks/3574.7a94c27e6a496a56.js +63 -0
  17. khoj/interface/compiled/_next/static/chunks/{3595-ac8e81e04ecb89cb.js → 3595-a015df928dccf883.js} +1 -1
  18. khoj/interface/compiled/_next/static/chunks/3599.53651e350d023038.js +131 -0
  19. khoj/interface/compiled/_next/static/chunks/3852.822389f445c9b427.js +1 -0
  20. khoj/interface/compiled/_next/static/chunks/3933.a3b09abdf19b7458.js +1 -0
  21. khoj/interface/compiled/_next/static/chunks/4323.3b06bc313e4946af.js +215 -0
  22. khoj/interface/compiled/_next/static/chunks/4447-df6e3ef2d9adb809.js +1 -0
  23. khoj/interface/compiled/_next/static/chunks/453.f8a05823b9d15c24.js +1 -0
  24. khoj/interface/compiled/_next/static/chunks/490.91b737ff35d6fbc1.js +1 -0
  25. khoj/interface/compiled/_next/static/chunks/5097.1129f707069b361f.js +1 -0
  26. khoj/interface/compiled/_next/static/chunks/5111.c8d55e95447d7609.js +5 -0
  27. khoj/interface/compiled/_next/static/chunks/5689.a323537972b343b4.js +1 -0
  28. khoj/interface/compiled/_next/static/chunks/572.3357cc94e3adfcba.js +262 -0
  29. khoj/interface/compiled/_next/static/chunks/62.53fa01be73dcb16e.js +62 -0
  30. khoj/interface/compiled/_next/static/chunks/7079-7849663838636d48.js +1 -0
  31. khoj/interface/compiled/_next/static/chunks/7200-9f1d584275259536.js +1 -0
  32. khoj/interface/compiled/_next/static/chunks/7626-551c62355b7b1b4a.js +1 -0
  33. khoj/interface/compiled/_next/static/chunks/7811.c32bdc47a9144a63.js +1 -0
  34. khoj/interface/compiled/_next/static/chunks/7986.4901bc54aadf59c3.js +1 -0
  35. khoj/interface/compiled/_next/static/chunks/8288.4883743fa40672e2.js +24 -0
  36. khoj/interface/compiled/_next/static/chunks/8382.335eadce6afb5d4a.js +1 -0
  37. khoj/interface/compiled/_next/static/chunks/8501.771e24303bd21479.js +24 -0
  38. khoj/interface/compiled/_next/static/chunks/8623.525c35f02a86ca25.js +174 -0
  39. khoj/interface/compiled/_next/static/chunks/8927.ba4a68dd6424b88c.js +166 -0
  40. khoj/interface/compiled/_next/static/chunks/{8072-e1440cb482a0940e.js → 9002-bd3304de324360eb.js} +1 -1
  41. khoj/interface/compiled/_next/static/chunks/9316-cfa655d664a6a959.js +1 -0
  42. khoj/interface/compiled/_next/static/chunks/9498.df45618893b18531.js +4 -0
  43. khoj/interface/compiled/_next/static/chunks/959.aa25ba53e976d0c1.js +36 -0
  44. khoj/interface/compiled/_next/static/chunks/9808-3cd28f0c0da0fd48.js +1 -0
  45. khoj/interface/compiled/_next/static/chunks/a764ac56.e65af2f7b1ecdaaa.js +136 -0
  46. khoj/interface/compiled/_next/static/chunks/app/agents/{page-e291b49977f43880.js → page-aa86693ebe6a688f.js} +1 -1
  47. khoj/interface/compiled/_next/static/chunks/app/automations/{layout-8639ff99d6c2fec6.js → layout-554744a3bb43b2f1.js} +1 -1
  48. khoj/interface/compiled/_next/static/chunks/app/automations/{page-1047097af99d31c7.js → page-224de8b2f24cd5a8.js} +1 -1
  49. khoj/interface/compiled/_next/static/chunks/app/chat/{layout-2ff3e18a6feae92a.js → layout-63ef3be8435d1c99.js} +1 -1
  50. khoj/interface/compiled/_next/static/chunks/app/chat/{page-ac7ed0a1aff1b145.js → page-60083b8e6276e6ad.js} +1 -1
  51. khoj/interface/compiled/_next/static/chunks/app/{layout-c2de87a25fededbb.js → layout-a7ad6fe9355ea57a.js} +1 -1
  52. khoj/interface/compiled/_next/static/chunks/app/{page-1567cac7b79a7c59.js → page-3699a0ef95d4a5ce.js} +1 -1
  53. khoj/interface/compiled/_next/static/chunks/app/search/{page-3639e50ec3e9acfd.js → page-6ff3715005bdbb48.js} +1 -1
  54. khoj/interface/compiled/_next/static/chunks/app/settings/{layout-f88cedfe9ad4df7c.js → layout-30fa7eff8e7e01d5.js} +1 -1
  55. khoj/interface/compiled/_next/static/chunks/app/settings/{page-6081362437c82470.js → page-464010b2b4389d0d.js} +1 -1
  56. khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-819c6536c15e3d31.js → page-5b98a0ed1e0835bf.js} +1 -1
  57. khoj/interface/compiled/_next/static/chunks/{main-fc8e0fefa2ef3d8c.js → main-0daa33fca37d54d4.js} +1 -1
  58. khoj/interface/compiled/_next/static/chunks/webpack-0da03e0f0f1cfc6e.js +1 -0
  59. khoj/interface/compiled/_next/static/css/2945c4a857922f3b.css +1 -0
  60. khoj/interface/compiled/_next/static/css/{7889a30fe9c83846.css → d8ec94d00b6bf837.css} +1 -1
  61. khoj/interface/compiled/_next/static/media/140e5638e63f96c7-s.woff2 +0 -0
  62. khoj/interface/compiled/_next/static/media/1755441e3a2fa970-s.p.woff2 +0 -0
  63. khoj/interface/compiled/_next/static/media/4b23ab4cc10b07bc-s.woff2 +0 -0
  64. khoj/interface/compiled/_next/static/media/b8c807255d58fc43-s.woff2 +0 -0
  65. khoj/interface/compiled/agents/index.html +2 -2
  66. khoj/interface/compiled/agents/index.txt +3 -3
  67. khoj/interface/compiled/automations/index.html +2 -2
  68. khoj/interface/compiled/automations/index.txt +4 -4
  69. khoj/interface/compiled/chat/index.html +2 -2
  70. khoj/interface/compiled/chat/index.txt +4 -4
  71. khoj/interface/compiled/index.html +2 -2
  72. khoj/interface/compiled/index.txt +3 -3
  73. khoj/interface/compiled/search/index.html +2 -2
  74. khoj/interface/compiled/search/index.txt +3 -3
  75. khoj/interface/compiled/settings/index.html +2 -2
  76. khoj/interface/compiled/settings/index.txt +5 -5
  77. khoj/interface/compiled/share/chat/index.html +2 -2
  78. khoj/interface/compiled/share/chat/index.txt +3 -3
  79. khoj/processor/conversation/openai/gpt.py +3 -5
  80. khoj/processor/conversation/openai/utils.py +12 -9
  81. khoj/routers/research.py +1 -1
  82. khoj/utils/helpers.py +2 -2
  83. {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b17.dev0.dist-info}/METADATA +4 -4
  84. {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b17.dev0.dist-info}/RECORD +90 -88
  85. khoj/interface/compiled/_next/static/chunks/1225.ecac11e7421504c4.js +0 -36
  86. khoj/interface/compiled/_next/static/chunks/1320.ae930ad00affe685.js +0 -5
  87. khoj/interface/compiled/_next/static/chunks/1327-e254819a9172cfa7.js +0 -20
  88. khoj/interface/compiled/_next/static/chunks/1915-5c6508f6ebb62a30.js +0 -1
  89. khoj/interface/compiled/_next/static/chunks/1940.d082758bd04e08ae.js +0 -4
  90. khoj/interface/compiled/_next/static/chunks/2327-438aaec1657c5ada.js +0 -1
  91. khoj/interface/compiled/_next/static/chunks/2475.57a0d0fd93d07af0.js +0 -93
  92. khoj/interface/compiled/_next/static/chunks/2481.5ce6524ba0a73f90.js +0 -55
  93. khoj/interface/compiled/_next/static/chunks/2939-4af3fd24b8ffc9ad.js +0 -1
  94. khoj/interface/compiled/_next/static/chunks/297.4c4c823ff6e3255b.js +0 -174
  95. khoj/interface/compiled/_next/static/chunks/3973.dc54a39586ab48be.js +0 -1
  96. khoj/interface/compiled/_next/static/chunks/4241.c1cd170f7f37ac59.js +0 -24
  97. khoj/interface/compiled/_next/static/chunks/4447-cd95608f8e93e711.js +0 -1
  98. khoj/interface/compiled/_next/static/chunks/4505.f09454a346269c3f.js +0 -117
  99. khoj/interface/compiled/_next/static/chunks/549.2bd27f59a91a9668.js +0 -148
  100. khoj/interface/compiled/_next/static/chunks/584.d7ce3505f169b706.js +0 -1
  101. khoj/interface/compiled/_next/static/chunks/6240.34f7c1fa692edd61.js +0 -24
  102. khoj/interface/compiled/_next/static/chunks/6d3fe5a5-f9f3c16e0bc0cdf9.js +0 -10
  103. khoj/interface/compiled/_next/static/chunks/7200-93ab0072359b8028.js +0 -1
  104. khoj/interface/compiled/_next/static/chunks/7553.f5ad54b1f6e92c49.js +0 -131
  105. khoj/interface/compiled/_next/static/chunks/7626-1b630f1654172341.js +0 -1
  106. khoj/interface/compiled/_next/static/chunks/764.dadd316e8e16d191.js +0 -63
  107. khoj/interface/compiled/_next/static/chunks/78.08169ab541abab4f.js +0 -43
  108. khoj/interface/compiled/_next/static/chunks/784.e03acf460df213d1.js +0 -1
  109. khoj/interface/compiled/_next/static/chunks/8086.8d39887215807fcd.js +0 -1
  110. khoj/interface/compiled/_next/static/chunks/8168.f074ab8c7c16d82d.js +0 -59
  111. khoj/interface/compiled/_next/static/chunks/8223.1705878fa7a09292.js +0 -1
  112. khoj/interface/compiled/_next/static/chunks/8483.94f6c9e2bee86f50.js +0 -215
  113. khoj/interface/compiled/_next/static/chunks/8810.fc0e479de78c7c61.js +0 -29
  114. khoj/interface/compiled/_next/static/chunks/8909.14ac3f43d0070cf1.js +0 -88
  115. khoj/interface/compiled/_next/static/chunks/9139-8ac4d9feb10f8869.js +0 -1
  116. khoj/interface/compiled/_next/static/chunks/9167.098534184f03fe92.js +0 -56
  117. khoj/interface/compiled/_next/static/chunks/9537.e934ce37bf314509.js +0 -166
  118. khoj/interface/compiled/_next/static/chunks/9574.3fe8e26e95bf1c34.js +0 -1
  119. khoj/interface/compiled/_next/static/chunks/9643.b34248df52ffc77c.js +0 -262
  120. khoj/interface/compiled/_next/static/chunks/9747.2fd9065b1435abb1.js +0 -1
  121. khoj/interface/compiled/_next/static/chunks/9808-bd5d7361ad026094.js +0 -1
  122. khoj/interface/compiled/_next/static/chunks/9922.98f2b2a9959b4ebe.js +0 -1
  123. khoj/interface/compiled/_next/static/chunks/webpack-820bd66958a5e279.js +0 -1
  124. khoj/interface/compiled/_next/static/css/821d0d60b0b6871d.css +0 -1
  125. khoj/interface/compiled/_next/static/media/2aa11a72f7f24b58-s.woff2 +0 -0
  126. khoj/interface/compiled/_next/static/media/383a65b63658737d-s.woff2 +0 -0
  127. khoj/interface/compiled/_next/static/media/85fe2766c5e6072a-s.woff2 +0 -0
  128. khoj/interface/compiled/_next/static/media/c4250770ab8708b6-s.p.woff2 +0 -0
  129. /khoj/interface/compiled/_next/static/chunks/{8667-50b03a89e82e0ba7.js → 8667-4b7790573b08c50d.js} +0 -0
  130. /khoj/interface/compiled/_next/static/{-vo0F0aVQi0xvwp3-9CX- → y0u6T-pNyjAaf0nVlKFLV}/_buildManifest.js +0 -0
  131. /khoj/interface/compiled/_next/static/{-vo0F0aVQi0xvwp3-9CX- → y0u6T-pNyjAaf0nVlKFLV}/_ssgManifest.js +0 -0
  132. {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b17.dev0.dist-info}/WHEEL +0 -0
  133. {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b17.dev0.dist-info}/entry_points.txt +0 -0
  134. {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b17.dev0.dist-info}/licenses/LICENSE +0 -0
@@ -1,215 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8483],{16816:function(t,e,s){s.d(e,{q:function(){return n}});var i=s(20755),r=s(84370),n=(0,i.eW)((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ys)("#i"+t)),("sandbox"===e?(0,r.Ys)(s.nodes()[0].contentDocument.body):(0,r.Ys)("body")).select(`[id="${t}"]`)},"getDiagramElement")},58483:function(t,e,s){s.d(e,{Ee:function(){return Q},J8:function(){return c},_$:function(){return Y},oI:function(){return Z}});var i=s(16816),r=s(14201),n=s(12168),a=s(56574),o=s(20755),l=function(){var t=(0,o.eW)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],i=[1,4],r=[2,4],n=[1,9],a=[1,11],l=[1,16],c=[1,17],h=[1,18],d=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],S=[1,23],f=[1,24],m=[1,26],_=[1,27],T=[1,28],E=[1,29],b=[1,30],k=[1,31],D=[1,32],C=[1,35],x=[1,36],$=[1,37],L=[1,38],A=[1,34],I=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],v=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],w=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],O={trace:(0,o.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,o.eW)(function(t,e,s,i,r,n,a){var o=n.length-1;switch(r){case 3:return i.setRootDoc(n[o]),n[o];case 4:this.$=[];break;case 5:"nl"!=n[o]&&(n[o-1].push(n[o]),this.$=n[o-1]);break;case 6:case 7:case 12:this.$=n[o];break;case 8:this.$="nl";break;case 13:let l=n[o-1];l.description=i.trimColon(n[o]),this.$=l;break;case 14:this.$={stmt:"relation",state1:n[o-2],state2:n[o]};break;case 15:let c=i.trimColon(n[o]);this.$={stmt:"relation",state1:n[o-3],state2:n[o-1],description:c};break;case 19:this.$={stmt:"state",id:n[o-3],type:"default",description:"",doc:n[o-1]};break;case 20:var h=n[o],d=n[o-2].trim();if(n[o].match(":")){var u=n[o].split(":");h=u[0],d=[d,u[1]]}this.$={stmt:"state",id:h,type:"default",description:d};break;case 21:this.$={stmt:"state",id:n[o-3],type:"default",description:n[o-5],doc:n[o-1]};break;case 22:this.$={stmt:"state",id:n[o],type:"fork"};break;case 23:this.$={stmt:"state",id:n[o],type:"join"};break;case 24:this.$={stmt:"state",id:n[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:n[o-1].trim(),note:{position:n[o-2].trim(),text:n[o].trim()}};break;case 29:this.$=n[o].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=n[o].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:n[o-3],url:n[o-2],tooltip:n[o-1]};break;case 33:this.$={stmt:"click",id:n[o-3],url:n[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:n[o-1].trim(),classes:n[o].trim()};break;case 36:this.$={stmt:"style",id:n[o-1].trim(),styleClass:n[o].trim()};break;case 37:this.$={stmt:"applyClass",id:n[o-1].trim(),styleClass:n[o].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:n[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:n[o-2].trim(),classes:[n[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:S,29:f,32:25,33:m,35:_,37:T,38:E,41:b,45:k,48:D,51:C,52:x,53:$,54:L,57:A},t(I,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:S,29:f,32:25,33:m,35:_,37:T,38:E,41:b,45:k,48:D,51:C,52:x,53:$,54:L,57:A},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12],{14:[1,40],15:[1,41]}),t(I,[2,16]),{18:[1,42]},t(I,[2,18],{20:[1,43]}),{23:[1,44]},t(I,[2,22]),t(I,[2,23]),t(I,[2,24]),t(I,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(I,[2,28]),{34:[1,49]},{36:[1,50]},t(I,[2,31]),{13:51,24:u,57:A},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(v,[2,44],{58:[1,56]}),t(v,[2,45],{58:[1,57]}),t(I,[2,38]),t(I,[2,39]),t(I,[2,40]),t(I,[2,41]),t(I,[2,6]),t(I,[2,13]),{13:58,24:u,57:A},t(I,[2,17]),t(w,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(I,[2,29]),t(I,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(I,[2,14],{14:[1,71]}),{4:n,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,72],22:d,24:u,25:p,26:y,27:g,28:S,29:f,32:25,33:m,35:_,37:T,38:E,41:b,45:k,48:D,51:C,52:x,53:$,54:L,57:A},t(I,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(I,[2,34]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(v,[2,46]),t(v,[2,47]),t(I,[2,15]),t(I,[2,19]),t(w,r,{7:78}),t(I,[2,26]),t(I,[2,27]),{5:[1,79]},{5:[1,80]},{4:n,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,81],22:d,24:u,25:p,26:y,27:g,28:S,29:f,32:25,33:m,35:_,37:T,38:E,41:b,45:k,48:D,51:C,52:x,53:$,54:L,57:A},t(I,[2,32]),t(I,[2,33]),t(I,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,o.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var s=Error(t);throw s.hash=e,s}},"parseError"),parse:(0,o.eW)(function(t){var e=this,s=[0],i=[],r=[null],n=[],a=this.table,l="",c=0,h=0,d=0,u=n.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var S=p.yylloc;n.push(S);var f=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.eW)(function(t){s.length=s.length-2*t,r.length=r.length-t,n.length=n.length-t},"popStack"),(0,o.eW)(m,"lex");for(var _,T,E,b,k,D,C,x,$,L={};;){if(E=s[s.length-1],this.defaultActions[E]?b=this.defaultActions[E]:(null==_&&(_=m()),b=a[E]&&a[E][_]),void 0===b||!b.length||!b[0]){var A="";for(D in $=[],a[E])this.terminals_[D]&&D>2&&$.push("'"+this.terminals_[D]+"'");A=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:S,expected:$})}if(b[0]instanceof Array&&b.length>1)throw Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(b[0]){case 1:s.push(_),r.push(p.yytext),n.push(p.yylloc),s.push(b[1]),_=null,T?(_=T,T=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,S=p.yylloc,d>0&&d--);break;case 2:if(C=this.productions_[b[1]][1],L.$=r[r.length-C],L._$={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},f&&(L._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),void 0!==(k=this.performAction.apply(L,[l,h,c,y.yy,b[1],r,n].concat(u))))return k;C&&(s=s.slice(0,-1*C*2),r=r.slice(0,-1*C),n=n.slice(0,-1*C)),s.push(this.productions_[b[1]][0]),r.push(L.$),n.push(L._$),x=a[s[s.length-2]][s[s.length-1]],s.push(x);break;case 3:return!0}}return!0},"parse")},N={EOF:1,parseError:(0,o.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,o.eW)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:(0,o.eW)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},"input"),unput:(0,o.eW)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),s.length-1&&(this.yylineno-=s.length-1);var r=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.eW)(function(){return this._more=!0,this},"more"),reject:(0,o.eW)(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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.eW)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.eW)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.eW)(function(t,e){var s,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var n in r)this[n]=r[n];return!1},"test_match"),next:(0,o.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,r=this._currentRules(),n=0;n<r.length;n++)if((s=this._input.match(this.rules[r[n]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[n])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,o.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.eW)(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:(0,o.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.eW)(function(t,e,s,i){switch(s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 45:return 51;case 5:case 46:return 52;case 6:case 47:return 53;case 7:case 48:return 54;case 8:case 9:case 11:case 12:case 13:case 14:case 57:case 59:case 65:break;case 10:case 80:return 5;case 15:case 35:return this.pushState("SCALE"),17;case 16:case 36:return 18;case 17:case 23:case 37:case 52:case 55:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 38:this.pushState("STATE");break;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 40:case 43:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 41:case 44:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:case 67:return this.popState(),"ID";case 53:return"STATE_DESCR";case 54:return 19;case 56:return this.popState(),this.pushState("struct"),20;case 58:return this.popState(),21;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 66:return"NOTE_TEXT";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 70:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 71:case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return e.yytext=e.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};function R(){this.yy={}}return O.lexer=N,(0,o.eW)(R,"Parser"),R.prototype=O,O.Parser=R,new R}();l.parser=l;var c=l,h="TB",d="state",u="root",p="relation",y="default",g="divider",S="fill:none",f="fill: #333",m="text",_="normal",T="rect",E="rectWithTitle",b="divider",k="roundedWithTitle",D="statediagram",C=`${D}-state`,x="transition",$=`${x} note-edge`,L=`${D}-note`,A=`${D}-cluster`,I=`${D}-cluster-alt`,v="parent",w="note",O="----",N=`${O}${w}`,R=`${O}${v}`,W=(0,o.eW)((t,e=h)=>{if(!t.doc)return e;let s=e;for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir"),Y={getClasses:(0,o.eW)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,o.eW)(async function(t,e,s,l){o.cM.info("REF0:"),o.cM.info("Drawing state diagram (v2)",e);let{securityLevel:c,state:h,layout:d}=(0,o.nV)();l.db.extract(l.db.getRootDocV2());let u=l.db.getData(),p=(0,i.q)(e,c);u.type=l.type,u.layoutAlgorithm=d,u.nodeSpacing=h?.nodeSpacing||50,u.rankSpacing=h?.rankSpacing||50,u.markers=["barb"],u.diagramId=e,await (0,n.sY)(u,p);try{("function"==typeof l.db.getLinks?l.db.getLinks():new Map).forEach((t,e)=>{let s;let i="string"==typeof e?e:"string"==typeof e?.id?e.id:"";if(!i){o.cM.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));return}let r=p.node()?.querySelectorAll("g");if(r?.forEach(t=>{t.textContent?.trim()===i&&(s=t)}),!s){o.cM.warn("⚠️ Could not find node matching text:",i);return}let n=s.parentNode;if(!n){o.cM.warn("⚠️ Node has no parent, cannot wrap:",i);return}let a=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),a.setAttribute("target","_blank"),t.tooltip){let e=t.tooltip.replace(/^"+|"+$/g,"");a.setAttribute("title",e)}n.replaceChild(a,s),a.appendChild(s),o.cM.info("\uD83D\uDD17 Wrapped node in <a> tag for:",i,t.url)})}catch(t){o.cM.error("❌ Error injecting clickable links:",t)}a.w8.insertTitle(p,"statediagramTitleText",h?.titleTopMargin??25,l.db.getDiagramTitle()),(0,r.j)(p,8,D,h?.useMaxWidth??!0)},"draw"),getDir:W},B=new Map,F=0;function P(t="",e=0,s="",i=O){let r=null!==s&&s.length>0?`${i}${s}`:"";return`state-${t}${r}-${e}`}(0,o.eW)(P,"stateDomId");var M=(0,o.eW)((t,e,s,i,r,n,a,l)=>{o.cM.trace("items",e),e.forEach(e=>{switch(e.stmt){case d:case y:U(t,e,s,i,r,n,a,l);break;case p:{U(t,e.state1,s,i,r,n,a,l),U(t,e.state2,s,i,r,n,a,l);let c={id:"edge"+F,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:S,labelStyle:"",label:o.SY.sanitizeText(e.description??"",(0,o.nV)()),arrowheadStyle:f,labelpos:"c",labelType:m,thickness:_,classes:x,look:a};r.push(c),F++}}})},"setupDoc"),G=(0,o.eW)((t,e=h)=>{let s=e;if(t.doc)for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir");function j(t,e,s){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{let i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));let i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function V(t){return t?.classes?.join(" ")??""}function z(t){return t?.styles??[]}(0,o.eW)(j,"insertOrUpdateNode"),(0,o.eW)(V,"getClassesFromDbInfo"),(0,o.eW)(z,"getStylesFromDbInfo");var U=(0,o.eW)((t,e,s,i,r,n,a,l)=>{let c=e.id,h=s.get(c),d=V(h),u=z(h),p=(0,o.nV)();if(o.cM.info("dataFetcher parsedItem",e,h,u),"root"!==c){let s=T;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==y&&(s=e.type),B.get(c)||B.set(c,{id:c,shape:s,description:o.SY.sanitizeText(c,p),cssClasses:`${d} ${C}`,cssStyles:u});let h=B.get(c);e.description&&(Array.isArray(h.description)?(h.shape=E,h.description.push(e.description)):h.description?.length&&h.description.length>0?(h.shape=E,h.description===c?h.description=[e.description]:h.description=[h.description,e.description]):(h.shape=T,h.description=e.description),h.description=o.SY.sanitizeTextOrArray(h.description,p)),h.description?.length===1&&h.shape===E&&("group"===h.type?h.shape=k:h.shape=T),!h.type&&e.doc&&(o.cM.info("Setting cluster for XCX",c,G(e)),h.type="group",h.isGroup=!0,h.dir=G(e),h.shape=e.type===g?b:k,h.cssClasses=`${h.cssClasses} ${A} ${n?I:""}`);let D={labelStyle:"",shape:h.shape,label:h.description,cssClasses:h.cssClasses,cssCompiledStyles:[],cssStyles:h.cssStyles,id:c,dir:h.dir,domId:P(c,F),type:h.type,isGroup:"group"===h.type,padding:8,rx:10,ry:10,look:a};if(D.shape===b&&(D.label=""),t&&"root"!==t.id&&(o.cM.trace("Setting node ",c," to be child of its parent ",t.id),D.parentId=t.id),D.centerLabel=!0,e.note){let t={labelStyle:"",shape:"note",label:e.note.text,cssClasses:L,cssStyles:[],cssCompiledStyles:[],id:c+N+"-"+F,domId:P(c,F,w),type:h.type,isGroup:"group"===h.type,padding:p.flowchart?.padding,look:a,position:e.note.position},s=c+R,n={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:h.cssClasses,cssStyles:[],id:c+R,domId:P(c,F,v),type:"group",isGroup:!0,padding:16,look:a,position:e.note.position};F++,n.id=s,t.parentId=s,j(i,n,l),j(i,t,l),j(i,D,l);let o=c,d=t.id;"left of"===e.note.position&&(o=t.id,d=c),r.push({id:o+"-"+d,start:o,end:d,arrowhead:"none",arrowTypeEnd:"",style:S,labelStyle:"",classes:$,arrowheadStyle:f,labelpos:"c",labelType:m,thickness:_,look:a})}else j(i,D,l)}e.doc&&(o.cM.trace("Adding nodes children "),M(e,e.doc,s,i,r,!n,a,l))},"dataFetcher"),K=(0,o.eW)(()=>{B.clear(),F=0},"reset"),H={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},X=(0,o.eW)(()=>new Map,"newClassesList"),J=(0,o.eW)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),q=(0,o.eW)(t=>JSON.parse(JSON.stringify(t)),"clone"),Z=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=X(),this.documents={root:J()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=o.eu,this.setAccTitle=o.GN,this.getAccDescription=o.Mx,this.setAccDescription=o.U$,this.setDiagramTitle=o.g2,this.getDiagramTitle=o.Kr,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{(0,o.eW)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){for(let e of(this.clear(!0),Array.isArray(t)?t:t.doc))switch(e.stmt){case d:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case p:this.addRelation(e.state1,e.state2,e.description);break;case"classDef":this.addStyleClass(e.id.trim(),e.classes);break;case"style":this.handleStyleDef(e);break;case"applyClass":this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}let e=this.getStates(),s=(0,o.nV)();for(let t of(K(),U(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes),this.nodes))if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${t.id}]`);t.label=t.label[0]}}handleStyleDef(t){let e=t.id.trim().split(","),s=t.styleClass.split(",");for(let t of e){let e=this.getState(t);if(!e){let s=t.trim();this.addState(s),e=this.getState(s)}e&&(e.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){o.cM.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===p){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===d&&(e.id===H.START_NODE?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==u&&e.stmt!==d||!e.doc)return;let i=[],r=[];for(let t of e.doc)if(t.type===g){let e=q(t);e.doc=q(r),i.push(e),r=[]}else r.push(t);if(i.length>0&&r.length>0){let t={stmt:d,id:(0,a.Ox)(),type:"divider",doc:q(r)};i.push(q(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:u,stmt:u},{id:u,stmt:u,doc:this.rootDoc},!0),{id:u,doc:this.rootDoc}}addState(t,e=y,s,i,r,n,a,l){let c=t?.trim();if(this.currentDocument.states.has(c)){let t=this.currentDocument.states.get(c);if(!t)throw Error(`State not found: ${c}`);t.doc||(t.doc=s),t.type||(t.type=e)}else o.cM.info("Adding state ",c,i),this.currentDocument.states.set(c,{stmt:d,id:c,descriptions:[],type:e,doc:s,note:r,classes:[],styles:[],textStyles:[]});if(i&&(o.cM.info("Setting state description",c,i),(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(c,t.trim()))),r){let t=this.currentDocument.states.get(c);if(!t)throw Error(`State not found: ${c}`);t.note=r,t.note.text=o.SY.sanitizeText(t.note.text,(0,o.nV)())}n&&(o.cM.info("Setting state classes",c,n),(Array.isArray(n)?n:[n]).forEach(t=>this.setCssClass(c,t.trim()))),a&&(o.cM.info("Setting state styles",c,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setStyle(c,t.trim()))),l&&(o.cM.info("Setting state styles",c,a),(Array.isArray(l)?l:[l]).forEach(t=>this.setTextStyle(c,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:J()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=X(),t||(this.links=new Map,(0,o.ZH)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){o.cM.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),o.cM.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===H.START_NODE?(this.startEndCount++,`${H.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=y){return t===H.START_NODE?H.START_TYPE:e}endIdIfNeeded(t=""){return t===H.END_NODE?(this.startEndCount++,`${H.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=y){return t===H.END_NODE?H.END_TYPE:e}addRelationObjs(t,e,s=""){let i=this.startIdIfNeeded(t.id.trim()),r=this.startTypeIfNeeded(t.id.trim(),t.type),n=this.startIdIfNeeded(e.id.trim()),a=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(n,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:n,relationTitle:o.SY.sanitizeText(s,(0,o.nV)())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){let i=this.startIdIfNeeded(t.trim()),r=this.startTypeIfNeeded(t),n=this.endIdIfNeeded(e.trim()),a=this.endTypeIfNeeded(e);this.addState(i,r),this.addState(n,a),this.currentDocument.relations.push({id1:i,id2:n,relationTitle:s?o.SY.sanitizeText(s,(0,o.nV)()):void 0})}}addDescription(t,e){let s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(o.SY.sanitizeText(i,o.nV()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let s=this.classes.get(t);e&&s&&e.split(H.STYLECLASS_SEP).forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(H.COLOR_KEYWORD).exec(t)){let t=e.replace(H.FILL_KEYWORD,H.BG_FILL).replace(H.COLOR_KEYWORD,H.FILL_KEYWORD);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){let e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){let e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=(0,o.nV)();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:W(this.getRootDocV2())}}getConfig(){return(0,o.nV)().state}},Q=(0,o.eW)(t=>`
2
- defs #statediagram-barbEnd {
3
- fill: ${t.transitionColor};
4
- stroke: ${t.transitionColor};
5
- }
6
- g.stateGroup text {
7
- fill: ${t.nodeBorder};
8
- stroke: none;
9
- font-size: 10px;
10
- }
11
- g.stateGroup text {
12
- fill: ${t.textColor};
13
- stroke: none;
14
- font-size: 10px;
15
-
16
- }
17
- g.stateGroup .state-title {
18
- font-weight: bolder;
19
- fill: ${t.stateLabelColor};
20
- }
21
-
22
- g.stateGroup rect {
23
- fill: ${t.mainBkg};
24
- stroke: ${t.nodeBorder};
25
- }
26
-
27
- g.stateGroup line {
28
- stroke: ${t.lineColor};
29
- stroke-width: 1;
30
- }
31
-
32
- .transition {
33
- stroke: ${t.transitionColor};
34
- stroke-width: 1;
35
- fill: none;
36
- }
37
-
38
- .stateGroup .composit {
39
- fill: ${t.background};
40
- border-bottom: 1px
41
- }
42
-
43
- .stateGroup .alt-composit {
44
- fill: #e0e0e0;
45
- border-bottom: 1px
46
- }
47
-
48
- .state-note {
49
- stroke: ${t.noteBorderColor};
50
- fill: ${t.noteBkgColor};
51
-
52
- text {
53
- fill: ${t.noteTextColor};
54
- stroke: none;
55
- font-size: 10px;
56
- }
57
- }
58
-
59
- .stateLabel .box {
60
- stroke: none;
61
- stroke-width: 0;
62
- fill: ${t.mainBkg};
63
- opacity: 0.5;
64
- }
65
-
66
- .edgeLabel .label rect {
67
- fill: ${t.labelBackgroundColor};
68
- opacity: 0.5;
69
- }
70
- .edgeLabel {
71
- background-color: ${t.edgeLabelBackground};
72
- p {
73
- background-color: ${t.edgeLabelBackground};
74
- }
75
- rect {
76
- opacity: 0.5;
77
- background-color: ${t.edgeLabelBackground};
78
- fill: ${t.edgeLabelBackground};
79
- }
80
- text-align: center;
81
- }
82
- .edgeLabel .label text {
83
- fill: ${t.transitionLabelColor||t.tertiaryTextColor};
84
- }
85
- .label div .edgeLabel {
86
- color: ${t.transitionLabelColor||t.tertiaryTextColor};
87
- }
88
-
89
- .stateLabel text {
90
- fill: ${t.stateLabelColor};
91
- font-size: 10px;
92
- font-weight: bold;
93
- }
94
-
95
- .node circle.state-start {
96
- fill: ${t.specialStateColor};
97
- stroke: ${t.specialStateColor};
98
- }
99
-
100
- .node .fork-join {
101
- fill: ${t.specialStateColor};
102
- stroke: ${t.specialStateColor};
103
- }
104
-
105
- .node circle.state-end {
106
- fill: ${t.innerEndBackground};
107
- stroke: ${t.background};
108
- stroke-width: 1.5
109
- }
110
- .end-state-inner {
111
- fill: ${t.compositeBackground||t.background};
112
- // stroke: ${t.background};
113
- stroke-width: 1.5
114
- }
115
-
116
- .node rect {
117
- fill: ${t.stateBkg||t.mainBkg};
118
- stroke: ${t.stateBorder||t.nodeBorder};
119
- stroke-width: 1px;
120
- }
121
- .node polygon {
122
- fill: ${t.mainBkg};
123
- stroke: ${t.stateBorder||t.nodeBorder};;
124
- stroke-width: 1px;
125
- }
126
- #statediagram-barbEnd {
127
- fill: ${t.lineColor};
128
- }
129
-
130
- .statediagram-cluster rect {
131
- fill: ${t.compositeTitleBackground};
132
- stroke: ${t.stateBorder||t.nodeBorder};
133
- stroke-width: 1px;
134
- }
135
-
136
- .cluster-label, .nodeLabel {
137
- color: ${t.stateLabelColor};
138
- // line-height: 1;
139
- }
140
-
141
- .statediagram-cluster rect.outer {
142
- rx: 5px;
143
- ry: 5px;
144
- }
145
- .statediagram-state .divider {
146
- stroke: ${t.stateBorder||t.nodeBorder};
147
- }
148
-
149
- .statediagram-state .title-state {
150
- rx: 5px;
151
- ry: 5px;
152
- }
153
- .statediagram-cluster.statediagram-cluster .inner {
154
- fill: ${t.compositeBackground||t.background};
155
- }
156
- .statediagram-cluster.statediagram-cluster-alt .inner {
157
- fill: ${t.altBackground?t.altBackground:"#efefef"};
158
- }
159
-
160
- .statediagram-cluster .inner {
161
- rx:0;
162
- ry:0;
163
- }
164
-
165
- .statediagram-state rect.basic {
166
- rx: 5px;
167
- ry: 5px;
168
- }
169
- .statediagram-state rect.divider {
170
- stroke-dasharray: 10,10;
171
- fill: ${t.altBackground?t.altBackground:"#efefef"};
172
- }
173
-
174
- .note-edge {
175
- stroke-dasharray: 5;
176
- }
177
-
178
- .statediagram-note rect {
179
- fill: ${t.noteBkgColor};
180
- stroke: ${t.noteBorderColor};
181
- stroke-width: 1px;
182
- rx: 0;
183
- ry: 0;
184
- }
185
- .statediagram-note rect {
186
- fill: ${t.noteBkgColor};
187
- stroke: ${t.noteBorderColor};
188
- stroke-width: 1px;
189
- rx: 0;
190
- ry: 0;
191
- }
192
-
193
- .statediagram-note text {
194
- fill: ${t.noteTextColor};
195
- }
196
-
197
- .statediagram-note .nodeLabel {
198
- color: ${t.noteTextColor};
199
- }
200
- .statediagram .edgeLabel {
201
- color: red; // ${t.noteTextColor};
202
- }
203
-
204
- #dependencyStart, #dependencyEnd {
205
- fill: ${t.lineColor};
206
- stroke: ${t.lineColor};
207
- stroke-width: 1;
208
- }
209
-
210
- .statediagramTitleText {
211
- text-anchor: middle;
212
- font-size: 18px;
213
- fill: ${t.textColor};
214
- }
215
- `,"getStyles")},14201:function(t,e,s){s.d(e,{j:function(){return r}});var i=s(20755),r=(0,i.eW)((t,e,s,r)=>{t.attr("class",s);let{width:o,height:l,x:c,y:h}=n(t,e);(0,i.v2)(t,l,o,r);let d=a(c,h,o,l,e);t.attr("viewBox",d),i.cM.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),n=(0,i.eW)((t,e)=>{let s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),a=(0,i.eW)((t,e,s,i,r)=>`${t-r} ${e-r} ${s} ${i}`,"createViewBox")}}]);
@@ -1,29 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8810],{30298:function(e,t,i){function a(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}i.d(t,{A:function(){return a}}),(0,i(20755).eW)(a,"populateCommonDb")},38810:function(e,t,i){i.d(t,{diagram:function(){return W}});var a=i(30298),l=i(56574),r=i(38111),n=i(20755),s=i(54327),c=i(84370),o=n.vZ.pie,p={sections:new Map,showData:!1,config:o},d=p.sections,u=p.showData,g=structuredClone(o),f=(0,n.eW)(()=>structuredClone(g),"getConfig"),h=(0,n.eW)(()=>{d=new Map,u=p.showData,(0,n.ZH)()},"clear"),x=(0,n.eW)(({label:e,value:t})=>{d.has(e)||(d.set(e,t),n.cM.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),m=(0,n.eW)(()=>d,"getSections"),w=(0,n.eW)(e=>{u=e},"setShowData"),S=(0,n.eW)(()=>u,"getShowData"),T={getConfig:f,clear:h,setDiagramTitle:n.g2,getDiagramTitle:n.Kr,setAccTitle:n.GN,getAccTitle:n.eu,setAccDescription:n.U$,getAccDescription:n.Mx,addSection:x,getSections:m,setShowData:w,getShowData:S},$=(0,n.eW)((e,t)=>{(0,a.A)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),y={parse:(0,n.eW)(async e=>{let t=await (0,s.Qc)("pie",e);n.cM.debug(t),$(t,T)},"parse")},D=(0,n.eW)(e=>`
2
- .pieCircle{
3
- stroke: ${e.pieStrokeColor};
4
- stroke-width : ${e.pieStrokeWidth};
5
- opacity : ${e.pieOpacity};
6
- }
7
- .pieOuterCircle{
8
- stroke: ${e.pieOuterStrokeColor};
9
- stroke-width: ${e.pieOuterStrokeWidth};
10
- fill: none;
11
- }
12
- .pieTitleText {
13
- text-anchor: middle;
14
- font-size: ${e.pieTitleTextSize};
15
- fill: ${e.pieTitleTextColor};
16
- font-family: ${e.fontFamily};
17
- }
18
- .slice {
19
- font-family: ${e.fontFamily};
20
- fill: ${e.pieSectionTextColor};
21
- font-size:${e.pieSectionTextSize};
22
- // fill: white;
23
- }
24
- .legend text {
25
- fill: ${e.pieLegendTextColor};
26
- font-family: ${e.fontFamily};
27
- font-size: ${e.pieLegendTextSize};
28
- }
29
- `,"getStyles"),C=(0,n.eW)(e=>{let t=[...e.entries()].map(e=>({label:e[0],value:e[1]})).sort((e,t)=>t.value-e.value);return(0,c.ve8)().value(e=>e.value)(t)},"createPieArcs"),W={parser:y,db:T,renderer:{draw:(0,n.eW)((e,t,i,a)=>{n.cM.debug("rendering pie chart\n"+e);let s=a.db,o=(0,n.nV)(),p=(0,l.Rb)(s.getConfig(),o.pie),d=(0,r.P)(t),u=d.append("g");u.attr("transform","translate(225,225)");let{themeVariables:g}=o,[f]=(0,l.VG)(g.pieOuterStrokeWidth);f??=2;let h=p.textPosition,x=(0,c.Nb1)().innerRadius(0).outerRadius(185),m=(0,c.Nb1)().innerRadius(185*h).outerRadius(185*h);u.append("circle").attr("cx",0).attr("cy",0).attr("r",185+f/2).attr("class","pieOuterCircle");let w=s.getSections(),S=C(w),T=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],$=(0,c.PKp)(T);u.selectAll("mySlices").data(S).enter().append("path").attr("d",x).attr("fill",e=>$(e.data.label)).attr("class","pieCircle");let y=0;w.forEach(e=>{y+=e}),u.selectAll("mySlices").data(S).enter().append("text").text(e=>(e.data.value/y*100).toFixed(0)+"%").attr("transform",e=>"translate("+m.centroid(e)+")").style("text-anchor","middle").attr("class","slice"),u.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");let D=u.selectAll(".legend").data($.domain()).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*$.domain().length/2)+")");D.append("rect").attr("width",18).attr("height",18).style("fill",$).style("stroke",$),D.data(S).append("text").attr("x",22).attr("y",14).text(e=>{let{label:t,value:i}=e.data;return s.getShowData()?`${t} [${i}]`:t});let W=512+Math.max(...D.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0));d.attr("viewBox",`0 0 ${W} 450`),(0,n.v2)(d,450,W,p.useMaxWidth)},"draw")},styles:D}}}]);