@nocobase/app 1.3.38-beta → 1.4.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/client/.umirc.ts +12 -14
  2. package/client/src/pages/index.tsx +3 -0
  3. package/dist/client/4607.bae81918.async.js +1 -0
  4. package/dist/client/5617.d114c98c.async.js +78 -0
  5. package/dist/client/5721.ee2b0cf3.async.js +7 -0
  6. package/dist/client/index.html +2 -1
  7. package/dist/client/index.html.tpl +2 -1
  8. package/dist/client/npm._at_ant-design.e1f1f4b0.async.js +110 -0
  9. package/dist/client/{npm._at_antv.5ea2df50.async.js → npm._at_antv.56fcebdf.async.js} +5 -5
  10. package/dist/client/npm._at_budibase.113c5b6a.async.js +36 -0
  11. package/dist/client/npm._at_dnd-kit.2fac5dde.async.js +9 -0
  12. package/dist/client/npm._at_emotion.6969cd50.async.js +2 -0
  13. package/dist/client/npm._at_formily.b1a03e41.async.js +96 -0
  14. package/dist/client/npm._at_formulajs.ff63776b.async.js +1 -0
  15. package/dist/client/npm._at_rc-component.43f95f42.async.js +5 -0
  16. package/dist/client/npm._at_remix-run.9a0418a9.async.js +2 -0
  17. package/dist/client/npm.ahooks.b416801a.async.js +6 -0
  18. package/dist/client/npm.antd-style.ecb45bdd.async.js +1 -0
  19. package/dist/client/npm.antd.732d7b9d.async.js +476 -0
  20. package/dist/client/npm.axios.c42e25ff.async.js +11 -0
  21. package/dist/client/npm.bignumber.js.cb49cd48.async.js +1 -0
  22. package/dist/client/npm.buffer.6f3eca94.async.js +1 -0
  23. package/dist/client/npm.cytoscape.cba0c14d.async.js +5 -0
  24. package/dist/client/{npm.d3-selection.e2684be8.async.js → npm.d3-selection.15d6ab5b.async.js} +1 -1
  25. package/dist/client/npm.d3-shape.b48fc404.async.js +1 -0
  26. package/dist/client/{npm.d3-transition.83e0f431.async.js → npm.d3-transition.5fd82a9c.async.js} +1 -1
  27. package/dist/client/{npm.dayjs.f4357565.async.js → npm.dayjs.0a5fd152.async.js} +1 -1
  28. package/dist/client/{npm.decimal.js.bb6d6d2e.async.js → npm.decimal.js.19391b1c.async.js} +1 -1
  29. package/dist/client/npm.dompurify.d5071c22.async.js +3 -0
  30. package/dist/client/{npm.elkjs.d0ff4db1.async.js → npm.elkjs.f35a7d45.async.js} +4 -4
  31. package/dist/client/npm.gl-matrix.d851d654.async.js +1 -0
  32. package/dist/client/{npm.handlebars.c04806e7.async.js → npm.handlebars.ade4c4fe.async.js} +5 -5
  33. package/dist/client/{npm.highlight.js.4213abe5.async.js → npm.highlight.js.8a8320c8.async.js} +1 -1
  34. package/dist/client/{npm.html-tokenize.360bb6e8.async.js → npm.html-tokenize.a6d58ae7.async.js} +1 -1
  35. package/dist/client/npm.htmlparser2.27ad86bc.async.js +2 -0
  36. package/dist/client/npm.i18next.98bb572b.async.js +1 -0
  37. package/dist/client/npm.json5.d58066fd.async.js +14 -0
  38. package/dist/client/npm.jstat.733c0b2c.async.js +1 -0
  39. package/dist/client/{npm.layout-base.49e322a0.async.js → npm.layout-base.0bdb6d00.async.js} +1 -1
  40. package/dist/client/npm.lodash-es.c06b3dd5.async.js +1 -0
  41. package/dist/client/npm.lodash.0ff318b3.async.js +37 -0
  42. package/dist/client/npm.markdown-it.5b35f93d.async.js +15 -0
  43. package/dist/client/npm.mathjs.fd97f3b7.async.js +52 -0
  44. package/dist/client/npm.mermaid.defd0c88.async.js +1529 -0
  45. package/dist/client/npm.moment.36abbf2c.async.js +4 -0
  46. package/dist/client/npm.picomatch.7a2f1314.async.js +1 -0
  47. package/dist/client/npm.postcss.2ccf11ae.async.js +27 -0
  48. package/dist/client/{npm.quill.e91b3c12.async.js → npm.quill.9d4c2cd1.async.js} +7 -7
  49. package/dist/client/{npm.rc-menu.2e06b9c3.async.js → npm.rc-menu.adf5ade6.async.js} +1 -1
  50. package/dist/client/npm.rc-picker.ef8a3e8b.async.js +1 -0
  51. package/dist/client/{npm.rc-select.13236fb8.async.js → npm.rc-select.7c36e54e.async.js} +2 -2
  52. package/dist/client/{npm.rc-table.de3dd762.async.js → npm.rc-table.a153e021.async.js} +1 -1
  53. package/dist/client/npm.rc-tree.f61b7d87.async.js +1 -0
  54. package/dist/client/npm.rc-util.23a9b855.async.js +18 -0
  55. package/dist/client/npm.react-dom.b9fb5fd7.async.js +11 -0
  56. package/dist/client/npm.react-image-lightbox.727d3218.async.js +3 -0
  57. package/dist/client/npm.react-router-dom.832efba3.async.js +1 -0
  58. package/dist/client/npm.readable-stream.6e743f2a.async.js +1 -0
  59. package/dist/client/p__index.89314c11.async.js +1533 -0
  60. package/dist/client/umi.9e319d79.js +21 -0
  61. package/lib/index.js +11 -3
  62. package/package.json +6 -6
  63. package/src/index.ts +12 -9
  64. package/dist/client/4607.6d585996.async.js +0 -1
  65. package/dist/client/5721.cf90e884.async.js +0 -8
  66. package/dist/client/6718.1e7fe05d.async.js +0 -66
  67. package/dist/client/npm._at_ant-design.4fe52a2f.async.js +0 -110
  68. package/dist/client/npm._at_dnd-kit.01a3ad70.async.js +0 -6
  69. package/dist/client/npm._at_emotion.0c6b11eb.async.js +0 -2
  70. package/dist/client/npm._at_formily.f9d0b213.async.js +0 -101
  71. package/dist/client/npm._at_formulajs.fe3f9fca.async.js +0 -1
  72. package/dist/client/npm._at_rc-component.086dbf23.async.js +0 -5
  73. package/dist/client/npm._at_remix-run.55137b87.async.js +0 -3
  74. package/dist/client/npm.ahooks.c3df4eb6.async.js +0 -6
  75. package/dist/client/npm.antd-style.47ebbe31.async.js +0 -1
  76. package/dist/client/npm.antd.91188318.async.js +0 -476
  77. package/dist/client/npm.axios.f696c6e5.async.js +0 -2
  78. package/dist/client/npm.bignumber.js.70d3d7e8.async.js +0 -1
  79. package/dist/client/npm.buffer.9cce4593.async.js +0 -1
  80. package/dist/client/npm.cytoscape.39239e7b.async.js +0 -5
  81. package/dist/client/npm.d3-shape.3660138b.async.js +0 -1
  82. package/dist/client/npm.dompurify.93b5a130.async.js +0 -3
  83. package/dist/client/npm.gl-matrix.31b80e16.async.js +0 -1
  84. package/dist/client/npm.htmlparser2.cbbea4c4.async.js +0 -2
  85. package/dist/client/npm.i18next.eee0fc0f.async.js +0 -1
  86. package/dist/client/npm.json5.87aca70f.async.js +0 -14
  87. package/dist/client/npm.jstat.657c7dba.async.js +0 -1
  88. package/dist/client/npm.lodash-es.5eff0420.async.js +0 -1
  89. package/dist/client/npm.lodash.0f9322fa.async.js +0 -37
  90. package/dist/client/npm.markdown-it.5875530c.async.js +0 -15
  91. package/dist/client/npm.mathjs.d8df2940.async.js +0 -53
  92. package/dist/client/npm.mermaid.7057e144.async.js +0 -1530
  93. package/dist/client/npm.moment.3c26e672.async.js +0 -4
  94. package/dist/client/npm.postcss.368fceaf.async.js +0 -28
  95. package/dist/client/npm.rc-picker.218fa2cc.async.js +0 -1
  96. package/dist/client/npm.rc-tree.bdb9cee8.async.js +0 -1
  97. package/dist/client/npm.rc-util.87a2c212.async.js +0 -18
  98. package/dist/client/npm.react-dom.6236e62b.async.js +0 -11
  99. package/dist/client/npm.react-image-lightbox.0e0cf81f.async.js +0 -3
  100. package/dist/client/npm.react-router-dom.06c80c5d.async.js +0 -2
  101. package/dist/client/npm.readable-stream.41117b5f.async.js +0 -1
  102. package/dist/client/p__index.4c7bade9.async.js +0 -1509
  103. package/dist/client/umi.016284ce.js +0 -22
