rasa-pro 3.11.3a1.dev7__py3-none-any.whl → 3.11.5__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 rasa-pro might be problematic. Click here for more details.

Files changed (135) hide show
  1. rasa/core/actions/action.py +10 -17
  2. rasa/core/actions/direct_custom_actions_executor.py +0 -1
  3. rasa/core/channels/__init__.py +0 -2
  4. rasa/core/channels/inspector/dist/assets/Tableau10-1b767f5e.js +1 -0
  5. rasa/core/channels/inspector/dist/assets/arc-f0f8bd46.js +1 -0
  6. rasa/core/channels/inspector/dist/assets/blockDiagram-38ab4fdb-7162c77d.js +118 -0
  7. rasa/core/channels/inspector/dist/assets/c4Diagram-3d4e48cf-b1d0d098.js +10 -0
  8. rasa/core/channels/inspector/dist/assets/channel-e265ea59.js +1 -0
  9. rasa/core/channels/inspector/dist/assets/classDiagram-70f12bd4-807a1b27.js +2 -0
  10. rasa/core/channels/inspector/dist/assets/classDiagram-v2-f2320105-5238dcdb.js +2 -0
  11. rasa/core/channels/inspector/dist/assets/clone-21f8a43d.js +1 -0
  12. rasa/core/channels/inspector/dist/assets/{createText-62fc7601-ef476ecd.js → createText-2e5e7dd3-75dfaa67.js} +1 -1
  13. rasa/core/channels/inspector/dist/assets/edges-e0da2a9e-df20501d.js +4 -0
  14. rasa/core/channels/inspector/dist/assets/{erDiagram-9d236eb7-fac75185.js → erDiagram-9861fffd-13cf4797.js} +4 -4
  15. rasa/core/channels/inspector/dist/assets/flowDb-956e92f1-a4991264.js +10 -0
  16. rasa/core/channels/inspector/dist/assets/flowDiagram-66a62f08-ccecf773.js +4 -0
  17. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-5c8ce12d.js +1 -0
  18. rasa/core/channels/inspector/dist/assets/flowchart-elk-definition-4a651766-b5801783.js +139 -0
  19. rasa/core/channels/inspector/dist/assets/ganttDiagram-c361ad54-161e079a.js +257 -0
  20. rasa/core/channels/inspector/dist/assets/gitGraphDiagram-72cf32ee-f38e86a4.js +70 -0
  21. rasa/core/channels/inspector/dist/assets/graph-be6ef5d8.js +1 -0
  22. rasa/core/channels/inspector/dist/assets/index-3862675e-d9ce8994.js +1 -0
  23. rasa/core/channels/inspector/dist/assets/{index-37817b51.js → index-7794b245.js} +200 -195
  24. rasa/core/channels/inspector/dist/assets/{infoDiagram-736b4530-6b731386.js → infoDiagram-f8f76790-5000a3dc.js} +1 -1
  25. rasa/core/channels/inspector/dist/assets/{journeyDiagram-df861f2b-e8579ac6.js → journeyDiagram-49397b02-8ef0a17a.js} +4 -4
  26. rasa/core/channels/inspector/dist/assets/katex-498eb57e.js +261 -0
  27. rasa/core/channels/inspector/dist/assets/layout-d649bc98.js +1 -0
  28. rasa/core/channels/inspector/dist/assets/{line-dc73d3fc.js → line-95add810.js} +1 -1
  29. rasa/core/channels/inspector/dist/assets/linear-f6025094.js +1 -0
  30. rasa/core/channels/inspector/dist/assets/mindmap-definition-fc14e90a-2e8531c4.js +312 -0
  31. rasa/core/channels/inspector/dist/assets/{pieDiagram-dbbf0591-bdf5f29b.js → pieDiagram-8a3498a8-918adfdb.js} +7 -7
  32. rasa/core/channels/inspector/dist/assets/{quadrantDiagram-4d7f4fd6-c7a0cbe4.js → quadrantDiagram-120e2f19-cbd01797.js} +1 -1
  33. rasa/core/channels/inspector/dist/assets/{requirementDiagram-6fc4c22a-7ec5410f.js → requirementDiagram-deff3bca-6a8b877b.js} +2 -2
  34. rasa/core/channels/inspector/dist/assets/sankeyDiagram-04a897e0-c377c3fe.js +8 -0
  35. rasa/core/channels/inspector/dist/assets/sequenceDiagram-704730f1-ab9e9b7f.js +122 -0
  36. rasa/core/channels/inspector/dist/assets/stateDiagram-587899a1-5e6ae67d.js +1 -0
  37. rasa/core/channels/inspector/dist/assets/stateDiagram-v2-d93cdb3a-40643476.js +1 -0
  38. rasa/core/channels/inspector/dist/assets/{styles-9c745c82-7a4e0e61.js → styles-6aaf32cf-afb8d108.js} +1 -1
  39. rasa/core/channels/inspector/dist/assets/styles-9a916d00-7edc9423.js +160 -0
  40. rasa/core/channels/inspector/dist/assets/styles-c10674c1-c1d8f7e9.js +116 -0
  41. rasa/core/channels/inspector/dist/assets/svgDrawCommon-08f97a94-f494b2ef.js +1 -0
  42. rasa/core/channels/inspector/dist/assets/{timeline-definition-5b62e21b-01ea12df.js → timeline-definition-85554ec2-11c7cdd0.js} +3 -3
  43. rasa/core/channels/inspector/dist/assets/{xychartDiagram-2b33534f-89407137.js → xychartDiagram-e933f94c-3f191ec1.js} +3 -3
  44. rasa/core/channels/inspector/dist/index.html +3 -1
  45. rasa/core/channels/inspector/index.html +2 -0
  46. rasa/core/channels/inspector/package.json +10 -3
  47. rasa/core/channels/inspector/src/App.tsx +1 -4
  48. rasa/core/channels/inspector/yarn.lock +89 -99
  49. rasa/core/channels/socketio.py +23 -2
  50. rasa/core/channels/voice_ready/audiocodes.py +42 -23
  51. rasa/core/nlg/contextual_response_rephraser.py +9 -62
  52. rasa/core/policies/enterprise_search_policy.py +12 -77
  53. rasa/core/policies/flows/flow_executor.py +2 -26
  54. rasa/core/processor.py +8 -11
  55. rasa/dialogue_understanding/generator/command_generator.py +5 -120
  56. rasa/dialogue_understanding/generator/llm_based_command_generator.py +5 -5
  57. rasa/dialogue_understanding/generator/llm_command_generator.py +1 -2
  58. rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +4 -50
  59. rasa/dialogue_understanding/generator/nlu_command_adapter.py +0 -3
  60. rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +3 -16
  61. rasa/dialogue_understanding/patterns/continue_interrupted.py +9 -0
  62. rasa/dialogue_understanding/stack/utils.py +1 -0
  63. rasa/e2e_test/e2e_test_case.py +1 -2
  64. rasa/e2e_test/utils/e2e_yaml_utils.py +1 -1
  65. rasa/e2e_test/utils/io.py +1 -1
  66. rasa/e2e_test/utils/validation.py +2 -100
  67. rasa/engine/recipes/default_recipe.py +49 -63
  68. rasa/engine/recipes/graph_recipe.py +7 -8
  69. rasa/hooks.py +9 -14
  70. rasa/model_manager/socket_bridge.py +2 -7
  71. rasa/model_manager/warm_rasa_process.py +4 -9
  72. rasa/model_training.py +1 -2
  73. rasa/nlu/classifiers/fallback_classifier.py +0 -3
  74. rasa/plugin.py +0 -11
  75. rasa/server.py +40 -2
  76. rasa/shared/constants.py +6 -26
  77. rasa/shared/core/events.py +8 -8
  78. rasa/shared/core/flows/flow.py +4 -4
  79. rasa/shared/core/flows/flow_step.py +15 -10
  80. rasa/shared/core/flows/flow_step_links.py +20 -12
  81. rasa/shared/core/flows/flow_step_sequence.py +5 -3
  82. rasa/shared/core/flows/steps/action.py +3 -2
  83. rasa/shared/core/flows/steps/call.py +3 -3
  84. rasa/shared/core/flows/steps/collect.py +6 -3
  85. rasa/shared/core/flows/steps/continuation.py +3 -1
  86. rasa/shared/core/flows/steps/end.py +3 -1
  87. rasa/shared/core/flows/steps/internal.py +2 -1
  88. rasa/shared/core/flows/steps/link.py +5 -3
  89. rasa/shared/core/flows/steps/no_operation.py +5 -3
  90. rasa/shared/core/flows/steps/set_slots.py +3 -2
  91. rasa/shared/core/flows/steps/start.py +3 -1
  92. rasa/shared/nlu/constants.py +0 -7
  93. rasa/shared/providers/llm/llm_response.py +1 -42
  94. rasa/shared/utils/llm.py +1 -1
  95. rasa/shared/utils/schemas/events.py +1 -1
  96. rasa/shared/utils/yaml.py +5 -6
  97. rasa/studio/upload.py +5 -19
  98. rasa/telemetry.py +33 -40
  99. rasa/tracing/instrumentation/attribute_extractors.py +9 -12
  100. rasa/validator.py +41 -32
  101. rasa/version.py +1 -1
  102. {rasa_pro-3.11.3a1.dev7.dist-info → rasa_pro-3.11.5.dist-info}/METADATA +7 -7
  103. {rasa_pro-3.11.3a1.dev7.dist-info → rasa_pro-3.11.5.dist-info}/RECORD +106 -107
  104. rasa/core/channels/inspector/dist/assets/arc-861ddd57.js +0 -1
  105. rasa/core/channels/inspector/dist/assets/c4Diagram-d0fbc5ce-921f02db.js +0 -10
  106. rasa/core/channels/inspector/dist/assets/classDiagram-936ed81e-b436c4f8.js +0 -2
  107. rasa/core/channels/inspector/dist/assets/classDiagram-v2-c3cb15f1-511a23cb.js +0 -2
  108. rasa/core/channels/inspector/dist/assets/edges-f2ad444c-f1878e0a.js +0 -4
  109. rasa/core/channels/inspector/dist/assets/flowDb-1972c806-201c5bbc.js +0 -6
  110. rasa/core/channels/inspector/dist/assets/flowDiagram-7ea5b25a-f904ae41.js +0 -4
  111. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-855bc5b3-b080d6f2.js +0 -1
  112. rasa/core/channels/inspector/dist/assets/flowchart-elk-definition-abe16c3d-1813da66.js +0 -139
  113. rasa/core/channels/inspector/dist/assets/ganttDiagram-9b5ea136-872af172.js +0 -266
  114. rasa/core/channels/inspector/dist/assets/gitGraphDiagram-99d0ae7c-34a0af5a.js +0 -70
  115. rasa/core/channels/inspector/dist/assets/index-2c4b9a3b-42ba3e3d.js +0 -1
  116. rasa/core/channels/inspector/dist/assets/layout-89e6403a.js +0 -1
  117. rasa/core/channels/inspector/dist/assets/linear-f5b1d2bc.js +0 -1
  118. rasa/core/channels/inspector/dist/assets/mindmap-definition-beec6740-82cb74fa.js +0 -109
  119. rasa/core/channels/inspector/dist/assets/sankeyDiagram-8f13d901-caee5554.js +0 -8
  120. rasa/core/channels/inspector/dist/assets/sequenceDiagram-b655622a-2935f8db.js +0 -122
  121. rasa/core/channels/inspector/dist/assets/stateDiagram-59f0c015-8f5d9693.js +0 -1
  122. rasa/core/channels/inspector/dist/assets/stateDiagram-v2-2b26beab-d565d1de.js +0 -1
  123. rasa/core/channels/inspector/dist/assets/styles-080da4f6-75ad421d.js +0 -110
  124. rasa/core/channels/inspector/dist/assets/styles-3dcbcfbf-7e764226.js +0 -159
  125. rasa/core/channels/inspector/dist/assets/svgDrawCommon-4835440b-4019d1bf.js +0 -1
  126. rasa/core/channels/studio_chat.py +0 -192
  127. rasa/dialogue_understanding/constants.py +0 -1
  128. rasa/dialogue_understanding/utils.py +0 -21
  129. rasa/dialogue_understanding_test/__init__.py +0 -0
  130. rasa/dialogue_understanding_test/constants.py +0 -15
  131. rasa/dialogue_understanding_test/du_test_case.py +0 -118
  132. rasa/dialogue_understanding_test/du_test_result.py +0 -11
  133. {rasa_pro-3.11.3a1.dev7.dist-info → rasa_pro-3.11.5.dist-info}/NOTICE +0 -0
  134. {rasa_pro-3.11.3a1.dev7.dist-info → rasa_pro-3.11.5.dist-info}/WHEEL +0 -0
  135. {rasa_pro-3.11.3a1.dev7.dist-info → rasa_pro-3.11.5.dist-info}/entry_points.txt +0 -0
