@cline/cli-windows-arm64 3.0.52 → 3.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cline.exe +0 -0
- package/cline-hub/webview/assets/Chat-5-m425Jp.js +197 -0
- package/cline-hub/webview/assets/DialogTitle-jgZKJpfs.js +1 -0
- package/cline-hub/webview/assets/{abnfDiagram-VRR7QNED-BmZn7QAr.js → abnfDiagram-VRR7QNED-BLFmc_AX.js} +1 -1
- package/cline-hub/webview/assets/{arc-C6pGbJrV.js → arc-DD7eF3YX.js} +1 -1
- package/cline-hub/webview/assets/{architectureDiagram-ZJ3FMSHR-Dgv4VGlE.js → architectureDiagram-ZJ3FMSHR-DvcvwqFE.js} +2 -2
- package/cline-hub/webview/assets/badge-DJicQweE.js +1 -0
- package/cline-hub/webview/assets/{blockDiagram-677ZJIJ3-D7Rb3u2m.js → blockDiagram-677ZJIJ3-D2G4QuxG.js} +5 -5
- package/cline-hub/webview/assets/{bundle-mjs-CO994-RQ.js → bundle-mjs-CSP5ngA5.js} +1 -1
- package/cline-hub/webview/assets/{c4Diagram-LMCZKHZV-Dkvth2jj.js → c4Diagram-LMCZKHZV-C6Nuiq7M.js} +3 -3
- package/cline-hub/webview/assets/channel-CSeXS2Ai.js +1 -0
- package/cline-hub/webview/assets/{chunk-32BRIVSS-CSG4V8l0.js → chunk-32BRIVSS-BsAqn4xZ.js} +1 -1
- package/cline-hub/webview/assets/chunk-52WLFC77-BWe_4R7D.js +10 -0
- package/cline-hub/webview/assets/chunk-BO2N2NFS-DhZuH4Af.js +131 -0
- package/cline-hub/webview/assets/{chunk-C7G6YPKG-hGGgXHCs.js → chunk-C7G6YPKG-CV2Ol95R.js} +1 -1
- package/cline-hub/webview/assets/{chunk-EX3LRPZG-C3BlUnKc.js → chunk-EX3LRPZG-C7pvEKxc.js} +3 -3
- package/cline-hub/webview/assets/{chunk-FWX5IMBZ-CBBxPYoo.js → chunk-FWX5IMBZ-wv8Fkt1d.js} +2 -2
- package/cline-hub/webview/assets/{chunk-HOUHSVGY-BK-KWdyz.js → chunk-HOUHSVGY-CFjt2s0d.js} +1 -1
- package/cline-hub/webview/assets/chunk-ICXQ74PX-COcWu1Sq.js +2 -0
- package/cline-hub/webview/assets/{chunk-MOJQB5TN-CxW5bRIS.js → chunk-MOJQB5TN-D44BZz7X.js} +1 -1
- package/cline-hub/webview/assets/chunk-OGEWGWER-BVna3Z_8.js +1 -0
- package/cline-hub/webview/assets/{chunk-PUDLZKDR-7amIl78k.js → chunk-PUDLZKDR-CE01riew.js} +5 -5
- package/cline-hub/webview/assets/{chunk-Q4XR5HBZ-DyEQflKV.js → chunk-Q4XR5HBZ-CtUzoHvJ.js} +6 -6
- package/cline-hub/webview/assets/chunk-RYQCIY6F-AfEdSVyS.js +1 -0
- package/cline-hub/webview/assets/{chunk-V7JOEXUC-7L1bQwIr.js → chunk-V7JOEXUC-C4XkVjGi.js} +3 -3
- package/cline-hub/webview/assets/chunk-VAUOI2AC-BlqTQL33.js +1 -0
- package/cline-hub/webview/assets/{chunk-VR4S4FIN-Be22cetl.js → chunk-VR4S4FIN-CbCTOh7J.js} +1 -1
- package/cline-hub/webview/assets/{chunk-WYO6CB5R-BQDKJ2Op.js → chunk-WYO6CB5R-B91ryJFB.js} +3 -3
- package/cline-hub/webview/assets/{chunk-XXDRQBXY-DlK_iNGL.js → chunk-XXDRQBXY-DR-hrsFH.js} +1 -1
- package/cline-hub/webview/assets/{chunk-ZGVPDNZ5-D0HhTn0b.js → chunk-ZGVPDNZ5-D5I51kcE.js} +2 -2
- package/cline-hub/webview/assets/{chunk-ZIRB5QZD-C6fEPe3t.js → chunk-ZIRB5QZD-BpeS1aZ7.js} +3 -3
- package/cline-hub/webview/assets/classDiagram-OUVF2IWQ-BC75njhg.js +1 -0
- package/cline-hub/webview/assets/classDiagram-v2-EOCWNBFH-BC75njhg.js +1 -0
- package/cline-hub/webview/assets/{cose-bilkent-JH36ORCC-Ovgghq0g.js → cose-bilkent-JH36ORCC-Do63cWW-.js} +1 -1
- package/cline-hub/webview/assets/cynefinDiagram-TSTJHNR4-DxiC1jLj.js +62 -0
- package/cline-hub/webview/assets/{dagre-VKFMJZFB-VZxqrogn.js → dagre-VKFMJZFB-D4MnrU54.js} +2 -2
- package/cline-hub/webview/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/cline-hub/webview/assets/{desktop-client-bYADwT3y.js → desktop-client-Cc9yU7GV.js} +1 -1
- package/cline-hub/webview/assets/{diagram-FQU43EPY-ZqBQCTGG.js → diagram-FQU43EPY-D6nNqFiO.js} +1 -1
- package/cline-hub/webview/assets/{diagram-G47NLZAW-DG_j92Nl.js → diagram-G47NLZAW-C8pCvnUn.js} +13 -13
- package/cline-hub/webview/assets/{diagram-NH7WQ7WH-Bt4tNl-h.js → diagram-NH7WQ7WH-BjRb6vlK.js} +1 -1
- package/cline-hub/webview/assets/{diagram-OA4YK3LP-v40q0J0R.js → diagram-OA4YK3LP-BOaPe4YT.js} +1 -1
- package/cline-hub/webview/assets/{diagram-WEI45ONY-CZSSbGFC.js → diagram-WEI45ONY-C2gh4ORi.js} +2 -2
- package/cline-hub/webview/assets/{dist-BH9bKIvu.js → dist-BDCdLWk4.js} +1 -1
- package/cline-hub/webview/assets/{ebnfDiagram-CCIWWBDH-BQguzKyi.js → ebnfDiagram-CCIWWBDH-CjkO8TQF.js} +1 -1
- package/cline-hub/webview/assets/{erDiagram-Q63AITRT-CXNNdhob.js → erDiagram-Q63AITRT-BMK30ekD.js} +3 -3
- package/cline-hub/webview/assets/extensions-view-Cd8F5xpl.js +1 -0
- package/cline-hub/webview/assets/flowDiagram-23GEKE2U-BntOZ8ZE.js +1 -0
- package/cline-hub/webview/assets/{ganttDiagram-NO4QXBWP-BeutZoFO.js → ganttDiagram-NO4QXBWP-BiXN4AZg.js} +3 -3
- package/cline-hub/webview/assets/{gitGraphDiagram-IHSO6WYX-DwtCBJ_d.js → gitGraphDiagram-IHSO6WYX-G9vFn-Jf.js} +3 -3
- package/cline-hub/webview/assets/{highlighted-body-OFNGDK62-BOW3kov6.js → highlighted-body-OFNGDK62-CgYHG1rO.js} +1 -1
- package/cline-hub/webview/assets/index-CfNkVILD.js +10 -0
- package/cline-hub/webview/assets/{infoDiagram-FWYZ7A6U-CBIO2hmL.js → infoDiagram-FWYZ7A6U-DKv-n7tl.js} +1 -1
- package/cline-hub/webview/assets/init-C-OQMol4.js +1 -0
- package/cline-hub/webview/assets/{ishikawaDiagram-FXEZZL3T-6y2h3Opo.js → ishikawaDiagram-FXEZZL3T-CR3RSn8R.js} +2 -2
- package/cline-hub/webview/assets/{journeyDiagram-5HDEW3XC-ClvGKUe-.js → journeyDiagram-5HDEW3XC-DLH3FDEU.js} +3 -3
- package/cline-hub/webview/assets/{kanban-definition-HUTT4EX6-BqBCyQU9.js → kanban-definition-HUTT4EX6-CfNVdKZg.js} +3 -3
- package/cline-hub/webview/assets/label-CFn0VYsb.js +1 -0
- package/cline-hub/webview/assets/{line-Bw8gqOPe.js → line-CJ_JkFXf.js} +1 -1
- package/cline-hub/webview/assets/{linear-BiXMiKrI.js → linear-B87ngFcg.js} +1 -1
- package/cline-hub/webview/assets/mermaid-GHXKKRXX-DWw3cmjX.js +1 -0
- package/cline-hub/webview/assets/mermaid-layout-C3UvhD5t.js +321 -0
- package/cline-hub/webview/assets/{mermaid-layout-D67Npcks.js → mermaid-layout-C40rDmm9.js} +1 -1
- package/cline-hub/webview/assets/mermaid-layout-CKcc_JPx.js +1 -0
- package/cline-hub/webview/assets/mermaid-layout-DI4ft-3R.js +1 -0
- package/cline-hub/webview/assets/mermaid-layout-db2zCT1P.js +1 -0
- package/cline-hub/webview/assets/mermaid-markup-aLwrmF5_.js +259 -0
- package/cline-hub/webview/assets/mermaid-parser-Bjbk52nf.js +1 -0
- package/cline-hub/webview/assets/{mermaid-parser-CsKqUYKE.js → mermaid-parser-C0ihgYQ9.js} +1 -1
- package/cline-hub/webview/assets/{mermaid-parser-CUZ6GPid.js → mermaid-parser-CJzh8iAc.js} +2 -2
- package/cline-hub/webview/assets/mermaid-parser-CWbpbwPR.js +1 -0
- package/cline-hub/webview/assets/{mermaid-parser-B5HHdaKy.js → mermaid-parser-CeG4Jv6J.js} +1 -1
- package/cline-hub/webview/assets/{mermaid-parser-BDUXySIN.js → mermaid-parser-D7YKh_-X.js} +1 -1
- package/cline-hub/webview/assets/{mermaid-parser-Dj-OpFgW.js → mermaid-parser-DEvma7oi.js} +24 -24
- package/cline-hub/webview/assets/mermaid-parser-N1OWR5wr.js +1 -0
- package/cline-hub/webview/assets/{mermaid-parser-B1PyAFXY.js → mermaid-parser-vz6fNr8n.js} +1 -1
- package/cline-hub/webview/assets/mermaid.core-Be9B_pr2.js +11 -0
- package/cline-hub/webview/assets/{mindmap-definition-LN4V7U3C--xTAn35A.js → mindmap-definition-LN4V7U3C-DUQyLHrD.js} +3 -3
- package/cline-hub/webview/assets/{ordinal-CopWnP7w.js → ordinal-DtR4qwUh.js} +1 -1
- package/cline-hub/webview/assets/{path-BWPyau1x.js → path-COt_16Va.js} +1 -1
- package/cline-hub/webview/assets/{pegDiagram-2B236MQR-5kpPEH6L.js → pegDiagram-2B236MQR-DOgBowT1.js} +1 -1
- package/cline-hub/webview/assets/{pieDiagram-ENE6RG2P-BFaL_bCO.js → pieDiagram-ENE6RG2P-DRfeiass.js} +2 -2
- package/cline-hub/webview/assets/{quadrantDiagram-ABIIQ3AL-DeQgeOJA.js → quadrantDiagram-ABIIQ3AL-BgPT8pIn.js} +2 -2
- package/cline-hub/webview/assets/{railroadDiagram-RFXS5EU6-D6A3-IXZ.js → railroadDiagram-RFXS5EU6-8wt-q6c9.js} +1 -1
- package/cline-hub/webview/assets/{requirementDiagram-TGXJPOKE-D3J4J8f0.js → requirementDiagram-TGXJPOKE-DRTUm7Qo.js} +2 -2
- package/cline-hub/webview/assets/{rolldown-runtime-CNC7AqOf.js → rolldown-runtime-B0Z9INg1.js} +1 -1
- package/cline-hub/webview/assets/{rough.esm-CSKSodPl.js → rough.esm-By172zw-.js} +1 -1
- package/cline-hub/webview/assets/{sankeyDiagram-HTMAVEWB-Csrr--Ku.js → sankeyDiagram-HTMAVEWB-CeY3Y_ll.js} +2 -2
- package/cline-hub/webview/assets/sequenceDiagram-DBY2YBRQ-DSUB2OM4.js +162 -0
- package/cline-hub/webview/assets/settings-view-DS30eWav.js +76 -0
- package/cline-hub/webview/assets/src-BY_WSiz7.js +1 -0
- package/cline-hub/webview/assets/{stateDiagram-2N3HPSRC-BAGoUKsk.js → stateDiagram-2N3HPSRC-B2x_vEZe.js} +1 -1
- package/cline-hub/webview/assets/stateDiagram-v2-6OUMAXLB-BchjBw5_.js +1 -0
- package/cline-hub/webview/assets/swimlanes-5IMT3BWC-D4vQUhBS.js +2 -0
- package/cline-hub/webview/assets/swimlanesDiagram-G3AALYLV-FXn7KRqH.js +8 -0
- package/cline-hub/webview/assets/switch-1OAUgxzd.js +1 -0
- package/cline-hub/webview/assets/{timeline-definition-FHXFAJF6-CQNgmTIt.js → timeline-definition-FHXFAJF6-B-Cz6AFL.js} +3 -3
- package/cline-hub/webview/assets/{vennDiagram-L72KCM5P-CXc-iN33.js → vennDiagram-L72KCM5P-BHMfdY1b.js} +3 -3
- package/cline-hub/webview/assets/vscode-tfEHsPTc.js +1 -0
- package/cline-hub/webview/assets/{wardleyDiagram-EHGQE667-DTibNvqD.js → wardleyDiagram-EHGQE667-BgTZ-C-Z.js} +22 -22
- package/cline-hub/webview/assets/{xychartDiagram-FW5EYKEG-CO2qnUyw.js → xychartDiagram-FW5EYKEG-B9lKc__k.js} +4 -4
- package/cline-hub/webview/index.html +5 -3
- package/package.json +1 -1
- package/cline-hub/webview/assets/Chat-Byz21shc.js +0 -201
- package/cline-hub/webview/assets/badge-tZD_60cv.js +0 -1
- package/cline-hub/webview/assets/channel-BLdg_aiM.js +0 -1
- package/cline-hub/webview/assets/chunk-52WLFC77-hXd71QCM.js +0 -10
- package/cline-hub/webview/assets/chunk-BO2N2NFS-DJS94hax.js +0 -131
- package/cline-hub/webview/assets/chunk-ICXQ74PX-C1naCh7h.js +0 -2
- package/cline-hub/webview/assets/chunk-OGEWGWER-IbFWtSr3.js +0 -1
- package/cline-hub/webview/assets/chunk-RYQCIY6F-L4N6kLKj.js +0 -1
- package/cline-hub/webview/assets/chunk-VAUOI2AC-IC4V3R7w.js +0 -1
- package/cline-hub/webview/assets/classDiagram-OUVF2IWQ-Cx3KaYH1.js +0 -1
- package/cline-hub/webview/assets/classDiagram-v2-EOCWNBFH-Cx3KaYH1.js +0 -1
- package/cline-hub/webview/assets/cynefinDiagram-TSTJHNR4-ck16KLo6.js +0 -62
- package/cline-hub/webview/assets/defaultLocale-C8Fc0cco.js +0 -1
- package/cline-hub/webview/assets/extensions-view-B6Z6Tf6l.js +0 -1
- package/cline-hub/webview/assets/flowDiagram-23GEKE2U-cbrTqCtr.js +0 -1
- package/cline-hub/webview/assets/index-Cw6Kg0MD.js +0 -10
- package/cline-hub/webview/assets/init-D6jRqBbL.js +0 -1
- package/cline-hub/webview/assets/label-B4VTGFzI.js +0 -1
- package/cline-hub/webview/assets/mermaid-GHXKKRXX-CoORZYz7.js +0 -1
- package/cline-hub/webview/assets/mermaid-layout-BClsMEZU.js +0 -1
- package/cline-hub/webview/assets/mermaid-layout-CQFVGiJu.js +0 -321
- package/cline-hub/webview/assets/mermaid-layout-Gej8MFKI.js +0 -1
- package/cline-hub/webview/assets/mermaid-layout-mOwqmNjF.js +0 -1
- package/cline-hub/webview/assets/mermaid-markup-WcaG3JKD.js +0 -259
- package/cline-hub/webview/assets/mermaid-parser-0bma_2tB.js +0 -1
- package/cline-hub/webview/assets/mermaid-parser-BaBV8uvS.js +0 -1
- package/cline-hub/webview/assets/mermaid-parser-BzOFf4CL.js +0 -1
- package/cline-hub/webview/assets/mermaid.core-CnkePiBs.js +0 -11
- package/cline-hub/webview/assets/sequenceDiagram-DBY2YBRQ-DgI2RFHU.js +0 -162
- package/cline-hub/webview/assets/settings-view-DvSMyQzo.js +0 -76
- package/cline-hub/webview/assets/src-Cz8bXOH0.js +0 -1
- package/cline-hub/webview/assets/stateDiagram-v2-6OUMAXLB-_KKwgh9O.js +0 -1
- package/cline-hub/webview/assets/swimlanes-5IMT3BWC-DZ_1nFLY.js +0 -2
- package/cline-hub/webview/assets/swimlanesDiagram-G3AALYLV-BEQ5I-gs.js +0 -8
- package/cline-hub/webview/assets/switch-DeaHMo5o.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-BY_WSiz7.js";import{c as n}from"./chunk-WYO6CB5R-B91ryJFB.js";import{t as r}from"./chunk-VAUOI2AC-BlqTQL33.js";import{n as i}from"./mermaid-parser-CJzh8iAc.js";var a={parse:e(async e=>{let n=await i(`info`,e);t.debug(n)},`parse`)},o={version:`11.16.0`},s={parser:a,db:{getVersion:e(()=>o.version,`getVersion`)},renderer:{draw:e((e,i,a)=>{t.debug(`rendering info diagram
|
|
2
2
|
`+e);let o=r(i);n(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}export{e as t};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-BY_WSiz7.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-WYO6CB5R-B91ryJFB.js";import{p as d}from"./chunk-ICXQ74PX-COcWu1Sq.js";import{t as f}from"./chunk-VAUOI2AC-BlqTQL33.js";import{t as p}from"./rough.esm-By172zw-.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim())}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
6
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}})();function g(){this.yy={}}return e(g,`Parser`),g.prototype=h,h.Parser=g,new g})();m.parser=m;var h=m,g=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{e(this,`IshikawaDB`)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,i()}getRoot(){return this.root}addNode(e,t){let r=o.sanitizeText(t,l());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],n(r);return}this.baseLevel??=e;let i=e-this.baseLevel+1;for(i<=0&&(i=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=i;)this.stack.pop();let a=this.stack[this.stack.length-1].node,s={text:r,children:[]};a.children.push(s),this.stack.push({level:i,node:s})}getAccTitle(){return u()}setAccTitle(e){r(e)}getAccDescription(){return s()}setAccDescription(e){t(e)}getDiagramTitle(){return c()}setDiagramTitle(e){n(e)}},_=14,v=250,y=30,b=60,x=5,S=82*Math.PI/180,C=Math.cos(S),w=Math.sin(S),T=e((e,t,n)=>{let r=e.node().getBBox(),i=r.width+t*2,o=r.height+t*2;a(e,o,i,n),e.attr(`viewBox`,`${r.x-t} ${r.y-t} ${i} ${o}`)},`applyPaddedViewBox`),E=e((e,t,n,r)=>{let i=r.db.getRoot();if(!i)return;let a=l(),{look:o,handDrawnSeed:s,themeVariables:c}=a,u=d(a.fontSize)[0]??_,m=o===`handDrawn`,h=i.children??[],g=a.ishikawa?.diagramPadding??20,y=a.ishikawa?.useMaxWidth??!1,b=f(t),x=b.append(`g`).attr(`class`,`ishikawa`),S=m?p.svg(b.node()):void 0,C=S?{roughSvg:S,seed:s??0,lineColor:c?.lineColor??`#333`,fillColor:c?.mainBkg??`#fff`}:void 0,w=`ishikawa-arrow-${t}`;m||x.append(`defs`).append(`marker`).attr(`id`,w).attr(`viewBox`,`0 0 10 10`).attr(`refX`,0).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 Z`).attr(`class`,`ishikawa-arrow`);let E=0,k=v,A=m?void 0:L(x,E,k,E,k,`ishikawa-spine`);if(O(x,E,k,i.text,u,C),!h.length){m&&L(x,E,k,E,k,`ishikawa-spine`,C),T(b,g,y);return}E-=20;let j=h.filter((e,t)=>t%2==0),N=h.filter((e,t)=>t%2==1),P=D(j),F=D(N),I=P.total+F.total,R=v,z=v;if(I>0){let e=v*2,t=v*.3;R=Math.max(t,e*(P.total/I)),z=Math.max(t,e*(F.total/I))}let B=u*2;R=Math.max(R,P.max*B),z=Math.max(z,F.max*B),k=Math.max(R,v),A&&A.attr(`y1`,k).attr(`y2`,k),x.select(`.ishikawa-head-group`).attr(`transform`,`translate(0,${k})`);let V=Math.ceil(h.length/2);for(let e=0;e<V;e++){let t=x.append(`g`).attr(`class`,`ishikawa-pair`);for(let[n,r,i]of[[h[e*2],-1,R],[h[e*2+1],1,z]])n&&M(t,n,E,k,r,i,u,C);E=t.selectAll(`text`).nodes().reduce((e,t)=>Math.min(e,t.getBBox().x),1/0)}if(m)L(x,E,k,0,k,`ishikawa-spine`,C);else{A.attr(`x1`,E);let e=`url(#${w})`;x.selectAll(`line.ishikawa-branch, line.ishikawa-sub-branch`).attr(`marker-start`,e)}T(b,g,y)},`draw`),D=e(t=>{let n=e(e=>e.children.reduce((e,t)=>e+1+n(t),0),`countDescendants`);return t.reduce((e,t)=>{let r=n(t);return e.total+=r,e.max=Math.max(e.max,r),e},{total:0,max:0})},`sideStats`),O=e((e,t,n,r,i,a)=>{let o=Math.max(6,Math.floor(110/(i*.6))),s=e.append(`g`).attr(`class`,`ishikawa-head-group`).attr(`transform`,`translate(${t},${n})`),c=F(s,P(r,o),0,0,`ishikawa-head-label`,`start`,i),l=c.node().getBBox(),u=Math.max(60,l.width+6),d=Math.max(40,l.height*2+40),f=`M 0 ${-d/2} L 0 ${d/2} Q ${u*2.4} 0 0 ${-d/2} Z`;if(a){let e=a.roughSvg.path(f,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-head`)}else s.insert(`path`,`:first-child`).attr(`class`,`ishikawa-head`).attr(`d`,f);c.attr(`transform`,`translate(${(u-l.width)/2-l.x+3},${-l.y-l.height/2})`)},`drawHead`),k=e((t,n)=>{let r=[],i=[],a=e((e,t,o)=>{let s=n===-1?[...e].reverse():e;for(let e of s){let n=r.length,s=e.children??[];r.push({depth:o,text:P(e.text,15),parentIndex:t,childCount:s.length}),o%2==0?(i.push(n),s.length&&a(s,n,o+1)):(s.length&&a(s,n,o+1),i.push(n))}},`walk`);return a(t,-1,2),{entries:r,yOrder:i}},`flattenTree`),A=e((e,t,n,r,i,a,o)=>{let s=e.append(`g`).attr(`class`,`ishikawa-label-group`),c=F(s,t,n,r+11*i,`ishikawa-label cause`,`middle`,a).node().getBBox();if(o){let e=o.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-label-box`)}else s.insert(`rect`,`:first-child`).attr(`class`,`ishikawa-label-box`).attr(`x`,c.x-20).attr(`y`,c.y-2).attr(`width`,c.width+40).attr(`height`,c.height+4)},`drawCauseLabel`),j=e((e,t,n,r,i,a)=>{let o=Math.sqrt(r*r+i*i);if(o===0)return;let s=r/o,c=i/o,l=-c*6,u=s*6,d=t,f=n,p=`M ${d} ${f} L ${d-s*6*2+l} ${f-c*6*2+u} L ${d-s*6*2-l} ${f-c*6*2-u} Z`,m=a.roughSvg.path(p,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:`solid`,stroke:a.lineColor,strokeWidth:1});e.append(()=>m)},`drawArrowMarker`),M=e((e,t,n,r,i,a,o,s)=>{let c=t.children??[],l=a*(c.length?1:.2),u=-C*l,d=w*l*i,f=n+u,p=r+d;if(L(e,n,r,f,p,`ishikawa-branch`,s),s&&j(e,n,r,n-f,r-p,s),A(e,t.text,f,p,i,o,s),!c.length)return;let{entries:m,yOrder:h}=k(c,i),g=m.length,_=Array(g);for(let[e,t]of h.entries())_[t]=r+d*((e+1)/(g+1));let v=new Map;v.set(-1,{x0:n,y0:r,x1:f,y1:p,childCount:c.length,childrenDrawn:0});let S=-C,T=w*i,E=i<0?`ishikawa-label up`:`ishikawa-label down`;for(let[t,n]of m.entries()){let r=_[t],i=v.get(n.parentIndex),a=e.append(`g`).attr(`class`,`ishikawa-sub-group`),c=0,l=0,u=0;if(n.depth%2==0){let e=i.y1-i.y0;c=I(i.x0,i.x1,e?(r-i.y0)/e:.5),l=r,u=c-(n.childCount>0?b+n.childCount*x:y),L(a,c,r,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,r,1,0,s),F(a,n.text,u,r,`ishikawa-label align`,`end`,o)}else{let e=i.childrenDrawn++;c=I(i.x0,i.x1,(i.childCount-e)/(i.childCount+1)),l=i.y0,u=c+S*((r-l)/T),L(a,c,l,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,l,c-u,l-r,s),F(a,n.text,u,r,E,`end`,o)}n.childCount>0&&v.set(t,{x0:c,y0:l,x1:u,y1:r,childCount:n.childCount,childrenDrawn:0})}},`drawBranch`),N=e(e=>e.split(/<br\s*\/?>|\n/),`splitLines`),P=e((e,t)=>{if(e.length<=t)return e;let n=[];for(let r of e.split(/\s+/)){let e=n.length-1;e>=0&&n[e].length+1+r.length<=t?n[e]+=` `+r:n.push(r)}return n.join(`
|
|
7
7
|
`)},`wrapText`),F=e((e,t,n,r,i,a,o)=>{let s=N(t),c=o*1.05,l=e.append(`text`).attr(`class`,i).attr(`text-anchor`,a).attr(`x`,n).attr(`y`,r-(s.length-1)*c/2);for(let[e,t]of s.entries())l.append(`tspan`).attr(`x`,n).attr(`dy`,e===0?0:c).text(t);return l},`drawMultilineText`),I=e((e,t,n)=>e+(t-e)*n,`lerp`),L=e((e,t,n,r,i,a,o)=>{if(o){let s=o.roughSvg.line(t,n,r,i,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});e.append(()=>s).attr(`class`,a);return}return e.append(`line`).attr(`class`,a).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i)},`drawLine`),R={parser:h,get db(){return new g},renderer:{draw:E},styles:e(e=>`
|
|
8
8
|
.ishikawa .ishikawa-spine,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-BY_WSiz7.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-WYO6CB5R-B91ryJFB.js";import{t as d}from"./arc-DD7eF3YX.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-32BRIVSS-BsAqn4xZ.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
6
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin(`acc_title`),12;case 8:return this.popState(),`acc_title_value`;case 9:return this.begin(`acc_descr`),14;case 10:return this.popState(),`acc_descr_value`;case 11:this.begin(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 17;case 15:return 18;case 16:return 19;case 17:return`:`;case 18:return 6;case 19:return`INVALID`}},`anonymous`),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}})();function u(){this.yy={}}return e(u,`Parser`),u.prototype=l,l.Parser=u,new u})();_.parser=_;var v=_,y=``,b=[],x=[],S=[],C=e(function(){b.length=0,x.length=0,y=``,S.length=0,a()},`clear`),w=e(function(e){y=e,b.push(e)},`addSection`),T=e(function(){return b},`getSections`),E=e(function(){let e=A(),t=0;for(;!e&&t<100;)e=A(),t++;return x.push(...S),x},`getTasks`),D=e(function(){let e=[];return x.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},`updateActors`),O=e(function(e,t){let n=t.substr(1).split(`:`),r=0,i=[];n.length===1?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(`,`));let a=i.map(e=>e.trim()),o={section:y,type:y,people:a,task:e,score:r};S.push(o)},`addTask`),k=e(function(e){let t={section:y,type:y,description:e,task:e,classes:[]};x.push(t)},`addTaskOrg`),A=e(function(){let t=e(function(e){return S[e].processed},`compileTask`),n=!0;for(let[e,r]of S.entries())t(e),n&&=r.processed;return n},`compileTasks`),j={getConfig:e(()=>l().journey,`getConfig`),clear:C,setDiagramTitle:r,getDiagramTitle:c,setAccTitle:i,getAccTitle:u,setAccDescription:n,getAccDescription:s,addSection:w,getSections:T,getTasks:E,addTask:O,addTaskOrg:k,getActors:e(function(){return D()},`getActors`)},M=e(e=>`.label {
|
|
7
7
|
font-family: ${e.fontFamily};
|
|
8
8
|
color: ${e.textColor};
|
|
@@ -136,4 +136,4 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
|
|
|
136
136
|
${e.actor5?`fill: ${e.actor5}`:``};
|
|
137
137
|
}
|
|
138
138
|
${f()}
|
|
139
|
-
`,`getStyles`),N=e(function(e,t){return p(e,t)},`drawRect`),P=e(function(t,n){let r=t.append(`circle`).attr(`cx`,n.cx).attr(`cy`,n.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),i=t.append(`g`);i.append(`circle`).attr(`cx`,n.cx-15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),i.append(`circle`).attr(`cx`,n.cx+15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function a(e){let t=d().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+2)+`)`)}e(a,`smile`);function o(e){let t=d().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+7)+`)`)}e(o,`sad`);function s(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,n.cx-5).attr(`y1`,n.cy+7).attr(`x2`,n.cx+5).attr(`y2`,n.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return e(s,`ambivalent`),n.score>3?a(i):n.score<3?o(i):s(i),r},`drawFace`),F=e(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),I=e(function(e,t){return h(e,t)},`drawText`),L=e(function(t,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}e(r,`genPoints`);let i=t.append(`polygon`);i.attr(`points`,r(n.x,n.y,50,20,7)),i.attr(`class`,`labelBox`),n.y+=n.labelMargin,n.x+=.5*n.labelMargin,I(t,n)},`drawLabel`),R=e(function(e,t,n){let r=e.append(`g`),i=g();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width*t.taskCount+n.diagramMarginX*(t.taskCount-1),i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,N(r,i),H(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),z=-1,B=e(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);z++,a.append(`line`).attr(`id`,r+`-task`+z).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),P(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=g();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,N(a,o);let s=t.x+14;t.people.forEach(e=>{let n=t.actors[e].color,r={cx:s,cy:t.y,r:7,fill:n,stroke:`#000`,title:e,pos:t.actors[e].position};F(a,r),s+=10}),H(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),V=e(function(e,t){m(e,t)},`drawBackgroundRect`),H=(function(){function t(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(/<br\s*\/?>/gi);for(let e=0;e<f.length;e++){let c=e*u-u*(f.length-1)/2,p=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).attr(`fill`,l).style(`text-anchor`,`middle`).style(`font-size`,u).style(`font-family`,d);p.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,c).text(f[e]),p.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(p,s)}}e(n,`byTspan`);function r(e,t,r,a,o,s,c,l){let u=t.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).attr(`position`,`fixed`).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).attr(`class`,`label`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,u,r,a,o,s,c,l),i(d,c)}e(r,`byFo`);function i(e,t){for(let n in t)n in t&&e.attr(n,t[n])}return e(i,`_setTextAttrs`),function(e){return e.textPlacement===`fo`?r:e.textPlacement===`old`?t:n}})(),U={drawRect:N,drawCircle:F,drawSection:R,drawText:I,drawLabel:L,drawTask:B,drawBackgroundRect:V,initGraphics:e(function(e,t){z=-1,e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,5).attr(`refY`,2).attr(`markerWidth`,6).attr(`markerHeight`,4).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0,0 V 4 L6,2 Z`)},`initGraphics`)},W=e(function(e){Object.keys(e).forEach(function(t){J[t]=e[t]})},`setConf`),G={},K=0;function q(e){let t=l().journey,n=t.maxLabelWidth;K=0;let r=60;Object.keys(G).forEach(i=>{let a=G[i].color,o={cx:20,cy:r,r:7,fill:a,stroke:`#000`,pos:G[i].position};U.drawCircle(e,o);let s=e.append(`text`).attr(`visibility`,`hidden`).text(i),c=s.node().getBoundingClientRect().width;s.remove();let l=[];if(c<=n)l=[i];else{let t=i.split(` `),r=``;s=e.append(`text`).attr(`visibility`,`hidden`),t.forEach(e=>{let t=r?`${r} ${e}`:e;if(s.text(t),s.node().getBoundingClientRect().width>n){if(r&&l.push(r),r=e,s.text(e),s.node().getBoundingClientRect().width>n){let t=``;for(let r of e)t+=r,s.text(t+`-`),s.node().getBoundingClientRect().width>n&&(l.push(t.slice(0,-1)+`-`),t=r);r=t}}else r=t}),r&&l.push(r),s.remove()}l.forEach((n,i)=>{let a={x:40,y:r+7+i*20,fill:`#666`,text:n,textMargin:t.boxTextMargin??5},o=U.drawText(e,a).node().getBoundingClientRect().width;o>K&&o>t.leftMargin-o&&(K=o)}),r+=Math.max(20,l.length*20)})}e(q,`drawActorLegend`);var J=l().journey,Y=0,ee=e(function(e,n,r,i){let a=l(),s=a.journey.titleColor,c=a.journey.titleFontSize,u=a.journey.titleFontFamily,d=a.securityLevel,f;d===`sandbox`&&(f=t(`#i`+n));let p=t(d===`sandbox`?f.nodes()[0].contentDocument.body:`body`);X.init();let m=p.select(`#`+n);U.initGraphics(m,n);let h=i.db.getTasks(),g=i.db.getDiagramTitle(),_=i.db.getActors();for(let e in G)delete G[e];let v=0;_.forEach(e=>{G[e]={color:J.actorColours[v%J.actorColours.length],position:v},v++}),q(m),Y=J.leftMargin+K,X.insert(0,0,Y,Object.keys(G).length*50),te(m,h,0,n);let y=X.getBounds();g&&m.append(`text`).text(g).attr(`x`,Y).attr(`font-size`,c).attr(`font-weight`,`bold`).attr(`y`,25).attr(`fill`,s).attr(`font-family`,u);let b=y.stopy-y.starty+2*J.diagramMarginY,x=Y+y.stopx+2*J.diagramMarginX;o(m,b,x,J.useMaxWidth),m.append(`line`).attr(`x1`,Y).attr(`y1`,J.height*4).attr(`x2`,x-Y-4).attr(`y2`,J.height*4).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#`+n+`-arrowhead)`);let S=g?70:0;m.attr(`viewBox`,`${y.startx} -25 ${x} ${b+S}`),m.attr(`preserveAspectRatio`,`xMinYMin meet`),m.attr(`height`,b+S+25)},`draw`),X={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:e(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},`init`),updateVal:e(function(e,t,n,r){e[t]===void 0?
|
|
139
|
+
`,`getStyles`),N=e(function(e,t){return p(e,t)},`drawRect`),P=e(function(t,n){let r=t.append(`circle`).attr(`cx`,n.cx).attr(`cy`,n.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),i=t.append(`g`);i.append(`circle`).attr(`cx`,n.cx-15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),i.append(`circle`).attr(`cx`,n.cx+15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function a(e){let t=d().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+2)+`)`)}e(a,`smile`);function o(e){let t=d().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+7)+`)`)}e(o,`sad`);function s(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,n.cx-5).attr(`y1`,n.cy+7).attr(`x2`,n.cx+5).attr(`y2`,n.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return e(s,`ambivalent`),n.score>3?a(i):n.score<3?o(i):s(i),r},`drawFace`),F=e(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),I=e(function(e,t){return h(e,t)},`drawText`),L=e(function(t,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}e(r,`genPoints`);let i=t.append(`polygon`);i.attr(`points`,r(n.x,n.y,50,20,7)),i.attr(`class`,`labelBox`),n.y+=n.labelMargin,n.x+=.5*n.labelMargin,I(t,n)},`drawLabel`),R=e(function(e,t,n){let r=e.append(`g`),i=g();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width*t.taskCount+n.diagramMarginX*(t.taskCount-1),i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,N(r,i),H(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),z=-1,B=e(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);z++,a.append(`line`).attr(`id`,r+`-task`+z).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),P(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=g();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,N(a,o);let s=t.x+14;t.people.forEach(e=>{let n=t.actors[e].color,r={cx:s,cy:t.y,r:7,fill:n,stroke:`#000`,title:e,pos:t.actors[e].position};F(a,r),s+=10}),H(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),V=e(function(e,t){m(e,t)},`drawBackgroundRect`),H=(function(){function t(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(/<br\s*\/?>/gi);for(let e=0;e<f.length;e++){let c=e*u-u*(f.length-1)/2,p=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).attr(`fill`,l).style(`text-anchor`,`middle`).style(`font-size`,u).style(`font-family`,d);p.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,c).text(f[e]),p.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(p,s)}}e(n,`byTspan`);function r(e,t,r,a,o,s,c,l){let u=t.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).attr(`position`,`fixed`).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).attr(`class`,`label`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,u,r,a,o,s,c,l),i(d,c)}e(r,`byFo`);function i(e,t){for(let n in t)n in t&&e.attr(n,t[n])}return e(i,`_setTextAttrs`),function(e){return e.textPlacement===`fo`?r:e.textPlacement===`old`?t:n}})(),U={drawRect:N,drawCircle:F,drawSection:R,drawText:I,drawLabel:L,drawTask:B,drawBackgroundRect:V,initGraphics:e(function(e,t){z=-1,e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,5).attr(`refY`,2).attr(`markerWidth`,6).attr(`markerHeight`,4).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0,0 V 4 L6,2 Z`)},`initGraphics`)},W=e(function(e){Object.keys(e).forEach(function(t){J[t]=e[t]})},`setConf`),G={},K=0;function q(e){let t=l().journey,n=t.maxLabelWidth;K=0;let r=60;Object.keys(G).forEach(i=>{let a=G[i].color,o={cx:20,cy:r,r:7,fill:a,stroke:`#000`,pos:G[i].position};U.drawCircle(e,o);let s=e.append(`text`).attr(`visibility`,`hidden`).text(i),c=s.node().getBoundingClientRect().width;s.remove();let l=[];if(c<=n)l=[i];else{let t=i.split(` `),r=``;s=e.append(`text`).attr(`visibility`,`hidden`),t.forEach(e=>{let t=r?`${r} ${e}`:e;if(s.text(t),s.node().getBoundingClientRect().width>n){if(r&&l.push(r),r=e,s.text(e),s.node().getBoundingClientRect().width>n){let t=``;for(let r of e)t+=r,s.text(t+`-`),s.node().getBoundingClientRect().width>n&&(l.push(t.slice(0,-1)+`-`),t=r);r=t}}else r=t}),r&&l.push(r),s.remove()}l.forEach((n,i)=>{let a={x:40,y:r+7+i*20,fill:`#666`,text:n,textMargin:t.boxTextMargin??5},o=U.drawText(e,a).node().getBoundingClientRect().width;o>K&&o>t.leftMargin-o&&(K=o)}),r+=Math.max(20,l.length*20)})}e(q,`drawActorLegend`);var J=l().journey,Y=0,ee=e(function(e,n,r,i){let a=l(),s=a.journey.titleColor,c=a.journey.titleFontSize,u=a.journey.titleFontFamily,d=a.securityLevel,f;d===`sandbox`&&(f=t(`#i`+n));let p=t(d===`sandbox`?f.nodes()[0].contentDocument.body:`body`);X.init();let m=p.select(`#`+n);U.initGraphics(m,n);let h=i.db.getTasks(),g=i.db.getDiagramTitle(),_=i.db.getActors();for(let e in G)delete G[e];let v=0;_.forEach(e=>{G[e]={color:J.actorColours[v%J.actorColours.length],position:v},v++}),q(m),Y=J.leftMargin+K,X.insert(0,0,Y,Object.keys(G).length*50),te(m,h,0,n);let y=X.getBounds();g&&m.append(`text`).text(g).attr(`x`,Y).attr(`font-size`,c).attr(`font-weight`,`bold`).attr(`y`,25).attr(`fill`,s).attr(`font-family`,u);let b=y.stopy-y.starty+2*J.diagramMarginY,x=Y+y.stopx+2*J.diagramMarginX;o(m,b,x,J.useMaxWidth),m.append(`line`).attr(`x1`,Y).attr(`y1`,J.height*4).attr(`x2`,x-Y-4).attr(`y2`,J.height*4).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#`+n+`-arrowhead)`);let S=g?70:0;m.attr(`viewBox`,`${y.startx} -25 ${x} ${b+S}`),m.attr(`preserveAspectRatio`,`xMinYMin meet`),m.attr(`height`,b+S+25)},`draw`),X={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:e(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},`init`),updateVal:e(function(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])},`updateVal`),updateBounds:e(function(t,n,r,i){let a=l().journey,o=this,s=0;function c(c){return e(function(e){s++;let l=o.sequenceItems.length-s+1;o.updateVal(e,`starty`,n-l*a.boxMargin,Math.min),o.updateVal(e,`stopy`,i+l*a.boxMargin,Math.max),o.updateVal(X.data,`startx`,t-l*a.boxMargin,Math.min),o.updateVal(X.data,`stopx`,r+l*a.boxMargin,Math.max),c!==`activation`&&(o.updateVal(e,`startx`,t-l*a.boxMargin,Math.min),o.updateVal(e,`stopx`,r+l*a.boxMargin,Math.max),o.updateVal(X.data,`starty`,n-l*a.boxMargin,Math.min),o.updateVal(X.data,`stopy`,i+l*a.boxMargin,Math.max))},`updateItemBounds`)}e(c,`updateFn`),this.sequenceItems.forEach(c())},`updateBounds`),insert:e(function(e,t,n,r){let i=Math.min(e,n),a=Math.max(e,n),o=Math.min(t,r),s=Math.max(t,r);this.updateVal(X.data,`startx`,i,Math.min),this.updateVal(X.data,`starty`,o,Math.min),this.updateVal(X.data,`stopx`,a,Math.max),this.updateVal(X.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),bumpVerticalPos:e(function(e){this.verticalPos+=e,this.data.stopy=this.verticalPos},`bumpVerticalPos`),getVerticalPos:e(function(){return this.verticalPos},`getVerticalPos`),getBounds:e(function(){return this.data},`getBounds`)},Z=J.sectionFills,Q=J.sectionColours,te=e(function(e,t,n,r){let i=l().journey,a=``,o=n+(i.height*2+i.diagramMarginY),s=0,c=`#CCC`,u=`black`,d=0;for(let[n,l]of t.entries()){if(a!==l.section){c=Z[s%Z.length],d=s%Z.length,u=Q[s%Q.length];let r=0,o=l.section;for(let e=n;e<t.length&&t[e].section==o;e++)r+=1;let f={x:n*i.taskMargin+n*i.width+Y,y:50,text:l.section,fill:c,num:d,colour:u,taskCount:r};U.drawSection(e,f,i),a=l.section,s++}let f=l.people.reduce((e,t)=>(G[t]&&(e[t]=G[t]),e),{});l.x=n*i.taskMargin+n*i.width+Y,l.y=o,l.width=i.diagramMarginX,l.height=i.diagramMarginY,l.colour=u,l.fill=c,l.num=d,l.actors=f,U.drawTask(e,l,i,r),X.insert(l.x,l.y,l.x+l.width+i.taskMargin,450)}},`drawTasks`),$={setConf:W,draw:ee},ne={parser:v,db:j,renderer:$,styles:M,init:e(e=>{$.setConf(e.journey),j.clear()},`init`)};export{ne as diagram};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-BY_WSiz7.js";import{$ as n,J as r,et as i,f as a,nt as o,x as s,z as c}from"./chunk-WYO6CB5R-B91ryJFB.js";import"./chunk-ICXQ74PX-COcWu1Sq.js";import{t as l}from"./chunk-VAUOI2AC-BlqTQL33.js";import"./chunk-HOUHSVGY-CFjt2s0d.js";import"./chunk-Q4XR5HBZ-CtUzoHvJ.js";import{t as u}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-OGEWGWER-BVna3Z_8.js";import"./chunk-C7G6YPKG-CV2Ol95R.js";import{a as d,c as f,i as p}from"./chunk-ZGVPDNZ5-D5I51kcE.js";import{n as m,t as h}from"./chunk-ZIRB5QZD-BpeS1aZ7.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
6
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return this.pushState(`shapeData`),t.yytext=``,24;case 1:return this.pushState(`shapeDataStr`),24;case 2:return this.popState(),24;case 3:return t.yytext=t.yytext.replace(/\n\s*/g,`<br/>`),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace(`Found comment`,t.yytext),6;case 7:return 8;case 8:this.begin(`CLASS`);break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 12:return e.getLogger().trace(`SPACELINE`),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace(`end icon`),this.popState();break;case 16:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),20;case 17:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),20;case 18:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),20;case 19:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),20;case 20:return this.begin(`NODE`),20;case 21:return this.begin(`NODE`),20;case 22:return this.begin(`NODE`),20;case 23:return this.begin(`NODE`),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin(`NSTR2`);break;case 28:return`NODE_DESCR`;case 29:this.popState();break;case 30:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 31:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 35:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 36:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 37:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 41:return e.getLogger().trace(`Long description:`,t.yytext),21;case 42:return e.getLogger().trace(`Long description:`,t.yytext),21}},`anonymous`),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}})();function S(){this.yy={}}return e(S,`Parser`),S.prototype=x,x.Parser=S,new S})();g.parser=g;var _=g,v=[],y=[],b=0,x={},S=e(()=>{v=[],y=[],b=0,x={}},`clear`),C=e(e=>{if(v.length===0)return null;let t=v[0].level,n=null;for(let e=v.length-1;e>=0;e--)if(v[e].level===t&&!n&&(n=v[e]),v[e].level<t)throw Error(`Items without section detected, found section ("`+v[e].label+`")`);return e===n?.level?null:n},`getSection`),w=e(function(){return y},`getSections`),T=e(function(){let e=[],t=[],n=w(),r=s();for(let e of n){let n={id:e.id,label:c(e.label??``,r),labelType:`markdown`,isGroup:!0,ticket:e.ticket,shape:`kanbanSection`,level:e.level,look:r.look};t.push(n);let i=v.filter(t=>t.parentId===e.id);for(let n of i){let i={id:n.id,parentId:e.id,label:c(n.label??``,r),labelType:`markdown`,isGroup:!1,ticket:n?.ticket,priority:n?.priority,assigned:n?.assigned,icon:n?.icon,shape:`kanbanItem`,level:n.level,rx:5,ry:5,cssStyles:[`text-align: left`]};t.push(i)}}return{nodes:t,edges:e,other:{},config:s()}},`getData`),E=e((e,t,n,r,i)=>{let o=s(),l=o.mindmap?.padding??a.mindmap.padding;switch(r){case D.ROUNDED_RECT:case D.RECT:case D.HEXAGON:l*=2}let u={id:c(t,o)||`kbn`+b++,level:e,label:c(n,o),width:o.mindmap?.maxNodeWidth??a.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(i!==void 0){let e;e=i.includes(`
|
|
7
7
|
`)?i+`
|
|
8
8
|
`:`{
|
|
9
9
|
`+i+`
|
|
10
10
|
}`;let t=m(e,{schema:h});if(t.shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes(`_`)))throw Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&t.shape===`kanbanItem`&&(u.shape=t?.shape),t?.label&&(u.label=t?.label),t?.icon&&(u.icon=t?.icon.toString()),t?.assigned&&(u.assigned=t?.assigned.toString()),t?.ticket&&(u.ticket=t?.ticket.toString()),t?.priority&&(u.priority=t?.priority)}let d=C(e);d?u.parentId=d.id||`kbn`+b++:y.push(u),v.push(u)},`addNode`),D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:E,getSections:w,getData:T,nodeType:D,getType:e((e,n)=>{switch(t.debug(`In get type`,e,n),e){case`[`:return D.RECT;case`(`:return n===`)`?D.ROUNDED_RECT:D.CLOUD;case`((`:return D.CIRCLE;case`)`:return D.CLOUD;case`))`:return D.BANG;case`{{`:return D.HEXAGON;default:return D.DEFAULT}},`getType`),setElementForId:e((e,t)=>{x[e]=t},`setElementForId`),decorateNode:e(e=>{if(!e)return;let t=s(),n=v[v.length-1];e.icon&&(n.icon=c(e.icon,t)),e.class&&(n.cssClasses=c(e.class,t))},`decorateNode`),type2Str:e(e=>{switch(e){case D.DEFAULT:return`no-border`;case D.RECT:return`rect`;case D.ROUNDED_RECT:return`rounded-rect`;case D.CIRCLE:return`circle`;case D.CLOUD:return`cloud`;case D.BANG:return`bang`;case D.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:e(()=>t,`getLogger`),getElementById:e(e=>x[e],`getElementById`)},k={draw:e(async(e,n,i,o)=>{t.debug(`Rendering kanban diagram
|
|
11
|
-
`+e);let c=o.db.getData(),u=s();u.htmlLabels=!1;let m=l(n);for(let e of c.nodes)e.domId=`${n}-${e.id}`;let h=m.append(`g`);h.attr(`class`,`sections`);let g=m.append(`g`);g.attr(`class`,`items`);let _=c.nodes.filter(e=>e.isGroup),v=0,y=[],b=25;for(let e of _){let t=u?.kanban?.sectionWidth||200;v+=1,e.x=t*v+(v-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+v;let n=await p(h,e);b=Math.max(b,n?.labelBBox?.height),y.push(n)}let x=0;for(let e of _){let t=y[x];x+=1;let n=u?.kanban?.sectionWidth||200,r=-n*3/2+b,i=r,a=c.nodes.filter(t=>t.parentId===e.id);for(let t of a){if(t.isGroup)throw Error(`Groups within groups are not allowed in Kanban diagrams`);t.x=e.x,t.width=n-
|
|
11
|
+
`+e);let c=o.db.getData(),u=s();u.htmlLabels=!1;let m=l(n);for(let e of c.nodes)e.domId=`${n}-${e.id}`;let h=m.append(`g`);h.attr(`class`,`sections`);let g=m.append(`g`);g.attr(`class`,`items`);let _=c.nodes.filter(e=>e.isGroup),v=0,y=[],b=25;for(let e of _){let t=u?.kanban?.sectionWidth||200;v+=1,e.x=t*v+(v-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+v;let n=await p(h,e);b=Math.max(b,n?.labelBBox?.height),y.push(n)}let x=0;for(let e of _){let t=y[x];x+=1;let n=u?.kanban?.sectionWidth||200,r=-n*3/2+b,i=r,a=c.nodes.filter(t=>t.parentId===e.id);for(let t of a){if(t.isGroup)throw Error(`Groups within groups are not allowed in Kanban diagrams`);t.x=e.x,t.width=n-15;let r=(await d(g,t,{config:u})).node().getBBox();t.y=i+r.height/2,await f(t),i=t.y+r.height/2+10/2}let o=t.cluster.select(`rect`),s=Math.max(i-r+30,50)+(b-25);o.attr(`height`,s)}r(void 0,m,u.mindmap?.padding??a.kanban.padding,u.mindmap?.useMaxWidth??a.kanban.useMaxWidth)},`draw`)},A=e(t=>{let r=``;for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t[`lineColor`+e]=t[`lineColor`+e]||t[`cScaleInv`+e],o(t[`lineColor`+e])?t[`lineColor`+e]=i(t[`lineColor`+e],20):t[`lineColor`+e]=n(t[`lineColor`+e],20);let a=e((e,r)=>t.darkMode?n(e,r):i(e,r),`adjuster`);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){let n=``+(17-3*e);r+=`
|
|
12
12
|
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} polygon, .section-${e-1} path {
|
|
13
13
|
fill: ${a(t[`cScale`+e],10)};
|
|
14
14
|
stroke: ${a(t[`cScale`+e],10)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{a as t,r as n}from"./bundle-mjs-CSP5ngA5.js";import{$ as r,$t as i,A as a,B as o,Bt as s,C as c,Ct as l,D as u,Dt as d,E as f,Et as p,G as m,H as h,Ht as g,I as _,It as v,J as y,Jn as b,L as x,Lt as S,Mn as C,O as ee,Pt as w,Q as T,R as E,Rn as D,S as O,T as k,Tt as A,U as j,Un as M,V as N,W as P,Wn as F,X as I,Z as te,Zn as ne,Zt as L,_ as R,a as z,an as B,ar as V,b as H,bt as U,c as W,cn as G,d as K,dn as q,dr as re,en as ie,f as ae,gt as oe,h as se,ht as ce,i as le,in as ue,ir as J,it as de,j as fe,jn as pe,jt as me,k as he,l as ge,ln as _e,nr as ve,o as ye,on as be,or as xe,q as Se,r as Ce,rn as we,rt as Te,s as Ee,sr as De,tn as Oe,u as ke,v as Ae,vt as je,w as Me,wn as Ne,wt as Pe,x as Fe,xn as Ie,xt as Le,y as Re,z as ze,zt as Y}from"./vscode-tfEHsPTc.js";import{a as Be,c as Ve,i as He,n as Ue,o as We,r as Ge,s as Ke,t as qe}from"./DialogTitle-jgZKJpfs.js";function Je(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=g(),a=me()!=null,o=re(()=>new U({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Te,floatingId:i,syncOnly:!1,nested:a})).current;return V(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=F(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var X=e(t(),1);function Ye(e){let[t,n]=X.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}var Xe=x(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ze=x(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Qe=x(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),$e=x(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),et=x(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),tt=x(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),nt=X.forwardRef(function(e,t){let{render:n,className:i,style:a,disabled:o=!1,nativeButton:s=!0,id:c,payload:l,handle:d,...f}=e,m=Ve(!0),h=r(d)??m;if(!h)throw Error(J(79));let g=P(c),_=h.useState(`floatingRootContext`),b=h.useState(`isOpenedByTrigger`,g),x=h.useState(`triggerPopupId`,g),S=X.useRef(null),{registerTrigger:C,isMountedByThisTrigger:ee}=ce(g,S,h,{payload:l}),{getButtonProps:w,buttonRef:T}=fe({disabled:o,native:s}),E=p(_),D=u(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),O={disabled:o,open:b},k=h.useState(`triggerProps`,ee);return Y(`button`,e,{state:O,ref:[T,t,C,S],props:[E.reference,k,D,{[v]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":b,"aria-controls":x},f,w],stateAttributesMapping:y})});function rt(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function it(e){let t=X.useRef(!0);t.current&&(t.current=!1,e())}var at=X.createContext(null);function Z(){let e=X.useContext(at);if(e===null)throw Error(J(60));return e}var ot=(e,t)=>Object.is(e,t);function st(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function ct(e,t,n){return!e||e.length===0?!1:e.some(e=>e!==void 0&&st(t,e,n))}function lt(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&st(e,t,n))}function ut(e,t,n,r){let i=lt(e,r&&Array.isArray(t)?t[t.length-1]:t,n);return i===-1?null:i}function dt(e,t,n){return e.filter(e=>!st(t,e,n))}function ft(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Q=n();function pt(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function mt(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(pt(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function ht(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return ft(e)}function gt(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?ft(e.value):ft(e)}function _t(e,t,n){function r(){return ht(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=pt(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function vt(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Q.jsx)(X.Fragment,{children:_t(r,t,n)},i)),e),[])}var $={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:gt(t,r)!==``},hasNullItemLabel:(e,t)=>t?mt(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>st(t,e,n)):st(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function yt(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function bt(e){let{id:t,value:n,defaultValue:r=null,onValueChange:a,open:o,defaultOpen:u=!1,onOpenChange:d,name:m,form:h,autoComplete:g,disabled:_=!1,readOnly:v=!1,required:y=!1,modal:b=!0,actionsRef:x,inputRef:S,onOpenChangeComplete:C,items:w,multiple:E=!1,itemToStringLabel:D,itemToStringValue:O,isItemEqualToValue:k=ot,highlightItemOnHover:j=!0,children:M}=e,{clearErrors:N}=ae(),{setDirty:P,setTouched:F,setFocused:I,validityData:ne,setFilled:L,name:R,disabled:z,validation:H,validationMode:U}=se(),W=ke({id:t}),G=z||_,K=R??m,[q,ce]=c({controlled:n,default:E?r??xe:r,name:`Select`,state:`value`}),[J,fe]=c({controlled:o,default:u,name:`Select`,state:`open`}),pe=X.useRef([]),me=X.useRef([]),he=X.useRef(null),ve=X.useRef(null),ye=X.useRef(0),Se=X.useRef(null),we=X.useRef([]),Te=X.useRef(!1),Ee=X.useRef(null),Oe=X.useRef(null),Ae=X.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Me=X.useRef(!1),{mounted:Pe,setMounted:Fe,transitionStatus:Ie}=je(J),{openMethod:Re,triggerProps:ze}=f(J),Y=re(()=>new Le({id:W,labelId:void 0,modal:b,multiple:E,itemToStringLabel:D,itemToStringValue:O,isItemEqualToValue:k,value:q,open:J,mounted:Pe,transitionStatus:Ie,items:w,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Be=l(Y,$.activeIndex),Ve=l(Y,$.selectedIndex),He=l(Y,$.triggerElement),Ue=l(Y,$.positionerElement),We=Ye(Re),Ge=Re??We,Ke=X.useMemo(()=>E?``:gt(q,O),[E,q,O]),qe=X.useMemo(()=>E&&Array.isArray(q)?q.map(e=>gt(e,O)):gt(q,O),[E,q,O]),Xe=B(He),Ze=ue(()=>qe);ge(Xe,W,q,Ze,!G,m);let Qe=X.useRef(q),$e=E?Array.isArray(q)&&q.length>0:q!=null&&Ke!==``;V(()=>{L($e)},[$e,L]),V(function(){let e=q,t=!1;if(E){let n=Array.isArray(q)?q:[];t=n.length===0,e=n[n.length-1]}let n=t?-1:lt(we.current,e,k),r=n===-1?null:n;r===null&&(Oe.current=null),!J&&Y.set(`selectedIndex`,r)},[E,J,q,k,Y]);function et(e){let t=ne.initialValue;return Array.isArray(e)&&Array.isArray(t)?!yt(e,t,(e,t)=>st(e,t,k)):e!==t}ee(q,()=>{N(K),P(et(q)),H.change(q)});let tt=ue((e,t)=>{d?.(e,t),!t.isCanceled&&(fe(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(F(!0),I(!1),U===`onBlur`&&H.commit(q)))}),nt=ue(()=>{Fe(!1),Y.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),C?.(!1)});oe({enabled:!x,open:J,ref:he,onComplete(){J||nt()}}),X.useImperativeHandle(x,()=>({unmount:nt}),[nt]);let Z=ue((e,t)=>{a?.(e,t),!t.isCanceled&&ce(e)}),ct=ue(e=>{let t=Ce(e.scrollHeight,e.clientHeight),n=le(e.scrollTop,t),r=n>0,i=n<t;Y.set(`scrollUpArrowVisible`,r),Y.set(`scrollDownArrowVisible`,i)}),ut=Je({open:J,onOpenChange:tt,elements:{reference:He,floating:Ue}}),dt=p(ut,{enabled:!v&&!G,event:`mousedown`}),ft=A(ut),pt=T(ut,{enabled:!v&&!G,listRef:pe,activeIndex:Be,selectedIndex:Ve,disabledIndices:xe,onNavigate(e){e===null&&!J||Y.set(`activeIndex`,e)},focusItemOnHover:j}),mt=te(ut,{enabled:!v&&!G&&(J||!E),listRef:me,activeIndex:Be,selectedIndex:Ve,disabledIndices:e=>rt(pe.current[e]),onMatch(e){J?Y.set(`activeIndex`,e):Z(we.current[e],_e(Ne))},onTyping(e){Te.current=e}}),_t=X.useMemo(()=>s(mt.reference,pt.reference,ft.reference,dt.reference,ze),[dt.reference,mt.reference,pt.reference,ft.reference,ze]),vt=X.useMemo(()=>s(de,mt.floating,pt.floating,ft.floating),[mt.floating,pt.floating,ft.floating]),bt=pt.item??De;it(()=>{Y.update({popupProps:vt,triggerProps:_t})}),Y.useSyncedValues({id:W,modal:b,multiple:E,value:q,open:J,mounted:Pe,transitionStatus:Ie,popupProps:vt,triggerProps:_t,items:w,itemToStringLabel:D,itemToStringValue:O,isItemEqualToValue:k,openMethod:Ge});let xt=X.useMemo(()=>({store:Y,floatingContext:ut,required:y,disabled:G,readOnly:v,multiple:E,highlightItemOnHover:j,setValue:Z,setOpen:tt,listRef:pe,popupRef:he,scrollHandlerRef:ve,handleScrollArrowVisibility:ct,scrollArrowsMountedCountRef:ye,itemProps:bt,valueRef:Se,valuesRef:we,labelsRef:me,typingRef:Te,selectionRef:Ae,firstItemTextRef:Ee,selectedItemTextRef:Oe,validation:H,onOpenChangeComplete:C,alignItemWithTriggerActiveRef:Me,initialValueRef:Qe}),[Y,ut,y,G,v,E,j,Z,tt,bt,H,C,ct]),St=be(S,H.inputRef),Ct=E?void 0:K,wt=X.useMemo(()=>!E||!Array.isArray(q)||!K?null:q.map(e=>{let t=gt(e,O);return(0,Q.jsx)(`input`,{type:`hidden`,form:h,name:K,value:t,disabled:G},t)}),[E,q,h,K,O,G]);return(0,Q.jsxs)(at.Provider,{value:xt,children:[M,(0,Q.jsx)(`input`,{...H.getValidationProps(G,{onFocus(){Y.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||G||v)return;let t=e.currentTarget.value,n=_e(Ne,e.nativeEvent);function r(){if(E)return;let e=t.toLowerCase(),r=we.current.findIndex(t=>gt(t,O).toLowerCase()===e||ht(t,D).toLowerCase()===e);r===-1&&(r=we.current.findIndex((t,n)=>{let r=me.current[n];return r!=null&&r.toLowerCase()===e}));let i=we.current[r];i!=null&&Z(i,n)}Y.set(`forceMount`,!0),queueMicrotask(r)}}),id:W&&Ct==null?`${W}-hidden-input`:void 0,form:h,name:Ct,autoComplete:g,value:Ke,disabled:G,required:y&&!(E&&$e),readOnly:v,ref:St,style:K?ie:i,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),wt]})}function xt(e,t){return e??t}var St=400,Ct={...Se,...R,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},wt=X.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:c,...u}=e,{setTouched:d,setFocused:f,validationMode:p,state:m,disabled:h}=se(),{labelId:g}=K(),{store:_,setOpen:v,selectionRef:y,validation:b,readOnly:x,required:S,alignItemWithTriggerActiveRef:ee,disabled:w}=Z(),T=h||w||a,E=l(_,$.open),O=l(_,$.mounted),k=l(_,$.value),A=l(_,$.triggerProps),j=l(_,$.positionerElement),M=l(_,$.listElement),N=l(_,$.popupSide),P=l(_,$.id),F=l(_,$.labelId),I=l(_,$.hasSelectedValue),te=O&&j?N:null,ne=i??P,L=xt(g,F);ke({id:ne});let R=B(j),z=X.useRef(null),{getButtonProps:V,buttonRef:H}=fe({disabled:T,native:o}),U=_.useStateSetter(`triggerElement`),W=ve(),G=ve(),re=ve();X.useEffect(()=>{if(E)return re.start(St,()=>{y.current.allowUnselectedMouseUp=!0,y.current.allowSelectedMouseUp=!0}),()=>{re.clear()};y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},G.clear()},[E,y,G,re]);let ie=s(A,{id:ne,role:`combobox`,"aria-expanded":E,"aria-haspopup":`listbox`,"aria-controls":E?M?.id??C(j)?.id:void 0,"aria-labelledby":L,"aria-readonly":x||void 0,"aria-required":S||void 0,tabIndex:T?-1:0,onFocus(e){f(!0),E&&ee.current&&v(!1,_e(Ne,e.nativeEvent)),W.start(0,()=>{_.set(`forceMount`,!0)})},onBlur(e){D(j,e.relatedTarget)||(d(!0),f(!1),p===`onBlur`&&b.commit(k))},onMouseDown(e){if(E)return;let t=Oe(e.currentTarget);function n(e){if(!z.current)return;let t=e.target;D(z.current,t)||D(R.current,t)||Ae(e,z.current)||v(!1,_e(q,e))}G.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},u,V),ae=b.getValidationProps(T,ie);ae.role=`combobox`;let oe={...m,open:E,disabled:T,value:k,readOnly:x,popupSide:te,placeholder:!I};return Y(`button`,e,{ref:[t,z,H,U],state:oe,stateAttributesMapping:Ct,props:ae})}),Tt={value:()=>null},Et=X.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:u}=Z(),d=l(c,$.value),f=l(c,$.items),p=l(c,$.itemToStringLabel),m=l(c,$.hasSelectedValue),h=!m&&a!=null&&i==null,g=l(c,$.hasNullItemLabel,h),_={value:d,placeholder:!m},v=null;return v=typeof i==`function`?i(d):i??(h&&!g?a:Array.isArray(d)?vt(d,f,p):_t(d,f,p)),Y(`span`,e,{state:_,ref:[t,u],props:[{children:v},s],stateAttributesMapping:Tt})}),Dt=X.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=Z(),s={open:l(o,$.open)};return Y(`span`,e,{state:s,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:y})}),Ot=X.forwardRef(function(e,t){let{store:n}=Z(),r=l(n,$.mounted),i=l(n,$.forceMount);return r||i?(0,Q.jsx)(w,{ref:t,...e}):null}),kt=X.createContext(void 0);function At(){let e=X.useContext(kt);if(!e)throw Error(J(59));return e}function jt(e,t){e&&Object.assign(e.style,t)}var Mt={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Nt={position:`fixed`},Pt=X.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:s,align:c,sideOffset:u,alignOffset:d,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:m,sticky:g,disableAnchorTracking:_,alignItemWithTrigger:v=!0,collisionAvoidance:y=S,style:b,...x}=e,{store:C,listRef:ee,labelsRef:w,alignItemWithTriggerActiveRef:T,selectedItemTextRef:E,valuesRef:D,initialValueRef:O,popupRef:k,setValue:A,floatingContext:j}=Z(),M=l(C,$.open),N=l(C,$.mounted),P=l(C,$.modal),F=l(C,$.value),I=l(C,$.openMethod),te=l(C,$.positionerElement),ne=l(C,$.triggerElement),L=l(C,$.isItemEqualToValue),R=l(C,$.transitionStatus),z=X.useRef(null),B=X.useRef(null),[U,W]=X.useState(v),G=N&&U&&I!==`touch`;!N&&U!==v&&W(v),X.useImperativeHandle(T,()=>G),Re((G||P)&&M,I===`touch`,te,ne);let K=h({anchor:n,floatingRootContext:j,positionMethod:a,mounted:N,side:s,sideOffset:u,align:c,alignOffset:d,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:g,disableAnchorTracking:_??G,collisionAvoidance:y,keepMounted:!0}),q=G?`none`:K.side,re=G?Nt:K.positionerStyles,ie={open:M,side:q,align:K.align,anchorHidden:K.anchorHidden};V(()=>{C.set(`popupSide`,K.side)},[C,K.side]);let ae=C.useStateSetter(`positionerElement`),oe=o(e,ie,{styles:re,transitionStatus:R,props:x,refs:[t,ae],hidden:!N,inert:!M}),se=X.useRef(0),ce=ue(e=>{if(D.current.length===0)return;let t=se.current;if(se.current=e.size,e.size===t)return;let n=_e(Ne);if(t!==0&&!C.state.multiple&&F!==null&<(D.current,F,L)===-1){let e=O.current,t=e!=null&<(D.current,e,L)!==-1?e:null;A(t,n),t===null&&(C.set(`selectedIndex`,null),E.current=null)}if(t!==0&&C.state.multiple&&Array.isArray(F)){let e=F.filter(e=>lt(D.current,e,L)!==-1);e.length!==F.length&&(A(e,n),e.length===0&&(C.set(`selectedIndex`,null),E.current=null))}if(M&&G){C.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};jt(te,e),jt(k.current,e)}}),le=X.useMemo(()=>({...K,side:q,alignItemWithTriggerActive:G,setControlledAlignItemWithTrigger:W,scrollUpArrowRef:z,scrollDownArrowRef:B}),[K,q,G,W]);return(0,Q.jsx)(H,{elementsRef:ee,labelsRef:w,onMapChange:ce,children:(0,Q.jsxs)(kt.Provider,{value:le,children:[N&&P&&(0,Q.jsx)(he,{inert:ze(!M),cutout:ne}),oe]})})}),Ft={...m,...I},It=X.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:o,...s}=e,{store:c,popupRef:u,onOpenChangeComplete:f,setOpen:p,valueRef:m,firstItemTextRef:h,selectedItemTextRef:g,multiple:_,handleScrollArrowVisibility:v,scrollHandlerRef:y,listRef:b,highlightItemOnHover:x,floatingContext:S}=Z(),{side:C,align:ee,alignItemWithTriggerActive:w,isPositioned:T,setControlledAlignItemWithTrigger:E}=At(),D=Fe(!0)!=null,O=j(),{nonce:k,disableStyleElements:A}=ye(),P=l(c,$.id),F=l(c,$.open),I=l(c,$.openMethod),te=l(c,$.mounted),L=l(c,$.popupProps),R=l(c,$.transitionStatus),B=l(c,$.triggerElement),H=l(c,$.positionerElement),U=l(c,$.listElement),W=X.useRef(!1),K=X.useRef(!1),q=X.useRef({}),re=we(),ie=ue(e=>{if(!H||!u.current||!K.current)return;let t=H.style.top===`0px`,n=H.style.bottom===`0px`;if(W.current||!w||!t&&!n){v(e);return}let r=zt(H),i=Bt(H.getBoundingClientRect().height,`y`,r),a=Oe(H),o=M(H),s=o.getComputedStyle(H),c=parseFloat(s.marginTop),l=parseFloat(s.marginBottom),d=Lt(o.getComputedStyle(u.current)),f=Math.min(a.documentElement.clientHeight-c-l,d),p=e.scrollTop,m=Rt(e),h=null,g=e=>{H.style.height=`${e}px`},_=t?m-p:p,y=Math.min(i+_,f);if(_<=1){let n=z(_,0,f-i);n>0&&g(i+n),e.scrollTop=t?m:0,f-(i+n)<=1&&(W.current=!0),v(e);return}f-y>1?h=t?1/0:0:n&&p<m&&(h=p-(_-(i+_-f)));let b=Math.ceil(y);if(b!==0&&g(b),h!=null){let t=z(h,0,Rt(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(W.current=!0),v(e)});X.useImperativeHandle(y,()=>ie,[ie]),oe({open:F,ref:u,onComplete(){F&&f?.(!0)}});let ae={open:F,transitionStatus:R,side:C,align:ee};V(()=>{!H||!u.current||Object.keys(q.current).length||(q.current={top:H.style.top||`0`,left:H.style.left||`0`,right:H.style.right,height:H.style.height,bottom:H.style.bottom,minHeight:H.style.minHeight,maxHeight:H.style.maxHeight,marginTop:H.style.marginTop,marginBottom:H.style.marginBottom})},[u,H]),V(()=>{F||w||(K.current=!1,W.current=!1,jt(H,q.current))},[F,w,H,u]),V(()=>{let e=u.current;if(!F||!B||!H||!e||w&&!T||c.state.transitionStatus===`ending`)return;if(K.current=!0,e.style.removeProperty(`--transform-origin`),!w){re.request(()=>v(U||e));return}let t=Ut(e);try{let t=g.current;t?.isConnected||(t=!$.hasSelectedValue(c.state)&&h.current?.isConnected?h.current:null);let n=m.current,r=M(H),i=r.getComputedStyle(H),a=r.getComputedStyle(e),o=Oe(B),s=zt(B),l=Vt(B.getBoundingClientRect(),s),u=Vt(H.getBoundingClientRect(),s),d=l.height,f=U||e,p=f.scrollHeight,_=parseFloat(a.borderBottomWidth),y=parseFloat(i.marginTop)||10,S=parseFloat(i.marginBottom)||10,C=parseFloat(i.minHeight)||100,ee=Lt(a),w=o.documentElement.clientHeight-y-S,T=o.documentElement.clientWidth,D=w-l.bottom+d,k,A=O===`rtl`?l.right-u.width:l.left,j=0;if(t&&n){let e=Vt(n.getBoundingClientRect(),s);k=Vt(t.getBoundingClientRect(),s),A=u.left+(O===`rtl`?e.right-k.right:e.left-k.left);let r=e.top-l.top+e.height/2;j=k.top-u.top+k.height/2-r}let N=D+j+S+_,P=Math.min(w,N),F=w-y-S,I=N-P,te=T-5;H.style.left=`${z(A,5,te-u.width)}px`,H.style.height=`${P}px`,H.style.maxHeight=`none`,H.style.marginTop=`${y}px`,H.style.marginBottom=`${S}px`,e.style.height=`100%`;let L=Rt(f),R=I>=L-1;R&&(P=Math.min(w,u.height)-(I-L));let V=l.top<20||l.bottom>w-20||Math.ceil(P)+1<Math.min(p,C),G=(r.visualViewport?.scale??1)!==1&≠if(V||G){jt(H,q.current),E(!1);return}let K=Math.max(C,P);if(R){let e=Math.max(0,w-N);H.style.top=u.height>=F?`0`:`${e}px`,H.style.height=`${P}px`,f.scrollTop=Rt(f)}else H.style.bottom=`0`,f.scrollTop=I;if(k){let t=u.top,n=u.height,r=k.top+k.height/2,i=z(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(K===w||P>=ee)&&(W.current=!0),v(f),x&&c.state.selectedIndex===null&&c.state.activeIndex===null&&b.current[0]!=null&&c.set(`activeIndex`,0)}finally{t()}},[c,F,H,B,m,h,g,u,v,w,E,re,U,b,x,O,T]),X.useEffect(()=>{if(!w||!H||!F)return;let e=M(H);function t(e){p(!1,_e(pe,e))}return G(e,`resize`,t)},[p,w,H,F]);let se={...U?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":_||void 0,id:`${P}-list`},onKeyDown(e){D&&a.has(e.key)&&e.stopPropagation()},onScroll(e){U||ie(e.currentTarget)},...w&&{style:U?{height:`100%`}:Mt},className:!U&&w?Ee.className:void 0},ce=Y(`div`,e,{ref:[t,u],state:ae,stateAttributesMapping:Ft,props:[L,se,N(R),s]});return(0,Q.jsxs)(X.Fragment,{children:[!A&&Ee.getElement(k),(0,Q.jsx)(d,{context:S,modal:!1,disabled:!te,openInteractionType:I,returnFocus:o,restoreFocus:!0,children:ce})]})});function Lt(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function Rt(e){return Ce(e.scrollHeight,e.clientHeight)}function zt(e){return Pe.getScale(e)}function Bt(e,t,n){return e/n[t]}function Vt(e,t){return L({x:Bt(e.x,`x`,t),y:Bt(e.y,`y`,t),width:Bt(e.width,`x`,t),height:Bt(e.height,`y`,t)})}var Ht=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Ut(e){let{style:t}=e,n={};for(let[e,r]of Ht)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Ht){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Wt=X.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s,multiple:c}=Z(),{alignItemWithTriggerActive:u}=At(),d=l(o,$.hasScrollArrows),f=l(o,$.openMethod),p={id:`${l(o,$.id)}-list`,role:`listbox`,"aria-multiselectable":c||void 0,onScroll(e){s.current?.(e.currentTarget)},...u&&{style:Mt},className:d&&f!==`touch`?Ee.className:void 0},m=o.useStateSetter(`listElement`);return Y(`div`,e,{ref:[t,m],props:[p,a]})}),Gt=X.createContext(void 0);function Kt(){let e=X.useContext(Gt);if(!e)throw Error(J(57));return e}var qt=X.memo(X.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...u}=e,d=X.useRef(null),f=O({guess:!0,label:o,textRef:d}),{store:p,itemProps:m,setOpen:h,setValue:g,selectionRef:_,typingRef:v,valuesRef:y,multiple:x,selectedItemTextRef:S,disabled:C,readOnly:ee}=Z(),w=C||s,T=l(p,$.isActive,f.index),E=l(p,$.open),D=l(p,$.isSelected,a),k=l(p,$.isSelectedByFocus,f.index),A=l(p,$.isItemEqualToValue),j=f.index,M=X.useRef(null);V(()=>{let e=y.current;return e[j]=a,()=>{delete e[j]}},[j,a,y]),V(()=>{let e=p.state.value,t=e;x&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&st(a,t,A)&&(p.set(`selectedIndex`,j),d.current&&(S.current=d.current))},[j,x,A,p,a,S]);let N=X.useRef(`mouse`),P=X.useRef(!1),{getButtonProps:F,buttonRef:I}=fe({disabled:w,focusableWhenDisabled:!0,native:c,composite:!0}),te={disabled:w,selected:D,highlighted:T};function ne(e){if(C||ee)return;let t=p.state.value;if(x){let n=Array.isArray(t)?t:[],r=D?dt(n,a,A):[...n,a];g(r,_e(Ie,e))}else g(a,_e(Ie,e)),h(!1,_e(Ie,e))}function L(){_.current.dragY=0}let R={role:`option`,"aria-selected":D,tabIndex:E&&T?0:-1,onKeyDown(e){p.set(`activeIndex`,j),e.key===` `&&v.current&&e.preventDefault()},onClick(e){let t=N.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&b(e.nativeEvent)&&(n!==void 0||T),i=t&&!r&&!P.current;P.current=!1,!(w||i)&&ne(e.nativeEvent)},onPointerEnter(e){N.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=_.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){N.current=e.pointerType,P.current=!0,L()},onMouseUp(){if(L(),w||N.current===`touch`||P.current)return;let e=!_.current.allowSelectedMouseUp&&D,t=!_.current.allowUnselectedMouseUp&&!D;e||t||(P.current=!0,M.current?.click(),P.current=!1)}},z=Y(`div`,e,{ref:[I,t,f.ref,M],state:te,props:[m,R,u,F]}),B=X.useMemo(()=>({selected:D,index:j,textRef:d,selectedByFocus:k}),[D,j,d,k]);return(0,Q.jsx)(Gt.Provider,{value:B,children:z})})),Jt=X.forwardRef(function(e,t){let{selected:n}=Kt();return e.keepMounted||n?(0,Q.jsx)(Yt,{...e,ref:t}):null}),Yt=X.memo(X.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=Kt(),c=X.useRef(null),{transitionStatus:l,setMounted:u}=je(s),d=Y(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:I});return oe({open:s,ref:c,onComplete(){s||u(!1)}}),d})),Xt=X.memo(X.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=Kt(),{firstItemTextRef:a,selectedItemTextRef:o}=Z(),{render:s,className:c,style:l,...u}=e,d=X.useCallback(e=>{e&&(n===0&&(a.current=e),i&&(o.current=e))},[a,o,n,i]);return Y(`div`,e,{ref:[d,t,r],props:u})})),Zt=X.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,{store:u,popupRef:d,listRef:f,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:m}=Z(),{side:h,scrollDownArrowRef:g,scrollUpArrowRef:_}=At(),v=c?$.scrollUpArrowVisible:$.scrollDownArrowVisible,y=l(u,v),b=l(u,$.openMethod),x=y&&b!==`touch`,S=ve(),C=c?_:g,{mounted:ee,transitionStatus:w,setMounted:T}=je(x);V(()=>(m.current+=1,u.set(`hasScrollArrows`,!0),()=>{m.current=Math.max(0,m.current-1),m.current===0&&u.set(`hasScrollArrows`,!1)}),[u,m]),oe({open:x,ref:C,onComplete(){x||T(!1)}});let E=Y(`div`,e,{ref:[t,C],state:{direction:a,visible:x,side:h,transitionStatus:w},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||S.isStarted())return;u.set(`activeIndex`,null);function t(){let e=u.state.listElement??d.current;if(!e)return;u.set(`activeIndex`,null),p(e);let n=Ce(e.scrollHeight,e.clientHeight),r=le(e.scrollTop,n),i=r===(c?0:n),a=f.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){S.clear();return}if(a.length>0){let t=C.current?.offsetHeight||0;e.scrollTop=Qt(a,c,r,e.clientHeight,t,n)}S.start(40,t)}S.start(40,t)},onMouseLeave(){S.clear()}},s],stateAttributesMapping:I});return ee||o?E:null});function Qt(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?le(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?le(l.offsetTop+l.offsetHeight-r+i,a):a}var $t=X.forwardRef(function(e,t){return(0,Q.jsx)(Zt,{...e,ref:t,direction:`down`})}),en=X.forwardRef(function(e,t){return(0,Q.jsx)(Zt,{...e,ref:t,direction:`up`})}),tn=bt;function nn({className:e,...t}){return(0,Q.jsx)(Et,{"data-slot":`select-value`,className:E(`flex flex-1 text-left`,e),...t})}function rn({className:e,size:t=`default`,children:n,...r}){return(0,Q.jsxs)(wt,{"data-slot":`select-trigger`,"data-size":t,className:E(`flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,Q.jsx)(Dt,{render:(0,Q.jsx)(Xe,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function an({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,Q.jsx)(Ot,{children:(0,Q.jsx)(Pt,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,Q.jsxs)(It,{"data-slot":`select-content`,"data-align-trigger":o,className:E(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...s,children:[(0,Q.jsx)(sn,{}),(0,Q.jsx)(Wt,{children:t}),(0,Q.jsx)(cn,{})]})})})}function on({className:e,children:t,...n}){return(0,Q.jsxs)(qt,{"data-slot":`select-item`,className:E(`relative flex w-full cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,Q.jsx)(Xt,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,Q.jsx)(Jt,{render:(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,Q.jsx)(_,{className:`pointer-events-none`})})]})}function sn({className:e,...t}){return(0,Q.jsx)(en,{"data-slot":`select-scroll-up-button`,className:E(`top-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(Ze,{})})}function cn({className:e,...t}){return(0,Q.jsx)($t,{"data-slot":`select-scroll-down-button`,className:E(`bottom-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(Xe,{})})}function ln(e){return Ke(`dialog`,e)}function un({...e}){return(0,Q.jsx)(ln,{"data-slot":`dialog`,...e})}function dn({...e}){return(0,Q.jsx)(nt,{"data-slot":`dialog-trigger`,...e})}function fn({...e}){return(0,Q.jsx)(Ue,{"data-slot":`dialog-portal`,...e})}function pn({className:e,...t}){return(0,Q.jsx)(We,{"data-slot":`dialog-overlay`,className:E(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function mn({className:e,children:t,showCloseButton:n=!0,...r}){return(0,Q.jsxs)(fn,{children:[(0,Q.jsx)(pn,{}),(0,Q.jsxs)(Ge,{"data-slot":`dialog-content`,className:E(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,Q.jsxs)(Be,{"data-slot":`dialog-close`,render:(0,Q.jsx)(Me,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,Q.jsx)(tt,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function hn({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`dialog-header`,className:E(`flex flex-col gap-2`,e),...t})}function gn({className:e,showCloseButton:t=!1,children:n,...r}){return(0,Q.jsxs)(`div`,{"data-slot":`dialog-footer`,className:E(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,Q.jsx)(Be,{render:(0,Q.jsx)(Me,{variant:`outline`}),children:`Close`})]})}function _n({className:e,...t}){return(0,Q.jsx)(qe,{"data-slot":`dialog-title`,className:E(`text-base leading-none font-medium`,e),...t})}function vn({className:e,...t}){return(0,Q.jsx)(He,{"data-slot":`dialog-description`,className:E(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function yn({className:e,...t}){return(0,Q.jsx)(`textarea`,{"data-slot":`textarea`,className:E(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function bn({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:E(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var xn=k(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function Sn({className:e,align:t=`inline-start`,...n}){return(0,Q.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:E(xn({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var Cn=k(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function wn({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,Q.jsx)(Me,{type:t,"data-size":r,variant:n,className:E(Cn({size:r}),e),...i})}function Tn({className:e,...t}){return(0,Q.jsx)(W,{"data-slot":`input-group-control`,className:E(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function En({className:e,...t}){return(0,Q.jsx)(yn,{"data-slot":`input-group-control`,className:E(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function Dn({className:e,...t}){return(0,Q.jsx)(`label`,{"data-slot":`label`,className:E(`flex items-center gap-2 text-base leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}export{dt as A,pt as C,ot as D,st as E,$e as F,Qe as I,Xe as L,it as M,tt as N,lt as O,et as P,Je as R,mt as S,gt as T,on as _,Tn as a,xt as b,un as c,gn as d,hn as f,an as g,tn as h,wn as i,ct as j,ut as k,mn as l,dn as m,bn as n,En as o,_n as p,Sn as r,yn as s,Dn as t,vn as u,rn as v,ht as w,yt as x,nn as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./path-
|
|
1
|
+
import{n as e,t}from"./path-COt_16Va.js";import{t as n}from"./array-BifhSqXX.js";import{rt as r}from"./chunk-ICXQ74PX-COcWu1Sq.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=e(!0),l=null,u=r,d=null,f=t(p);o=typeof o==`function`?o:o===void 0?i:e(o),s=typeof s==`function`?s:s===void 0?a:e(s);function p(e){var t,r=(e=n(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=r;++t)!(t<r&&c(i=e[t],t,e))===a&&((a=!a)?d.lineStart():d.lineEnd()),a&&d.point(+o(i,t,e),+s(i,t,e));if(p)return d=null,p+``||null}return p.x=function(t){return arguments.length?(o=typeof t==`function`?t:e(+t),p):o},p.y=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),p):s},p.defined=function(t){return arguments.length?(c=typeof t==`function`?t:e(!!t),p):c},p.curve=function(e){return arguments.length?(u=e,l!=null&&(d=u(l)),p):u},p.context=function(e){return arguments.length?(e==null?l=d=null:d=u(l=e),p):l},p}export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e,n as t,o as n,r,t as i}from"./src-
|
|
1
|
+
import{l as e,n as t,o as n,r,t as i}from"./src-BY_WSiz7.js";import{i as a,n as o,r as s,t as c}from"./defaultLocale-BFoDCU3G.js";import{t as l}from"./init-C-OQMol4.js";function u(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function d(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function f(e){let t,n,r;e.length===2?(t=e===u||e===d?e:p,n=e,r=e):(t=u,n=(t,n)=>u(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function p(){return 0}function m(e){return e===null?NaN:+e}var h=f(u),g=h.right;h.left,f(m).center;var _=Math.sqrt(50),v=Math.sqrt(10),y=Math.sqrt(2);function b(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=_?10:a>=v?5:a>=y?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?b(e,t,n*2):[s,c,l]}function x(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?b(t,e,n):b(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function S(e,t,n){return t=+t,e=+e,n=+n,b(e,t,n)[2]}function C(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?S(t,e,n):S(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function w(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function T(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=k(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function D(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function O(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=k(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function k(a,o){var s=typeof o,c;return o==null||s===`boolean`?n(o):(s===`number`?t:s===`string`?(c=e(o))?(o=c,r):i:o instanceof e?r:o instanceof Date?D:T(o)?w:Array.isArray(o)?E:typeof o.valueOf!=`function`&&typeof o.toString!=`function`||isNaN(o)?O:t)(a,o)}function A(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function j(e){return Math.max(0,-a(Math.abs(e)))}function M(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(t)/3)))*3-a(Math.abs(e)))}function N(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,a(t)-a(e))+1}function P(e){return function(){return e}}function F(e){return+e}var I=[0,1];function L(e){return e}function R(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:P(isNaN(t)?NaN:.5)}function z(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function B(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=R(i,r),a=n(o,a)):(r=R(r,i),a=n(a,o)),function(e){return a(r(e))}}function V(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=R(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=g(e,t,1,r)-1;return a[n](i[n](t))}}function H(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function U(){var e=I,n=I,r=k,i,a,o,s=L,c,l,u;function d(){var t=Math.min(e.length,n.length);return s!==L&&(s=z(e[0],e[t-1])),c=t>2?V:B,l=u=null,f}function f(t){return t==null||isNaN(t=+t)?o:(l||=c(e.map(i),n,r))(i(s(t)))}return f.invert=function(r){return s(a((u||=c(n,e.map(i),t))(r)))},f.domain=function(t){return arguments.length?(e=Array.from(t,F),d()):e.slice()},f.range=function(e){return arguments.length?(n=Array.from(e),d()):n.slice()},f.rangeRound=function(e){return n=Array.from(e),r=A,d()},f.clamp=function(e){return arguments.length?(s=e?!0:L,d()):s!==L},f.interpolate=function(e){return arguments.length?(r=e,d()):r},f.unknown=function(e){return arguments.length?(o=e,f):o},function(e,t){return i=e,a=t,d()}}function W(){return U()(L,L)}function G(e,t,n,r){var i=C(e,t,n),a;switch(r=s(r??`,f`),r.type){case`s`:var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=M(i,l))&&(r.precision=a),o(r,l);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=N(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=j(i))&&(r.precision=a-(r.type===`%`)*2)}return c(r)}function K(e){var t=e.domain;return e.ticks=function(e){var n=t();return x(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return G(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=S(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function q(){var e=W();return e.copy=function(){return H(e,q())},l.apply(e,arguments),K(e)}export{f as a,C as i,W as n,H as r,q as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-BO2N2NFS-DhZuH4Af.js";export{e as Mermaid};
|