package/client/.umirc.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { getUmiConfig, IndexGenerator } from '@nocobase/devtools/umiConfig';
1
+ import { generatePlugins, getUmiConfig } from '@nocobase/devtools/umiConfig';
2
2
  import path from 'path';
3
3
  import { defineConfig } from 'umi';
4
4
 
@@ -8,35 +8,30 @@ process.env.MFSU_AD = 'none';
8
8
  process.env.DID_YOU_KNOW = 'none';
9
9
 
10
10
  const pluginPrefix = (process.env.PLUGIN_PACKAGE_PREFIX || '').split(',').filter((item) => !item.includes('preset')); // 因为现在 preset 是直接引入的,所以不能忽略,如果以后 preset 也是动态插件的形式引入,那么这里可以去掉
11
-
12
- const pluginDirs = (process.env.PLUGIN_PATH || 'packages/plugins/,packages/samples/,packages/pro-plugins/')
13
- .split(',').map(item => path.join(process.cwd(), item));
14
-
15
- const outputPluginPath = path.join(__dirname, 'src', '.plugins');
16
- const indexGenerator = new IndexGenerator(outputPluginPath, pluginDirs);
17
- indexGenerator.generate();
18
-
19
11
  const isDevCmd = !!process.env.IS_DEV_CMD;
