khoj 2.0.0b16.dev0__py3-none-any.whl → 2.0.0b16.dev8__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.
- khoj/interface/compiled/404/index.html +2 -2
- khoj/interface/compiled/_next/static/chunks/02b2f66c-c89cf69943479389.js +53 -0
- khoj/interface/compiled/_next/static/chunks/1423.7b1e8bf760d28078.js +1 -0
- khoj/interface/compiled/_next/static/chunks/1585.3de407cd92842aed.js +55 -0
- khoj/interface/compiled/_next/static/chunks/1822.0cc2f58edae71bbb.js +56 -0
- khoj/interface/compiled/_next/static/chunks/1915-cf7bfb14d1d7c694.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{2117-080746c8e170c81a.js → 2117-9da935e257b6d677.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/2327-115eb57f8f41544b.js +1 -0
- khoj/interface/compiled/_next/static/chunks/2526.8ac62b527c9ab703.js +43 -0
- khoj/interface/compiled/_next/static/chunks/2626.2125083a1ff3b80a.js +29 -0
- khoj/interface/compiled/_next/static/chunks/2684-981c00094da80a42.js +20 -0
- khoj/interface/compiled/_next/static/chunks/273.c2bdf48df1dfc5ef.js +93 -0
- khoj/interface/compiled/_next/static/chunks/3.87fb50c162c65241.js +59 -0
- khoj/interface/compiled/_next/static/chunks/3192.d7a2786f846fe872.js +148 -0
- khoj/interface/compiled/_next/static/chunks/{3260-82d2521fab032ff1.js → 3260-babf79aa1083e03a.js} +18 -63
- khoj/interface/compiled/_next/static/chunks/3574.7a94c27e6a496a56.js +63 -0
- khoj/interface/compiled/_next/static/chunks/{3595-ac8e81e04ecb89cb.js → 3595-a015df928dccf883.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/3599.53651e350d023038.js +131 -0
- khoj/interface/compiled/_next/static/chunks/3852.822389f445c9b427.js +1 -0
- khoj/interface/compiled/_next/static/chunks/3933.a3b09abdf19b7458.js +1 -0
- khoj/interface/compiled/_next/static/chunks/4323.3b06bc313e4946af.js +215 -0
- khoj/interface/compiled/_next/static/chunks/4447-111dcc7ac33e42ae.js +1 -0
- khoj/interface/compiled/_next/static/chunks/453.f8a05823b9d15c24.js +1 -0
- khoj/interface/compiled/_next/static/chunks/490.91b737ff35d6fbc1.js +1 -0
- khoj/interface/compiled/_next/static/chunks/5097.1129f707069b361f.js +1 -0
- khoj/interface/compiled/_next/static/chunks/5111.c8d55e95447d7609.js +5 -0
- khoj/interface/compiled/_next/static/chunks/5689.a323537972b343b4.js +1 -0
- khoj/interface/compiled/_next/static/chunks/572.3357cc94e3adfcba.js +262 -0
- khoj/interface/compiled/_next/static/chunks/62.53fa01be73dcb16e.js +62 -0
- khoj/interface/compiled/_next/static/chunks/7079-9cdc83e5ad213e0b.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7200-9f1d584275259536.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7626-551c62355b7b1b4a.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7811.c32bdc47a9144a63.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7986.4901bc54aadf59c3.js +1 -0
- khoj/interface/compiled/_next/static/chunks/8288.4883743fa40672e2.js +24 -0
- khoj/interface/compiled/_next/static/chunks/8382.335eadce6afb5d4a.js +1 -0
- khoj/interface/compiled/_next/static/chunks/8501.771e24303bd21479.js +24 -0
- khoj/interface/compiled/_next/static/chunks/8623.525c35f02a86ca25.js +174 -0
- khoj/interface/compiled/_next/static/chunks/8927.ba4a68dd6424b88c.js +166 -0
- khoj/interface/compiled/_next/static/chunks/{8072-e1440cb482a0940e.js → 9002-bd3304de324360eb.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/9316-b53a7fb1be7889f3.js +1 -0
- khoj/interface/compiled/_next/static/chunks/9498.df45618893b18531.js +4 -0
- khoj/interface/compiled/_next/static/chunks/959.aa25ba53e976d0c1.js +36 -0
- khoj/interface/compiled/_next/static/chunks/9808-c95c38946322e899.js +1 -0
- khoj/interface/compiled/_next/static/chunks/a764ac56.e65af2f7b1ecdaaa.js +136 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-e291b49977f43880.js → page-aa86693ebe6a688f.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{layout-8639ff99d6c2fec6.js → layout-554744a3bb43b2f1.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-1047097af99d31c7.js → page-224de8b2f24cd5a8.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{layout-2ff3e18a6feae92a.js → layout-63ef3be8435d1c99.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{page-ac7ed0a1aff1b145.js → page-60083b8e6276e6ad.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{layout-c2de87a25fededbb.js → layout-a7ad6fe9355ea57a.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{page-1567cac7b79a7c59.js → page-3699a0ef95d4a5ce.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/{page-3639e50ec3e9acfd.js → page-6ff3715005bdbb48.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/{layout-f88cedfe9ad4df7c.js → layout-30fa7eff8e7e01d5.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/{page-6081362437c82470.js → page-464010b2b4389d0d.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-819c6536c15e3d31.js → page-5b98a0ed1e0835bf.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{main-fc8e0fefa2ef3d8c.js → main-0daa33fca37d54d4.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/webpack-6912ca6b054cee28.js +1 -0
- khoj/interface/compiled/_next/static/css/{821d0d60b0b6871d.css → c34713c98384ee87.css} +1 -1
- khoj/interface/compiled/_next/static/css/{7889a30fe9c83846.css → d8ec94d00b6bf837.css} +1 -1
- khoj/interface/compiled/_next/static/media/140e5638e63f96c7-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/1755441e3a2fa970-s.p.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/4b23ab4cc10b07bc-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/b8c807255d58fc43-s.woff2 +0 -0
- khoj/interface/compiled/agents/index.html +2 -2
- khoj/interface/compiled/agents/index.txt +3 -3
- khoj/interface/compiled/automations/index.html +2 -2
- khoj/interface/compiled/automations/index.txt +4 -4
- khoj/interface/compiled/chat/index.html +2 -2
- khoj/interface/compiled/chat/index.txt +4 -4
- khoj/interface/compiled/index.html +2 -2
- khoj/interface/compiled/index.txt +3 -3
- khoj/interface/compiled/search/index.html +2 -2
- khoj/interface/compiled/search/index.txt +3 -3
- khoj/interface/compiled/settings/index.html +2 -2
- khoj/interface/compiled/settings/index.txt +5 -5
- khoj/interface/compiled/share/chat/index.html +2 -2
- khoj/interface/compiled/share/chat/index.txt +3 -3
- khoj/processor/conversation/openai/gpt.py +3 -5
- khoj/processor/conversation/openai/utils.py +12 -9
- khoj/routers/research.py +1 -1
- khoj/utils/helpers.py +2 -2
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b16.dev8.dist-info}/METADATA +4 -4
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b16.dev8.dist-info}/RECORD +89 -87
- khoj/interface/compiled/_next/static/chunks/1225.ecac11e7421504c4.js +0 -36
- khoj/interface/compiled/_next/static/chunks/1320.ae930ad00affe685.js +0 -5
- khoj/interface/compiled/_next/static/chunks/1327-e254819a9172cfa7.js +0 -20
- khoj/interface/compiled/_next/static/chunks/1915-5c6508f6ebb62a30.js +0 -1
- khoj/interface/compiled/_next/static/chunks/1940.d082758bd04e08ae.js +0 -4
- khoj/interface/compiled/_next/static/chunks/2327-438aaec1657c5ada.js +0 -1
- khoj/interface/compiled/_next/static/chunks/2475.57a0d0fd93d07af0.js +0 -93
- khoj/interface/compiled/_next/static/chunks/2481.5ce6524ba0a73f90.js +0 -55
- khoj/interface/compiled/_next/static/chunks/2939-4af3fd24b8ffc9ad.js +0 -1
- khoj/interface/compiled/_next/static/chunks/297.4c4c823ff6e3255b.js +0 -174
- khoj/interface/compiled/_next/static/chunks/3973.dc54a39586ab48be.js +0 -1
- khoj/interface/compiled/_next/static/chunks/4241.c1cd170f7f37ac59.js +0 -24
- khoj/interface/compiled/_next/static/chunks/4447-cd95608f8e93e711.js +0 -1
- khoj/interface/compiled/_next/static/chunks/4505.f09454a346269c3f.js +0 -117
- khoj/interface/compiled/_next/static/chunks/549.2bd27f59a91a9668.js +0 -148
- khoj/interface/compiled/_next/static/chunks/584.d7ce3505f169b706.js +0 -1
- khoj/interface/compiled/_next/static/chunks/6240.34f7c1fa692edd61.js +0 -24
- khoj/interface/compiled/_next/static/chunks/6d3fe5a5-f9f3c16e0bc0cdf9.js +0 -10
- khoj/interface/compiled/_next/static/chunks/7200-93ab0072359b8028.js +0 -1
- khoj/interface/compiled/_next/static/chunks/7553.f5ad54b1f6e92c49.js +0 -131
- khoj/interface/compiled/_next/static/chunks/7626-1b630f1654172341.js +0 -1
- khoj/interface/compiled/_next/static/chunks/764.dadd316e8e16d191.js +0 -63
- khoj/interface/compiled/_next/static/chunks/78.08169ab541abab4f.js +0 -43
- khoj/interface/compiled/_next/static/chunks/784.e03acf460df213d1.js +0 -1
- khoj/interface/compiled/_next/static/chunks/8086.8d39887215807fcd.js +0 -1
- khoj/interface/compiled/_next/static/chunks/8168.f074ab8c7c16d82d.js +0 -59
- khoj/interface/compiled/_next/static/chunks/8223.1705878fa7a09292.js +0 -1
- khoj/interface/compiled/_next/static/chunks/8483.94f6c9e2bee86f50.js +0 -215
- khoj/interface/compiled/_next/static/chunks/8810.fc0e479de78c7c61.js +0 -29
- khoj/interface/compiled/_next/static/chunks/8909.14ac3f43d0070cf1.js +0 -88
- khoj/interface/compiled/_next/static/chunks/9139-8ac4d9feb10f8869.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9167.098534184f03fe92.js +0 -56
- khoj/interface/compiled/_next/static/chunks/9537.e934ce37bf314509.js +0 -166
- khoj/interface/compiled/_next/static/chunks/9574.3fe8e26e95bf1c34.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9643.b34248df52ffc77c.js +0 -262
- khoj/interface/compiled/_next/static/chunks/9747.2fd9065b1435abb1.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9808-bd5d7361ad026094.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9922.98f2b2a9959b4ebe.js +0 -1
- khoj/interface/compiled/_next/static/chunks/webpack-820bd66958a5e279.js +0 -1
- khoj/interface/compiled/_next/static/media/2aa11a72f7f24b58-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/383a65b63658737d-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/85fe2766c5e6072a-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/c4250770ab8708b6-s.p.woff2 +0 -0
- /khoj/interface/compiled/_next/static/{-vo0F0aVQi0xvwp3-9CX- → uYxzoECdaO5T7Rd_Wa44U}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{-vo0F0aVQi0xvwp3-9CX- → uYxzoECdaO5T7Rd_Wa44U}/_ssgManifest.js +0 -0
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b16.dev8.dist-info}/WHEEL +0 -0
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b16.dev8.dist-info}/entry_points.txt +0 -0
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b16.dev8.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,136 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2893],{26510:function(t,e,a){a.d(e,{diagram:function(){return tL}});var r=a(74464),s=a(64342),i=a(57098),n=a(94705),o=a(55166),c=a(31954),l=a(84370),h=a(59543),d=function(){var t=(0,c.eW)(function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],n=[1,11],o=[1,13],l=[1,14],h=[1,16],d=[1,17],p=[1,18],g=[1,24],u=[1,25],x=[1,26],y=[1,27],m=[1,28],b=[1,29],T=[1,30],E=[1,31],f=[1,32],w=[1,33],I=[1,34],L=[1,35],k=[1,36],_=[1,37],P=[1,38],N=[1,39],A=[1,41],M=[1,42],S=[1,43],v=[1,44],O=[1,45],D=[1,46],W=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],$=[2,71],Y=[4,5,16,50,52,53],R=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],C=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],V=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],F=[69,70,71],q=[1,127],z={trace:(0,c.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:(0,c.eW)(function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 63:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:case 53:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 54:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 55:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 59:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 62:this.$=[i[o-2],i[o]];break;case 64:this.$=r.PLACEMENT.LEFTOF;break;case 65:this.$=r.PLACEMENT.RIGHTOF;break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 67:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 68:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 69:this.$={type:"addParticipant",actor:i[o-1],config:i[o]};break;case 70:this.$=i[o-1].trim();break;case 71:this.$={type:"addParticipant",actor:i[o]};break;case 72:this.$=r.LINETYPE.SOLID_OPEN;break;case 73:this.$=r.LINETYPE.DOTTED_OPEN;break;case 74:this.$=r.LINETYPE.SOLID;break;case 75:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=r.LINETYPE.DOTTED;break;case 77:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=r.LINETYPE.SOLID_CROSS;break;case 79:this.$=r.LINETYPE.DOTTED_CROSS;break;case 80:this.$=r.LINETYPE.SOLID_POINT;break;case 81:this.$=r.LINETYPE.DOTTED_POINT;break;case 82:this.$=r.parseMessage(i[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,12:12,13:o,14:l,17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:k,50:_,52:P,53:N,55:A,60:M,61:S,62:v,63:O,71:D},t(W,[2,5]),{9:47,12:12,13:o,14:l,17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:k,50:_,52:P,53:N,55:A,60:M,61:S,62:v,63:O,71:D},t(W,[2,7]),t(W,[2,8]),t(W,[2,14]),{12:48,50:_,52:P,53:N},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:D},{22:55,71:D},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(W,[2,29]),t(W,[2,30]),{32:[1,61]},{34:[1,62]},t(W,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:D},{22:75,71:D},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:D},{22:92,71:D},{22:93,71:D},{22:94,71:D},t([5,51,65,76,77,78,79,80,81,82,83,84,85,86],$),t(W,[2,6]),t(W,[2,15]),t(Y,[2,9],{10:95}),t(W,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},t(W,[2,21]),{5:[1,99]},{5:[1,100]},t(W,[2,24]),t(W,[2,25]),t(W,[2,26]),t(W,[2,27]),t(W,[2,28]),t(W,[2,31]),t(W,[2,32]),t(R,s,{7:101}),t(R,s,{7:102}),t(R,s,{7:103}),t(C,s,{40:104,7:105}),t(B,s,{42:106,7:107}),t(B,s,{7:107,42:108}),t(V,s,{45:109,7:110}),t(R,s,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},t([5,51],$,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:D},t(F,[2,72]),t(F,[2,73]),t(F,[2,74]),t(F,[2,75]),t(F,[2,76]),t(F,[2,77]),t(F,[2,78]),t(F,[2,79]),t(F,[2,80]),t(F,[2,81]),{22:123,71:D},{22:125,59:124,71:D},{71:[2,64]},{71:[2,65]},{57:126,86:q},{57:128,86:q},{57:129,86:q},{57:130,86:q},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:_,52:P,53:N},{5:[1,136]},t(W,[2,19]),t(W,[2,20]),t(W,[2,22]),t(W,[2,23]),{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,137],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:k,50:_,52:P,53:N,55:A,60:M,61:S,62:v,63:O,71:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,138],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:k,50:_,52:P,53:N,55:A,60:M,61:S,62:v,63:O,71:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,139],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:k,50:_,52:P,53:N,55:A,60:M,61:S,62:v,63:O,71:D},{16:[1,140]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,46],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:k,49:[1,141],50:_,52:P,53:N,55:A,60:M,61:S,62:v,63:O,71:D},{16:[1,142]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,44],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:k,48:[1,143],50:_,52:P,53:N,55:A,60:M,61:S,62:v,63:O,71:D},{16:[1,144]},{16:[1,145]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,42],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:k,47:[1,146],50:_,52:P,53:N,55:A,60:M,61:S,62:v,63:O,71:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,147],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:k,50:_,52:P,53:N,55:A,60:M,61:S,62:v,63:O,71:D},{15:[1,148]},t(W,[2,49]),t(W,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},t(W,[2,51]),t(W,[2,52]),{22:151,71:D},{22:152,71:D},{57:153,86:q},{57:154,86:q},{57:155,86:q},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},t(W,[2,16]),t(Y,[2,10]),{12:157,50:_,52:P,53:N},t(Y,[2,12]),t(Y,[2,13]),t(W,[2,18]),t(W,[2,34]),t(W,[2,35]),t(W,[2,36]),t(W,[2,37]),{15:[1,158]},t(W,[2,38]),{15:[1,159]},t(W,[2,39]),t(W,[2,40]),{15:[1,160]},t(W,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:q},{57:165,86:q},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:D},t(Y,[2,11]),t(C,s,{7:105,40:167}),t(B,s,{7:107,42:168}),t(V,s,{7:110,45:169}),t(W,[2,48]),{5:[2,70]},t(W,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:(0,c.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=e,a}},"parseError"),parse:(0,c.eW)(function(t){var e=this,a=[0],r=[],s=[null],i=[],n=this.table,o="",l=0,h=0,d=0,p=i.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;i.push(y);var m=g.options&&g.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.eW)(function(t){a.length=a.length-2*t,s.length=s.length-t,i.length=i.length-t},"popStack"),(0,c.eW)(b,"lex");for(var T,E,f,w,I,L,k,_,P,N={};;){if(f=a[a.length-1],this.defaultActions[f]?w=this.defaultActions[f]:(null==T&&(T=b()),w=n[f]&&n[f][T]),void 0===w||!w.length||!w[0]){var A="";for(L in P=[],n[f])this.terminals_[L]&&L>2&&P.push("'"+this.terminals_[L]+"'");A=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[T]||T)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==T?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(A,{text:g.match,token:this.terminals_[T]||T,line:g.yylineno,loc:y,expected:P})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+f+", token: "+T);switch(w[0]){case 1:a.push(T),s.push(g.yytext),i.push(g.yylloc),a.push(w[1]),T=null,E?(T=E,E=null):(h=g.yyleng,o=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[w[1]][1],N.$=s[s.length-k],N._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(N._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(N,[o,h,l,u.yy,w[1],s,i].concat(p))))return I;k&&(a=a.slice(0,-1*k*2),s=s.slice(0,-1*k),i=i.slice(0,-1*k)),a.push(this.productions_[w[1]][0]),s.push(N.$),i.push(N._$),_=n[a[a.length-2]][a[a.length-1]],a.push(_);break;case 3:return!0}}return!0},"parse")},H={EOF:1,parseError:(0,c.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,c.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,c.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,c.eW)(function(t){var e=t.length,a=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.eW)(function(){return this._more=!0,this},"more"),reject:(0,c.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,c.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.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,c.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,c.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.eW)(function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.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],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var i in s)this[i]=s[i];return!1},"test_match"),next:(0,c.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,r,s=this._currentRules(),i=0;i<s.length;i++)if((a=this._input.match(this.rules[s[i]]))&&(!e||a[0].length>e[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&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,c.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,c.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.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,c.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.eW)(function(t,e,a,r){switch(a){case 0:case 56:case 72:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:case 57:return e.yytext=e.yytext.trim(),71;case 11:case 17:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:case 69:return 86;case 70:return 69;case 71:return 70;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}};function j(){this.yy={}}return z.lexer=H,(0,c.eW)(j,"Parser"),j.prototype=z,z.Parser=j,new j}();d.parser=d;var p={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},g={FILLED:0,OPEN:1},u={LEFTOF:0,RIGHTOF:1,OVER:2},x=class{constructor(){this.state=new i.A(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=o.GN,this.setAccDescription=o.U$,this.setDiagramTitle=o.g2,this.getAccTitle=o.eu,this.getAccDescription=o.Mx,this.getDiagramTitle=o.Kr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,o.nV)().wrap),this.LINETYPE=p,this.ARROWTYPE=g,this.PLACEMENT=u}static{(0,c.eW)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,a,r,i){let n,o=this.state.records.currentBox;if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}",n=(0,s.z)(t,{schema:s.A})}r=n?.type??r;let c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==a)return}if(a?.text==null&&(a={text:e,type:r}),(null==r||null==a.text)&&(a={text:e,type:r}),this.state.records.actors.set(t,{box:o,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),this.state.records.prevActor){let e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e;let a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:r})}addSignal(t,e,a,r,s=!1){if(r===this.LINETYPE.ACTIVE_END&&1>this.activationCount(t??"")){let e=Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:s}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();let e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:o.nV().sequence?.wrap??!1}clear(){this.state.reset(),(0,o.ZH)()}parseMessage(t){let e=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(e),s={text:r,wrap:a};return c.cM.debug(`parseMessage: ${JSON.stringify(s)}`),s}parseBoxData(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{let e=new Option().style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}let{wrap:s,cleanedText:i}=this.extractWrap(r);return{text:i?(0,o.oO)(i,(0,o.nV)()):void 0,color:a,wrap:s}}addNote(t,e,a){let r={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},s=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:s[0],to:s[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){let a=this.getActor(t);try{let t=(0,o.oO)(e.text,(0,o.nV)());t=(t=t.replace(/=/g,"=")).replace(/&/g,"&");let r=JSON.parse(t);this.insertLinks(a,r)}catch(t){c.cM.error("error while parsing actor link text",t)}}addALink(t,e){let a=this.getActor(t);try{let t={},r=(0,o.oO)(e.text,(0,o.nV)()),s=r.indexOf("@"),i=(r=(r=r.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,s-1).trim(),n=r.slice(s+1).trim();t[i]=n,this.insertLinks(a,t)}catch(t){c.cM.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(let a in e)t.links[a]=e[a]}addProperties(t,e){let a=this.getActor(t);try{let t=(0,o.oO)(e.text,(0,o.nV)()),r=JSON.parse(t);this.insertProperties(a,r)}catch(t){c.cM.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(let a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){let a=this.getActor(t),r=document.getElementById(e.text);try{let t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(t){c.cM.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(t?.properties!==void 0)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,o.GN)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,o.nV)().sequence}},y=(0,c.eW)(t=>`.actor {
|
2
|
+
stroke: ${t.actorBorder};
|
3
|
+
fill: ${t.actorBkg};
|
4
|
+
}
|
5
|
+
|
6
|
+
text.actor > tspan {
|
7
|
+
fill: ${t.actorTextColor};
|
8
|
+
stroke: none;
|
9
|
+
}
|
10
|
+
|
11
|
+
.actor-line {
|
12
|
+
stroke: ${t.actorLineColor};
|
13
|
+
}
|
14
|
+
|
15
|
+
.innerArc {
|
16
|
+
stroke-width: 1.5;
|
17
|
+
stroke-dasharray: none;
|
18
|
+
}
|
19
|
+
|
20
|
+
.messageLine0 {
|
21
|
+
stroke-width: 1.5;
|
22
|
+
stroke-dasharray: none;
|
23
|
+
stroke: ${t.signalColor};
|
24
|
+
}
|
25
|
+
|
26
|
+
.messageLine1 {
|
27
|
+
stroke-width: 1.5;
|
28
|
+
stroke-dasharray: 2, 2;
|
29
|
+
stroke: ${t.signalColor};
|
30
|
+
}
|
31
|
+
|
32
|
+
#arrowhead path {
|
33
|
+
fill: ${t.signalColor};
|
34
|
+
stroke: ${t.signalColor};
|
35
|
+
}
|
36
|
+
|
37
|
+
.sequenceNumber {
|
38
|
+
fill: ${t.sequenceNumberColor};
|
39
|
+
}
|
40
|
+
|
41
|
+
#sequencenumber {
|
42
|
+
fill: ${t.signalColor};
|
43
|
+
}
|
44
|
+
|
45
|
+
#crosshead path {
|
46
|
+
fill: ${t.signalColor};
|
47
|
+
stroke: ${t.signalColor};
|
48
|
+
}
|
49
|
+
|
50
|
+
.messageText {
|
51
|
+
fill: ${t.signalTextColor};
|
52
|
+
stroke: none;
|
53
|
+
}
|
54
|
+
|
55
|
+
.labelBox {
|
56
|
+
stroke: ${t.labelBoxBorderColor};
|
57
|
+
fill: ${t.labelBoxBkgColor};
|
58
|
+
}
|
59
|
+
|
60
|
+
.labelText, .labelText > tspan {
|
61
|
+
fill: ${t.labelTextColor};
|
62
|
+
stroke: none;
|
63
|
+
}
|
64
|
+
|
65
|
+
.loopText, .loopText > tspan {
|
66
|
+
fill: ${t.loopTextColor};
|
67
|
+
stroke: none;
|
68
|
+
}
|
69
|
+
|
70
|
+
.loopLine {
|
71
|
+
stroke-width: 2px;
|
72
|
+
stroke-dasharray: 2, 2;
|
73
|
+
stroke: ${t.labelBoxBorderColor};
|
74
|
+
fill: ${t.labelBoxBorderColor};
|
75
|
+
}
|
76
|
+
|
77
|
+
.note {
|
78
|
+
//stroke: #decc93;
|
79
|
+
stroke: ${t.noteBorderColor};
|
80
|
+
fill: ${t.noteBkgColor};
|
81
|
+
}
|
82
|
+
|
83
|
+
.noteText, .noteText > tspan {
|
84
|
+
fill: ${t.noteTextColor};
|
85
|
+
stroke: none;
|
86
|
+
}
|
87
|
+
|
88
|
+
.activation0 {
|
89
|
+
fill: ${t.activationBkgColor};
|
90
|
+
stroke: ${t.activationBorderColor};
|
91
|
+
}
|
92
|
+
|
93
|
+
.activation1 {
|
94
|
+
fill: ${t.activationBkgColor};
|
95
|
+
stroke: ${t.activationBorderColor};
|
96
|
+
}
|
97
|
+
|
98
|
+
.activation2 {
|
99
|
+
fill: ${t.activationBkgColor};
|
100
|
+
stroke: ${t.activationBorderColor};
|
101
|
+
}
|
102
|
+
|
103
|
+
.actorPopupMenu {
|
104
|
+
position: absolute;
|
105
|
+
}
|
106
|
+
|
107
|
+
.actorPopupMenuPanel {
|
108
|
+
position: absolute;
|
109
|
+
fill: ${t.actorBkg};
|
110
|
+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
111
|
+
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
112
|
+
}
|
113
|
+
.actor-man line {
|
114
|
+
stroke: ${t.actorBorder};
|
115
|
+
fill: ${t.actorBkg};
|
116
|
+
}
|
117
|
+
.actor-man circle, line {
|
118
|
+
stroke: ${t.actorBorder};
|
119
|
+
fill: ${t.actorBkg};
|
120
|
+
stroke-width: 2px;
|
121
|
+
}
|
122
|
+
|
123
|
+
`,"getStyles"),m="actor-top",b="actor-bottom",T="actor-box",E="actor-man",f=(0,c.eW)(function(t,e){return(0,r.Mu)(t,e)},"drawRect"),w=(0,c.eW)(function(t,e,a,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};let i=e.links,n=e.actorCnt,o=e.rectData;var c="none";s&&(c="block !important");let l=t.append("g");l.attr("id","actor"+n+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",c);var d="";void 0!==o.class&&(d=" "+o.class);let p=o.width>a?o.width:a,g=l.append("rect");if(g.attr("class","actorPopupMenuPanel"+d),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",p),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),null!=i){var u=20;for(let t in i){var x=l.append("a"),y=(0,h.N)(i[t]);x.attr("xlink:href",y),x.attr("target","_blank"),Q(r)(t,x,o.x+10,o.height+u,p,20,{class:"actor"},r),u+=30}}return g.attr("height",u),{height:o.height+u,width:p}},"drawPopup"),I=(0,c.eW)(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),L=(0,c.eW)(async function(t,e,a=null){let r=t.append("foreignObject"),s=await (0,o.ur)(e.text,(0,o.iE)()),i=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(r.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){let a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);let s=a.getBBox();r.attr("x",Math.round(s.x+s.width/2-i.width/2)).attr("y",Math.round(s.y+s.height/2-i.height/2))}else if(a){let{startx:t,stopx:s,starty:n}=a;if(t>s){let e=t;t=s,s=e}r.attr("x",Math.round(t+Math.abs(t-s)/2-i.width/2)),"loopText"===e.class?r.attr("y",Math.round(n)):r.attr("y",Math.round(n-i.height))}return[r]},"drawKatex"),k=(0,c.eW)(function(t,e){let a=0,r=0,s=e.text.split(o.SY.lineBreakRegex),[i,l]=(0,n.VG)(e.fontSize),h=[],d=0,p=(0,c.eW)(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":p=(0,c.eW)(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":p=(0,c.eW)(()=>Math.round(e.y+(a+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":p=(0,c.eW)(()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[o,c]of s.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==i&&(d=o*i);let s=t.append("text");s.attr("x",e.x),s.attr("y",p()),void 0!==e.anchor&&s.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&s.style("font-family",e.fontFamily),void 0!==l&&s.style("font-size",l),void 0!==e.fontWeight&&s.style("font-weight",e.fontWeight),void 0!==e.fill&&s.attr("fill",e.fill),void 0!==e.class&&s.attr("class",e.class),void 0!==e.dy?s.attr("dy",e.dy):0!==d&&s.attr("dy",d);let g=c||n.$m;if(e.tspan){let t=s.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else s.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(s._groups||s)[0][0].getBBox().height,a=r),h.push(s)}return h},"drawText"),_=(0,c.eW)(function(t,e){function a(t,e,a,r,s){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+r-s)+" "+(t+a-1.2*s)+","+(e+r)+" "+t+","+(e+r)}(0,c.eW)(a,"genPoints");let r=t.append("polygon");return r.attr("points",a(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,k(t,e),r},"drawLabel"),P=-1,N=(0,c.eW)((t,e,a,r)=>{t.select&&a.forEach(a=>{let s=e.get(a),i=t.select("#actor"+s.actorCnt);!r.mirrorActors&&s.stopy?i.attr("y2",s.stopy+s.height/2):r.mirrorActors&&i.attr("y2",s.stopy)})},"fixLifeLineHeights"),A=(0,c.eW)(function(t,e,a,s){let i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+e.height,l=t.append("g").lower();var h=l;s||(P++,Object.keys(e.links||{}).length&&!a.forceMenus&&h.attr("onclick",I(`actor${P}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=l.append("g"),e.actorCnt=P,null!=e.links&&h.attr("id","root-"+P));let d=(0,r.kc)();var p="actor";e.properties?.class?p=e.properties.class:d.fill="#eaeaea",s?p+=` ${b}`:p+=` ${m}`,d.x=e.x,d.y=i,d.width=e.width,d.height=e.height,d.class=p,d.rx=3,d.ry=3,d.name=e.name;let g=f(h,d);if(e.rectData=d,e.properties?.icon){let t=e.properties.icon.trim();"@"===t.charAt(0)?(0,r.rB)(h,d.x+d.width-20,d.y+10,t.substr(1)):(0,r.AE)(h,d.x+d.width-20,d.y+10,t)}Z(a,(0,o.l0)(e.description))(e.description,h,d.x,d.y,d.width,d.height,{class:`actor ${T}`},a);let u=e.height;if(g.node){let t=g.node().getBBox();e.height=t.height,u=t.height}return u},"drawActorTypeParticipant"),M=(0,c.eW)(function(t,e,a,s){let i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+e.height,l=t.append("g").lower();var h=l;s||(P++,Object.keys(e.links||{}).length&&!a.forceMenus&&h.attr("onclick",I(`actor${P}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=l.append("g"),e.actorCnt=P,null!=e.links&&h.attr("id","root-"+P));let d=(0,r.kc)();var p="actor";e.properties?.class?p=e.properties.class:d.fill="#eaeaea",s?p+=` ${b}`:p+=` ${m}`,d.x=e.x,d.y=i,d.width=e.width,d.height=e.height,d.class=p,d.name=e.name;let g={...d,x:d.x+-6,y:d.y+6,class:"actor"},u=f(h,d);if(f(h,g),e.rectData=d,e.properties?.icon){let t=e.properties.icon.trim();"@"===t.charAt(0)?(0,r.rB)(h,d.x+d.width-20,d.y+10,t.substr(1)):(0,r.AE)(h,d.x+d.width-20,d.y+10,t)}Z(a,(0,o.l0)(e.description))(e.description,h,d.x-6,d.y+6,d.width,d.height,{class:`actor ${T}`},a);let x=e.height;if(u.node){let t=u.node().getBBox();e.height=t.height,x=t.height}return x},"drawActorTypeCollections"),S=(0,c.eW)(function(t,e,a,s){let i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+e.height,l=t.append("g").lower(),h=l;s||(P++,Object.keys(e.links||{}).length&&!a.forceMenus&&h.attr("onclick",I(`actor${P}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=l.append("g"),e.actorCnt=P,null!=e.links&&h.attr("id","root-"+P));let d=(0,r.kc)(),p="actor";e.properties?.class?p=e.properties.class:d.fill="#eaeaea",s?p+=` ${b}`:p+=` ${m}`,d.x=e.x,d.y=i,d.width=e.width,d.height=e.height,d.class=p,d.name=e.name;let g=d.height/2,u=g/(2.5+d.height/50),x=h.append("g"),y=h.append("g");if(x.append("path").attr("d",`M ${d.x},${d.y+g}
|
124
|
+
a ${u},${g} 0 0 0 0,${d.height}
|
125
|
+
h ${d.width-2*u}
|
126
|
+
a ${u},${g} 0 0 0 0,-${d.height}
|
127
|
+
Z
|
128
|
+
`).attr("class",p),y.append("path").attr("d",`M ${d.x},${d.y+g}
|
129
|
+
a ${u},${g} 0 0 0 0,${d.height}`).attr("stroke","#666").attr("stroke-width","1px").attr("class",p),x.attr("transform",`translate(${u}, ${-(d.height/2)})`),y.attr("transform",`translate(${d.width-u}, ${-d.height/2})`),e.rectData=d,e.properties?.icon){let t=e.properties.icon.trim(),a=d.x+d.width-20,s=d.y+10;"@"===t.charAt(0)?(0,r.rB)(h,a,s,t.substr(1)):(0,r.AE)(h,a,s,t)}Z(a,(0,o.l0)(e.description))(e.description,h,d.x,d.y,d.width,d.height,{class:`actor ${T}`},a);let E=e.height,f=x.select("path:last-child");if(f.node()){let t=f.node().getBBox();e.height=t.height,E=t.height}return E},"drawActorTypeQueue"),v=(0,c.eW)(function(t,e,a,s){let i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+75,l=t.append("g").lower();s||(P++,l.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=P);let h=t.append("g"),d=E;s?d+=` ${b}`:d+=` ${m}`,h.attr("class",d),h.attr("name",e.name);let p=(0,r.kc)();p.x=e.x,p.y=i,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor";let g=e.x+e.width/2,u=i+30;h.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),h.append("circle").attr("cx",g).attr("cy",u).attr("r",18).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),h.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${g}, ${u-18})`);let x=h.node().getBBox();return e.height=x.height+2*(a?.sequence?.labelBoxHeight??0),Z(a,(0,o.l0)(e.description))(e.description,h,p.x,p.y+18+(s?5:10),p.width,p.height,{class:`actor ${E}`},a),e.height},"drawActorTypeControl"),O=(0,c.eW)(function(t,e,a,s){let i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+75,l=t.append("g").lower(),h=t.append("g"),d=E;s?d+=` ${b}`:d+=` ${m}`,h.attr("class",d),h.attr("name",e.name);let p=(0,r.kc)();p.x=e.x,p.y=i,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor";let g=e.x+e.width/2,u=i+(s?10:25);h.append("circle").attr("cx",g).attr("cy",u).attr("r",18).attr("width",e.width).attr("height",e.height),h.append("line").attr("x1",g-18).attr("x2",g+18).attr("y1",u+18).attr("y2",u+18).attr("stroke","#333").attr("stroke-width",2);let x=h.node().getBBox();return e.height=x.height+(a?.sequence?.labelBoxHeight??0),s||(P++,l.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=P),Z(a,(0,o.l0)(e.description))(e.description,h,p.x,p.y+(s?(u-i+18-5)/2:(u+18-i)/2),p.width,p.height,{class:`actor ${E}`},a),h.attr("transform","translate(0, 9)"),e.height},"drawActorTypeEntity"),D=(0,c.eW)(function(t,e,a,s){let i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+e.height+2*a.boxTextMargin,l=t.append("g").lower(),h=l;s||(P++,Object.keys(e.links||{}).length&&!a.forceMenus&&h.attr("onclick",I(`actor${P}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=l.append("g"),e.actorCnt=P,null!=e.links&&h.attr("id","root-"+P));let d=(0,r.kc)(),p="actor";e.properties?.class?p=e.properties.class:d.fill="#eaeaea",s?p+=` ${b}`:p+=` ${m}`,d.x=e.x,d.y=i,d.width=e.width,d.height=e.height,d.class=p,d.name=e.name,d.x=e.x,d.y=i;let g=d.width/4,u=d.width/4,x=g/2,y=x/(2.5+g/50),E=h.append("g"),f=`
|
130
|
+
M ${d.x},${d.y+y}
|
131
|
+
a ${x},${y} 0 0 0 ${g},0
|
132
|
+
a ${x},${y} 0 0 0 -${g},0
|
133
|
+
l 0,${u-2*y}
|
134
|
+
a ${x},${y} 0 0 0 ${g},0
|
135
|
+
l 0,-${u-2*y}
|
136
|
+
`;E.append("path").attr("d",f).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",p),s?E.attr("transform",`translate(${1.5*g}, ${d.height/4-2*y})`):E.attr("transform",`translate(${1.5*g}, ${(d.height+y)/4})`),e.rectData=d,Z(a,(0,o.l0)(e.description))(e.description,h,d.x,d.y+(s?(d.height+u)/4:(d.height+y)/2),d.width,d.height,{class:`actor ${T}`},a);let w=E.select("path:last-child");if(w.node()){let t=w.node().getBBox();e.height=t.height+(a.sequence.labelBoxHeight??0)}return e.height},"drawActorTypeDatabase"),W=(0,c.eW)(function(t,e,a,s){let i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+80,l=t.append("g").lower();s||(P++,l.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=P);let h=t.append("g"),d=E;s?d+=` ${b}`:d+=` ${m}`,h.attr("class",d),h.attr("name",e.name);let p=(0,r.kc)();p.x=e.x,p.y=i,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor",h.append("line").attr("id","actor-man-torso"+P).attr("x1",e.x+e.width/2-75).attr("y1",i+10).attr("x2",e.x+e.width/2-15).attr("y2",i+10),h.append("line").attr("id","actor-man-arms"+P).attr("x1",e.x+e.width/2-75).attr("y1",i+0).attr("x2",e.x+e.width/2-75).attr("y2",i+20),h.append("circle").attr("cx",e.x+e.width/2).attr("cy",i+10).attr("r",30);let g=h.node().getBBox();return e.height=g.height+(a.sequence.labelBoxHeight??0),Z(a,(0,o.l0)(e.description))(e.description,h,p.x,p.y+(s?11:18),p.width,p.height,{class:`actor ${E}`},a),h.attr("transform","translate(0,22)"),e.height},"drawActorTypeBoundary"),$=(0,c.eW)(function(t,e,a,s){let i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+80,l=t.append("g").lower();s||(P++,l.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=P);let h=t.append("g"),d=E;s?d+=` ${b}`:d+=` ${m}`,h.attr("class",d),h.attr("name",e.name);let p=(0,r.kc)();p.x=e.x,p.y=i,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor",p.rx=3,p.ry=3,h.append("line").attr("id","actor-man-torso"+P).attr("x1",n).attr("y1",i+25).attr("x2",n).attr("y2",i+45),h.append("line").attr("id","actor-man-arms"+P).attr("x1",n-18).attr("y1",i+33).attr("x2",n+18).attr("y2",i+33),h.append("line").attr("x1",n-18).attr("y1",i+60).attr("x2",n).attr("y2",i+45),h.append("line").attr("x1",n).attr("y1",i+45).attr("x2",n+18-2).attr("y2",i+60);let g=h.append("circle");g.attr("cx",e.x+e.width/2),g.attr("cy",i+10),g.attr("r",15),g.attr("width",e.width),g.attr("height",e.height);let u=h.node().getBBox();return e.height=u.height,Z(a,(0,o.l0)(e.description))(e.description,h,p.x,p.y+35,p.width,p.height,{class:`actor ${E}`},a),e.height},"drawActorTypeActor"),Y=(0,c.eW)(async function(t,e,a,r){switch(e.type){case"actor":return await $(t,e,a,r);case"participant":return await A(t,e,a,r);case"boundary":return await W(t,e,a,r);case"control":return await v(t,e,a,r);case"entity":return await O(t,e,a,r);case"database":return await D(t,e,a,r);case"collections":return await M(t,e,a,r);case"queue":return await S(t,e,a,r)}},"drawActor"),R=(0,c.eW)(function(t,e,a){let r=t.append("g");F(r,e),e.name&&Z(a)(e.name,r,e.x,e.y+a.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()},"drawBox"),C=(0,c.eW)(function(t){return t.append("g")},"anchorElement"),B=(0,c.eW)(function(t,e,a,s,i){let n=(0,r.kc)(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+i%3,n.width=e.stopx-e.startx,n.height=a-e.starty,f(o,n)},"drawActivation"),V=(0,c.eW)(async function(t,e,a,s){let{boxMargin:i,boxTextMargin:n,labelBoxHeight:l,labelBoxWidth:h,messageFontFamily:d,messageFontSize:p,messageFontWeight:g}=s,u=t.append("g"),x=(0,c.eW)(function(t,e,a,r){return u.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")},"drawLoopLine");x(e.startx,e.starty,e.stopx,e.starty),x(e.stopx,e.starty,e.stopx,e.stopy),x(e.startx,e.stopy,e.stopx,e.stopy),x(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){x(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")});let y=(0,r.AD)();y.text=a,y.x=e.startx,y.y=e.starty,y.fontFamily=d,y.fontSize=p,y.fontWeight=g,y.anchor="middle",y.valign="middle",y.tspan=!1,y.width=h||50,y.height=l||20,y.textMargin=n,y.class="labelText",_(u,y),(y=X()).text=e.title,y.x=e.startx+h/2+(e.stopx-e.startx)/2,y.y=e.starty+i+n,y.anchor="middle",y.valign="middle",y.textMargin=n,y.class="loopText",y.fontFamily=d,y.fontSize=p,y.fontWeight=g,y.wrap=!0;let m=(0,o.l0)(y.text)?await L(u,y,e):k(u,y);if(void 0!==e.sectionTitles){for(let[t,a]of Object.entries(e.sectionTitles))if(a.message){y.text=a.message,y.x=e.startx+(e.stopx-e.startx)/2,y.y=e.sections[t].y+i+n,y.class="loopText",y.anchor="middle",y.valign="middle",y.tspan=!1,y.fontFamily=d,y.fontSize=p,y.fontWeight=g,y.wrap=e.wrap,(0,o.l0)(y.text)?(e.starty=e.sections[t].y,await L(u,y,e)):k(u,y);let r=Math.round(m.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));e.sections[t].height+=r-(i+n)}}return e.height=Math.round(e.stopy-e.starty),u},"drawLoop"),F=(0,c.eW)(function(t,e){(0,r.O)(t,e)},"drawBackgroundRect"),q=(0,c.eW)(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),z=(0,c.eW)(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),H=(0,c.eW)(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),j=(0,c.eW)(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),U=(0,c.eW)(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),G=(0,c.eW)(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),K=(0,c.eW)(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),X=(0,c.eW)(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),J=(0,c.eW)(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Z=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a+i/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,r,i,c,l,h){let{actorFontSize:d,actorFontFamily:p,actorFontWeight:g}=h,[u,x]=(0,n.VG)(d),y=t.split(o.SY.lineBreakRegex);for(let t=0;t<y.length;t++){let n=t*u-u*(y.length-1)/2,o=e.append("text").attr("x",a+i/2).attr("y",r).style("text-anchor","middle").style("font-size",x).style("font-weight",g).style("font-family",p);o.append("tspan").attr("x",a+i/2).attr("dy",n).text(y[t]),o.attr("y",r+c/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(o,l)}}function a(t,a,r,i,n,o,c,l){let h=a.append("switch"),d=h.append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,r,i,n,o,c,l),s(d,c)}async function r(t,a,r,i,n,c,l,h){let d=await (0,o.nH)(t,(0,o.iE)()),p=a.append("switch"),g=p.append("foreignObject").attr("x",r+n/2-d.width/2).attr("y",i+c/2-d.height/2).attr("width",d.width).attr("height",d.height).append("xhtml:div").style("height","100%").style("width","100%");g.append("div").style("text-align","center").style("vertical-align","middle").html(await (0,o.ur)(t,(0,o.iE)())),e(t,p,r,i,n,c,l,h),s(g,l)}function s(t,e){for(let a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return(0,c.eW)(t,"byText"),(0,c.eW)(e,"byTspan"),(0,c.eW)(a,"byFo"),(0,c.eW)(r,"byKatex"),(0,c.eW)(s,"_setTextAttrs"),function(s,i=!1){return i?r:"fo"===s.textPlacement?a:"old"===s.textPlacement?t:e}}(),Q=function(){function t(t,e,a,s,i,n,o){r(e.append("text").attr("x",a).attr("y",s).style("text-anchor","start").text(t),o)}function e(t,e,a,s,i,n,c,l){let{actorFontSize:h,actorFontFamily:d,actorFontWeight:p}=l,g=t.split(o.SY.lineBreakRegex);for(let t=0;t<g.length;t++){let i=t*h-h*(g.length-1)/2,o=e.append("text").attr("x",a).attr("y",s).style("text-anchor","start").style("font-size",h).style("font-weight",p).style("font-family",d);o.append("tspan").attr("x",a).attr("dy",i).text(g[t]),o.attr("y",s+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(o,c)}}function a(t,a,s,i,n,o,c,l){let h=a.append("switch"),d=h.append("foreignObject").attr("x",s).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,i,n,o,c,l),r(d,c)}function r(t,e){for(let a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return(0,c.eW)(t,"byText"),(0,c.eW)(e,"byTspan"),(0,c.eW)(a,"byFo"),(0,c.eW)(r,"_setTextAttrs"),function(r){return"fo"===r.textPlacement?a:"old"===r.textPlacement?t:e}}(),tt={drawRect:f,drawText:k,drawLabel:_,drawActor:Y,drawBox:R,drawPopup:w,anchorElement:C,drawActivation:B,drawLoop:V,drawBackgroundRect:F,insertArrowHead:j,insertArrowFilledHead:U,insertSequenceNumber:G,insertArrowCrossHead:K,insertDatabaseIcon:q,insertComputerIcon:z,insertClockIcon:H,getTextObj:X,getNoteRect:J,fixLifeLineHeights:N,sanitizeUrl:h.N},te={},ta={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:(0,c.eW)(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:(0,c.eW)(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:(0,c.eW)(function(t){this.boxes.push(t)},"addBox"),addActor:(0,c.eW)(function(t){this.actors.push(t)},"addActor"),addLoop:(0,c.eW)(function(t){this.loops.push(t)},"addLoop"),addMessage:(0,c.eW)(function(t){this.messages.push(t)},"addMessage"),addNote:(0,c.eW)(function(t){this.notes.push(t)},"addNote"),lastActor:(0,c.eW)(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:(0,c.eW)(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:(0,c.eW)(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:(0,c.eW)(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,c.eW)(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,tp((0,o.nV)())},"init"),updateVal:(0,c.eW)(function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])},"updateVal"),updateBounds:(0,c.eW)(function(t,e,a,r){let s=this,i=0;function n(n){return(0,c.eW)(function(o){i++;let c=s.sequenceItems.length-i+1;s.updateVal(o,"starty",e-c*te.boxMargin,Math.min),s.updateVal(o,"stopy",r+c*te.boxMargin,Math.max),s.updateVal(ta.data,"startx",t-c*te.boxMargin,Math.min),s.updateVal(ta.data,"stopx",a+c*te.boxMargin,Math.max),"activation"!==n&&(s.updateVal(o,"startx",t-c*te.boxMargin,Math.min),s.updateVal(o,"stopx",a+c*te.boxMargin,Math.max),s.updateVal(ta.data,"starty",e-c*te.boxMargin,Math.min),s.updateVal(ta.data,"stopy",r+c*te.boxMargin,Math.max))},"updateItemBounds")}(0,c.eW)(n,"updateFn"),this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))},"updateBounds"),insert:(0,c.eW)(function(t,e,a,r){let s=o.SY.getMin(t,a),i=o.SY.getMax(t,a),n=o.SY.getMin(e,r),c=o.SY.getMax(e,r);this.updateVal(ta.data,"startx",s,Math.min),this.updateVal(ta.data,"starty",n,Math.min),this.updateVal(ta.data,"stopx",i,Math.max),this.updateVal(ta.data,"stopy",c,Math.max),this.updateBounds(s,n,i,c)},"insert"),newActivation:(0,c.eW)(function(t,e,a){let r=a.get(t.from),s=tg(t.from).length||0,i=r.x+r.width/2+(s-1)*te.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+te.activationWidth,stopy:void 0,actor:t.from,anchored:tt.anchorElement(e)})},"newActivation"),endActivation:(0,c.eW)(function(t){let e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:(0,c.eW)(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:(0,c.eW)(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:(0,c.eW)(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:(0,c.eW)(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:(0,c.eW)(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:ta.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:(0,c.eW)(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:(0,c.eW)(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:(0,c.eW)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=o.SY.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:(0,c.eW)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,c.eW)(function(){return{bounds:this.data,models:this.models}},"getBounds")},tr=(0,c.eW)(async function(t,e){ta.bumpVerticalPos(te.boxMargin),e.height=te.boxMargin,e.starty=ta.getVerticalPos();let a=(0,r.kc)();a.x=e.startx,a.y=e.starty,a.width=e.width||te.width,a.class="note";let s=t.append("g"),i=tt.drawRect(s,a),n=(0,r.AD)();n.x=e.startx,n.y=e.starty,n.width=a.width,n.dy="1em",n.text=e.message,n.class="noteText",n.fontFamily=te.noteFontFamily,n.fontSize=te.noteFontSize,n.fontWeight=te.noteFontWeight,n.anchor=te.noteAlign,n.textMargin=te.noteMargin,n.valign="center";let c=Math.round(((0,o.l0)(n.text)?await L(s,n):k(s,n)).map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));i.attr("height",c+2*te.noteMargin),e.height+=c+2*te.noteMargin,ta.bumpVerticalPos(c+2*te.noteMargin),e.stopy=e.starty+c+2*te.noteMargin,e.stopx=e.startx+a.width,ta.insert(e.startx,e.starty,e.stopx,e.stopy),ta.models.addNote(e)},"drawNote"),ts=(0,c.eW)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),ti=(0,c.eW)(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),tn=(0,c.eW)(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function to(t,e){let a;ta.bumpVerticalPos(10);let{startx:r,stopx:s,message:i}=e,c=o.SY.splitBreaks(i).length,l=(0,o.l0)(i),h=l?await (0,o.nH)(i,(0,o.nV)()):n.w8.calculateTextDimensions(i,ts(te));if(!l){let t=h.height/c;e.height+=t,ta.bumpVerticalPos(t)}let d=h.height-10,p=h.width;if(r===s){a=ta.getVerticalPos()+d,te.rightAngles||(d+=te.boxMargin,a=ta.getVerticalPos()+d),d+=30;let t=o.SY.getMax(p/2,te.width/2);ta.insert(r-t,ta.getVerticalPos()-10+d,s+t,ta.getVerticalPos()+30+d)}else d+=te.boxMargin,a=ta.getVerticalPos()+d,ta.insert(r,a-10,s,a);return ta.bumpVerticalPos(d),e.height+=d,e.stopy=e.starty+e.height,ta.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),a}(0,c.eW)(to,"boundMessage");var tc=(0,c.eW)(async function(t,e,a,s){let i;let{startx:c,stopx:l,starty:h,message:d,type:p,sequenceIndex:g,sequenceVisible:u}=e,x=n.w8.calculateTextDimensions(d,ts(te)),y=(0,r.AD)();y.x=c,y.y=h+10,y.width=l-c,y.class="messageText",y.dy="1em",y.text=d,y.fontFamily=te.messageFontFamily,y.fontSize=te.messageFontSize,y.fontWeight=te.messageFontWeight,y.anchor=te.messageAlign,y.valign="center",y.textMargin=te.wrapPadding,y.tspan=!1,(0,o.l0)(y.text)?await L(t,y,{startx:c,stopx:l,starty:a}):k(t,y);let m=x.width;c===l?i=te.rightAngles?t.append("path").attr("d",`M ${c},${a} H ${c+o.SY.getMax(te.width/2,m/2)} V ${a+25} H ${c}`):t.append("path").attr("d","M "+c+","+a+" C "+(c+60)+","+(a-10)+" "+(c+60)+","+(a+30)+" "+c+","+(a+20)):((i=t.append("line")).attr("x1",c),i.attr("y1",a),i.attr("x2",l),i.attr("y2",a)),p===s.db.LINETYPE.DOTTED||p===s.db.LINETYPE.DOTTED_CROSS||p===s.db.LINETYPE.DOTTED_POINT||p===s.db.LINETYPE.DOTTED_OPEN||p===s.db.LINETYPE.BIDIRECTIONAL_DOTTED?(i.style("stroke-dasharray","3, 3"),i.attr("class","messageLine1")):i.attr("class","messageLine0");let b="";te.arrowMarkerAbsolute&&(b=(0,o.Gr)(!0)),i.attr("stroke-width",2),i.attr("stroke","none"),i.style("fill","none"),(p===s.db.LINETYPE.SOLID||p===s.db.LINETYPE.DOTTED)&&i.attr("marker-end","url("+b+"#arrowhead)"),(p===s.db.LINETYPE.BIDIRECTIONAL_SOLID||p===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(i.attr("marker-start","url("+b+"#arrowhead)"),i.attr("marker-end","url("+b+"#arrowhead)")),(p===s.db.LINETYPE.SOLID_POINT||p===s.db.LINETYPE.DOTTED_POINT)&&i.attr("marker-end","url("+b+"#filled-head)"),(p===s.db.LINETYPE.SOLID_CROSS||p===s.db.LINETYPE.DOTTED_CROSS)&&i.attr("marker-end","url("+b+"#crosshead)"),(u||te.showSequenceNumbers)&&((p===s.db.LINETYPE.BIDIRECTIONAL_SOLID||p===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(c<l?i.attr("x1",c+12):i.attr("x1",c+6)),t.append("line").attr("x1",c).attr("y1",a).attr("x2",c).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+b+"#sequencenumber)"),t.append("text").attr("x",c).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(g))},"drawMessage"),tl=(0,c.eW)(function(t,e,a,r,s,i,n){let c,l=0,h=0,d=0;for(let t of r){let r=e.get(t),i=r.box;c&&c!=i&&(n||ta.models.addBox(c),h+=te.boxMargin+c.margin),i&&i!=c&&(n||(i.x=l+h,i.y=s),h+=i.margin),r.width=r.width||te.width,r.height=o.SY.getMax(r.height||te.height,te.height),r.margin=r.margin||te.actorMargin,d=o.SY.getMax(d,r.height),a.get(r.name)&&(h+=r.width/2),r.x=l+h,r.starty=ta.getVerticalPos(),ta.insert(r.x,s,r.x+r.width,r.height),l+=r.width+h,r.box&&(r.box.width=l+i.margin-r.box.x),h=r.margin,c=r.box,ta.models.addActor(r)}c&&!n&&ta.models.addBox(c),ta.bumpVerticalPos(d)},"addActorRenderingData"),th=(0,c.eW)(async function(t,e,a,r){if(r){let r=0;for(let s of(ta.bumpVerticalPos(2*te.boxMargin),a)){let a=e.get(s);a.stopy||(a.stopy=ta.getVerticalPos());let i=await tt.drawActor(t,a,te,!0);r=o.SY.getMax(r,i)}ta.bumpVerticalPos(r+te.boxMargin)}else for(let r of a){let a=e.get(r);await tt.drawActor(t,a,te,!1)}},"drawActors"),td=(0,c.eW)(function(t,e,a,r){let s=0,i=0;for(let n of a){let a=e.get(n),o=tT(a),c=tt.drawPopup(t,a,o,te,te.forceMenus,r);c.height>s&&(s=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:s,maxWidth:i}},"drawActorsPopup"),tp=(0,c.eW)(function(t){(0,o.Yc)(te,t),t.fontFamily&&(te.actorFontFamily=te.noteFontFamily=te.messageFontFamily=t.fontFamily),t.fontSize&&(te.actorFontSize=te.noteFontSize=te.messageFontSize=t.fontSize),t.fontWeight&&(te.actorFontWeight=te.noteFontWeight=te.messageFontWeight=t.fontWeight)},"setConf"),tg=(0,c.eW)(function(t){return ta.activations.filter(function(e){return e.actor===t})},"actorActivations"),tu=(0,c.eW)(function(t,e){let a=e.get(t),r=tg(t);return[r.reduce(function(t,e){return o.SY.getMin(t,e.startx)},a.x+a.width/2-1),r.reduce(function(t,e){return o.SY.getMax(t,e.stopx)},a.x+a.width/2+1)]},"activationBounds");function tx(t,e,a,r,s){ta.bumpVerticalPos(a);let i=r;if(e.id&&e.message&&t[e.id]){let a=t[e.id].width,s=ts(te);e.message=n.w8.wrapLabel(`[${e.message}]`,a-2*te.wrapPadding,s),e.width=a,e.wrap=!0;let l=n.w8.calculateTextDimensions(e.message,s),h=o.SY.getMax(l.height,te.labelBoxHeight);i=r+h,c.cM.debug(`${h} - ${e.message}`)}s(e),ta.bumpVerticalPos(i)}function ty(t,e,a,r,s,i,n){function o(a,r){a.x<s.get(t.from).x?(ta.insert(e.stopx-r,e.starty,e.startx,e.stopy+a.height/2+te.noteMargin),e.stopx=e.stopx+r):(ta.insert(e.startx,e.starty,e.stopx+r,e.stopy+a.height/2+te.noteMargin),e.stopx=e.stopx-r)}function l(a,r){a.x<s.get(t.to).x?(ta.insert(e.startx-r,e.starty,e.stopx,e.stopy+a.height/2+te.noteMargin),e.startx=e.startx+r):(ta.insert(e.stopx,e.starty,e.startx+r,e.stopy+a.height/2+te.noteMargin),e.startx=e.startx-r)}(0,c.eW)(o,"receiverAdjustment"),(0,c.eW)(l,"senderAdjustment");let h=["actor","control","entity","database"];if(i.get(t.to)==r){let e=s.get(t.to),r=h.includes(e.type)?21:e.width/2+3;o(e,r),e.starty=a-e.height/2,ta.bumpVerticalPos(e.height/2)}else if(n.get(t.from)==r){let e=s.get(t.from);if(te.mirrorActors){let t=h.includes(e.type)?18:e.width/2;l(e,t)}e.stopy=a-e.height/2,ta.bumpVerticalPos(e.height/2)}else if(n.get(t.to)==r){let e=s.get(t.to);if(te.mirrorActors){let t=h.includes(e.type)?21:e.width/2+3;o(e,t)}e.stopy=a-e.height/2,ta.bumpVerticalPos(e.height/2)}}(0,c.eW)(tx,"adjustLoopHeightForWrap"),(0,c.eW)(ty,"adjustCreatedDestroyedData");var tm=(0,c.eW)(async function(t,e,a,r){let s;let{securityLevel:i,sequence:n}=(0,o.nV)();te=n,"sandbox"===i&&(s=(0,l.Ys)("#i"+e));let h="sandbox"===i?(0,l.Ys)(s.nodes()[0].contentDocument.body):(0,l.Ys)("body"),d="sandbox"===i?s.nodes()[0].contentDocument:document;ta.init(),c.cM.debug(r.db);let p="sandbox"===i?h.select(`[id="${e}"]`):(0,l.Ys)(`[id="${e}"]`),g=r.db.getActors(),u=r.db.getCreatedActors(),x=r.db.getDestroyedActors(),y=r.db.getBoxes(),m=r.db.getActorKeys(),b=r.db.getMessages(),T=r.db.getDiagramTitle(),E=r.db.hasAtLeastOneBox(),f=r.db.hasAtLeastOneBoxWithTitle(),w=await tb(g,b,r);if(te.height=await tE(g,w,y),tt.insertComputerIcon(p),tt.insertDatabaseIcon(p),tt.insertClockIcon(p),E&&(ta.bumpVerticalPos(te.boxMargin),f&&ta.bumpVerticalPos(y[0].textMaxHeight)),!0===te.hideUnusedParticipants){let t=new Set;b.forEach(e=>{t.add(e.from),t.add(e.to)}),m=m.filter(e=>t.has(e))}tl(p,g,u,m,0,b,!1);let I=await tI(b,g,w,r);function L(t,e){let a=ta.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),tt.drawActivation(p,a,e,te,tg(t.from).length),ta.insert(a.startx,e-10,a.stopx,e)}tt.insertArrowHead(p),tt.insertArrowCrossHead(p),tt.insertArrowFilledHead(p),tt.insertSequenceNumber(p),(0,c.eW)(L,"activeEnd");let k=1,_=1,P=[],A=[],M=0;for(let t of b){let e,a,s;switch(t.type){case r.db.LINETYPE.NOTE:ta.resetVerticalPos(),a=t.noteModel,await tr(p,a);break;case r.db.LINETYPE.ACTIVE_START:ta.newActivation(t,p,g);break;case r.db.LINETYPE.ACTIVE_END:L(t,ta.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:tx(I,t,te.boxMargin,te.boxMargin+te.boxTextMargin,t=>ta.newLoop(t));break;case r.db.LINETYPE.LOOP_END:e=ta.endLoop(),await tt.drawLoop(p,e,"loop",te),ta.bumpVerticalPos(e.stopy-ta.getVerticalPos()),ta.models.addLoop(e);break;case r.db.LINETYPE.RECT_START:tx(I,t,te.boxMargin,te.boxMargin,t=>ta.newLoop(void 0,t.message));break;case r.db.LINETYPE.RECT_END:e=ta.endLoop(),A.push(e),ta.models.addLoop(e),ta.bumpVerticalPos(e.stopy-ta.getVerticalPos());break;case r.db.LINETYPE.OPT_START:tx(I,t,te.boxMargin,te.boxMargin+te.boxTextMargin,t=>ta.newLoop(t));break;case r.db.LINETYPE.OPT_END:e=ta.endLoop(),await tt.drawLoop(p,e,"opt",te),ta.bumpVerticalPos(e.stopy-ta.getVerticalPos()),ta.models.addLoop(e);break;case r.db.LINETYPE.ALT_START:tx(I,t,te.boxMargin,te.boxMargin+te.boxTextMargin,t=>ta.newLoop(t));break;case r.db.LINETYPE.ALT_ELSE:tx(I,t,te.boxMargin+te.boxTextMargin,te.boxMargin,t=>ta.addSectionToLoop(t));break;case r.db.LINETYPE.ALT_END:e=ta.endLoop(),await tt.drawLoop(p,e,"alt",te),ta.bumpVerticalPos(e.stopy-ta.getVerticalPos()),ta.models.addLoop(e);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:tx(I,t,te.boxMargin,te.boxMargin+te.boxTextMargin,t=>ta.newLoop(t)),ta.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:tx(I,t,te.boxMargin+te.boxTextMargin,te.boxMargin,t=>ta.addSectionToLoop(t));break;case r.db.LINETYPE.PAR_END:e=ta.endLoop(),await tt.drawLoop(p,e,"par",te),ta.bumpVerticalPos(e.stopy-ta.getVerticalPos()),ta.models.addLoop(e);break;case r.db.LINETYPE.AUTONUMBER:k=t.message.start||k,_=t.message.step||_,t.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:tx(I,t,te.boxMargin,te.boxMargin+te.boxTextMargin,t=>ta.newLoop(t));break;case r.db.LINETYPE.CRITICAL_OPTION:tx(I,t,te.boxMargin+te.boxTextMargin,te.boxMargin,t=>ta.addSectionToLoop(t));break;case r.db.LINETYPE.CRITICAL_END:e=ta.endLoop(),await tt.drawLoop(p,e,"critical",te),ta.bumpVerticalPos(e.stopy-ta.getVerticalPos()),ta.models.addLoop(e);break;case r.db.LINETYPE.BREAK_START:tx(I,t,te.boxMargin,te.boxMargin+te.boxTextMargin,t=>ta.newLoop(t));break;case r.db.LINETYPE.BREAK_END:e=ta.endLoop(),await tt.drawLoop(p,e,"break",te),ta.bumpVerticalPos(e.stopy-ta.getVerticalPos()),ta.models.addLoop(e);break;default:try{(s=t.msgModel).starty=ta.getVerticalPos(),s.sequenceIndex=k,s.sequenceVisible=r.db.showSequenceNumbers();let e=await to(p,s);ty(t,s,e,M,g,u,x),P.push({messageModel:s,lineStartY:e}),ta.models.addMessage(s)}catch(t){c.cM.error("error while drawing message",t)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(k+=_),M++}for(let t of(c.cM.debug("createdActors",u),c.cM.debug("destroyedActors",x),await th(p,g,m,!1),P))await tc(p,t.messageModel,t.lineStartY,r);for(let t of(te.mirrorActors&&await th(p,g,m,!0),A.forEach(t=>tt.drawBackgroundRect(p,t)),N(p,g,m,te),ta.models.boxes)){t.height=ta.getVerticalPos()-t.y,ta.insert(t.x,t.y,t.x+t.width,t.height);let e=2*te.boxMargin;t.startx=t.x-e,t.starty=t.y-.25*e,t.stopx=t.startx+t.width+2*e,t.stopy=t.starty+t.height+.75*e,t.stroke="rgb(0,0,0, 0.5)",tt.drawBox(p,t,te)}E&&ta.bumpVerticalPos(te.boxMargin);let S=td(p,g,m,d),{bounds:v}=ta.getBounds();void 0===v.startx&&(v.startx=0),void 0===v.starty&&(v.starty=0),void 0===v.stopx&&(v.stopx=0),void 0===v.stopy&&(v.stopy=0);let O=v.stopy-v.starty;O<S.maxHeight&&(O=S.maxHeight);let D=O+2*te.diagramMarginY;te.mirrorActors&&(D=D-te.boxMargin+te.bottomMarginAdj);let W=v.stopx-v.startx;W<S.maxWidth&&(W=S.maxWidth);let $=W+2*te.diagramMarginX;T&&p.append("text").text(T).attr("x",(v.stopx-v.startx)/2-2*te.diagramMarginX).attr("y",-25),(0,o.v2)(p,D,$,te.useMaxWidth);let Y=T?40:0;p.attr("viewBox",v.startx-te.diagramMarginX+" -"+(te.diagramMarginY+Y)+" "+$+" "+(D+Y)),c.cM.debug("models:",ta.models)},"draw");async function tb(t,e,a){let r={};for(let s of e)if(t.get(s.to)&&t.get(s.from)){let e=t.get(s.to);if(s.placement===a.db.PLACEMENT.LEFTOF&&!e.prevActor||s.placement===a.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;let i=void 0!==s.placement,c=!i,l=i?ti(te):ts(te),h=s.wrap?n.w8.wrapLabel(s.message,te.width-2*te.wrapPadding,l):s.message,d=((0,o.l0)(h)?await (0,o.nH)(s.message,(0,o.nV)()):n.w8.calculateTextDimensions(h,l)).width+2*te.wrapPadding;c&&s.from===e.nextActor?r[s.to]=o.SY.getMax(r[s.to]||0,d):c&&s.from===e.prevActor?r[s.from]=o.SY.getMax(r[s.from]||0,d):c&&s.from===s.to?(r[s.from]=o.SY.getMax(r[s.from]||0,d/2),r[s.to]=o.SY.getMax(r[s.to]||0,d/2)):s.placement===a.db.PLACEMENT.RIGHTOF?r[s.from]=o.SY.getMax(r[s.from]||0,d):s.placement===a.db.PLACEMENT.LEFTOF?r[e.prevActor]=o.SY.getMax(r[e.prevActor]||0,d):s.placement===a.db.PLACEMENT.OVER&&(e.prevActor&&(r[e.prevActor]=o.SY.getMax(r[e.prevActor]||0,d/2)),e.nextActor&&(r[s.from]=o.SY.getMax(r[s.from]||0,d/2)))}return c.cM.debug("maxMessageWidthPerActor:",r),r}(0,c.eW)(tb,"getMaxMessageWidthPerActor");var tT=(0,c.eW)(function(t){let e=0,a=tn(te);for(let r in t.links){let t=n.w8.calculateTextDimensions(r,a).width+2*te.wrapPadding+2*te.boxMargin;e<t&&(e=t)}return e},"getRequiredPopupWidth");async function tE(t,e,a){let r=0;for(let e of t.keys()){let a=t.get(e);a.wrap&&(a.description=n.w8.wrapLabel(a.description,te.width-2*te.wrapPadding,tn(te)));let s=(0,o.l0)(a.description)?await (0,o.nH)(a.description,(0,o.nV)()):n.w8.calculateTextDimensions(a.description,tn(te));a.width=a.wrap?te.width:o.SY.getMax(te.width,s.width+2*te.wrapPadding),a.height=a.wrap?o.SY.getMax(s.height,te.height):te.height,r=o.SY.getMax(r,a.height)}for(let a in e){let r=t.get(a);if(!r)continue;let s=t.get(r.nextActor);if(!s){let t=e[a]+te.actorMargin-r.width/2;r.margin=o.SY.getMax(t,te.actorMargin);continue}let i=e[a]+te.actorMargin-r.width/2-s.width/2;r.margin=o.SY.getMax(i,te.actorMargin)}let s=0;return a.forEach(e=>{let a=ts(te),r=e.actorKeys.reduce((e,a)=>e+=t.get(a).width+(t.get(a).margin||0),0);r+=8*te.boxMargin,r-=2*te.boxTextMargin,e.wrap&&(e.name=n.w8.wrapLabel(e.name,r-2*te.wrapPadding,a));let i=n.w8.calculateTextDimensions(e.name,a);s=o.SY.getMax(i.height,s);let c=o.SY.getMax(r,i.width+2*te.wrapPadding);if(e.margin=te.boxTextMargin,r<c){let t=(c-r)/2;e.margin+=t}}),a.forEach(t=>t.textMaxHeight=s),o.SY.getMax(r,te.height)}(0,c.eW)(tE,"calculateActorMargins");var tf=(0,c.eW)(async function(t,e,a){let r=e.get(t.from),s=e.get(t.to),i=r.x,l=s.x,h=t.wrap&&t.message,d=(0,o.l0)(t.message)?await (0,o.nH)(t.message,(0,o.nV)()):n.w8.calculateTextDimensions(h?n.w8.wrapLabel(t.message,te.width,ti(te)):t.message,ti(te)),p={width:h?te.width:o.SY.getMax(te.width,d.width+2*te.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(p.width=h?o.SY.getMax(te.width,d.width):o.SY.getMax(r.width/2+s.width/2,d.width+2*te.noteMargin),p.startx=i+(r.width+te.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(p.width=h?o.SY.getMax(te.width,d.width+2*te.noteMargin):o.SY.getMax(r.width/2+s.width/2,d.width+2*te.noteMargin),p.startx=i-p.width+(r.width-te.actorMargin)/2):t.to===t.from?(d=n.w8.calculateTextDimensions(h?n.w8.wrapLabel(t.message,o.SY.getMax(te.width,r.width),ti(te)):t.message,ti(te)),p.width=h?o.SY.getMax(te.width,r.width):o.SY.getMax(r.width,te.width,d.width+2*te.noteMargin),p.startx=i+(r.width-p.width)/2):(p.width=Math.abs(i+r.width/2-(l+s.width/2))+te.actorMargin,p.startx=i<l?i+r.width/2-te.actorMargin/2:l+s.width/2-te.actorMargin/2),h&&(p.message=n.w8.wrapLabel(t.message,p.width-2*te.wrapPadding,ti(te))),c.cM.debug(`NM:[${p.startx},${p.stopx},${p.starty},${p.stopy}:${p.width},${p.height}=${t.message}]`),p},"buildNoteModel"),tw=(0,c.eW)(function(t,e,a){if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};let[r,s]=tu(t.from,e),[i,l]=tu(t.to,e),h=r<=i,d=h?s:r,p=h?i:l,g=Math.abs(i-l)>2,u=(0,c.eW)(t=>h?-t:t,"adjustValue");t.from===t.to?p=d:(t.activate&&!g&&(p+=u(te.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(p+=u(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(d-=u(3)));let x=[r,s,i,l],y=Math.abs(d-p);t.wrap&&t.message&&(t.message=n.w8.wrapLabel(t.message,o.SY.getMax(y+2*te.wrapPadding,te.width),ts(te)));let m=n.w8.calculateTextDimensions(t.message,ts(te));return{width:o.SY.getMax(t.wrap?0:m.width+2*te.wrapPadding,y+2*te.wrapPadding,te.width),height:0,startx:d,stopx:p,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,x),toBounds:Math.max.apply(null,x)}},"buildMessageModel"),tI=(0,c.eW)(async function(t,e,a,r){let s,i,n;let l={},h=[];for(let a of t){switch(a.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:h.push({id:a.id,msg:a.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:a.message&&(l[(s=h.pop()).id]=s,l[a.id]=s,h.push(s));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:l[(s=h.pop()).id]=s;break;case r.db.LINETYPE.ACTIVE_START:{let t=e.get(a.from?a.from:a.to.actor),r=tg(a.from?a.from:a.to.actor).length,s=t.x+t.width/2+(r-1)*te.activationWidth/2,i={startx:s,stopx:s+te.activationWidth,actor:a.from,enabled:!0};ta.activations.push(i)}break;case r.db.LINETYPE.ACTIVE_END:{let t=ta.activations.map(t=>t.actor).lastIndexOf(a.from);ta.activations.splice(t,1).splice(0,1)}}void 0!==a.placement?(i=await tf(a,e,r),a.noteModel=i,h.forEach(t=>{(s=t).from=o.SY.getMin(s.from,i.startx),s.to=o.SY.getMax(s.to,i.startx+i.width),s.width=o.SY.getMax(s.width,Math.abs(s.from-s.to))-te.labelBoxWidth})):(n=tw(a,e,r),a.msgModel=n,n.startx&&n.stopx&&h.length>0&&h.forEach(t=>{if(s=t,n.startx===n.stopx){let t=e.get(a.from),r=e.get(a.to);s.from=o.SY.getMin(t.x-n.width/2,t.x-t.width/2,s.from),s.to=o.SY.getMax(r.x+n.width/2,r.x+t.width/2,s.to),s.width=o.SY.getMax(s.width,Math.abs(s.to-s.from))-te.labelBoxWidth}else s.from=o.SY.getMin(n.startx,s.from),s.to=o.SY.getMax(n.stopx,s.to),s.width=o.SY.getMax(s.width,n.width)-te.labelBoxWidth}))}return ta.activations=[],c.cM.debug("Loop type widths:",l),l},"calculateLoopBounds"),tL={parser:d,get db(){return new x},renderer:{bounds:ta,drawActors:th,drawActorsPopup:td,setConf:tp,draw:tm},styles:y,init:(0,c.eW)(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,(0,o.Y4)({sequence:{wrap:t.wrap}}))},"init")}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9718],{1813:function(e,a,t){Promise.resolve().then(t.bind(t,37335))},37335:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return V}});var l=t(57437),n=t(14675),r=t.n(n),o=t(17200),s=t(2265),i=t(56937),d=t(2335),c=t(19945),u=t(26110),h=t(39535),m=t(14308),p=t(65613),f=t(7436),v=t(25427),g=t(29501),x=t(13590),A=t(60729),j=t(34124),b=t(6512),_=t(37104),Z=t(49027),M=t(27648);let N=()=>window.fetch("/api/agents").then(e=>e.json()).catch(e=>console.log(e)),y=e=>fetch(e).then(e=>e.json());function E(e){let[a,t]=(0,s.useState)(!1),[n,r]=(0,s.useState)(null),[o,i]=(0,s.useState)(!0),c=(0,g.cI)({resolver:(0,x.F)(v.bc),defaultValues:{name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.selectedChatModelOption,files:[]}});return(0,s.useEffect)(()=>{c.reset({name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.selectedChatModelOption,files:[]})},[e.selectedChatModelOption,e.data]),(0,l.jsxs)(u.Vq,{open:a,onOpenChange:t,children:[(0,l.jsx)(u.hg,{children:(0,l.jsxs)("div",{className:"flex items-center text-md gap-2",children:[(0,l.jsx)(d.v,{}),"Create Agent"]})}),(0,l.jsxs)(u.cZ,{className:"lg:max-w-screen-lg py-4 overflow-y-scroll h-full md:h-4/6 rounded-lg flex flex-col",children:[(0,l.jsx)(u.fK,{children:(0,l.jsx)(Z.$N,{children:"Create Agent"})}),!e.userProfile&&o&&(0,l.jsx)(h.Z,{onOpenChange:i,isMobileWidth:e.isMobileWidth}),(0,l.jsx)(v.ks,{form:c,onSubmit:a=>{fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then(a=>{200===a.status?(c.reset(),t(!1),r(null),e.setAgentChangeTriggered(!0)):a.json().then(e=>{console.error(e),e.error&&r(e.error)})}).catch(e=>{console.error("Error:",e),r(e)})},create:!0,errors:n,filesOptions:e.filesOptions,modelOptions:e.modelOptions,inputToolOptions:e.inputToolOptions,outputModeOptions:e.outputModeOptions,isSubscribed:e.isSubscribed})]})]})}function V(){let{data:e,error:a,mutate:t}=(0,o.ZP)("agents",N,{revalidateOnFocus:!1}),{data:n,error:d,isLoading:u}=(0,i.GW)(),{data:g}=(0,i.h2)(!0),[x,Z]=(0,s.useState)(!1),V=(0,f.IC)(),[w,O]=(0,s.useState)([]),[L,C]=(0,s.useState)([]),[S,P]=(0,s.useState)(null),{data:F,error:H}=(0,o.ZP)(g?"/api/content/computer":null,y),{data:T,error:k}=(0,o.ZP)("/api/agents/options",y),[I,W]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{I&&(t(),W(!1))},[I]),(0,s.useEffect)(()=>{if(e){O(e.filter(e=>e.creator===(null==n?void 0:n.username)));let a=e.filter(e=>"private"!==e.privacy_level&&e.creator!==(null==n?void 0:n.username));C(a);{let t=new URLSearchParams(window.location.search).get("agent");if(t){P(t);let l=e.find(e=>e.slug===t);l||(l=a.find(e=>e.slug===t)),l||fetch("/api/agents/".concat(t)).then(e=>{if(404===e.status)throw Error("Agent not found");return e.json()}).then(e=>{"protected"===e.privacy_level&&C(a=>[...a,e])})}}}},[e,n]),a)return(0,l.jsxs)("main",{className:r().main,children:[(0,l.jsx)("div",{className:"".concat(r().titleBar," text-5xl"),children:"Agents"}),(0,l.jsx)("div",{className:r().agentList,children:"Error loading agents"})]});if(!e)return(0,l.jsx)("main",{className:r().main,children:(0,l.jsxs)("div",{className:r().agentList,children:[(0,l.jsx)(m.l,{})," booting up your agents"]})});let R=(null==g?void 0:g.chat_model_options)||[],B=(null==g?void 0:g.selected_chat_model_config)||0,Y=(null==g?void 0:g.is_active)||!1,z=R.find(e=>e.id===B);return(0,l.jsxs)(A.Hn,{children:[(0,l.jsx)(j.S,{conversationId:""}),(0,l.jsxs)(A.kV,{children:[(0,l.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,l.jsx)(A.vP,{className:"-ml-1"}),(0,l.jsx)(b.Z,{orientation:"vertical",className:"mr-2 h-4"}),V?(0,l.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,l.jsx)(_.VO,{className:"h-auto w-16"})}):(0,l.jsx)("h2",{className:"text-lg",children:"Agents"})]}),(0,l.jsx)("main",{className:"w-full mx-auto",children:(0,l.jsx)("div",{className:"grid w-full mx-auto",children:(0,l.jsxs)("div",{className:"".concat(r().pageLayout," w-full"),children:[(0,l.jsxs)("div",{className:"pt-6 md:pt-8 flex justify-between",children:[(0,l.jsx)("h1",{className:"text-3xl flex items-center",children:"Agents"}),(0,l.jsx)("div",{className:"ml-auto float-right border p-2 pt-3 rounded-xl font-bold hover:bg-stone-100 dark:hover:bg-neutral-900",children:(0,l.jsx)(E,{data:{slug:"",name:"",persona:"",color:"",icon:"",privacy_level:"private",managed_by_admin:!1,chat_model:"",input_tools:[],output_modes:[],is_hidden:!1},userProfile:u?null:null!=n?n:null,isMobileWidth:V,filesOptions:F||[],modelOptions:(null==g?void 0:g.chat_model_options)||[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:Y,setAgentChangeTriggered:W,inputToolOptions:(null==T?void 0:T.input_tools)||{},outputModeOptions:(null==T?void 0:T.output_modes)||{}})})]}),x&&(0,l.jsx)(h.Z,{onOpenChange:Z,isMobileWidth:V}),(0,l.jsx)(p.bZ,{className:"bg-secondary border-none my-4",children:(0,l.jsxs)(p.X,{children:[(0,l.jsx)(c.P,{weight:"fill",className:"h-4 w-4 text-purple-400 inline"}),(0,l.jsx)("span",{className:"font-bold",children:"How it works"})," Use any of these specialized personas to tune your conversation to your needs.",!Y&&(0,l.jsxs)("span",{children:[" ",(0,l.jsx)(M.default,{href:"/settings",className:"font-bold",children:"Upgrade your plan"})," ","to leverage custom models. You will fallback to the default model when chatting."]})]})}),(0,l.jsx)("div",{className:"pt-6 md:pt-8",children:(0,l.jsx)("div",{className:"".concat(r().agentList),children:n&&w.map(e=>(0,l.jsx)(v.EY,{data:e,userProfile:n,isMobileWidth:V,filesOptions:null!=F?F:[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:Y,setAgentChangeTriggered:W,modelOptions:(null==g?void 0:g.chat_model_options)||[],editCard:!0,agentSlug:S||"",inputToolOptions:(null==T?void 0:T.input_tools)||{},outputModeOptions:(null==T?void 0:T.output_modes)||{}},e.slug))})}),(0,l.jsxs)("div",{className:"pt-6 md:pt-8",children:[(0,l.jsx)("h2",{className:"text-2xl",children:"Explore"}),(0,l.jsx)("div",{className:"".concat(r().agentList),children:!u&&L.map(e=>(0,l.jsx)(v.EY,{data:e,userProfile:n||null,isMobileWidth:V,editCard:!1,filesOptions:null!=F?F:[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:Y,setAgentChangeTriggered:W,modelOptions:(null==g?void 0:g.chat_model_options)||[],agentSlug:S||"",inputToolOptions:(null==T?void 0:T.input_tools)||{},outputModeOptions:(null==T?void 0:T.output_modes)||{}},e.slug))})]})]})})})]})]})}},32759:function(e,a,t){"use strict";t.d(a,{E:function(){return s}});var l=t(57437),n=t(2265),r=t(60610),o=t(94508);let s=n.forwardRef((e,a)=>{let{className:t,value:n,indicatorColor:s,...i}=e;return(0,l.jsx)(r.fC,{ref:a,className:(0,o.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...i,children:(0,l.jsx)(r.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(s),style:{transform:"translateX(-".concat(100-(n||0),"%)")}})})});s.displayName=r.fC.displayName},76818:function(e,a,t){"use strict";t.d(a,{g:function(){return o}});var l=t(57437),n=t(2265),r=t(94508);let o=n.forwardRef((e,a)=>{let{className:t,...n}=e;return(0,l.jsx)("textarea",{className:(0,r.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...n})});o.displayName="Textarea"},14675:function(e){e.exports={titleBar:"agents_titleBar__FzYbY",agentPersonality:"agents_agentPersonality__o0Ysz",pageLayout:"agents_pageLayout__gR3S3",infoButton:"agents_infoButton__NqI7E",agentList:"agents_agentList__XVx4A"}},49807:function(e,a,t){"use strict";t.d(a,{a:function(){return s}});var l=t(2265),n=t(4992);let r=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M252,124a60.14,60.14,0,0,0-32-53.08,52,52,0,0,0-92-32.11A52,52,0,0,0,36,70.92a60,60,0,0,0,0,106.14,52,52,0,0,0,92,32.13,52,52,0,0,0,92-32.13A60.05,60.05,0,0,0,252,124ZM88,204a28,28,0,0,1-26.85-20.07c1,0,1.89.07,2.85.07h8a12,12,0,0,0,0-24H64A36,36,0,0,1,52,90.05a12,12,0,0,0,8-11.32V72a28,28,0,0,1,56,0v60.18a51.61,51.61,0,0,0-7.2-3.85,12,12,0,1,0-9.6,22A28,28,0,0,1,88,204Zm104-44h-8a12,12,0,0,0,0,24h8c1,0,1.9,0,2.85-.07a28,28,0,1,1-38-33.61,12,12,0,1,0-9.6-22,51.61,51.61,0,0,0-7.2,3.85V72a28,28,0,0,1,56,0v6.73a12,12,0,0,0,8,11.32,36,36,0,0,1-12,70Zm16-44a12,12,0,0,1-12,12,40,40,0,0,1-40-40V84a12,12,0,0,1,24,0v4a16,16,0,0,0,16,16A12,12,0,0,1,208,116ZM100,88a40,40,0,0,1-40,40,12,12,0,0,1,0-24A16,16,0,0,0,76,88V84a12,12,0,0,1,24,0Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M240,124a48,48,0,0,1-32,45.27h0V176a40,40,0,0,1-80,0,40,40,0,0,1-80,0v-6.73h0a48,48,0,0,1,0-90.54V72a40,40,0,0,1,80,0,40,40,0,0,1,80,0v6.73A48,48,0,0,1,240,124Z",opacity:"0.2"}),l.createElement("path",{d:"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M212,76V72a44,44,0,0,0-74.86-31.31,3.93,3.93,0,0,0-1.14,2.8v88.72a4,4,0,0,0,6.2,3.33A47.67,47.67,0,0,1,167.68,128a8.18,8.18,0,0,1,8.31,7.58,8,8,0,0,1-8,8.42,32,32,0,0,0-32,32v33.88a4,4,0,0,0,1.49,3.12,47.92,47.92,0,0,0,74.21-17.16,4,4,0,0,0-4.49-5.56A68.06,68.06,0,0,1,192,192h-7.73a8.18,8.18,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h8a51.6,51.6,0,0,0,24-5.88v0A52,52,0,0,0,212,76Zm-12,36h-4a36,36,0,0,1-36-36V72a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4a8,8,0,0,1,0,16ZM88,28A44.05,44.05,0,0,0,44,72v4a52,52,0,0,0-4,94.12h0A51.6,51.6,0,0,0,64,176h7.73A8.18,8.18,0,0,1,80,183.47,8,8,0,0,1,72,192H64a67.48,67.48,0,0,1-15.21-1.73,4,4,0,0,0-4.5,5.55A47.93,47.93,0,0,0,118.51,213a4,4,0,0,0,1.49-3.12V176a32,32,0,0,0-32-32,8,8,0,0,1-8-8.42A8.18,8.18,0,0,1,88.32,128a47.67,47.67,0,0,1,25.48,7.54,4,4,0,0,0,6.2-3.33V43.49a4,4,0,0,0-1.14-2.81A43.85,43.85,0,0,0,88,28Zm8,48a36,36,0,0,1-36,36H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,76V72a8,8,0,0,1,16,0Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M246,124a54.13,54.13,0,0,0-32-49.33V72a46,46,0,0,0-86-22.67A46,46,0,0,0,42,72v2.67a54,54,0,0,0,0,98.63V176a46,46,0,0,0,86,22.67A46,46,0,0,0,214,176v-2.7A54.07,54.07,0,0,0,246,124ZM88,210a34,34,0,0,1-34-32.94A53.67,53.67,0,0,0,64,178h8a6,6,0,0,0,0-12H64A42,42,0,0,1,50,84.39a6,6,0,0,0,4-5.66V72a34,34,0,0,1,68,0v73.05A45.89,45.89,0,0,0,88,130a6,6,0,0,0,0,12,34,34,0,0,1,0,68Zm104-44h-8a6,6,0,0,0,0,12h8a53.67,53.67,0,0,0,10-.94A34,34,0,1,1,168,142a6,6,0,0,0,0-12,45.89,45.89,0,0,0-34,15.05V72a34,34,0,0,1,68,0v6.73a6,6,0,0,0,4,5.66A42,42,0,0,1,192,166Zm14-54a6,6,0,0,1-6,6h-4a34,34,0,0,1-34-34V80a6,6,0,0,1,12,0v4a22,22,0,0,0,22,22h4A6,6,0,0,1,206,112ZM60,118H56a6,6,0,0,1,0-12h4A22,22,0,0,0,82,84V80a6,6,0,0,1,12,0v4A34,34,0,0,1,60,118Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M244,124a52.1,52.1,0,0,0-32-48V72a44,44,0,0,0-84-18.3A44,44,0,0,0,44,72v4a52,52,0,0,0,0,96v4a44,44,0,0,0,84,18.3A44,44,0,0,0,212,176v-4A52.07,52.07,0,0,0,244,124ZM88,212a36,36,0,0,1-36-36v-1.41A52.13,52.13,0,0,0,64,176h8a4,4,0,0,0,0-8H64A44,44,0,0,1,49.33,82.5,4,4,0,0,0,52,78.73V72a36,36,0,0,1,72,0v78.75A44,44,0,0,0,88,132a4,4,0,0,0,0,8,36,36,0,0,1,0,72Zm104-44h-8a4,4,0,0,0,0,8h8a52.13,52.13,0,0,0,12-1.41V176a36,36,0,1,1-36-36,4,4,0,0,0,0-8,44,44,0,0,0-36,18.75V72a36,36,0,0,1,72,0v6.73a4,4,0,0,0,2.67,3.77A44,44,0,0,1,192,168Zm12-56a4,4,0,0,1-4,4h-4a32,32,0,0,1-32-32V80a4,4,0,0,1,8,0v4a24,24,0,0,0,24,24h4A4,4,0,0,1,204,112ZM92,84a32,32,0,0,1-32,32H56a4,4,0,0,1,0-8h4A24,24,0,0,0,84,84V80a4,4,0,0,1,8,0Z"}))]]),o=l.forwardRef((e,a)=>l.createElement(n.Z,{ref:a,...e,weights:r}));o.displayName="BrainIcon";let s=o},19945:function(e,a,t){"use strict";t.d(a,{P:function(){return s}});var l=t(2265),n=t(4992);let r=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),l.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),o=l.forwardRef((e,a)=>l.createElement(n.Z,{ref:a,...e,weights:r}));o.displayName="LightningIcon";let s=o},60610:function(e,a,t){"use strict";t.d(a,{fC:function(){return j},z$:function(){return b}});var l=t(2265),n=t(73966),r=t(66840),o=t(57437),s="Progress",[i,d]=(0,n.b)(s),[c,u]=i(s),h=l.forwardRef((e,a)=>{var t,l,n,s;let{__scopeProgress:i,value:d=null,max:u,getValueLabel:h=f,...m}=e;(u||0===u)&&!x(u)&&console.error((t="".concat(u),l="Progress","Invalid prop `max` of value `".concat(t,"` supplied to `").concat(l,"`. Only numbers greater than 0 are valid max values. Defaulting to `").concat(100,"`.")));let p=x(u)?u:100;null===d||A(d,p)||console.error((n="".concat(d),s="Progress","Invalid prop `value` of value `".concat(n,"` supplied to `").concat(s,"`. The `value` prop must be:\n - a positive number\n - less than the value passed to `max` (or ").concat(100," if no `max` prop is set)\n - `null` or `undefined` if the progress is indeterminate.\n\nDefaulting to `null`.")));let j=A(d,p)?d:null,b=g(j)?h(j,p):void 0;return(0,o.jsx)(c,{scope:i,value:j,max:p,children:(0,o.jsx)(r.WV.div,{"aria-valuemax":p,"aria-valuemin":0,"aria-valuenow":g(j)?j:void 0,"aria-valuetext":b,role:"progressbar","data-state":v(j,p),"data-value":null!=j?j:void 0,"data-max":p,...m,ref:a})})});h.displayName=s;var m="ProgressIndicator",p=l.forwardRef((e,a)=>{var t;let{__scopeProgress:l,...n}=e,s=u(m,l);return(0,o.jsx)(r.WV.div,{"data-state":v(s.value,s.max),"data-value":null!==(t=s.value)&&void 0!==t?t:void 0,"data-max":s.max,...n,ref:a})});function f(e,a){return"".concat(Math.round(e/a*100),"%")}function v(e,a){return null==e?"indeterminate":e===a?"complete":"loading"}function g(e){return"number"==typeof e}function x(e){return g(e)&&!isNaN(e)&&e>0}function A(e,a){return g(e)&&!isNaN(e)&&e<=a&&e>=0}p.displayName=m;var j=h,b=p}},function(e){e.O(0,[5638,2939,7200,8667,1327,4447,7626,3595,2327,5427,2971,2117,1744],function(){return e(e.s=1813)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9718],{1813:function(e,a,t){Promise.resolve().then(t.bind(t,37335))},37335:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return V}});var l=t(57437),n=t(14675),r=t.n(n),o=t(17200),s=t(2265),i=t(56937),d=t(2335),c=t(19945),u=t(26110),h=t(39535),m=t(14308),p=t(65613),f=t(7436),v=t(25427),g=t(29501),x=t(13590),A=t(60729),j=t(34124),b=t(6512),_=t(37104),Z=t(49027),M=t(27648);let N=()=>window.fetch("/api/agents").then(e=>e.json()).catch(e=>console.log(e)),y=e=>fetch(e).then(e=>e.json());function E(e){let[a,t]=(0,s.useState)(!1),[n,r]=(0,s.useState)(null),[o,i]=(0,s.useState)(!0),c=(0,g.cI)({resolver:(0,x.F)(v.bc),defaultValues:{name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.selectedChatModelOption,files:[]}});return(0,s.useEffect)(()=>{c.reset({name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.selectedChatModelOption,files:[]})},[e.selectedChatModelOption,e.data]),(0,l.jsxs)(u.Vq,{open:a,onOpenChange:t,children:[(0,l.jsx)(u.hg,{children:(0,l.jsxs)("div",{className:"flex items-center text-md gap-2",children:[(0,l.jsx)(d.v,{}),"Create Agent"]})}),(0,l.jsxs)(u.cZ,{className:"lg:max-w-screen-lg py-4 overflow-y-scroll h-full md:h-4/6 rounded-lg flex flex-col",children:[(0,l.jsx)(u.fK,{children:(0,l.jsx)(Z.$N,{children:"Create Agent"})}),!e.userProfile&&o&&(0,l.jsx)(h.Z,{onOpenChange:i,isMobileWidth:e.isMobileWidth}),(0,l.jsx)(v.ks,{form:c,onSubmit:a=>{fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then(a=>{200===a.status?(c.reset(),t(!1),r(null),e.setAgentChangeTriggered(!0)):a.json().then(e=>{console.error(e),e.error&&r(e.error)})}).catch(e=>{console.error("Error:",e),r(e)})},create:!0,errors:n,filesOptions:e.filesOptions,modelOptions:e.modelOptions,inputToolOptions:e.inputToolOptions,outputModeOptions:e.outputModeOptions,isSubscribed:e.isSubscribed})]})]})}function V(){let{data:e,error:a,mutate:t}=(0,o.ZP)("agents",N,{revalidateOnFocus:!1}),{data:n,error:d,isLoading:u}=(0,i.GW)(),{data:g}=(0,i.h2)(!0),[x,Z]=(0,s.useState)(!1),V=(0,f.IC)(),[w,O]=(0,s.useState)([]),[L,C]=(0,s.useState)([]),[S,P]=(0,s.useState)(null),{data:F,error:H}=(0,o.ZP)(g?"/api/content/computer":null,y),{data:T,error:k}=(0,o.ZP)("/api/agents/options",y),[I,W]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{I&&(t(),W(!1))},[I]),(0,s.useEffect)(()=>{if(e){O(e.filter(e=>e.creator===(null==n?void 0:n.username)));let a=e.filter(e=>"private"!==e.privacy_level&&e.creator!==(null==n?void 0:n.username));C(a);{let t=new URLSearchParams(window.location.search).get("agent");if(t){P(t);let l=e.find(e=>e.slug===t);l||(l=a.find(e=>e.slug===t)),l||fetch("/api/agents/".concat(t)).then(e=>{if(404===e.status)throw Error("Agent not found");return e.json()}).then(e=>{"protected"===e.privacy_level&&C(a=>[...a,e])})}}}},[e,n]),a)return(0,l.jsxs)("main",{className:r().main,children:[(0,l.jsx)("div",{className:"".concat(r().titleBar," text-5xl"),children:"Agents"}),(0,l.jsx)("div",{className:r().agentList,children:"Error loading agents"})]});if(!e)return(0,l.jsx)("main",{className:r().main,children:(0,l.jsxs)("div",{className:r().agentList,children:[(0,l.jsx)(m.l,{})," booting up your agents"]})});let R=(null==g?void 0:g.chat_model_options)||[],B=(null==g?void 0:g.selected_chat_model_config)||0,Y=(null==g?void 0:g.is_active)||!1,z=R.find(e=>e.id===B);return(0,l.jsxs)(A.Hn,{children:[(0,l.jsx)(j.S,{conversationId:""}),(0,l.jsxs)(A.kV,{children:[(0,l.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,l.jsx)(A.vP,{className:"-ml-1"}),(0,l.jsx)(b.Z,{orientation:"vertical",className:"mr-2 h-4"}),V?(0,l.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,l.jsx)(_.VO,{className:"h-auto w-16"})}):(0,l.jsx)("h2",{className:"text-lg",children:"Agents"})]}),(0,l.jsx)("main",{className:"w-full mx-auto",children:(0,l.jsx)("div",{className:"grid w-full mx-auto",children:(0,l.jsxs)("div",{className:"".concat(r().pageLayout," w-full"),children:[(0,l.jsxs)("div",{className:"pt-6 md:pt-8 flex justify-between",children:[(0,l.jsx)("h1",{className:"text-3xl flex items-center",children:"Agents"}),(0,l.jsx)("div",{className:"ml-auto float-right border p-2 pt-3 rounded-xl font-bold hover:bg-stone-100 dark:hover:bg-neutral-900",children:(0,l.jsx)(E,{data:{slug:"",name:"",persona:"",color:"",icon:"",privacy_level:"private",managed_by_admin:!1,chat_model:"",input_tools:[],output_modes:[],is_hidden:!1},userProfile:u?null:null!=n?n:null,isMobileWidth:V,filesOptions:F||[],modelOptions:(null==g?void 0:g.chat_model_options)||[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:Y,setAgentChangeTriggered:W,inputToolOptions:(null==T?void 0:T.input_tools)||{},outputModeOptions:(null==T?void 0:T.output_modes)||{}})})]}),x&&(0,l.jsx)(h.Z,{onOpenChange:Z,isMobileWidth:V}),(0,l.jsx)(p.bZ,{className:"bg-secondary border-none my-4",children:(0,l.jsxs)(p.X,{children:[(0,l.jsx)(c.P,{weight:"fill",className:"h-4 w-4 text-purple-400 inline"}),(0,l.jsx)("span",{className:"font-bold",children:"How it works"})," Use any of these specialized personas to tune your conversation to your needs.",!Y&&(0,l.jsxs)("span",{children:[" ",(0,l.jsx)(M.default,{href:"/settings",className:"font-bold",children:"Upgrade your plan"})," ","to leverage custom models. You will fallback to the default model when chatting."]})]})}),(0,l.jsx)("div",{className:"pt-6 md:pt-8",children:(0,l.jsx)("div",{className:"".concat(r().agentList),children:n&&w.map(e=>(0,l.jsx)(v.EY,{data:e,userProfile:n,isMobileWidth:V,filesOptions:null!=F?F:[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:Y,setAgentChangeTriggered:W,modelOptions:(null==g?void 0:g.chat_model_options)||[],editCard:!0,agentSlug:S||"",inputToolOptions:(null==T?void 0:T.input_tools)||{},outputModeOptions:(null==T?void 0:T.output_modes)||{}},e.slug))})}),(0,l.jsxs)("div",{className:"pt-6 md:pt-8",children:[(0,l.jsx)("h2",{className:"text-2xl",children:"Explore"}),(0,l.jsx)("div",{className:"".concat(r().agentList),children:!u&&L.map(e=>(0,l.jsx)(v.EY,{data:e,userProfile:n||null,isMobileWidth:V,editCard:!1,filesOptions:null!=F?F:[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:Y,setAgentChangeTriggered:W,modelOptions:(null==g?void 0:g.chat_model_options)||[],agentSlug:S||"",inputToolOptions:(null==T?void 0:T.input_tools)||{},outputModeOptions:(null==T?void 0:T.output_modes)||{}},e.slug))})]})]})})})]})]})}},32759:function(e,a,t){"use strict";t.d(a,{E:function(){return s}});var l=t(57437),n=t(2265),r=t(60610),o=t(94508);let s=n.forwardRef((e,a)=>{let{className:t,value:n,indicatorColor:s,...i}=e;return(0,l.jsx)(r.fC,{ref:a,className:(0,o.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...i,children:(0,l.jsx)(r.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(s),style:{transform:"translateX(-".concat(100-(n||0),"%)")}})})});s.displayName=r.fC.displayName},76818:function(e,a,t){"use strict";t.d(a,{g:function(){return o}});var l=t(57437),n=t(2265),r=t(94508);let o=n.forwardRef((e,a)=>{let{className:t,...n}=e;return(0,l.jsx)("textarea",{className:(0,r.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...n})});o.displayName="Textarea"},14675:function(e){e.exports={titleBar:"agents_titleBar__FzYbY",agentPersonality:"agents_agentPersonality__o0Ysz",pageLayout:"agents_pageLayout__gR3S3",infoButton:"agents_infoButton__NqI7E",agentList:"agents_agentList__XVx4A"}},49807:function(e,a,t){"use strict";t.d(a,{a:function(){return s}});var l=t(2265),n=t(4992);let r=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M252,124a60.14,60.14,0,0,0-32-53.08,52,52,0,0,0-92-32.11A52,52,0,0,0,36,70.92a60,60,0,0,0,0,106.14,52,52,0,0,0,92,32.13,52,52,0,0,0,92-32.13A60.05,60.05,0,0,0,252,124ZM88,204a28,28,0,0,1-26.85-20.07c1,0,1.89.07,2.85.07h8a12,12,0,0,0,0-24H64A36,36,0,0,1,52,90.05a12,12,0,0,0,8-11.32V72a28,28,0,0,1,56,0v60.18a51.61,51.61,0,0,0-7.2-3.85,12,12,0,1,0-9.6,22A28,28,0,0,1,88,204Zm104-44h-8a12,12,0,0,0,0,24h8c1,0,1.9,0,2.85-.07a28,28,0,1,1-38-33.61,12,12,0,1,0-9.6-22,51.61,51.61,0,0,0-7.2,3.85V72a28,28,0,0,1,56,0v6.73a12,12,0,0,0,8,11.32,36,36,0,0,1-12,70Zm16-44a12,12,0,0,1-12,12,40,40,0,0,1-40-40V84a12,12,0,0,1,24,0v4a16,16,0,0,0,16,16A12,12,0,0,1,208,116ZM100,88a40,40,0,0,1-40,40,12,12,0,0,1,0-24A16,16,0,0,0,76,88V84a12,12,0,0,1,24,0Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M240,124a48,48,0,0,1-32,45.27h0V176a40,40,0,0,1-80,0,40,40,0,0,1-80,0v-6.73h0a48,48,0,0,1,0-90.54V72a40,40,0,0,1,80,0,40,40,0,0,1,80,0v6.73A48,48,0,0,1,240,124Z",opacity:"0.2"}),l.createElement("path",{d:"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M212,76V72a44,44,0,0,0-74.86-31.31,3.93,3.93,0,0,0-1.14,2.8v88.72a4,4,0,0,0,6.2,3.33A47.67,47.67,0,0,1,167.68,128a8.18,8.18,0,0,1,8.31,7.58,8,8,0,0,1-8,8.42,32,32,0,0,0-32,32v33.88a4,4,0,0,0,1.49,3.12,47.92,47.92,0,0,0,74.21-17.16,4,4,0,0,0-4.49-5.56A68.06,68.06,0,0,1,192,192h-7.73a8.18,8.18,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h8a51.6,51.6,0,0,0,24-5.88v0A52,52,0,0,0,212,76Zm-12,36h-4a36,36,0,0,1-36-36V72a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4a8,8,0,0,1,0,16ZM88,28A44.05,44.05,0,0,0,44,72v4a52,52,0,0,0-4,94.12h0A51.6,51.6,0,0,0,64,176h7.73A8.18,8.18,0,0,1,80,183.47,8,8,0,0,1,72,192H64a67.48,67.48,0,0,1-15.21-1.73,4,4,0,0,0-4.5,5.55A47.93,47.93,0,0,0,118.51,213a4,4,0,0,0,1.49-3.12V176a32,32,0,0,0-32-32,8,8,0,0,1-8-8.42A8.18,8.18,0,0,1,88.32,128a47.67,47.67,0,0,1,25.48,7.54,4,4,0,0,0,6.2-3.33V43.49a4,4,0,0,0-1.14-2.81A43.85,43.85,0,0,0,88,28Zm8,48a36,36,0,0,1-36,36H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,76V72a8,8,0,0,1,16,0Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M246,124a54.13,54.13,0,0,0-32-49.33V72a46,46,0,0,0-86-22.67A46,46,0,0,0,42,72v2.67a54,54,0,0,0,0,98.63V176a46,46,0,0,0,86,22.67A46,46,0,0,0,214,176v-2.7A54.07,54.07,0,0,0,246,124ZM88,210a34,34,0,0,1-34-32.94A53.67,53.67,0,0,0,64,178h8a6,6,0,0,0,0-12H64A42,42,0,0,1,50,84.39a6,6,0,0,0,4-5.66V72a34,34,0,0,1,68,0v73.05A45.89,45.89,0,0,0,88,130a6,6,0,0,0,0,12,34,34,0,0,1,0,68Zm104-44h-8a6,6,0,0,0,0,12h8a53.67,53.67,0,0,0,10-.94A34,34,0,1,1,168,142a6,6,0,0,0,0-12,45.89,45.89,0,0,0-34,15.05V72a34,34,0,0,1,68,0v6.73a6,6,0,0,0,4,5.66A42,42,0,0,1,192,166Zm14-54a6,6,0,0,1-6,6h-4a34,34,0,0,1-34-34V80a6,6,0,0,1,12,0v4a22,22,0,0,0,22,22h4A6,6,0,0,1,206,112ZM60,118H56a6,6,0,0,1,0-12h4A22,22,0,0,0,82,84V80a6,6,0,0,1,12,0v4A34,34,0,0,1,60,118Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M244,124a52.1,52.1,0,0,0-32-48V72a44,44,0,0,0-84-18.3A44,44,0,0,0,44,72v4a52,52,0,0,0,0,96v4a44,44,0,0,0,84,18.3A44,44,0,0,0,212,176v-4A52.07,52.07,0,0,0,244,124ZM88,212a36,36,0,0,1-36-36v-1.41A52.13,52.13,0,0,0,64,176h8a4,4,0,0,0,0-8H64A44,44,0,0,1,49.33,82.5,4,4,0,0,0,52,78.73V72a36,36,0,0,1,72,0v78.75A44,44,0,0,0,88,132a4,4,0,0,0,0,8,36,36,0,0,1,0,72Zm104-44h-8a4,4,0,0,0,0,8h8a52.13,52.13,0,0,0,12-1.41V176a36,36,0,1,1-36-36,4,4,0,0,0,0-8,44,44,0,0,0-36,18.75V72a36,36,0,0,1,72,0v6.73a4,4,0,0,0,2.67,3.77A44,44,0,0,1,192,168Zm12-56a4,4,0,0,1-4,4h-4a32,32,0,0,1-32-32V80a4,4,0,0,1,8,0v4a24,24,0,0,0,24,24h4A4,4,0,0,1,204,112ZM92,84a32,32,0,0,1-32,32H56a4,4,0,0,1,0-8h4A24,24,0,0,0,84,84V80a4,4,0,0,1,8,0Z"}))]]),o=l.forwardRef((e,a)=>l.createElement(n.Z,{ref:a,...e,weights:r}));o.displayName="BrainIcon";let s=o},19945:function(e,a,t){"use strict";t.d(a,{P:function(){return s}});var l=t(2265),n=t(4992);let r=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),l.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),o=l.forwardRef((e,a)=>l.createElement(n.Z,{ref:a,...e,weights:r}));o.displayName="LightningIcon";let s=o},60610:function(e,a,t){"use strict";t.d(a,{fC:function(){return j},z$:function(){return b}});var l=t(2265),n=t(73966),r=t(66840),o=t(57437),s="Progress",[i,d]=(0,n.b)(s),[c,u]=i(s),h=l.forwardRef((e,a)=>{var t,l,n,s;let{__scopeProgress:i,value:d=null,max:u,getValueLabel:h=f,...m}=e;(u||0===u)&&!x(u)&&console.error((t="".concat(u),l="Progress","Invalid prop `max` of value `".concat(t,"` supplied to `").concat(l,"`. Only numbers greater than 0 are valid max values. Defaulting to `").concat(100,"`.")));let p=x(u)?u:100;null===d||A(d,p)||console.error((n="".concat(d),s="Progress","Invalid prop `value` of value `".concat(n,"` supplied to `").concat(s,"`. The `value` prop must be:\n - a positive number\n - less than the value passed to `max` (or ").concat(100," if no `max` prop is set)\n - `null` or `undefined` if the progress is indeterminate.\n\nDefaulting to `null`.")));let j=A(d,p)?d:null,b=g(j)?h(j,p):void 0;return(0,o.jsx)(c,{scope:i,value:j,max:p,children:(0,o.jsx)(r.WV.div,{"aria-valuemax":p,"aria-valuemin":0,"aria-valuenow":g(j)?j:void 0,"aria-valuetext":b,role:"progressbar","data-state":v(j,p),"data-value":null!=j?j:void 0,"data-max":p,...m,ref:a})})});h.displayName=s;var m="ProgressIndicator",p=l.forwardRef((e,a)=>{var t;let{__scopeProgress:l,...n}=e,s=u(m,l);return(0,o.jsx)(r.WV.div,{"data-state":v(s.value,s.max),"data-value":null!==(t=s.value)&&void 0!==t?t:void 0,"data-max":s.max,...n,ref:a})});function f(e,a){return"".concat(Math.round(e/a*100),"%")}function v(e,a){return null==e?"indeterminate":e===a?"complete":"loading"}function g(e){return"number"==typeof e}function x(e){return g(e)&&!isNaN(e)&&e>0}function A(e,a){return g(e)&&!isNaN(e)&&e<=a&&e>=0}p.displayName=m;var j=h,b=p}},function(e){e.O(0,[5638,7079,7200,8667,2684,4447,7626,3595,2327,5427,2971,2117,1744],function(){return e(e.s=1813)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3179,3317],{90836:function(t,e,r){Promise.resolve().then(r.bind(r,35976))},89534:function(t,e,r){"use strict";r.d(e,{FN:function(){return f},Mi:function(){return v},VW:function(){return d},_i:function(){return c},gD:function(){return p},lj:function(){return x},sA:function(){return m}});var s=r(57437),a=r(2265),n=r(41915),o=r(90535),i=r(32489),u=r(94508);let d=n.zt,c=a.forwardRef((t,e)=>{let{className:r,...a}=t;return(0,s.jsx)(n.l_,{ref:e,className:(0,u.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",r),...a})});c.displayName=n.l_.displayName;let l=(0,o.j)("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),f=a.forwardRef((t,e)=>{let{className:r,variant:a,...o}=t;return(0,s.jsx)(n.fC,{ref:e,className:(0,u.cn)(l({variant:a}),r),...o})});f.displayName=n.fC.displayName;let p=a.forwardRef((t,e)=>{let{className:r,...a}=t;return(0,s.jsx)(n.aU,{ref:e,className:(0,u.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",r),...a})});p.displayName=n.aU.displayName;let m=a.forwardRef((t,e)=>{let{className:r,...a}=t;return(0,s.jsx)(n.x8,{ref:e,className:(0,u.cn)("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",r),"toast-close":"",...a,children:(0,s.jsx)(i.Z,{className:"h-4 w-4"})})});m.displayName=n.x8.displayName;let v=a.forwardRef((t,e)=>{let{className:r,...a}=t;return(0,s.jsx)(n.Dx,{ref:e,className:(0,u.cn)("text-sm font-semibold",r),...a})});v.displayName=n.Dx.displayName;let x=a.forwardRef((t,e)=>{let{className:r,...a}=t;return(0,s.jsx)(n.dk,{ref:e,className:(0,u.cn)("text-sm opacity-90",r),...a})});x.displayName=n.dk.displayName},35976:function(t,e,r){"use strict";r.d(e,{Toaster:function(){return o}});var s=r(57437),a=r(89534),n=r(77992);function o(){let{toasts:t}=(0,n.pm)();return(0,s.jsxs)(a.VW,{children:[t.map(function(t){let{id:e,title:r,description:n,action:o,...i}=t;return(0,s.jsxs)(a.FN,{...i,children:[(0,s.jsxs)("div",{className:"grid gap-1",children:[r&&(0,s.jsx)(a.Mi,{children:r}),n&&(0,s.jsx)(a.lj,{children:n})]}),o,(0,s.jsx)(a.sA,{})]},e)}),(0,s.jsx)(a._i,{})]})}},77992:function(t,e,r){"use strict";r.d(e,{pm:function(){return f}});var s=r(2265);let a=0,n=new Map,o=t=>{if(n.has(t))return;let e=setTimeout(()=>{n.delete(t),c({type:"REMOVE_TOAST",toastId:t})},1e6);n.set(t,e)},i=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,1)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case"DISMISS_TOAST":{let{toastId:r}=e;return r?o(r):t.toasts.forEach(t=>{o(t.id)}),{...t,toasts:t.toasts.map(t=>t.id===r||void 0===r?{...t,open:!1}:t)}}case"REMOVE_TOAST":if(void 0===e.toastId)return{...t,toasts:[]};return{...t,toasts:t.toasts.filter(t=>t.id!==e.toastId)}}},u=[],d={toasts:[]};function c(t){d=i(d,t),u.forEach(t=>{t(d)})}function l(t){let{...e}=t,r=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),s=()=>c({type:"DISMISS_TOAST",toastId:r});return c({type:"ADD_TOAST",toast:{...e,id:r,open:!0,onOpenChange:t=>{t||s()}}}),{id:r,dismiss:s,update:t=>c({type:"UPDATE_TOAST",toast:{...t,id:r}})}}function f(){let[t,e]=s.useState(d);return s.useEffect(()=>(u.push(e),()=>{let t=u.indexOf(e);t>-1&&u.splice(t,1)}),[t]),{...t,toast:l,dismiss:t=>c({type:"DISMISS_TOAST",toastId:t})}}},94508:function(t,e,r){"use strict";r.d(e,{cn:function(){return n}});var s=r(61994),a=r(53335);function n(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return(0,a.m6)((0,s.W)(e))}}},function(t){t.O(0,[
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3179,3317],{90836:function(t,e,r){Promise.resolve().then(r.bind(r,35976))},89534:function(t,e,r){"use strict";r.d(e,{FN:function(){return f},Mi:function(){return v},VW:function(){return d},_i:function(){return c},gD:function(){return p},lj:function(){return x},sA:function(){return m}});var s=r(57437),a=r(2265),n=r(41915),o=r(90535),i=r(32489),u=r(94508);let d=n.zt,c=a.forwardRef((t,e)=>{let{className:r,...a}=t;return(0,s.jsx)(n.l_,{ref:e,className:(0,u.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",r),...a})});c.displayName=n.l_.displayName;let l=(0,o.j)("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),f=a.forwardRef((t,e)=>{let{className:r,variant:a,...o}=t;return(0,s.jsx)(n.fC,{ref:e,className:(0,u.cn)(l({variant:a}),r),...o})});f.displayName=n.fC.displayName;let p=a.forwardRef((t,e)=>{let{className:r,...a}=t;return(0,s.jsx)(n.aU,{ref:e,className:(0,u.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",r),...a})});p.displayName=n.aU.displayName;let m=a.forwardRef((t,e)=>{let{className:r,...a}=t;return(0,s.jsx)(n.x8,{ref:e,className:(0,u.cn)("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",r),"toast-close":"",...a,children:(0,s.jsx)(i.Z,{className:"h-4 w-4"})})});m.displayName=n.x8.displayName;let v=a.forwardRef((t,e)=>{let{className:r,...a}=t;return(0,s.jsx)(n.Dx,{ref:e,className:(0,u.cn)("text-sm font-semibold",r),...a})});v.displayName=n.Dx.displayName;let x=a.forwardRef((t,e)=>{let{className:r,...a}=t;return(0,s.jsx)(n.dk,{ref:e,className:(0,u.cn)("text-sm opacity-90",r),...a})});x.displayName=n.dk.displayName},35976:function(t,e,r){"use strict";r.d(e,{Toaster:function(){return o}});var s=r(57437),a=r(89534),n=r(77992);function o(){let{toasts:t}=(0,n.pm)();return(0,s.jsxs)(a.VW,{children:[t.map(function(t){let{id:e,title:r,description:n,action:o,...i}=t;return(0,s.jsxs)(a.FN,{...i,children:[(0,s.jsxs)("div",{className:"grid gap-1",children:[r&&(0,s.jsx)(a.Mi,{children:r}),n&&(0,s.jsx)(a.lj,{children:n})]}),o,(0,s.jsx)(a.sA,{})]},e)}),(0,s.jsx)(a._i,{})]})}},77992:function(t,e,r){"use strict";r.d(e,{pm:function(){return f}});var s=r(2265);let a=0,n=new Map,o=t=>{if(n.has(t))return;let e=setTimeout(()=>{n.delete(t),c({type:"REMOVE_TOAST",toastId:t})},1e6);n.set(t,e)},i=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,1)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case"DISMISS_TOAST":{let{toastId:r}=e;return r?o(r):t.toasts.forEach(t=>{o(t.id)}),{...t,toasts:t.toasts.map(t=>t.id===r||void 0===r?{...t,open:!1}:t)}}case"REMOVE_TOAST":if(void 0===e.toastId)return{...t,toasts:[]};return{...t,toasts:t.toasts.filter(t=>t.id!==e.toastId)}}},u=[],d={toasts:[]};function c(t){d=i(d,t),u.forEach(t=>{t(d)})}function l(t){let{...e}=t,r=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),s=()=>c({type:"DISMISS_TOAST",toastId:r});return c({type:"ADD_TOAST",toast:{...e,id:r,open:!0,onOpenChange:t=>{t||s()}}}),{id:r,dismiss:s,update:t=>c({type:"UPDATE_TOAST",toast:{...t,id:r}})}}function f(){let[t,e]=s.useState(d);return s.useEffect(()=>(u.push(e),()=>{let t=u.indexOf(e);t>-1&&u.splice(t,1)}),[t]),{...t,toast:l,dismiss:t=>c({type:"DISMISS_TOAST",toastId:t})}}},94508:function(t,e,r){"use strict";r.d(e,{cn:function(){return n}});var s=r(61994),a=r(53335);function n(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return(0,a.m6)((0,s.W)(e))}}},function(t){t.O(0,[7079,1915,2971,2117,1744],function(){return t(t.s=90836)}),_N_E=t.O()}]);
|