@@ -1,159 +0,0 @@
1
- import{s as Xe,g as We,a as qe,b as He,c as F,B as Je,D as Ze,j as v,E as $e,l as et,z as Pe,h as U,d as tt,G as ye}from"./index-37817b51.js";var De=function(){var e=function(L,u,a,o){for(a=a||{},o=L.length;o--;a[L[o]]=u);return a},n=[1,16],r=[1,17],h=[1,18],l=[1,37],A=[1,38],g=[1,24],D=[1,22],B=[1,23],_=[1,29],ne=[1,30],ue=[1,31],re=[1,32],ae=[1,33],le=[1,34],ce=[1,25],oe=[1,26],he=[1,27],Ae=[1,28],d=[1,42],E=[1,39],C=[1,40],m=[1,41],k=[1,43],pe=[1,9],c=[1,8,9],Y=[1,54],K=[1,55],j=[1,56],Q=[1,57],X=[1,58],fe=[1,59],de=[1,60],W=[1,8,9,38],Ne=[1,71],V=[1,8,9,12,13,21,36,38,41,58,59,60,61,62,63,64,69,71],q=[1,8,9,12,13,19,21,36,38,41,45,58,59,60,61,62,63,64,69,71,84,86,87,88,89],H=[13,84,86,87,88,89],G=[13,63,64,84,86,87,88,89],ve=[13,58,59,60,61,62,84,86,87,88,89],Ee=[1,90],Ce=[1,8,9,36,38,41],J=[1,8,9,21],me={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,cssClassStatement:27,noteStatement:28,direction:29,acc_title:30,acc_title_value:31,acc_descr:32,acc_descr_value:33,acc_descr_multiline_value:34,namespaceIdentifier:35,STRUCT_START:36,classStatements:37,STRUCT_STOP:38,NAMESPACE:39,classIdentifier:40,STYLE_SEPARATOR:41,members:42,CLASS:43,ANNOTATION_START:44,ANNOTATION_END:45,MEMBER:46,SEPARATOR:47,relation:48,NOTE_FOR:49,noteText:50,NOTE:51,direction_tb:52,direction_bt:53,direction_rl:54,direction_lr:55,relationType:56,lineType:57,AGGREGATION:58,EXTENSION:59,COMPOSITION:60,DEPENDENCY:61,LOLLIPOP:62,LINE:63,DOTTED_LINE:64,CALLBACK:65,LINK:66,LINK_TARGET:67,CLICK:68,CALLBACK_NAME:69,CALLBACK_ARGS:70,HREF:71,CSSCLASS:72,commentToken:73,textToken:74,graphCodeTokens:75,textNoTagsToken:76,TAGSTART:77,TAGEND:78,"==":79,"--":80,PCT:81,DEFAULT:82,SPACE:83,MINUS:84,keywords:85,UNICODE_TEXT:86,NUM:87,ALPHA:88,BQUOTE_STR:89,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",30:"acc_title",31:"acc_title_value",32:"acc_descr",33:"acc_descr_value",34:"acc_descr_multiline_value",36:"STRUCT_START",38:"STRUCT_STOP",39:"NAMESPACE",41:"STYLE_SEPARATOR",43:"CLASS",44:"ANNOTATION_START",45:"ANNOTATION_END",46:"MEMBER",47:"SEPARATOR",49:"NOTE_FOR",51:"NOTE",52:"direction_tb",53:"direction_bt",54:"direction_rl",55:"direction_lr",58:"AGGREGATION",59:"EXTENSION",60:"COMPOSITION",61:"DEPENDENCY",62:"LOLLIPOP",63:"LINE",64:"DOTTED_LINE",65:"CALLBACK",66:"LINK",67:"LINK_TARGET",68:"CLICK",69:"CALLBACK_NAME",70:"CALLBACK_ARGS",71:"HREF",72:"CSSCLASS",75:"graphCodeTokens",77:"TAGSTART",78:"TAGEND",79:"==",80:"--",81:"PCT",82:"DEFAULT",83:"SPACE",84:"MINUS",85:"keywords",86:"UNICODE_TEXT",87:"NUM",88:"ALPHA",89:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[35,2],[37,1],[37,2],[37,3],[23,1],[23,3],[23,4],[23,6],[40,2],[40,3],[25,4],[42,1],[42,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[28,3],[28,2],[29,1],[29,1],[29,1],[29,1],[48,3],[48,2],[48,2],[48,1],[56,1],[56,1],[56,1],[56,1],[56,1],[57,1],[57,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[73,1],[73,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[76,1],[76,1],[76,1],[76,1],[16,1],[16,1],[16,1],[16,1],[18,1],[50,1]],performAction:function(u,a,o,i,p,t,M){var s=t.length-1;switch(p){case 8:this.$=t[s-1];break;case 9:case 11:case 12:this.$=t[s];break;case 10:case 13:this.$=t[s-1]+t[s];break;case 14:case 15:this.$=t[s-1]+"~"+t[s]+"~";break;case 16:i.addRelation(t[s]);break;case 17:t[s-1].title=i.cleanupLabel(t[s]),i.addRelation(t[s-1]);break;case 26:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 27:case 28:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 29:i.addClassesToNamespace(t[s-3],t[s-1]);break;case 30:i.addClassesToNamespace(t[s-4],t[s-1]);break;case 31:this.$=t[s],i.addNamespace(t[s]);break;case 32:this.$=[t[s]];break;case 33:this.$=[t[s-1]];break;case 34:t[s].unshift(t[s-2]),this.$=t[s];break;case 36:i.setCssClass(t[s-2],t[s]);break;case 37:i.addMembers(t[s-3],t[s-1]);break;case 38:i.setCssClass(t[s-5],t[s-3]),i.addMembers(t[s-5],t[s-1]);break;case 39:this.$=t[s],i.addClass(t[s]);break;case 40:this.$=t[s-1],i.addClass(t[s-1]),i.setClassLabel(t[s-1],t[s]);break;case 41:i.addAnnotation(t[s],t[s-2]);break;case 42:this.$=[t[s]];break;case 43:t[s].push(t[s-1]),this.$=t[s];break;case 44:break;case 45:i.addMember(t[s-1],i.cleanupLabel(t[s]));break;case 46:break;case 47:break;case 48:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 50:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 51:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 52:i.addNote(t[s],t[s-1]);break;case 53:i.addNote(t[s]);break;case 54:i.setDirection("TB");break;case 55:i.setDirection("BT");break;case 56:i.setDirection("RL");break;case 57:i.setDirection("LR");break;case 58:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 59:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 60:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 61:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 62:this.$=i.relationType.AGGREGATION;break;case 63:this.$=i.relationType.EXTENSION;break;case 64:this.$=i.relationType.COMPOSITION;break;case 65:this.$=i.relationType.DEPENDENCY;break;case 66:this.$=i.relationType.LOLLIPOP;break;case 67:this.$=i.lineType.LINE;break;case 68:this.$=i.lineType.DOTTED_LINE;break;case 69:case 75:this.$=t[s-2],i.setClickEvent(t[s-1],t[s]);break;case 70:case 76:this.$=t[s-3],i.setClickEvent(t[s-2],t[s-1]),i.setTooltip(t[s-2],t[s]);break;case 71:this.$=t[s-2],i.setLink(t[s-1],t[s]);break;case 72:this.$=t[s-3],i.setLink(t[s-2],t[s-1],t[s]);break;case 73:this.$=t[s-3],i.setLink(t[s-2],t[s-1]),i.setTooltip(t[s-2],t[s]);break;case 74:this.$=t[s-4],i.setLink(t[s-3],t[s-2],t[s]),i.setTooltip(t[s-3],t[s-1]);break;case 77:this.$=t[s-3],i.setClickEvent(t[s-2],t[s-1],t[s]);break;case 78:this.$=t[s-4],i.setClickEvent(t[s-3],t[s-2],t[s-1]),i.setTooltip(t[s-3],t[s]);break;case 79:this.$=t[s-3],i.setLink(t[s-2],t[s]);break;case 80:this.$=t[s-4],i.setLink(t[s-3],t[s-1],t[s]);break;case 81:this.$=t[s-4],i.setLink(t[s-3],t[s-1]),i.setTooltip(t[s-3],t[s]);break;case 82:this.$=t[s-5],i.setLink(t[s-4],t[s-2],t[s]),i.setTooltip(t[s-4],t[s-1]);break;case 83:i.setCssClass(t[s-1],t[s]);break}},table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:35,17:19,18:36,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:n,32:r,34:h,35:20,39:l,40:21,43:A,44:g,46:D,47:B,49:_,51:ne,52:ue,53:re,54:ae,55:le,65:ce,66:oe,68:he,72:Ae,84:d,86:E,87:C,88:m,89:k},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(pe,[2,5],{8:[1,44]}),{8:[1,45]},e(c,[2,16],{21:[1,46]}),e(c,[2,18]),e(c,[2,19]),e(c,[2,20]),e(c,[2,21]),e(c,[2,22]),e(c,[2,23]),e(c,[2,24]),e(c,[2,25]),{31:[1,47]},{33:[1,48]},e(c,[2,28]),e(c,[2,44],{48:49,56:52,57:53,13:[1,50],21:[1,51],58:Y,59:K,60:j,61:Q,62:X,63:fe,64:de}),{36:[1,61]},e(W,[2,35],{36:[1,63],41:[1,62]}),e(c,[2,46]),e(c,[2,47]),{16:64,84:d,86:E,87:C,88:m},{16:35,17:65,18:36,84:d,86:E,87:C,88:m,89:k},{16:35,17:66,18:36,84:d,86:E,87:C,88:m,89:k},{16:35,17:67,18:36,84:d,86:E,87:C,88:m,89:k},{13:[1,68]},{16:35,17:69,18:36,84:d,86:E,87:C,88:m,89:k},{13:Ne,50:70},e(c,[2,54]),e(c,[2,55]),e(c,[2,56]),e(c,[2,57]),e(V,[2,11],{16:35,18:36,17:72,19:[1,73],84:d,86:E,87:C,88:m,89:k}),e(V,[2,12],{19:[1,74]}),{15:75,16:76,84:d,86:E,87:C,88:m},{16:35,17:77,18:36,84:d,86:E,87:C,88:m,89:k},e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e([1,8,9,12,13,19,21,36,38,41,58,59,60,61,62,63,64,69,71],[2,101]),e(pe,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,17:19,35:20,40:21,16:35,18:36,5:78,30:n,32:r,34:h,39:l,43:A,44:g,46:D,47:B,49:_,51:ne,52:ue,53:re,54:ae,55:le,65:ce,66:oe,68:he,72:Ae,84:d,86:E,87:C,88:m,89:k}),{5:79,10:5,16:35,17:19,18:36,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:n,32:r,34:h,35:20,39:l,40:21,43:A,44:g,46:D,47:B,49:_,51:ne,52:ue,53:re,54:ae,55:le,65:ce,66:oe,68:he,72:Ae,84:d,86:E,87:C,88:m,89:k},e(c,[2,17]),e(c,[2,26]),e(c,[2,27]),{13:[1,81],16:35,17:80,18:36,84:d,86:E,87:C,88:m,89:k},{48:82,56:52,57:53,58:Y,59:K,60:j,61:Q,62:X,63:fe,64:de},e(c,[2,45]),{57:83,63:fe,64:de},e(H,[2,61],{56:84,58:Y,59:K,60:j,61:Q,62:X}),e(G,[2,62]),e(G,[2,63]),e(G,[2,64]),e(G,[2,65]),e(G,[2,66]),e(ve,[2,67]),e(ve,[2,68]),{8:[1,86],23:87,37:85,40:21,43:A},{16:88,84:d,86:E,87:C,88:m},{42:89,46:Ee},{45:[1,91]},{13:[1,92]},{13:[1,93]},{69:[1,94],71:[1,95]},{16:96,84:d,86:E,87:C,88:m},{13:Ne,50:97},e(c,[2,53]),e(c,[2,102]),e(V,[2,13]),e(V,[2,14]),e(V,[2,15]),{36:[2,31]},{15:98,16:76,36:[2,9],84:d,86:E,87:C,88:m},e(Ce,[2,39],{11:99,12:[1,100]}),e(pe,[2,7]),{9:[1,101]},e(J,[2,48]),{16:35,17:102,18:36,84:d,86:E,87:C,88:m,89:k},{13:[1,104],16:35,17:103,18:36,84:d,86:E,87:C,88:m,89:k},e(H,[2,60],{56:105,58:Y,59:K,60:j,61:Q,62:X}),e(H,[2,59]),{38:[1,106]},{23:87,37:107,40:21,43:A},{8:[1,108],38:[2,32]},e(W,[2,36],{36:[1,109]}),{38:[1,110]},{38:[2,42],42:111,46:Ee},{16:35,17:112,18:36,84:d,86:E,87:C,88:m,89:k},e(c,[2,69],{13:[1,113]}),e(c,[2,71],{13:[1,115],67:[1,114]}),e(c,[2,75],{13:[1,116],70:[1,117]}),{13:[1,118]},e(c,[2,83]),e(c,[2,52]),{36:[2,10]},e(Ce,[2,40]),{13:[1,119]},{1:[2,4]},e(J,[2,50]),e(J,[2,49]),{16:35,17:120,18:36,84:d,86:E,87:C,88:m,89:k},e(H,[2,58]),e(c,[2,29]),{38:[1,121]},{23:87,37:122,38:[2,33],40:21,43:A},{42:123,46:Ee},e(W,[2,37]),{38:[2,43]},e(c,[2,41]),e(c,[2,70]),e(c,[2,72]),e(c,[2,73],{67:[1,124]}),e(c,[2,76]),e(c,[2,77],{13:[1,125]}),e(c,[2,79],{13:[1,127],67:[1,126]}),{14:[1,128]},e(J,[2,51]),e(c,[2,30]),{38:[2,34]},{38:[1,129]},e(c,[2,74]),e(c,[2,78]),e(c,[2,80]),e(c,[2,81],{67:[1,130]}),e(Ce,[2,8]),e(W,[2,38]),e(c,[2,82])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],75:[2,31],98:[2,10],101:[2,4],111:[2,43],122:[2,34]},parseError:function(u,a){if(a.recoverable)this.trace(u);else{var o=new Error(u);throw o.hash=a,o}},parse:function(u){var a=this,o=[0],i=[],p=[null],t=[],M=this.table,s="",Z=0,Le=0,Ye=2,xe=1,Ke=t.slice.call(arguments,1),b=Object.create(this.lexer),I={yy:{}};for(var ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ge)&&(I.yy[ge]=this.yy[ge]);b.setInput(u,I.yy),I.yy.lexer=b,I.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var ke=b.yylloc;t.push(ke);var je=b.options&&b.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qe(){var N;return N=i.pop()||b.lex()||xe,typeof N!="number"&&(N instanceof Array&&(i=N,N=i.pop()),N=a.symbols_[N]||N),N}for(var T,O,y,Te,w={},$,S,Ie,ee;;){if(O=o[o.length-1],this.defaultActions[O]?y=this.defaultActions[O]:((T===null||typeof T>"u")&&(T=Qe()),y=M[O]&&M[O][T]),typeof y>"u"||!y.length||!y[0]){var Fe="";ee=[];for($ in M[O])this.terminals_[$]&&$>Ye&&ee.push("'"+this.terminals_[$]+"'");b.showPosition?Fe="Parse error on line "+(Z+1)+`:
2
- `+b.showPosition()+`
3
- Expecting `+ee.join(", ")+", got '"+(this.terminals_[T]||T)+"'":Fe="Parse error on line "+(Z+1)+": Unexpected "+(T==xe?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(Fe,{text:b.match,token:this.terminals_[T]||T,line:b.yylineno,loc:ke,expected:ee})}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+T);switch(y[0]){case 1:o.push(T),p.push(b.yytext),t.push(b.yylloc),o.push(y[1]),T=null,Le=b.yyleng,s=b.yytext,Z=b.yylineno,ke=b.yylloc;break;case 2:if(S=this.productions_[y[1]][1],w.$=p[p.length-S],w._$={first_line:t[t.length-(S||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(S||1)].first_column,last_column:t[t.length-1].last_column},je&&(w._$.range=[t[t.length-(S||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(w,[s,Le,Z,I.yy,y[1],p,t].concat(Ke)),typeof Te<"u")return Te;S&&(o=o.slice(0,-1*S*2),p=p.slice(0,-1*S),t=t.slice(0,-1*S)),o.push(this.productions_[y[1]][0]),p.push(w.$),t.push(w._$),Ie=M[o[o.length-2]][o[o.length-1]],o.push(Ie);break;case 3:return!0}}return!0}},ze=function(){var L={EOF:1,parseError:function(a,o){if(this.yy.parser)this.yy.parser.parseError(a,o);else throw new Error(a)},setInput:function(u,a){return this.yy=a||this.yy||{},this._input=u,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},input:function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var a=u.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},unput:function(u){var a=u.length,o=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;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),o.length-1&&(this.yylineno-=o.length-1);var p=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:o?(o.length===i.length?this.yylloc.first_column:0)+i[i.length-o.length].length-o[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(u){this.unput(this.match.slice(u))},pastInput:function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var u=this.pastInput(),a=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
5
- `+a+"^"},test_match:function(u,a){var o,i,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),i=u[0].match(/(?:\r\n?|\n).*/g),i&&(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+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,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(u[0].length),this.matched+=u[0],o=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var t in p)this[t]=p[t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,a,o,i;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),t=0;t<p.length;t++)if(o=this._input.match(this.rules[p[t]]),o&&(!a||o[0].length>a[0].length)){if(a=o,i=t,this.options.backtrack_lexer){if(u=this.test_match(o,p[t]),u!==!1)return u;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(u=this.test_match(a,p[i]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return a||this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},pushState:function(a){this.begin(a)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(a,o,i,p){switch(i){case 0:return 52;case 1:return 53;case 2:return 54;case 3:return 55;case 4:break;case 5:break;case 6:return this.begin("acc_title"),30;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),32;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 69;case 22:this.popState();break;case 23:return 70;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return this.begin("namespace"),39;case 28:return this.popState(),8;case 29:break;case 30:return this.begin("namespace-body"),36;case 31:return this.popState(),38;case 32:return"EOF_IN_STRUCT";case 33:return 8;case 34:break;case 35:return"EDGE_STATE";case 36:return this.begin("class"),43;case 37:return this.popState(),8;case 38:break;case 39:return this.popState(),this.popState(),38;case 40:return this.begin("class-body"),36;case 41:return this.popState(),38;case 42:return"EOF_IN_STRUCT";case 43:return"EDGE_STATE";case 44:return"OPEN_IN_STRUCT";case 45:break;case 46:return"MEMBER";case 47:return 72;case 48:return 65;case 49:return 66;case 50:return 68;case 51:return 49;case 52:return 51;case 53:return 44;case 54:return 45;case 55:return 71;case 56:this.popState();break;case 57:return"GENERICTYPE";case 58:this.begin("generic");break;case 59:this.popState();break;case 60:return"BQUOTE_STR";case 61:this.begin("bqstring");break;case 62:return 67;case 63:return 67;case 64:return 67;case 65:return 67;case 66:return 59;case 67:return 59;case 68:return 61;case 69:return 61;case 70:return 60;case 71:return 58;case 72:return 62;case 73:return 63;case 74:return 64;case 75:return 21;case 76:return 41;case 77:return 84;case 78:return"DOT";case 79:return"PLUS";case 80:return 81;case 81:return"EQUALS";case 82:return"EQUALS";case 83:return 88;case 84:return 12;case 85:return 14;case 86:return"PUNCTUATION";case 87:return 87;case 88:return 86;case 89:return 83;case 90:return 9}},rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,31,32,33,34,35,36,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},namespace:{rules:[26,27,28,29,30,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},"class-body":{rules:[26,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},class:{rules:[26,37,38,39,40,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},acc_descr:{rules:[9,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},acc_title:{rules:[7,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},callback_args:{rules:[22,23,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},callback_name:{rules:[19,20,21,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},href:{rules:[26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},struct:{rules:[26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},generic:{rules:[26,47,48,49,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},bqstring:{rules:[26,47,48,49,50,51,52,53,54,55,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},string:{rules:[24,25,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,36,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!0}}};return L}();me.lexer=ze;function be(){this.yy={}}return be.prototype=me,me.Parser=be,new be}();De.parser=De;const Nt=De,Oe=["#","+","~","-",""];class Re{constructor(n,r){this.memberType=r,this.visibility="",this.classifier="";const h=tt(n,F());this.parseMember(h)}getDisplayDetails(){let n=this.visibility+ye(this.id);this.memberType==="method"&&(n+=`(${ye(this.parameters.trim())})`,this.returnType&&(n+=" : "+ye(this.returnType))),n=n.trim();const r=this.parseClassifier();return{displayText:n,cssStyle:r}}parseMember(n){let r="";if(this.memberType==="method"){const h=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/,l=n.match(h);if(l){const A=l[1]?l[1].trim():"";if(Oe.includes(A)&&(this.visibility=A),this.id=l[2].trim(),this.parameters=l[3]?l[3].trim():"",r=l[4]?l[4].trim():"",this.returnType=l[5]?l[5].trim():"",r===""){const g=this.returnType.substring(this.returnType.length-1);g.match(/[$*]/)&&(r=g,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const h=n.length,l=n.substring(0,1),A=n.substring(h-1);Oe.includes(l)&&(this.visibility=l),A.match(/[*?]/)&&(r=A),this.id=n.substring(this.visibility===""?0:1,r===""?h:h-1)}this.classifier=r}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}const ie="classId-";let _e=[],f={},te=[],we=0,x={},Be=0,z=[];const R=e=>v.sanitizeText(e,F()),P=function(e){const n=v.sanitizeText(e,F());let r="",h=n;if(n.indexOf("~")>0){const l=n.split("~");h=R(l[0]),r=R(l[1])}return{className:h,type:r}},st=function(e,n){const r=v.sanitizeText(e,F());n&&(n=R(n));const{className:h}=P(r);f[h].label=n},se=function(e){const n=v.sanitizeText(e,F()),{className:r,type:h}=P(n);if(Object.hasOwn(f,r))return;const l=v.sanitizeText(r,F());f[l]={id:l,type:h,label:l,cssClasses:[],methods:[],members:[],annotations:[],domId:ie+l+"-"+we},we++},Ve=function(e){const n=v.sanitizeText(e,F());if(n in f)return f[n].domId;throw new Error("Class not found: "+n)},it=function(){_e=[],f={},te=[],z=[],z.push(Me),x={},Be=0,$e()},nt=function(e){return f[e]},ut=function(){return f},rt=function(){return _e},at=function(){return te},lt=function(e){et.debug("Adding relation: "+JSON.stringify(e)),se(e.id1),se(e.id2),e.id1=P(e.id1).className,e.id2=P(e.id2).className,e.relationTitle1=v.sanitizeText(e.relationTitle1.trim(),F()),e.relationTitle2=v.sanitizeText(e.relationTitle2.trim(),F()),_e.push(e)},ct=function(e,n){const r=P(e).className;f[r].annotations.push(n)},Ge=function(e,n){se(e);const r=P(e).className,h=f[r];if(typeof n=="string"){const l=n.trim();l.startsWith("<<")&&l.endsWith(">>")?h.annotations.push(R(l.substring(2,l.length-2))):l.indexOf(")")>0?h.methods.push(new Re(l,"method")):l&&h.members.push(new Re(l,"attribute"))}},ot=function(e,n){Array.isArray(n)&&(n.reverse(),n.forEach(r=>Ge(e,r)))},ht=function(e,n){const r={id:`note${te.length}`,class:n,text:e};te.push(r)},At=function(e){return e.startsWith(":")&&(e=e.substring(1)),R(e.trim())},Se=function(e,n){e.split(",").forEach(function(r){let h=r;r[0].match(/\d/)&&(h=ie+h),f[h]!==void 0&&f[h].cssClasses.push(n)})},pt=function(e,n){e.split(",").forEach(function(r){n!==void 0&&(f[r].tooltip=R(n))})},ft=function(e,n){return n?x[n].classes[e].tooltip:f[e].tooltip},dt=function(e,n,r){const h=F();e.split(",").forEach(function(l){let A=l;l[0].match(/\d/)&&(A=ie+A),f[A]!==void 0&&(f[A].link=Pe.formatUrl(n,h),h.securityLevel==="sandbox"?f[A].linkTarget="_top":typeof r=="string"?f[A].linkTarget=R(r):f[A].linkTarget="_blank")}),Se(e,"clickable")},Et=function(e,n,r){e.split(",").forEach(function(h){Ct(h,n,r),f[h].haveCallback=!0}),Se(e,"clickable")},Ct=function(e,n,r){const h=v.sanitizeText(e,F());if(F().securityLevel!=="loose"||n===void 0)return;const A=h;if(f[A]!==void 0){const g=Ve(A);let D=[];if(typeof r=="string"){D=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let B=0;B<D.length;B++){let _=D[B].trim();_.charAt(0)==='"'&&_.charAt(_.length-1)==='"'&&(_=_.substr(1,_.length-2)),D[B]=_}}D.length===0&&D.push(g),z.push(function(){const B=document.querySelector(`[id="${g}"]`);B!==null&&B.addEventListener("click",function(){Pe.runFunc(n,...D)},!1)})}},mt=function(e){z.forEach(function(n){n(e)})},bt={LINE:0,DOTTED_LINE:1},gt={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},Me=function(e){let n=U(".mermaidTooltip");(n._groups||n)[0][0]===null&&(n=U("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),U(e).select("svg").selectAll("g.node").on("mouseover",function(){const l=U(this);if(l.attr("title")===null)return;const g=this.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.text(l.attr("title")).style("left",window.scrollX+g.left+(g.right-g.left)/2+"px").style("top",window.scrollY+g.top-14+document.body.scrollTop+"px"),n.html(n.html().replace(/&lt;br\/&gt;/g,"<br/>")),l.classed("hover",!0)}).on("mouseout",function(){n.transition().duration(500).style("opacity",0),U(this).classed("hover",!1)})};z.push(Me);let Ue="TB";const kt=()=>Ue,Tt=e=>{Ue=e},Ft=function(e){x[e]===void 0&&(x[e]={id:e,classes:{},children:{},domId:ie+e+"-"+Be},Be++)},yt=function(e){return x[e]},Dt=function(){return x},Bt=function(e,n){x[e]!==void 0&&n.map(r=>{f[r].parent=e,x[e].classes[r]=f[r]})},vt={setAccTitle:Xe,getAccTitle:We,getAccDescription:qe,setAccDescription:He,getConfig:()=>F().class,addClass:se,bindFunctions:mt,clear:it,getClass:nt,getClasses:ut,getNotes:at,addAnnotation:ct,addNote:ht,getRelations:rt,addRelation:lt,getDirection:kt,setDirection:Tt,addMember:Ge,addMembers:ot,cleanupLabel:At,lineType:bt,relationType:gt,setClickEvent:Et,setCssClass:Se,setLink:dt,getTooltip:ft,setTooltip:pt,lookUpDomId:Ve,setDiagramTitle:Je,getDiagramTitle:Ze,setClassLabel:st,addNamespace:Ft,addClassesToNamespace:Bt,getNamespace:yt,getNamespaces:Dt},_t=e=>`g.classGroup text {
7
- fill: ${e.nodeBorder||e.classText};
8
- stroke: none;
9
- font-family: ${e.fontFamily};
10
- font-size: 10px;
11
-
12
- .title {
13
- font-weight: bolder;
14
- }
15
-
16
- }
17
-
18
- .nodeLabel, .edgeLabel {
19
- color: ${e.classText};
20
- }
21
- .edgeLabel .label rect {
22
- fill: ${e.mainBkg};
23
- }
24
- .label text {
25
- fill: ${e.classText};
26
- }
27
- .edgeLabel .label span {
28
- background: ${e.mainBkg};
29
- }
30
-
31
- .classTitle {
32
- font-weight: bolder;
33
- }
34
- .node rect,
35
- .node circle,
36
- .node ellipse,
37
- .node polygon,
38
- .node path {
39
- fill: ${e.mainBkg};
40
- stroke: ${e.nodeBorder};
41
- stroke-width: 1px;
42
- }
43
-
44
-
45
- .divider {
46
- stroke: ${e.nodeBorder};
47
- stroke-width: 1;
48
- }
49
-
50
- g.clickable {
51
- cursor: pointer;
52
- }
53
-
54
- g.classGroup rect {
55
- fill: ${e.mainBkg};
56
- stroke: ${e.nodeBorder};
57
- }
58
-
59
- g.classGroup line {
60
- stroke: ${e.nodeBorder};
61
- stroke-width: 1;
62
- }
63
-
64
- .classLabel .box {
65
- stroke: none;
66
- stroke-width: 0;
67
- fill: ${e.mainBkg};
68
- opacity: 0.5;
69
- }
70
-
71
- .classLabel .label {
72
- fill: ${e.nodeBorder};
73
- font-size: 10px;
74
- }
75
-
76
- .relation {
77
- stroke: ${e.lineColor};
78
- stroke-width: 1;
79
- fill: none;
80
- }
81
-
82
- .dashed-line{
83
- stroke-dasharray: 3;
84
- }
85
-
86
- .dotted-line{
87
- stroke-dasharray: 1 2;
88
- }
89
-
90
- #compositionStart, .composition {
91
- fill: ${e.lineColor} !important;
92
- stroke: ${e.lineColor} !important;
93
- stroke-width: 1;
94
- }
95
-
96
- #compositionEnd, .composition {
97
- fill: ${e.lineColor} !important;
98
- stroke: ${e.lineColor} !important;
99
- stroke-width: 1;
100
- }
101
-
102
- #dependencyStart, .dependency {
103
- fill: ${e.lineColor} !important;
104
- stroke: ${e.lineColor} !important;
105
- stroke-width: 1;
106
- }
107
-
108
- #dependencyStart, .dependency {
109
- fill: ${e.lineColor} !important;
110
- stroke: ${e.lineColor} !important;
111
- stroke-width: 1;
112
- }
113
-
114
- #extensionStart, .extension {
115
- fill: transparent !important;
116
- stroke: ${e.lineColor} !important;
117
- stroke-width: 1;
118
- }
119
-
120
- #extensionEnd, .extension {
121
- fill: transparent !important;
122
- stroke: ${e.lineColor} !important;
123
- stroke-width: 1;
124
- }
125
-
126
- #aggregationStart, .aggregation {
127
- fill: transparent !important;
128
- stroke: ${e.lineColor} !important;
129
- stroke-width: 1;
130
- }
131
-
132
- #aggregationEnd, .aggregation {
133
- fill: transparent !important;
134
- stroke: ${e.lineColor} !important;
135
- stroke-width: 1;
136
- }
137
-
138
- #lollipopStart, .lollipop {
139
- fill: ${e.mainBkg} !important;
140
- stroke: ${e.lineColor} !important;
141
- stroke-width: 1;
142
- }
143
-
144
- #lollipopEnd, .lollipop {
145
- fill: ${e.mainBkg} !important;
146
- stroke: ${e.lineColor} !important;
147
- stroke-width: 1;
148
- }
149
-
150
- .edgeTerminals {
151
- font-size: 11px;
152
- }
153
-
154
- .classTitleText {
155
- text-anchor: middle;
156
- font-size: 18px;
157
- fill: ${e.textColor};
158
- }
159
- `,Lt=_t;export{vt as d,Nt as p,Lt as s};
@@ -1 +0,0 @@
1
- import{aP as o,m as i}from"./index-37817b51.js";const c=(s,t)=>{const r=s.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.rx!==void 0&&r.attr("rx",t.rx),t.ry!==void 0&&r.attr("ry",t.ry),t.attrs!==void 0)for(const e in t.attrs)r.attr(e,t.attrs[e]);return t.class!==void 0&&r.attr("class",t.class),r},x=(s,t)=>{const r={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};c(s,r).lower()},d=(s,t)=>{const r=t.text.replace(o," "),e=s.append("text");e.attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),t.class!==void 0&&e.attr("class",t.class);const n=e.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(r),e},h=(s,t,r,e)=>{const n=s.append("image");n.attr("x",t),n.attr("y",r);const a=i.sanitizeUrl(e);n.attr("xlink:href",a)},y=(s,t,r,e)=>{const n=s.append("use");n.attr("x",t),n.attr("y",r);const a=i.sanitizeUrl(e);n.attr("xlink:href",`#${a}`)},g=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),p=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0});export{x as a,y as b,h as c,c as d,p as e,d as f,g};
@@ -1,192 +0,0 @@
1
- import asyncio
2
- from functools import partial
3
- import json
4
- from typing import (
5
- TYPE_CHECKING,
6
- Any,
7
- Awaitable,
8
- Callable,
9
- Dict,
10
- List,
11
- Optional,
12
- Text,
13
- )
14
- import structlog
15
-
16
- from rasa.core.channels.socketio import SocketBlueprint, SocketIOInput
17
- from rasa.shared.core.trackers import EventVerbosity
18
- from sanic import Sanic
19
- from rasa.plugin import plugin_manager
20
- from rasa.hooks import hookimpl
21
-
22
- if TYPE_CHECKING:
23
- from rasa.core.channels.channel import UserMessage
24
- from rasa.shared.core.trackers import DialogueStateTracker
25
-
26
-
27
- structlogger = structlog.get_logger()
28
-
29
-
30
- def tracker_as_dump(tracker: "DialogueStateTracker") -> str:
31
- """Create a dump of the tracker state."""
32
- from rasa.shared.core.trackers import get_trackers_for_conversation_sessions
33
-
34
- multiple_tracker_sessions = get_trackers_for_conversation_sessions(tracker)
35
-
36
- if 0 <= len(multiple_tracker_sessions) <= 1:
37
- last_tracker = tracker
38
- else:
39
- last_tracker = multiple_tracker_sessions[-1]
40
-
41
- state = last_tracker.current_state(EventVerbosity.AFTER_RESTART)
42
- return json.dumps(state)
43
-
44
-
45
- class StudioTrackerUpdatePlugin:
46
- """Plugin for publishing tracker updates a socketio channel."""
47
-
48
- def __init__(self, socket_channel: "StudioChatInput") -> None:
49
- self.socket_channel = socket_channel
50
- self.tasks: List[asyncio.Task] = []
51
-
52
- def _cancel_tasks(self) -> None:
53
- """Cancel all remaining tasks."""
54
- for task in self.tasks:
55
- task.cancel()
56
- self.tasks = []
57
-
58
- def _cleanup_tasks(self) -> None:
59
- """Remove tasks that have already completed."""
60
- self.tasks = [task for task in self.tasks if not task.done()]
61
-
62
- @hookimpl # type: ignore[misc]
63
- def after_new_user_message(self, tracker: "DialogueStateTracker") -> None:
64
- """Triggers a tracker update notification after a new user message."""
65
- self.handle_tracker_update(tracker)
66
-
67
- @hookimpl # type: ignore[misc]
68
- def after_action_executed(self, tracker: "DialogueStateTracker") -> None:
69
- """Triggers a tracker update notification after an action is executed."""
70
- self.handle_tracker_update(tracker)
71
-
72
- def handle_tracker_update(self, tracker: "DialogueStateTracker") -> None:
73
- """Handles a tracker update when triggered by a hook."""
74
- structlogger.info("studio_chat.after_tracker_update", tracker=tracker)
75
- # directly create a dump to avoid the tracker getting modified by another
76
- # function before it gets published (since the publishing is scheduled
77
- # as an async task)
78
- tracker_dump = tracker_as_dump(tracker)
79
- task = asyncio.create_task(
80
- self.socket_channel.publish_tracker_update(tracker.sender_id, tracker_dump)
81
- )
82
- self.tasks.append(task)
83
- self._cleanup_tasks()
84
-
85
- @hookimpl # type: ignore[misc]
86
- def after_server_stop(self) -> None:
87
- """Cancels all remaining tasks when the server stops."""
88
- self._cancel_tasks()
89
-
90
-
91
- class StudioChatInput(SocketIOInput):
92
- """Input channel for the communication between Rasa Studio and Rasa Pro."""
93
-
94
- @classmethod
95
- def name(cls) -> Text:
96
- return "studio_chat"
97
-
98
- def __init__(
99
- self,
100
- *args: Any,
101
- **kwargs: Any,
102
- ) -> None:
103
- """Creates a ``SocketIOInput`` object."""
104
- from rasa.core.agent import Agent
105
-
106
- super().__init__(*args, **kwargs)
107
- self.agent: Optional[Agent] = None
108
-
109
- self._register_tracker_update_hook()
110
-
111
- def _register_tracker_update_hook(self) -> None:
112
- plugin_manager().register(StudioTrackerUpdatePlugin(self))
113
-
114
- async def on_tracker_updated(self, tracker: "DialogueStateTracker") -> None:
115
- """Triggers a tracker update notification after a change to the tracker."""
116
- await self.publish_tracker_update(tracker.sender_id, tracker_as_dump(tracker))
117
-
118
- async def publish_tracker_update(self, sender_id: str, tracker_dump: Dict) -> None:
119
- """Publishes a tracker update notification to the websocket."""
120
- if not self.sio:
121
- structlogger.error("studio_chat.on_tracker_updated.sio_not_initialized")
122
- return
123
- await self.sio.emit("tracker", tracker_dump, room=sender_id)
124
-
125
- async def on_message_proxy(
126
- self,
127
- on_new_message: Callable[["UserMessage"], Awaitable[Any]],
128
- message: "UserMessage",
129
- ) -> None:
130
- """Proxies the on_new_message call to the underlying channel.
131
-
132
- Triggers a tracker update notification after processing the message.
133
- """
134
- await on_new_message(message)
135
-
136
- if not self.agent:
137
- structlogger.error("studio_chat.on_message_proxy.agent_not_initialized")
138
- return
139
-
140
- tracker = await self.agent.tracker_store.retrieve(message.sender_id)
141
- if tracker is None:
142
- structlogger.error("studio_chat.on_message_proxy.tracker_not_found")
143
- return
144
-
145
- await self.on_tracker_updated(tracker)
146
-
147
- async def handle_tracker_update(self, sid: str, data: Dict) -> None:
148
- from rasa.shared.core.trackers import DialogueStateTracker
149
-
150
- structlogger.debug(
151
- "studio_chat.sio.handle_tracker_update",
152
- sid=sid,
153
- sender_id=data["sender_id"],
154
- )
155
- if self.agent is None:
156
- structlogger.error("studio_chat.sio.agent_not_initialized")
157
- return None
158
-
159
- if not (domain := self.agent.domain):
160
- structlogger.error("studio_chat.sio.domain_not_initialized")
161
- return None
162
-
163
- async with self.agent.lock_store.lock(data["sender_id"]):
164
- tracker = DialogueStateTracker.from_dict(
165
- data["sender_id"], data["events"], domain.slots
166
- )
167
-
168
- # will override an existing tracker with the same id!
169
- await self.agent.tracker_store.save(tracker)
170
-
171
- await self.on_tracker_updated(tracker)
172
-
173
- def blueprint(
174
- self, on_new_message: Callable[["UserMessage"], Awaitable[Any]]
175
- ) -> SocketBlueprint:
176
- socket_blueprint = super().blueprint(
177
- partial(self.on_message_proxy, on_new_message)
178
- )
179
-
180
- if not self.sio:
181
- structlogger.error("studio_chat.blueprint.sio_not_initialized")
182
- return socket_blueprint
183
-
184
- @socket_blueprint.listener("after_server_start") # type: ignore[misc]
185
- async def after_server_start(app: Sanic, _: asyncio.AbstractEventLoop) -> None:
186
- self.agent = app.ctx.agent
187
-
188
- @self.sio.on("update_tracker", namespace=self.namespace)
189
- async def on_update_tracker(sid: Text, data: Dict) -> None:
190
- await self.handle_tracker_update(sid, data)
191
-
192
- return socket_blueprint
@@ -1 +0,0 @@
1
- RASA_RECORD_COMMANDS_AND_PROMPTS_ENV_VAR_NAME = "RASA_RECORD_COMMANDS_AND_PROMPTS"
@@ -1,21 +0,0 @@
1
- from contextlib import contextmanager
2
- from typing import Generator
3
-
4
- from rasa.dialogue_understanding.constants import (
5
- RASA_RECORD_COMMANDS_AND_PROMPTS_ENV_VAR_NAME,
6
- )
7
- from rasa.utils.common import get_bool_env_variable
8
-
9
- record_commands_and_prompts = get_bool_env_variable(
10
- RASA_RECORD_COMMANDS_AND_PROMPTS_ENV_VAR_NAME, False
11
- )
12
-
13
-
14
- @contextmanager
15
- def set_record_commands_and_prompts() -> Generator:
16
- global record_commands_and_prompts
17
- record_commands_and_prompts = True
18
- try:
19
- yield
20
- finally:
21
- record_commands_and_prompts = False
File without changes
@@ -1,15 +0,0 @@
1
- import rasa.e2e_test.constants as constants
2
-
3
- KEY_FIXTURES = constants.KEY_FIXTURES
4
- KEY_METADATA = constants.KEY_METADATA
5
- KEY_STUB_CUSTOM_ACTIONS = constants.KEY_STUB_CUSTOM_ACTIONS
6
- KEY_USER_INPUT = constants.KEY_USER_INPUT
7
- KEY_BOT_INPUT = constants.KEY_BOT_INPUT
8
- KEY_BOT_UTTERED = constants.KEY_BOT_UTTERED
9
- KEY_STEPS = constants.KEY_STEPS
10
- KEY_TEST_CASE = constants.KEY_TEST_CASE
11
- KEY_TEST_CASES = constants.KEY_TEST_CASES
12
- KEY_COMMANDS = "commands"
13
-
14
- ACTOR_USER = "user"
15
- ACTOR_BOT = "bot"
@@ -1,118 +0,0 @@
1
- from typing import List, Optional, Dict, Any
2
-
3
- from pydantic import BaseModel, ConfigDict, Field
4
-
5
- from rasa.dialogue_understanding.commands import Command
6
- from rasa.dialogue_understanding_test.constants import (
7
- ACTOR_USER,
8
- KEY_COMMANDS,
9
- ACTOR_BOT,
10
- KEY_TEST_CASE,
11
- KEY_STEPS,
12
- KEY_FIXTURES,
13
- KEY_METADATA,
14
- KEY_USER_INPUT,
15
- KEY_BOT_INPUT,
16
- KEY_BOT_UTTERED,
17
- )
18
-
19
-
20
- class DialogueUnderstandingOutput(BaseModel):
21
- """Output containing prompts and generated commands by component.
22
-
23
- Example of commands:
24
- {
25
- "MultiStepLLMCommandGenerator": [
26
- {"command": "set_slot", "name": "slot_name", "value": "slot_value"},
27
- ],
28
- "NLUCommandAdapter": [
29
- {"command": "start_flow", "name": "test_flow"},
30
- ]
31
- }
32
-
33
- Example of prompts:
34
- {
35
- "MultiStepLLMCommandGenerator": [
36
- (
37
- "fill_slots_prompt",
38
- {
39
- "user_prompt": "<prompt content>",
40
- "system_prompt": "<prompt content>"
41
- }
42
- ),
43
- (
44
- "handle_flows_prompt",
45
- {
46
- "user_prompt": "<prompt content>",
47
- "system_prompt": "<prompt content>"
48
- }
49
- ),
50
- ],
51
- }
52
- """
53
-
54
- prompts: Dict[str, tuple[str, Dict[str, str]]]
55
- commands: Dict[str, List[Command]]
56
-
57
- model_config = ConfigDict(frozen=True)
58
-
59
- def get_component_data(
60
- self, component_name: str
61
- ) -> tuple[Optional[tuple[str, Dict[str, str]]], List[Command]]:
62
- """Get both the prompts and commands for a specific component."""
63
- return self.prompts.get(component_name), self.commands.get(component_name, [])
64
-
65
-
66
- class DialogueUnderstandingTestStep(BaseModel):
67
- actor: str
68
- text: Optional[str] = None
69
- template: Optional[str] = None
70
- line: Optional[int] = None
71
- metadata_name: Optional[str] = None
72
- commands: Optional[List[Command]] = None
73
- dialogue_understanding_output: Optional[DialogueUnderstandingOutput] = None
74
-
75
- def as_dict(self) -> Dict[str, Any]:
76
- if self.actor == ACTOR_USER:
77
- if self.commands:
78
- return {
79
- KEY_USER_INPUT: self.text,
80
- # TODO: The command should be converted into our DSL
81
- KEY_COMMANDS: [command.as_dict() for command in self.commands],
82
- }
83
- return {ACTOR_USER: self.text}
84
- elif self.actor == ACTOR_BOT:
85
- if self.text is not None:
86
- return {KEY_BOT_INPUT: self.text}
87
- elif self.template is not None:
88
- return {KEY_BOT_UTTERED: self.template}
89
-
90
- return {}
91
-
92
-
93
- class DialogueUnderstandingTestCase(BaseModel):
94
- name: str
95
- steps: list[DialogueUnderstandingTestStep] = Field(min_length=1)
96
- file: Optional[str] = None
97
- line: Optional[int] = None
98
- fixture_names: Optional[List[str]] = None
99
- metadata_name: Optional[str] = None
100
-
101
- def full_name(self) -> str:
102
- return f"{self.file}::{self.name}"
103
-
104
- def as_dict(self) -> Dict[str, Any]:
105
- result = {
106
- KEY_TEST_CASE: self.name,
107
- KEY_STEPS: [step.as_dict() for step in self.steps],
108
- }
109
- if self.fixture_names:
110
- result[KEY_FIXTURES] = self.fixture_names
111
- if self.metadata_name:
112
- result[KEY_METADATA] = self.metadata_name
113
- return result
114
-
115
-
116
- # Update forward references
117
- DialogueUnderstandingTestStep.model_rebuild()
118
- DialogueUnderstandingTestCase.model_rebuild()
@@ -1,11 +0,0 @@
1
- from typing import Optional
2
-
3
- from pydantic import BaseModel
4
-
5
- from rasa.dialogue_understanding_test.du_test_case import DialogueUnderstandingTestCase
6
-
7
-
8
- class DialogueUnderstandingTestResult(BaseModel):
9
- test_case: DialogueUnderstandingTestCase
10
- passed: bool
11
- error_line: Optional[int] = None