20
12
  const appPublicPath = isDevCmd ? '/' : '{{env.APP_PUBLIC_PATH}}';
21
13
 
14
+ generatePlugins();
15
+
22
16
  export default defineConfig({
23
17
  title: 'Loading...',
24
18
  devtool: process.env.NODE_ENV === 'development' ? 'source-map' : false,
25
19
  favicons: [`${appPublicPath}favicon/favicon.ico`],
26
20
  metas: [{ name: 'viewport', content: 'initial-scale=0.1' }],
27
- links: [
28
- { rel: 'stylesheet', href: `${appPublicPath}global.css` },
29
- ],
21
+ links: [{ rel: 'stylesheet', href: `${appPublicPath}global.css` }],
30
22
  headScripts: [
31
23
  {
32
24
  src: `${appPublicPath}browser-checker.js`,
33
25
  },
34
26
  {
35
- content: isDevCmd ? '' : `
27
+ content: isDevCmd
28
+ ? ''
29
+ : `
36
30
  window['__webpack_public_path__'] = '{{env.APP_PUBLIC_PATH}}';
37
31
  window['__nocobase_public_path__'] = '{{env.APP_PUBLIC_PATH}}';
38
32
  window['__nocobase_api_base_url__'] = '{{env.API_BASE_URL}}';
39
33
  window['__nocobase_api_client_storage_prefix__'] = '{{env.API_CLIENT_STORAGE_PREFIX}}';
34
+ window['__nocobase_api_client_storage_type__'] = '{{env.API_CLIENT_STORAGE_TYPE}}';
40
35
  window['__nocobase_ws_url__'] = '{{env.WS_URL}}';
41
36
  window['__nocobase_ws_path__'] = '{{env.WS_PATH}}';
42
37
  `,
@@ -68,8 +63,11 @@ export default defineConfig({
68
63
  edge: 79,
69
64
  safari: 12,
70
65
  },
66
+ jsMinifierOptions: {
67
+ target: ['chrome80', 'es2020'],
68
+ },
71
69
  codeSplitting: {
72
- jsStrategy: 'depPerChunk'
70
+ jsStrategy: 'depPerChunk',
73
71
  },
74
72
  chainWebpack(config, { env }) {
75
73
  if (env === 'production') {
@@ -13,6 +13,9 @@ import devDynamicImport from '../.plugins/index';
13
13
 
14
14
  export const app = new Application({
15
15
  apiClient: {
16
+ storageType:
17
+ // @ts-ignore
18
+ window['__nocobase_api_client_storage_type__'] || process.env.API_CLIENT_STORAGE_TYPE || 'localStorage',
16
19
  // @ts-ignore
17
20
  storagePrefix:
18
21
  // @ts-ignore
@@ -0,0 +1 @@
1
+ (self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4607],{84182:function(V,K,W){(function(T,y){V.exports=y(W(82241))})(this,function(B){return function(T){var y={};function l(o){if(y[o])return y[o].exports;var n=y[o]={i:o,l:!1,exports:{}};return T[o].call(n.exports,n,n.exports,l),n.l=!0,n.exports}return l.m=T,l.c=y,l.i=function(o){return o},l.d=function(o,n,u){l.o(o,n)||Object.defineProperty(o,n,{configurable:!1,enumerable:!0,get:u})},l.n=function(o){var n=o&&o.__esModule?function(){return o.default}:function(){return o};return l.d(n,"a",n),n},l.o=function(o,n){return Object.prototype.hasOwnProperty.call(o,n)},l.p="",l(l.s=7)}([function(T,y){T.exports=B},function(T,y,l){"use strict";var o=l(0).FDLayoutConstants;function n(){}for(var u in o)n[u]=o[u];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=o.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TREE_REDUCTION_ON_INCREMENTAL=!1,T.exports=n},function(T,y,l){"use strict";var o=l(0).FDLayoutEdge;function n(O,v,L){o.call(this,O,v,L)}n.prototype=Object.create(o.prototype);for(var u in o)n[u]=o[u];T.exports=n},function(T,y,l){"use strict";var o=l(0).LGraph;function n(O,v,L){o.call(this,O,v,L)}n.prototype=Object.create(o.prototype);for(var u in o)n[u]=o[u];T.exports=n},function(T,y,l){"use strict";var o=l(0).LGraphManager;function n(O){o.call(this,O)}n.prototype=Object.create(o.prototype);for(var u in o)n[u]=o[u];T.exports=n},function(T,y,l){"use strict";var o=l(0).FDLayoutNode,n=l(0).IMath;function u(v,L,N,F){o.call(this,v,L,N,F)}u.prototype=Object.create(o.prototype);for(var O in o)u[O]=o[O];u.prototype.move=function(){var v=this.graphManager.getLayout();this.displacementX=v.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=v.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>v.coolingFactor*v.maxNodeDisplacement&&(this.displacementX=v.coolingFactor*v.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>v.coolingFactor*v.maxNodeDisplacement&&(this.displacementY=v.coolingFactor*v.maxNodeDisplacement*n.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),v.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},u.prototype.propogateDisplacementToChildren=function(v,L){for(var N=this.getChild().getNodes(),F,H=0;H<N.length;H++)F=N[H],F.getChild()==null?(F.moveBy(v,L),F.displacementX+=v,F.displacementY+=L):F.propogateDisplacementToChildren(v,L)},u.prototype.setPred1=function(v){this.pred1=v},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(v){this.next=v},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(v){this.processed=v},u.prototype.isProcessed=function(){return processed},T.exports=u},function(T,y,l){"use strict";var o=l(0).FDLayout,n=l(4),u=l(3),O=l(5),v=l(2),L=l(1),N=l(0).FDLayoutConstants,F=l(0).LayoutConstants,H=l(0).Point,P=l(0).PointD,Z=l(0).Layout,Y=l(0).Integer,A=l(0).IGeometry,c=l(0).LGraph,C=l(0).Transform;function d(){o.call(this),this.toBeTiled={}}d.prototype=Object.create(o.prototype);for(var D in o)d[D]=o[D];d.prototype.newGraphManager=function(){var t=new n(this);return this.graphManager=t,t},d.prototype.newGraph=function(t){return new u(null,this.graphManager,t)},d.prototype.newNode=function(t){return new O(this.graphManager,t)},d.prototype.newEdge=function(t){return new v(null,null,t)},d.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.isSubLayout||(L.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=L.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=L.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=N.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=N.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=N.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=N.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=N.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=N.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/N.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=N.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},d.prototype.layout=function(){var t=F.DEFAULT_CREATE_BENDS_AS_NEEDED;return t&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},d.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(L.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var r=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(s){return r.has(s)});this.graphManager.setAllNodesToApplyGravitation(e)}}else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var r=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(i){return r.has(i)});this.graphManager.setAllNodesToApplyGravitation(e),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},d.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%N.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(a){return t.has(a)});this.graphManager.setAllNodesToApplyGravitation(r),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=N.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=N.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var e=!this.isTreeGrowing&&!this.isGrowthFinished,i=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(e,i),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},d.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),r={},e=0;e<t.length;e++){var i=t[e].rect,a=t[e].id;r[a]={id:a,x:i.getCenterX(),y:i.getCenterY(),w:i.width,h:i.height}}return r},d.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if(N.ANIMATE==="during")this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},d.prototype.calculateNodesToApplyGravitationTo=function(){var t=[],r,e=this.graphManager.getGraphs(),i=e.length,a;for(a=0;a<i;a++)r=e[a],r.updateConnected(),r.isConnected||(t=t.concat(r.getNodes()));return t},d.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var r=new Set,e;for(e=0;e<t.length;e++){var i=t[e];if(!r.has(i)){var a=i.getSource(),s=i.getTarget();if(a==s)i.getBendpoints().push(new P),i.getBendpoints().push(new P),this.createDummyNodesForBendpoints(i),r.add(i);else{var h=[];if(h=h.concat(a.getEdgeListToNode(s)),h=h.concat(s.getEdgeListToNode(a)),!r.has(h[0])){if(h.length>1){var g;for(g=0;g<h.length;g++){var p=h[g];p.getBendpoints().push(new P),this.createDummyNodesForBendpoints(p)}}h.forEach(function(R){r.add(R)})}}}if(r.size==t.length)break}},d.prototype.positionNodesRadially=function(t){for(var r=new H(0,0),e=Math.ceil(Math.sqrt(t.length)),i=0,a=0,s=0,h=new P(0,0),g=0;g<t.length;g++){g%e==0&&(s=0,a=i,g!=0&&(a+=L.DEFAULT_COMPONENT_SEPERATION),i=0);var p=t[g],R=Z.findCenterOfTree(p);r.x=s,r.y=a,h=d.radialLayout(p,R,r),h.y>i&&(i=Math.floor(h.y)),s=Math.floor(h.x+L.DEFAULT_COMPONENT_SEPERATION)}this.transform(new P(F.WORLD_CENTER_X-h.x/2,F.WORLD_CENTER_Y-h.y/2))},d.radialLayout=function(t,r,e){var i=Math.max(this.maxDiagonalInTree(t),L.DEFAULT_RADIAL_SEPARATION);d.branchRadialLayout(r,null,0,359,0,i);var a=c.calculateBounds(t),s=new C;s.setDeviceOrgX(a.getMinX()),s.setDeviceOrgY(a.getMinY()),s.setWorldOrgX(e.x),s.setWorldOrgY(e.y);for(var h=0;h<t.length;h++){var g=t[h];g.transform(s)}var p=new P(a.getMaxX(),a.getMaxY());return s.inverseTransformPoint(p)},d.branchRadialLayout=function(t,r,e,i,a,s){var h=(i-e+1)/2;h<0&&(h+=180);var g=(h+e)%360,p=g*A.TWO_PI/360,R=Math.cos(p),w=a*Math.cos(p),I=a*Math.sin(p);t.setCenter(w,I);var f=[];f=f.concat(t.getEdges());var E=f.length;r!=null&&E--;for(var G=0,M=f.length,U,m=t.getEdgesBetween(r);m.length>1;){var S=m[0];m.splice(0,1);var X=f.indexOf(S);X>=0&&f.splice(X,1),M--,E--}r!=null?U=(f.indexOf(m[0])+1)%M:U=0;for(var x=Math.abs(i-e)/E,b=U;G!=E;b=++b%M){var j=f[b].getOtherEnd(t);if(j!=r){var Q=(e+G*x)%360,k=(Q+x)%360;d.branchRadialLayout(j,t,Q,k,a+s,s),G++}}},d.maxDiagonalInTree=function(t){for(var r=Y.MIN_VALUE,e=0;e<t.length;e++){var i=t[e],a=i.getDiagonal();a>r&&(r=a)}return r},d.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},d.prototype.groupZeroDegreeMembers=function(){var t=this,r={};this.memberGroups={},this.idToDummyNode={};for(var e=[],i=this.graphManager.getAllNodes(),a=0;a<i.length;a++){var s=i[a],h=s.getParent();this.getNodeDegreeWithChildren(s)===0&&(h.id==null||!this.getToBeTiled(h))&&e.push(s)}for(var a=0;a<e.length;a++){var s=e[a],g=s.getParent().id;typeof r[g]>"u"&&(r[g]=[]),r[g]=r[g].concat(s)}Object.keys(r).forEach(function(p){if(r[p].length>1){var R="DummyCompound_"+p;t.memberGroups[R]=r[p];var w=r[p][0].getParent(),I=new O(t.graphManager);I.id=R,I.paddingLeft=w.paddingLeft||0,I.paddingRight=w.paddingRight||0,I.paddingBottom=w.paddingBottom||0,I.paddingTop=w.paddingTop||0,t.idToDummyNode[R]=I;var f=t.getGraphManager().add(t.newGraph(),I),E=w.getChild();E.add(I);for(var G=0;G<r[p].length;G++){var M=r[p][G];E.remove(M),f.add(M)}}})},d.prototype.clearCompounds=function(){var t={},r={};this.performDFSOnCompounds();for(var e=0;e<this.compoundOrder.length;e++)r[this.compoundOrder[e].id]=this.compoundOrder[e],t[this.compoundOrder[e].id]=[].concat(this.compoundOrder[e].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[e].getChild()),this.compoundOrder[e].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,r)},d.prototype.clearZeroDegreeMembers=function(){var t=this,r=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(e){var i=t.idToDummyNode[e];r[e]=t.tileNodes(t.memberGroups[e],i.paddingLeft+i.paddingRight),i.rect.width=r[e].width,i.rect.height=r[e].height})},d.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var r=this.compoundOrder[t],e=r.id,i=r.paddingLeft,a=r.paddingTop;this.adjustLocations(this.tiledMemberPack[e],r.rect.x,r.rect.y,i,a)}},d.prototype.repopulateZeroDegreeMembers=function(){var t=this,r=this.tiledZeroDegreePack;Object.keys(r).forEach(function(e){var i=t.idToDummyNode[e],a=i.paddingLeft,s=i.paddingTop;t.adjustLocations(r[e],i.rect.x,i.rect.y,a,s)})},d.prototype.getToBeTiled=function(t){var r=t.id;if(this.toBeTiled[r]!=null)return this.toBeTiled[r];var e=t.getChild();if(e==null)return this.toBeTiled[r]=!1,!1;for(var i=e.getNodes(),a=0;a<i.length;a++){var s=i[a];if(this.getNodeDegree(s)>0)return this.toBeTiled[r]=!1,!1;if(s.getChild()==null){this.toBeTiled[s.id]=!1;continue}if(!this.getToBeTiled(s))return this.toBeTiled[r]=!1,!1}return this.toBeTiled[r]=!0,!0},d.prototype.getNodeDegree=function(t){for(var r=t.id,e=t.getEdges(),i=0,a=0;a<e.length;a++){var s=e[a];s.getSource().id!==s.getTarget().id&&(i=i+1)}return i},d.prototype.getNodeDegreeWithChildren=function(t){var r=this.getNodeDegree(t);if(t.getChild()==null)return r;for(var e=t.getChild().getNodes(),i=0;i<e.length;i++){var a=e[i];r+=this.getNodeDegreeWithChildren(a)}return r},d.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},d.prototype.fillCompexOrderByDFS=function(t){for(var r=0;r<t.length;r++){var e=t[r];e.getChild()!=null&&this.fillCompexOrderByDFS(e.getChild().getNodes()),this.getToBeTiled(e)&&this.compoundOrder.push(e)}},d.prototype.adjustLocations=function(t,r,e,i,a){r+=i,e+=a;for(var s=r,h=0;h<t.rows.length;h++){var g=t.rows[h];r=s;for(var p=0,R=0;R<g.length;R++){var w=g[R];w.rect.x=r,w.rect.y=e,r+=w.rect.width+t.horizontalPadding,w.rect.height>p&&(p=w.rect.height)}e+=p+t.verticalPadding}},d.prototype.tileCompoundMembers=function(t,r){var e=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(i){var a=r[i];e.tiledMemberPack[i]=e.tileNodes(t[i],a.paddingLeft+a.paddingRight),a.rect.width=e.tiledMemberPack[i].width,a.rect.height=e.tiledMemberPack[i].height})},d.prototype.tileNodes=function(t,r){var e=L.TILING_PADDING_VERTICAL,i=L.TILING_PADDING_HORIZONTAL,a={rows:[],rowWidth:[],rowHeight:[],width:0,height:r,verticalPadding:e,horizontalPadding:i};t.sort(function(g,p){return g.rect.width*g.rect.height>p.rect.width*p.rect.height?-1:g.rect.width*g.rect.height<p.rect.width*p.rect.height?1:0});for(var s=0;s<t.length;s++){var h=t[s];a.rows.length==0?this.insertNodeToRow(a,h,0,r):this.canAddHorizontal(a,h.rect.width,h.rect.height)?this.insertNodeToRow(a,h,this.getShortestRowIndex(a),r):this.insertNodeToRow(a,h,a.rows.length,r),this.shiftToLastRow(a)}return a},d.prototype.insertNodeToRow=function(t,r,e,i){var a=i;if(e==t.rows.length){var s=[];t.rows.push(s),t.rowWidth.push(a),t.rowHeight.push(0)}var h=t.rowWidth[e]+r.rect.width;t.rows[e].length>0&&(h+=t.horizontalPadding),t.rowWidth[e]=h,t.width<h&&(t.width=h);var g=r.rect.height;e>0&&(g+=t.verticalPadding);var p=0;g>t.rowHeight[e]&&(p=t.rowHeight[e],t.rowHeight[e]=g,p=t.rowHeight[e]-p),t.height+=p,t.rows[e].push(r)},d.prototype.getShortestRowIndex=function(t){for(var r=-1,e=Number.MAX_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]<e&&(r=i,e=t.rowWidth[i]);return r},d.prototype.getLongestRowIndex=function(t){for(var r=-1,e=Number.MIN_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]>e&&(r=i,e=t.rowWidth[i]);return r},d.prototype.canAddHorizontal=function(t,r,e){var i=this.getShortestRowIndex(t);if(i<0)return!0;var a=t.rowWidth[i];if(a+t.horizontalPadding+r<=t.width)return!0;var s=0;t.rowHeight[i]<e&&i>0&&(s=e+t.verticalPadding-t.rowHeight[i]);var h;t.width-a>=r+t.horizontalPadding?h=(t.height+s)/(a+r+t.horizontalPadding):h=(t.height+s)/t.width,s=e+t.verticalPadding;var g;return t.width<r?g=(t.height+s)/r:g=(t.height+s)/t.width,g<1&&(g=1/g),h<1&&(h=1/h),h<g},d.prototype.shiftToLastRow=function(t){var r=this.getLongestRowIndex(t),e=t.rowWidth.length-1,i=t.rows[r],a=i[i.length-1],s=a.width+t.horizontalPadding;if(t.width-t.rowWidth[e]>s&&r!=e){i.splice(-1,1),t.rows[e].push(a),t.rowWidth[r]=t.rowWidth[r]-s,t.rowWidth[e]=t.rowWidth[e]+s,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var h=Number.MIN_VALUE,g=0;g<i.length;g++)i[g].height>h&&(h=i[g].height);r>0&&(h+=t.verticalPadding);var p=t.rowHeight[r]+t.rowHeight[e];t.rowHeight[r]=h,t.rowHeight[e]<a.height+t.verticalPadding&&(t.rowHeight[e]=a.height+t.verticalPadding);var R=t.rowHeight[r]+t.rowHeight[e];t.height+=R-p,this.shiftToLastRow(t)}},d.prototype.tilingPreLayout=function(){L.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},d.prototype.tilingPostLayout=function(){L.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},d.prototype.reduceTrees=function(){for(var t=[],r=!0,e;r;){var i=this.graphManager.getAllNodes(),a=[];r=!1;for(var s=0;s<i.length;s++)e=i[s],e.getEdges().length==1&&!e.getEdges()[0].isInterGraph&&e.getChild()==null&&(a.push([e,e.getEdges()[0],e.getOwner()]),r=!0);if(r==!0){for(var h=[],g=0;g<a.length;g++)a[g][0].getEdges().length==1&&(h.push(a[g]),a[g][0].getOwner().remove(a[g][0]));t.push(h),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=t},d.prototype.growTree=function(t){for(var r=t.length,e=t[r-1],i,a=0;a<e.length;a++)i=e[a],this.findPlaceforPrunedNode(i),i[2].add(i[0]),i[2].add(i[1],i[1].source,i[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},d.prototype.findPlaceforPrunedNode=function(t){var r,e,i=t[0];i==t[1].source?e=t[1].target:e=t[1].source;var a=e.startX,s=e.finishX,h=e.startY,g=e.finishY,p=0,R=0,w=0,I=0,f=[p,w,R,I];if(h>0)for(var E=a;E<=s;E++)f[0]+=this.grid[E][h-1].length+this.grid[E][h].length-1;if(s<this.grid.length-1)for(var E=h;E<=g;E++)f[1]+=this.grid[s+1][E].length+this.grid[s][E].length-1;if(g<this.grid[0].length-1)for(var E=a;E<=s;E++)f[2]+=this.grid[E][g+1].length+this.grid[E][g].length-1;if(a>0)for(var E=h;E<=g;E++)f[3]+=this.grid[a-1][E].length+this.grid[a][E].length-1;for(var G=Y.MAX_VALUE,M,U,m=0;m<f.length;m++)f[m]<G?(G=f[m],M=1,U=m):f[m]==G&&M++;if(M==3&&G==0)f[0]==0&&f[1]==0&&f[2]==0?r=1:f[0]==0&&f[1]==0&&f[3]==0?r=0:f[0]==0&&f[2]==0&&f[3]==0?r=3:f[1]==0&&f[2]==0&&f[3]==0&&(r=2);else if(M==2&&G==0){var S=Math.floor(Math.random()*2);f[0]==0&&f[1]==0?S==0?r=0:r=1:f[0]==0&&f[2]==0?S==0?r=0:r=2:f[0]==0&&f[3]==0?S==0?r=0:r=3:f[1]==0&&f[2]==0?S==0?r=1:r=2:f[1]==0&&f[3]==0?S==0?r=1:r=3:S==0?r=2:r=3}else if(M==4&&G==0){var S=Math.floor(Math.random()*4);r=S}else r=U;r==0?i.setCenter(e.getCenterX(),e.getCenterY()-e.getHeight()/2-N.DEFAULT_EDGE_LENGTH-i.getHeight()/2):r==1?i.setCenter(e.getCenterX()+e.getWidth()/2+N.DEFAULT_EDGE_LENGTH+i.getWidth()/2,e.getCenterY()):r==2?i.setCenter(e.getCenterX(),e.getCenterY()+e.getHeight()/2+N.DEFAULT_EDGE_LENGTH+i.getHeight()/2):i.setCenter(e.getCenterX()-e.getWidth()/2-N.DEFAULT_EDGE_LENGTH-i.getWidth()/2,e.getCenterY())},T.exports=d},function(T,y,l){"use strict";var o={};o.layoutBase=l(0),o.CoSEConstants=l(1),o.CoSEEdge=l(2),o.CoSEGraph=l(3),o.CoSEGraphManager=l(4),o.CoSELayout=l(6),o.CoSENode=l(5),T.exports=o}])})},14607:function(V,K,W){(function(T,y){V.exports=y(W(84182))})(this,function(B){return function(T){var y={};function l(o){if(y[o])return y[o].exports;var n=y[o]={i:o,l:!1,exports:{}};return T[o].call(n.exports,n,n.exports,l),n.l=!0,n.exports}return l.m=T,l.c=y,l.i=function(o){return o},l.d=function(o,n,u){l.o(o,n)||Object.defineProperty(o,n,{configurable:!1,enumerable:!0,get:u})},l.n=function(o){var n=o&&o.__esModule?function(){return o.default}:function(){return o};return l.d(n,"a",n),n},l.o=function(o,n){return Object.prototype.hasOwnProperty.call(o,n)},l.p="",l(l.s=1)}([function(T,y){T.exports=B},function(T,y,l){"use strict";var o=l(0).layoutBase.LayoutConstants,n=l(0).layoutBase.FDLayoutConstants,u=l(0).CoSEConstants,O=l(0).CoSELayout,v=l(0).CoSENode,L=l(0).layoutBase.PointD,N=l(0).layoutBase.DimensionD,F={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function H(A,c){var C={};for(var d in A)C[d]=A[d];for(var d in c)C[d]=c[d];return C}function P(A){this.options=H(F,A),Z(this.options)}var Z=function(c){c.nodeRepulsion!=null&&(u.DEFAULT_REPULSION_STRENGTH=n.DEFAULT_REPULSION_STRENGTH=c.nodeRepulsion),c.idealEdgeLength!=null&&(u.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=c.idealEdgeLength),c.edgeElasticity!=null&&(u.DEFAULT_SPRING_STRENGTH=n.DEFAULT_SPRING_STRENGTH=c.edgeElasticity),c.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=n.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(u.MAX_ITERATIONS=n.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=n.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=n.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.quality=="draft"?o.QUALITY=0:c.quality=="proof"?o.QUALITY=2:o.QUALITY=1,u.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!c.randomize,u.ANIMATE=n.ANIMATE=o.ANIMATE=c.animate,u.TILE=c.tile,u.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal};P.prototype.run=function(){var A,c,C=this.options,d=this.idToLNode={},D=this.layout=new O,t=this;t.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var r=D.newGraphManager();this.gm=r;var e=this.options.eles.nodes(),i=this.options.eles.edges();this.root=r.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(e),D);for(var a=0;a<i.length;a++){var s=i[a],h=this.idToLNode[s.data("source")],g=this.idToLNode[s.data("target")];if(h!==g&&h.getEdgesBetween(g).length==0){var p=r.add(D.newEdge(),h,g);p.id=s.id()}}var R=function(f,E){typeof f=="number"&&(f=E);var G=f.data("id"),M=t.idToLNode[G];return{x:M.getRect().getCenterX(),y:M.getRect().getCenterY()}},w=function I(){for(var f=function(){C.fit&&C.cy.fit(C.eles,C.padding),A||(A=!0,t.cy.one("layoutready",C.ready),t.cy.trigger({type:"layoutready",layout:t}))},E=t.options.refresh,G,M=0;M<E&&!G;M++)G=t.stopped||t.layout.tick();if(G){D.checkLayoutSuccess()&&!D.isSubLayout&&D.doPostLayout(),D.tilingPostLayout&&D.tilingPostLayout(),D.isLayoutFinished=!0,t.options.eles.nodes().positions(R),f(),t.cy.one("layoutstop",t.options.stop),t.cy.trigger({type:"layoutstop",layout:t}),c&&cancelAnimationFrame(c),A=!1;return}var U=t.layout.getPositionsData();C.eles.nodes().positions(function(m,S){if(typeof m=="number"&&(m=S),!m.isParent()){for(var X=m.id(),x=U[X],b=m;x==null&&(x=U[b.data("parent")]||U["DummyCompound_"+b.data("parent")],U[X]=x,b=b.parent()[0],b!=null););return x!=null?{x:x.x,y:x.y}:{x:m.position("x"),y:m.position("y")}}}),f(),c=requestAnimationFrame(I)};return D.addListener("layoutstarted",function(){t.options.animate==="during"&&(c=requestAnimationFrame(w))}),D.runLayout(),this.options.animate!=="during"&&(t.options.eles.nodes().not(":parent").layoutPositions(t,t.options,R),A=!1),this},P.prototype.getTopMostNodes=function(A){for(var c={},C=0;C<A.length;C++)c[A[C].id()]=!0;var d=A.filter(function(D,t){typeof D=="number"&&(D=t);for(var r=D.parent()[0];r!=null;){if(c[r.id()])return!1;r=r.parent()[0]}return!0});return d},P.prototype.processChildrenList=function(A,c,C){for(var d=c.length,D=0;D<d;D++){var t=c[D],r=t.children(),e,i=t.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(t.outerWidth()!=null&&t.outerHeight()!=null?e=A.add(new v(C.graphManager,new L(t.position("x")-i.w/2,t.position("y")-i.h/2),new N(parseFloat(i.w),parseFloat(i.h)))):e=A.add(new v(this.graphManager)),e.id=t.data("id"),e.paddingLeft=parseInt(t.css("padding")),e.paddingTop=parseInt(t.css("padding")),e.paddingRight=parseInt(t.css("padding")),e.paddingBottom=parseInt(t.css("padding")),this.options.nodeDimensionsIncludeLabels&&t.isParent()){var a=t.boundingBox({includeLabels:!0,includeNodes:!1}).w,s=t.boundingBox({includeLabels:!0,includeNodes:!1}).h,h=t.css("text-halign");e.labelWidth=a,e.labelHeight=s,e.labelPos=h}if(this.idToLNode[t.data("id")]=e,isNaN(e.rect.x)&&(e.rect.x=0),isNaN(e.rect.y)&&(e.rect.y=0),r!=null&&r.length>0){var g;g=C.getGraphManager().add(C.newGraph(),e),this.processChildrenList(g,r,C)}}},P.prototype.stop=function(){return this.stopped=!0,this};var Y=function(c){c("layout","cose-bilkent",P)};typeof cytoscape<"u"&&Y(cytoscape),T.exports=Y}])})}}]);