@jsonforms/core 3.1.0-alpha.0 → 3.1.0-alpha.1

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 (194) hide show
  1. package/lib/Helpers.d.ts +1 -1
  2. package/lib/actions/actions.d.ts +6 -5
  3. package/lib/generators/Generate.d.ts +1 -1
  4. package/lib/generators/schema.d.ts +1 -1
  5. package/lib/i18n/i18nTypes.d.ts +3 -2
  6. package/lib/i18n/i18nUtil.d.ts +2 -2
  7. package/lib/jsonforms-core.cjs.js +3 -3
  8. package/lib/jsonforms-core.cjs.js.map +1 -1
  9. package/lib/jsonforms-core.esm.js +2 -2
  10. package/lib/jsonforms-core.esm.js.map +1 -1
  11. package/lib/models/jsonSchema.d.ts +2 -2
  12. package/lib/models/uischema.d.ts +1 -1
  13. package/lib/reducers/cells.d.ts +2 -2
  14. package/lib/reducers/config.d.ts +1 -1
  15. package/lib/reducers/core.d.ts +3 -2
  16. package/lib/reducers/default-data.d.ts +1 -1
  17. package/lib/reducers/i18n.d.ts +1 -1
  18. package/lib/reducers/reducers.d.ts +4 -4
  19. package/lib/reducers/renderers.d.ts +2 -2
  20. package/lib/reducers/selectors.d.ts +6 -6
  21. package/lib/reducers/uischemas.d.ts +2 -2
  22. package/lib/store.d.ts +3 -3
  23. package/lib/testers/testers.d.ts +1 -1
  24. package/lib/util/cell.d.ts +3 -3
  25. package/lib/util/combinators.d.ts +1 -1
  26. package/lib/util/label.d.ts +1 -1
  27. package/lib/util/path.d.ts +6 -3
  28. package/lib/util/renderer.d.ts +5 -5
  29. package/lib/util/resolvers.d.ts +1 -1
  30. package/lib/util/runtime.d.ts +2 -2
  31. package/lib/util/util.d.ts +2 -2
  32. package/lib/util/validator.d.ts +1 -1
  33. package/package.json +7 -3
  34. package/src/Helpers.ts +1 -1
  35. package/src/actions/actions.ts +6 -5
  36. package/src/generators/Generate.ts +1 -1
  37. package/src/generators/schema.ts +1 -1
  38. package/src/i18n/i18nTypes.ts +3 -2
  39. package/src/i18n/i18nUtil.ts +2 -2
  40. package/src/models/jsonSchema.ts +2 -2
  41. package/src/models/uischema.ts +1 -1
  42. package/src/reducers/cells.ts +2 -2
  43. package/src/reducers/config.ts +1 -1
  44. package/src/reducers/core.ts +4 -3
  45. package/src/reducers/default-data.ts +1 -1
  46. package/src/reducers/i18n.ts +1 -1
  47. package/src/reducers/reducers.ts +4 -4
  48. package/src/reducers/renderers.ts +2 -2
  49. package/src/reducers/selectors.ts +6 -6
  50. package/src/reducers/uischemas.ts +2 -2
  51. package/src/store.ts +3 -3
  52. package/src/testers/testers.ts +2 -2
  53. package/src/util/cell.ts +3 -3
  54. package/src/util/combinators.ts +1 -1
  55. package/src/util/label.ts +1 -1
  56. package/src/util/path.ts +6 -3
  57. package/src/util/renderer.ts +5 -5
  58. package/src/util/resolvers.ts +2 -2
  59. package/src/util/runtime.ts +2 -2
  60. package/src/util/util.ts +2 -2
  61. package/src/util/validator.ts +1 -1
  62. package/.nycrc +0 -6
  63. package/docs/assets/css/main.css +0 -1
  64. package/docs/assets/images/icons.png +0 -0
  65. package/docs/assets/images/icons@2x.png +0 -0
  66. package/docs/assets/images/widgets.png +0 -0
  67. package/docs/assets/images/widgets@2x.png +0 -0
  68. package/docs/assets/js/main.js +0 -51
  69. package/docs/assets/js/search.json +0 -1
  70. package/docs/classes/gen.html +0 -406
  71. package/docs/enums/ruleeffect.html +0 -214
  72. package/docs/globals.html +0 -10568
  73. package/docs/index.html +0 -1297
  74. package/docs/interfaces/action.html +0 -166
  75. package/docs/interfaces/addcellrendereraction.html +0 -181
  76. package/docs/interfaces/addrendereraction.html +0 -181
  77. package/docs/interfaces/adduischemaaction.html +0 -181
  78. package/docs/interfaces/andcondition.html +0 -181
  79. package/docs/interfaces/anyaction.html +0 -189
  80. package/docs/interfaces/arraycontrolprops.html +0 -653
  81. package/docs/interfaces/arraylayoutprops.html +0 -648
  82. package/docs/interfaces/categorization.html +0 -281
  83. package/docs/interfaces/category.html +0 -279
  84. package/docs/interfaces/cellprops.html +0 -452
  85. package/docs/interfaces/combinatorrendererprops.html +0 -503
  86. package/docs/interfaces/combinatorsubschemarenderinfo.html +0 -181
  87. package/docs/interfaces/composablecondition.html +0 -193
  88. package/docs/interfaces/condition.html +0 -176
  89. package/docs/interfaces/controlelement.html +0 -280
  90. package/docs/interfaces/controlprops.html +0 -497
  91. package/docs/interfaces/controlstate.html +0 -184
  92. package/docs/interfaces/controlwithdetailprops.html +0 -501
  93. package/docs/interfaces/dispatchcellprops.html +0 -388
  94. package/docs/interfaces/dispatchcellstateprops.html +0 -408
  95. package/docs/interfaces/dispatchpropsofarraycontrol.html +0 -322
  96. package/docs/interfaces/dispatchpropsofcontrol.html +0 -204
  97. package/docs/interfaces/dispatchpropsofmultienumcontrol.html +0 -215
  98. package/docs/interfaces/enumcellprops.html +0 -467
  99. package/docs/interfaces/enumoption.html +0 -167
  100. package/docs/interfaces/formatted.html +0 -226
  101. package/docs/interfaces/grouplayout.html +0 -284
  102. package/docs/interfaces/horizontallayout.html +0 -234
  103. package/docs/interfaces/initaction.html +0 -209
  104. package/docs/interfaces/initactionoptions.html +0 -181
  105. package/docs/interfaces/internationalizable.html +0 -170
  106. package/docs/interfaces/jsonformscellrendererregistryentry.html +0 -167
  107. package/docs/interfaces/jsonformscore.html +0 -251
  108. package/docs/interfaces/jsonformsdefaultdataregistryentry.html +0 -167
  109. package/docs/interfaces/jsonformsextendedstate.html +0 -175
  110. package/docs/interfaces/jsonformsi18nstate.html +0 -181
  111. package/docs/interfaces/jsonformsprops.html +0 -321
  112. package/docs/interfaces/jsonformsrendererregistryentry.html +0 -167
  113. package/docs/interfaces/jsonformsstate.html +0 -170
  114. package/docs/interfaces/jsonformsstore.html +0 -376
  115. package/docs/interfaces/jsonformssubstates.html +0 -276
  116. package/docs/interfaces/jsonformsuischemaregistryentry.html +0 -167
  117. package/docs/interfaces/jsonschema4.html +0 -758
  118. package/docs/interfaces/jsonschema7.html +0 -884
  119. package/docs/interfaces/labelable.html +0 -184
  120. package/docs/interfaces/labeldescription.html +0 -184
  121. package/docs/interfaces/labeled.html +0 -182
  122. package/docs/interfaces/labelelement.html +0 -251
  123. package/docs/interfaces/labelprops.html +0 -339
  124. package/docs/interfaces/layout.html +0 -253
  125. package/docs/interfaces/layoutprops.html +0 -359
  126. package/docs/interfaces/leafcondition.html +0 -209
  127. package/docs/interfaces/orcondition.html +0 -181
  128. package/docs/interfaces/ownpropsofcell.html +0 -321
  129. package/docs/interfaces/ownpropsofcontrol.html +0 -305
  130. package/docs/interfaces/ownpropsofenum.html +0 -161
  131. package/docs/interfaces/ownpropsofenumcell.html +0 -335
  132. package/docs/interfaces/ownpropsofjsonformsrenderer.html +0 -296
  133. package/docs/interfaces/ownpropsoflabel.html +0 -286
  134. package/docs/interfaces/ownpropsoflayout.html +0 -305
  135. package/docs/interfaces/ownpropsofmasterlistitem.html +0 -289
  136. package/docs/interfaces/ownpropsofrenderer.html +0 -292
  137. package/docs/interfaces/referenceschemamap.html +0 -138
  138. package/docs/interfaces/registerdefaultdataaction.html +0 -181
  139. package/docs/interfaces/removecellrendereraction.html +0 -181
  140. package/docs/interfaces/removerendereraction.html +0 -181
  141. package/docs/interfaces/removeuischemaaction.html +0 -167
  142. package/docs/interfaces/rendererprops.html +0 -331
  143. package/docs/interfaces/rule.html +0 -185
  144. package/docs/interfaces/schemabasedcondition.html +0 -202
  145. package/docs/interfaces/scopable.html +0 -171
  146. package/docs/interfaces/scoped.html +0 -183
  147. package/docs/interfaces/setajvaction.html +0 -167
  148. package/docs/interfaces/setconfigaction.html +0 -167
  149. package/docs/interfaces/setlocaleaction.html +0 -167
  150. package/docs/interfaces/setschemaaction.html +0 -167
  151. package/docs/interfaces/settranslatoraction.html +0 -181
  152. package/docs/interfaces/setuischemaaction.html +0 -167
  153. package/docs/interfaces/setvalidationmodeaction.html +0 -167
  154. package/docs/interfaces/statepropsofarraycontrol.html +0 -474
  155. package/docs/interfaces/statepropsofarraylayout.html +0 -461
  156. package/docs/interfaces/statepropsofcell.html +0 -408
  157. package/docs/interfaces/statepropsofcombinator.html +0 -449
  158. package/docs/interfaces/statepropsofcontrol.html +0 -451
  159. package/docs/interfaces/statepropsofcontrolwithdetail.html +0 -463
  160. package/docs/interfaces/statepropsofenumcell.html +0 -422
  161. package/docs/interfaces/statepropsofjsonformsrenderer.html +0 -324
  162. package/docs/interfaces/statepropsoflabel.html +0 -343
  163. package/docs/interfaces/statepropsoflayout.html +0 -369
  164. package/docs/interfaces/statepropsofmasteritem.html +0 -309
  165. package/docs/interfaces/statepropsofrenderer.html +0 -331
  166. package/docs/interfaces/statepropsofscopedrenderer.html +0 -391
  167. package/docs/interfaces/store.html +0 -386
  168. package/docs/interfaces/testercontext.html +0 -184
  169. package/docs/interfaces/uischemaelement.html +0 -225
  170. package/docs/interfaces/unregisterdefaultdataaction.html +0 -167
  171. package/docs/interfaces/updateaction.html +0 -202
  172. package/docs/interfaces/updatecoreaction.html +0 -209
  173. package/docs/interfaces/updateerrorsaction.html +0 -167
  174. package/docs/interfaces/updatei18naction.html +0 -195
  175. package/docs/interfaces/verticallayout.html +0 -234
  176. package/docs/interfaces/withclassname.html +0 -153
  177. package/rollup.config.js +0 -44
  178. package/stats.html +0 -3279
  179. package/test/actions/actions.test.ts +0 -93
  180. package/test/generators/schema.test.ts +0 -224
  181. package/test/generators/uischema.test.ts +0 -576
  182. package/test/i18n/i18nUtil.test.ts +0 -88
  183. package/test/reducers/core.test.ts +0 -1682
  184. package/test/reducers/uischemas.test.ts +0 -173
  185. package/test/testers.test.ts +0 -948
  186. package/test/util/array.test.ts +0 -28
  187. package/test/util/cell.test.ts +0 -354
  188. package/test/util/derivetype.test.ts +0 -101
  189. package/test/util/label.test.ts +0 -364
  190. package/test/util/path.test.ts +0 -259
  191. package/test/util/renderer.test.ts +0 -1830
  192. package/test/util/resolvers.test.ts +0 -157
  193. package/test/util/runtime.test.ts +0 -779
  194. package/tsconfig.json +0 -13
package/stats.html DELETED
@@ -1,3279 +0,0 @@
1
-
2
- <!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <meta http-equiv="X-UA-Compatible" content="ie=edge" />
8
- <title>RollUp Visualizer</title>
9
- <style>
10
- :root {
11
- --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
12
- "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
13
- "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
14
- --background-color: #f7eedf;
15
- --text-color: #333;
16
- }
17
-
18
- @media (prefers-color-scheme: dark) {
19
- :root {
20
- --background-color: #2b2d42;
21
- --text-color: #edf2f4;
22
- }
23
- }
24
- html {
25
- box-sizing: border-box;
26
- }
27
-
28
- *,
29
- *:before,
30
- *:after {
31
- box-sizing: inherit;
32
- }
33
-
34
- html {
35
- background-color: var(--background-color);
36
- color: var(--text-color);
37
- font-family: var(--font-family);
38
- }
39
-
40
- body {
41
- padding: 0;
42
- margin: 0;
43
- }
44
-
45
- html,
46
- body {
47
- height: 100%;
48
- width: 100%;
49
- overflow: hidden;
50
- }
51
-
52
- body {
53
- display: flex;
54
- flex-direction: column;
55
- }
56
-
57
- svg {
58
- vertical-align: middle;
59
- width: 100%;
60
- height: 100%;
61
- max-height: 100vh;
62
- }
63
-
64
- main {
65
- flex-grow: 1;
66
- height: 100vh;
67
- padding: 20px;
68
- }
69
-
70
- .tooltip {
71
- position: absolute;
72
- z-index: 1070;
73
- border: 2px solid;
74
- border-radius: 5px;
75
- padding: 5px;
76
- white-space: nowrap;
77
- font-size: 0.875rem;
78
- background-color: var(--background-color);
79
- color: var(--text-color);
80
- }
81
-
82
- .tooltip-hidden {
83
- visibility: hidden;
84
- opacity: 0;
85
- }
86
-
87
- .sidebar {
88
- position: fixed;
89
- top: 0;
90
- left: 0;
91
- right: 0;
92
- display: flex;
93
- flex-direction: row;
94
- font-size: 0.7rem;
95
- align-items: center;
96
- margin: 0 50px;
97
- height: 20px;
98
- }
99
-
100
- .size-selectors {
101
- display: flex;
102
- flex-direction: row;
103
- align-items: center;
104
- }
105
-
106
- .size-selector {
107
- display: flex;
108
- flex-direction: row;
109
- align-items: center;
110
- justify-content: center;
111
- margin-right: 1rem;
112
- }
113
- .size-selector input {
114
- margin: 0 0.3rem 0 0;
115
- }
116
-
117
- .filters {
118
- flex: 1;
119
- display: flex;
120
- flex-direction: row;
121
- align-items: center;
122
- }
123
-
124
- .module-filters {
125
- display: flex;
126
- }
127
-
128
- .module-filter {
129
- display: flex;
130
- flex-direction: row;
131
- align-items: center;
132
- justify-content: center;
133
- flex: 1;
134
- }
135
- .module-filter input {
136
- flex: 1;
137
- height: 1rem;
138
- padding: 0.01rem;
139
- font-size: 0.7rem;
140
- margin-left: 0.3rem;
141
- }
142
- .module-filter + .module-filter {
143
- margin-left: 0.5rem;
144
- }
145
- </style>
146
- </head>
147
- <body>
148
- <main></main>
149
- <script>
150
- /*<!--*/
151
- var drawChart = (function (exports) {
152
- 'use strict';
153
-
154
- var n,u$1,i$1,t$1,o$2,r$1={},f$1=[],e$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c$1(n,l){for(var u in l)n[u]=l[u];return n}function s$1(n){var l=n.parentNode;l&&l.removeChild(n);}function a$1(n,l,u){var i,t,o,r=arguments,f={};for(o in l)"key"==o?i=l[o]:"ref"==o?t=l[o]:f[o]=l[o];if(arguments.length>3)for(u=[u],o=3;o<arguments.length;o++)u.push(r[o]);if(null!=u&&(f.children=u),"function"==typeof n&&null!=n.defaultProps)for(o in n.defaultProps)void 0===f[o]&&(f[o]=n.defaultProps[o]);return v$1(n,f,i,t,null)}function v$1(l,u,i,t,o){var r={type:l,props:u,key:i,ref:t,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++n.__v:o};return null!=n.vnode&&n.vnode(r),r}function y$1(n){return n.children}function p$1(n,l){this.props=n,this.context=l;}function d$1(n,l){if(null==l)return n.__?d$1(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?d$1(n):null}function _(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return _(n)}}function k$1(l){(!l.__d&&(l.__d=!0)&&u$1.push(l)&&!b$1.__r++||t$1!==n.debounceRendering)&&((t$1=n.debounceRendering)||i$1)(b$1);}function b$1(){for(var n;b$1.__r=u$1.length;)n=u$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),u$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=c$1({},t)).__v=t.__v+1,I(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?d$1(t):o,t.__h),T(u,t),t.__e!=o&&_(t)));});}function m$1(n,l,u,i,t,o,e,c,s,a){var h,p,_,k,b,m,w,A=i&&i.__k||f$1,P=A.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(y$1,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(_=A[h])||_&&k.key==_.key&&k.type===_.type)A[h]=void 0;else for(p=0;p<P;p++){if((_=A[p])&&k.key==_.key&&k.type===_.type){A[p]=void 0;break}_=null;}I(n,k,_=_||r$1,t,o,e,c,s,a),b=k.__e,(p=k.ref)&&_.ref!=p&&(w||(w=[]),_.ref&&w.push(_.ref,null,k),w.push(p,k.__c||b,k)),null!=b?(null==m&&(m=b),"function"==typeof k.type&&null!=k.__k&&k.__k===_.__k?k.__d=s=g$1(k,s,n):s=x$1(n,k,_,A,b,s),a||"option"!==u.type?"function"==typeof u.type&&(u.__d=s):n.value=""):s&&_.__e==s&&s.parentNode!=n&&(s=d$1(_));}for(u.__e=m,h=P;h--;)null!=A[h]&&("function"==typeof u.type&&null!=A[h].__e&&A[h].__e==u.__d&&(u.__d=d$1(i,h+1)),L(A[h],A[h]));if(w)for(h=0;h<w.length;h++)z(w[h],w[++h],w[++h]);}function g$1(n,l,u){var i,t;for(i=0;i<n.__k.length;i++)(t=n.__k[i])&&(t.__=n,l="function"==typeof t.type?g$1(t,l,u):x$1(u,t,t,n.__k,t.__e,l));return l}function x$1(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function A$1(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||C$1(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||C$1(n,o,l[o],u[o],i);}function P(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||e$1.test(l)?u:u+"px";}function C$1(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||P(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||P(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?H:$,o):n.removeEventListener(l,o?H:$,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function $(l){this.l[l.type+!1](n.event?n.event(l):l);}function H(l){this.l[l.type+!0](n.event?n.event(l):l);}function I(l,u,i,t,o,r,f,e,s){var a,v,h,d,_,k,b,g,w,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(s=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=n.__b)&&a(u);try{n:if("function"==typeof P){if(g=u.props,w=(a=P.contextType)&&t[a.__c],x=a?w?w.props.value:a.__:t,i.__c?b=(v=u.__c=i.__c).__=v.__E:("prototype"in P&&P.prototype.render?u.__c=v=new P(g,x):(u.__c=v=new p$1(g,x),v.constructor=P,v.render=M),w&&w.sub(v),v.props=g,v.state||(v.state={}),v.context=x,v.__n=t,h=v.__d=!0,v.__h=[]),null==v.__s&&(v.__s=v.state),null!=P.getDerivedStateFromProps&&(v.__s==v.state&&(v.__s=c$1({},v.__s)),c$1(v.__s,P.getDerivedStateFromProps(g,v.__s))),d=v.props,_=v.state,h)null==P.getDerivedStateFromProps&&null!=v.componentWillMount&&v.componentWillMount(),null!=v.componentDidMount&&v.__h.push(v.componentDidMount);else {if(null==P.getDerivedStateFromProps&&g!==d&&null!=v.componentWillReceiveProps&&v.componentWillReceiveProps(g,x),!v.__e&&null!=v.shouldComponentUpdate&&!1===v.shouldComponentUpdate(g,v.__s,x)||u.__v===i.__v){v.props=g,v.state=v.__s,u.__v!==i.__v&&(v.__d=!1),v.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),v.__h.length&&f.push(v);break n}null!=v.componentWillUpdate&&v.componentWillUpdate(g,v.__s,x),null!=v.componentDidUpdate&&v.__h.push(function(){v.componentDidUpdate(d,_,k);});}v.context=x,v.props=g,v.state=v.__s,(a=n.__r)&&a(u),v.__d=!1,v.__v=u,v.__P=l,a=v.render(v.props,v.state,v.context),v.state=v.__s,null!=v.getChildContext&&(t=c$1(c$1({},t),v.getChildContext())),h||null==v.getSnapshotBeforeUpdate||(k=v.getSnapshotBeforeUpdate(d,_)),A=null!=a&&a.type===y$1&&null==a.key?a.props.children:a,m$1(l,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,s),v.base=u.__e,u.__h=null,v.__h.length&&f.push(v),b&&(v.__E=v.__=null),v.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=j$1(i.__e,u,i,t,o,r,f,s);(a=n.diffed)&&a(u);}catch(l){u.__v=null,(s||null!=r)&&(u.__e=e,u.__h=!!s,r[r.indexOf(e)]=null),n.__e(l,u,i);}}function T(l,u){n.__c&&n.__c(u,l),l.some(function(u){try{l=u.__h,u.__h=[],l.some(function(n){n.call(u);});}catch(l){n.__e(l,u.__v);}});}function j$1(n,l,u,i,t,o,e,c){var a,v,h,y,p=u.props,d=l.props,_=l.type,k=0;if("svg"===_&&(t=!0),null!=o)for(;k<o.length;k++)if((a=o[k])&&(a===n||(_?a.localName==_:3==a.nodeType))){n=a,o[k]=null;break}if(null==n){if(null===_)return document.createTextNode(d);n=t?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,d.is&&d),o=null,c=!1;}if(null===_)p===d||c&&n.data===d||(n.data=d);else {if(o=o&&f$1.slice.call(n.childNodes),v=(p=u.props||r$1).dangerouslySetInnerHTML,h=d.dangerouslySetInnerHTML,!c){if(null!=o)for(p={},y=0;y<n.attributes.length;y++)p[n.attributes[y].name]=n.attributes[y].value;(h||v)&&(h&&(v&&h.__html==v.__html||h.__html===n.innerHTML)||(n.innerHTML=h&&h.__html||""));}if(A$1(n,d,p,t,c),h)l.__k=[];else if(k=l.props.children,m$1(n,Array.isArray(k)?k:[k],l,u,i,t&&"foreignObject"!==_,o,e,n.firstChild,c),null!=o)for(k=o.length;k--;)null!=o[k]&&s$1(o[k]);c||("value"in d&&void 0!==(k=d.value)&&(k!==n.value||"progress"===_&&!k)&&C$1(n,"value",k,p.value,!1),"checked"in d&&void 0!==(k=d.checked)&&k!==n.checked&&C$1(n,"checked",k,p.checked,!1));}return n}function z(l,u,i){try{"function"==typeof l?l(u):l.current=u;}catch(l){n.__e(l,i);}}function L(l,u,i){var t,o,r;if(n.unmount&&n.unmount(l),(t=l.ref)&&(t.current&&t.current!==l.__e||z(t,null,u)),i||"function"==typeof l.type||(i=null!=(o=l.__e)),l.__e=l.__d=void 0,null!=(t=l.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(l){n.__e(l,u);}t.base=t.__P=null;}if(t=l.__k)for(r=0;r<t.length;r++)t[r]&&L(t[r],u,i);null!=o&&s$1(o);}function M(n,l,u){return this.constructor(n,u)}function N(l,u,i){var t,o,e;n.__&&n.__(l,u),o=(t="function"==typeof i)?null:i&&i.__k||u.__k,e=[],I(u,l=(!t&&i||u).__k=a$1(y$1,null,[l]),o||r$1,r$1,void 0!==u.ownerSVGElement,!t&&i?[i]:o?null:u.firstChild?f$1.slice.call(u.childNodes):null,e,!t&&i?i:o?o.__e:u.firstChild,t),T(e,l);}function q(n,l){var u={__c:l="__cC"+o$2++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(k$1);},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l;}throw n},__v:0},p$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=c$1({},this.state),"function"==typeof n&&(n=n(c$1({},u),this.props)),n&&c$1(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),k$1(this));},p$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),k$1(this));},p$1.prototype.render=y$1,u$1=[],i$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b$1.__r=0,o$2=0;
155
-
156
- function o$1(_,o,e,n$1,t){var f={};for(var l in o)"ref"!=l&&(f[l]=o[l]);var s,u,a={type:_,props:f,key:e,ref:o&&o.ref,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:++n.__v,__source:n$1,__self:t};if("function"==typeof _&&(s=_.defaultProps))for(u in s)void 0===f[u]&&(f[u]=s[u]);return n.vnode&&n.vnode(a),a}
157
-
158
- function count$1(node) {
159
- var sum = 0,
160
- children = node.children,
161
- i = children && children.length;
162
- if (!i) sum = 1;
163
- else while (--i >= 0) sum += children[i].value;
164
- node.value = sum;
165
- }
166
-
167
- function node_count() {
168
- return this.eachAfter(count$1);
169
- }
170
-
171
- function node_each(callback, that) {
172
- let index = -1;
173
- for (const node of this) {
174
- callback.call(that, node, ++index, this);
175
- }
176
- return this;
177
- }
178
-
179
- function node_eachBefore(callback, that) {
180
- var node = this, nodes = [node], children, i, index = -1;
181
- while (node = nodes.pop()) {
182
- callback.call(that, node, ++index, this);
183
- if (children = node.children) {
184
- for (i = children.length - 1; i >= 0; --i) {
185
- nodes.push(children[i]);
186
- }
187
- }
188
- }
189
- return this;
190
- }
191
-
192
- function node_eachAfter(callback, that) {
193
- var node = this, nodes = [node], next = [], children, i, n, index = -1;
194
- while (node = nodes.pop()) {
195
- next.push(node);
196
- if (children = node.children) {
197
- for (i = 0, n = children.length; i < n; ++i) {
198
- nodes.push(children[i]);
199
- }
200
- }
201
- }
202
- while (node = next.pop()) {
203
- callback.call(that, node, ++index, this);
204
- }
205
- return this;
206
- }
207
-
208
- function node_find(callback, that) {
209
- let index = -1;
210
- for (const node of this) {
211
- if (callback.call(that, node, ++index, this)) {
212
- return node;
213
- }
214
- }
215
- }
216
-
217
- function node_sum(value) {
218
- return this.eachAfter(function(node) {
219
- var sum = +value(node.data) || 0,
220
- children = node.children,
221
- i = children && children.length;
222
- while (--i >= 0) sum += children[i].value;
223
- node.value = sum;
224
- });
225
- }
226
-
227
- function node_sort(compare) {
228
- return this.eachBefore(function(node) {
229
- if (node.children) {
230
- node.children.sort(compare);
231
- }
232
- });
233
- }
234
-
235
- function node_path(end) {
236
- var start = this,
237
- ancestor = leastCommonAncestor(start, end),
238
- nodes = [start];
239
- while (start !== ancestor) {
240
- start = start.parent;
241
- nodes.push(start);
242
- }
243
- var k = nodes.length;
244
- while (end !== ancestor) {
245
- nodes.splice(k, 0, end);
246
- end = end.parent;
247
- }
248
- return nodes;
249
- }
250
-
251
- function leastCommonAncestor(a, b) {
252
- if (a === b) return a;
253
- var aNodes = a.ancestors(),
254
- bNodes = b.ancestors(),
255
- c = null;
256
- a = aNodes.pop();
257
- b = bNodes.pop();
258
- while (a === b) {
259
- c = a;
260
- a = aNodes.pop();
261
- b = bNodes.pop();
262
- }
263
- return c;
264
- }
265
-
266
- function node_ancestors() {
267
- var node = this, nodes = [node];
268
- while (node = node.parent) {
269
- nodes.push(node);
270
- }
271
- return nodes;
272
- }
273
-
274
- function node_descendants() {
275
- return Array.from(this);
276
- }
277
-
278
- function node_leaves() {
279
- var leaves = [];
280
- this.eachBefore(function(node) {
281
- if (!node.children) {
282
- leaves.push(node);
283
- }
284
- });
285
- return leaves;
286
- }
287
-
288
- function node_links() {
289
- var root = this, links = [];
290
- root.each(function(node) {
291
- if (node !== root) { // Don’t include the root’s parent, if any.
292
- links.push({source: node.parent, target: node});
293
- }
294
- });
295
- return links;
296
- }
297
-
298
- function* node_iterator() {
299
- var node = this, current, next = [node], children, i, n;
300
- do {
301
- current = next.reverse(), next = [];
302
- while (node = current.pop()) {
303
- yield node;
304
- if (children = node.children) {
305
- for (i = 0, n = children.length; i < n; ++i) {
306
- next.push(children[i]);
307
- }
308
- }
309
- }
310
- } while (next.length);
311
- }
312
-
313
- function hierarchy(data, children) {
314
- if (data instanceof Map) {
315
- data = [undefined, data];
316
- if (children === undefined) children = mapChildren;
317
- } else if (children === undefined) {
318
- children = objectChildren;
319
- }
320
-
321
- var root = new Node$1(data),
322
- node,
323
- nodes = [root],
324
- child,
325
- childs,
326
- i,
327
- n;
328
-
329
- while (node = nodes.pop()) {
330
- if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {
331
- node.children = childs;
332
- for (i = n - 1; i >= 0; --i) {
333
- nodes.push(child = childs[i] = new Node$1(childs[i]));
334
- child.parent = node;
335
- child.depth = node.depth + 1;
336
- }
337
- }
338
- }
339
-
340
- return root.eachBefore(computeHeight);
341
- }
342
-
343
- function node_copy() {
344
- return hierarchy(this).eachBefore(copyData);
345
- }
346
-
347
- function objectChildren(d) {
348
- return d.children;
349
- }
350
-
351
- function mapChildren(d) {
352
- return Array.isArray(d) ? d[1] : null;
353
- }
354
-
355
- function copyData(node) {
356
- if (node.data.value !== undefined) node.value = node.data.value;
357
- node.data = node.data.data;
358
- }
359
-
360
- function computeHeight(node) {
361
- var height = 0;
362
- do node.height = height;
363
- while ((node = node.parent) && (node.height < ++height));
364
- }
365
-
366
- function Node$1(data) {
367
- this.data = data;
368
- this.depth =
369
- this.height = 0;
370
- this.parent = null;
371
- }
372
-
373
- Node$1.prototype = hierarchy.prototype = {
374
- constructor: Node$1,
375
- count: node_count,
376
- each: node_each,
377
- eachAfter: node_eachAfter,
378
- eachBefore: node_eachBefore,
379
- find: node_find,
380
- sum: node_sum,
381
- sort: node_sort,
382
- path: node_path,
383
- ancestors: node_ancestors,
384
- descendants: node_descendants,
385
- leaves: node_leaves,
386
- links: node_links,
387
- copy: node_copy,
388
- [Symbol.iterator]: node_iterator
389
- };
390
-
391
- function required(f) {
392
- if (typeof f !== "function") throw new Error;
393
- return f;
394
- }
395
-
396
- function constantZero() {
397
- return 0;
398
- }
399
-
400
- function constant(x) {
401
- return function() {
402
- return x;
403
- };
404
- }
405
-
406
- function roundNode(node) {
407
- node.x0 = Math.round(node.x0);
408
- node.y0 = Math.round(node.y0);
409
- node.x1 = Math.round(node.x1);
410
- node.y1 = Math.round(node.y1);
411
- }
412
-
413
- function treemapDice(parent, x0, y0, x1, y1) {
414
- var nodes = parent.children,
415
- node,
416
- i = -1,
417
- n = nodes.length,
418
- k = parent.value && (x1 - x0) / parent.value;
419
-
420
- while (++i < n) {
421
- node = nodes[i], node.y0 = y0, node.y1 = y1;
422
- node.x0 = x0, node.x1 = x0 += node.value * k;
423
- }
424
- }
425
-
426
- function treemapSlice(parent, x0, y0, x1, y1) {
427
- var nodes = parent.children,
428
- node,
429
- i = -1,
430
- n = nodes.length,
431
- k = parent.value && (y1 - y0) / parent.value;
432
-
433
- while (++i < n) {
434
- node = nodes[i], node.x0 = x0, node.x1 = x1;
435
- node.y0 = y0, node.y1 = y0 += node.value * k;
436
- }
437
- }
438
-
439
- var phi = (1 + Math.sqrt(5)) / 2;
440
-
441
- function squarifyRatio(ratio, parent, x0, y0, x1, y1) {
442
- var rows = [],
443
- nodes = parent.children,
444
- row,
445
- nodeValue,
446
- i0 = 0,
447
- i1 = 0,
448
- n = nodes.length,
449
- dx, dy,
450
- value = parent.value,
451
- sumValue,
452
- minValue,
453
- maxValue,
454
- newRatio,
455
- minRatio,
456
- alpha,
457
- beta;
458
-
459
- while (i0 < n) {
460
- dx = x1 - x0, dy = y1 - y0;
461
-
462
- // Find the next non-empty node.
463
- do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);
464
- minValue = maxValue = sumValue;
465
- alpha = Math.max(dy / dx, dx / dy) / (value * ratio);
466
- beta = sumValue * sumValue * alpha;
467
- minRatio = Math.max(maxValue / beta, beta / minValue);
468
-
469
- // Keep adding nodes while the aspect ratio maintains or improves.
470
- for (; i1 < n; ++i1) {
471
- sumValue += nodeValue = nodes[i1].value;
472
- if (nodeValue < minValue) minValue = nodeValue;
473
- if (nodeValue > maxValue) maxValue = nodeValue;
474
- beta = sumValue * sumValue * alpha;
475
- newRatio = Math.max(maxValue / beta, beta / minValue);
476
- if (newRatio > minRatio) { sumValue -= nodeValue; break; }
477
- minRatio = newRatio;
478
- }
479
-
480
- // Position and record the row orientation.
481
- rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});
482
- if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);
483
- else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);
484
- value -= sumValue, i0 = i1;
485
- }
486
-
487
- return rows;
488
- }
489
-
490
- var squarify = (function custom(ratio) {
491
-
492
- function squarify(parent, x0, y0, x1, y1) {
493
- squarifyRatio(ratio, parent, x0, y0, x1, y1);
494
- }
495
-
496
- squarify.ratio = function(x) {
497
- return custom((x = +x) > 1 ? x : 1);
498
- };
499
-
500
- return squarify;
501
- })(phi);
502
-
503
- function treemap() {
504
- var tile = squarify,
505
- round = false,
506
- dx = 1,
507
- dy = 1,
508
- paddingStack = [0],
509
- paddingInner = constantZero,
510
- paddingTop = constantZero,
511
- paddingRight = constantZero,
512
- paddingBottom = constantZero,
513
- paddingLeft = constantZero;
514
-
515
- function treemap(root) {
516
- root.x0 =
517
- root.y0 = 0;
518
- root.x1 = dx;
519
- root.y1 = dy;
520
- root.eachBefore(positionNode);
521
- paddingStack = [0];
522
- if (round) root.eachBefore(roundNode);
523
- return root;
524
- }
525
-
526
- function positionNode(node) {
527
- var p = paddingStack[node.depth],
528
- x0 = node.x0 + p,
529
- y0 = node.y0 + p,
530
- x1 = node.x1 - p,
531
- y1 = node.y1 - p;
532
- if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
533
- if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
534
- node.x0 = x0;
535
- node.y0 = y0;
536
- node.x1 = x1;
537
- node.y1 = y1;
538
- if (node.children) {
539
- p = paddingStack[node.depth + 1] = paddingInner(node) / 2;
540
- x0 += paddingLeft(node) - p;
541
- y0 += paddingTop(node) - p;
542
- x1 -= paddingRight(node) - p;
543
- y1 -= paddingBottom(node) - p;
544
- if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
545
- if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
546
- tile(node, x0, y0, x1, y1);
547
- }
548
- }
549
-
550
- treemap.round = function(x) {
551
- return arguments.length ? (round = !!x, treemap) : round;
552
- };
553
-
554
- treemap.size = function(x) {
555
- return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];
556
- };
557
-
558
- treemap.tile = function(x) {
559
- return arguments.length ? (tile = required(x), treemap) : tile;
560
- };
561
-
562
- treemap.padding = function(x) {
563
- return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();
564
- };
565
-
566
- treemap.paddingInner = function(x) {
567
- return arguments.length ? (paddingInner = typeof x === "function" ? x : constant(+x), treemap) : paddingInner;
568
- };
569
-
570
- treemap.paddingOuter = function(x) {
571
- return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();
572
- };
573
-
574
- treemap.paddingTop = function(x) {
575
- return arguments.length ? (paddingTop = typeof x === "function" ? x : constant(+x), treemap) : paddingTop;
576
- };
577
-
578
- treemap.paddingRight = function(x) {
579
- return arguments.length ? (paddingRight = typeof x === "function" ? x : constant(+x), treemap) : paddingRight;
580
- };
581
-
582
- treemap.paddingBottom = function(x) {
583
- return arguments.length ? (paddingBottom = typeof x === "function" ? x : constant(+x), treemap) : paddingBottom;
584
- };
585
-
586
- treemap.paddingLeft = function(x) {
587
- return arguments.length ? (paddingLeft = typeof x === "function" ? x : constant(+x), treemap) : paddingLeft;
588
- };
589
-
590
- return treemap;
591
- }
592
-
593
- var treemapResquarify = (function custom(ratio) {
594
-
595
- function resquarify(parent, x0, y0, x1, y1) {
596
- if ((rows = parent._squarify) && (rows.ratio === ratio)) {
597
- var rows,
598
- row,
599
- nodes,
600
- i,
601
- j = -1,
602
- n,
603
- m = rows.length,
604
- value = parent.value;
605
-
606
- while (++j < m) {
607
- row = rows[j], nodes = row.children;
608
- for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;
609
- if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1);
610
- else treemapSlice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1);
611
- value -= row.value;
612
- }
613
- } else {
614
- parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);
615
- rows.ratio = ratio;
616
- }
617
- }
618
-
619
- resquarify.ratio = function(x) {
620
- return custom((x = +x) > 1 ? x : 1);
621
- };
622
-
623
- return resquarify;
624
- })(phi);
625
-
626
- const isModuleTree = (mod) => "children" in mod;
627
-
628
- let count = 0;
629
- class Id {
630
- constructor(id) {
631
- this._id = id;
632
- const url = new URL(window.location.href);
633
- url.hash = id;
634
- this._href = url.toString();
635
- }
636
- get id() {
637
- return this._id;
638
- }
639
- get href() {
640
- return this._href;
641
- }
642
- toString() {
643
- return `url(${this.href})`;
644
- }
645
- }
646
- function generateUniqueId(name) {
647
- count += 1;
648
- const id = ["O", name, count].filter(Boolean).join("-");
649
- return new Id(id);
650
- }
651
-
652
- const LABELS = {
653
- renderedLength: "Rendered",
654
- gzipLength: "Gzip",
655
- brotliLength: "Brotli",
656
- };
657
- const getAvailableSizeOptions = (options) => {
658
- const availableSizeProperties = ["renderedLength"];
659
- if (options.gzip) {
660
- availableSizeProperties.push("gzipLength");
661
- }
662
- if (options.brotli) {
663
- availableSizeProperties.push("brotliLength");
664
- }
665
- return availableSizeProperties;
666
- };
667
-
668
- var t,u,r,o=0,i=[],c=n.__b,f=n.__r,e=n.diffed,a=n.__c,v=n.unmount;function m(t,r){n.__h&&n.__h(u,t,o||r),o=0;var i=u.__H||(u.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({}),i.__[t]}function l(n){return o=1,p(w,n)}function p(n,r,o){var i=m(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):w(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}));}],i.__c=u),i.__}function y(r,o){var i=m(t++,3);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i));}function h(r,o){var i=m(t++,4);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i));}function s(n){return o=5,d(function(){return {current:n}},[])}function d(n,u){var r=m(t++,7);return k(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function F(n){var r=u.context[n.__c],o=m(t++,9);return o.__c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function x(){i.forEach(function(t){if(t.__P)try{t.__H.__h.forEach(g),t.__H.__h.forEach(j),t.__H.__h=[];}catch(u){t.__H.__h=[],n.__e(u,t.__v);}}),i=[];}n.__b=function(n){u=null,c&&c(n);},n.__r=function(n){f&&f(n),t=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(g),r.__h.forEach(j),r.__h=[]);},n.diffed=function(t){e&&e(t);var o=t.__c;o&&o.__H&&o.__H.__h.length&&(1!==i.push(o)&&r===n.requestAnimationFrame||((r=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),b&&cancelAnimationFrame(t),setTimeout(n);},r=setTimeout(u,100);b&&(t=requestAnimationFrame(u));})(x)),u=void 0;},n.__c=function(t,u){u.some(function(t){try{t.__h.forEach(g),t.__h=t.__h.filter(function(n){return !n.__||j(n)});}catch(r){u.some(function(n){n.__h&&(n.__h=[]);}),u=[],n.__e(r,t.__v);}}),a&&a(t,u);},n.unmount=function(t){v&&v(t);var u=t.__c;if(u&&u.__H)try{u.__H.__.forEach(g);}catch(t){n.__e(t,u.__v);}};var b="function"==typeof requestAnimationFrame;function g(n){var t=u;"function"==typeof n.__c&&n.__c(),u=t;}function j(n){var t=u;n.__c=n.__(),u=t;}function k(n,t){return !n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function w(n,t){return "function"==typeof t?t(n):t}
669
-
670
- const SideBar = ({ availableSizeProperties, sizeProperty, setSizeProperty, onExcludeChange, onIncludeChange, }) => {
671
- const [includeValue, setIncludeValue] = l("");
672
- const [excludeValue, setExcludeValue] = l("");
673
- const handleSizePropertyChange = (sizeProp) => () => {
674
- if (sizeProp !== sizeProperty) {
675
- setSizeProperty(sizeProp);
676
- }
677
- };
678
- const handleIncludeChange = (event) => {
679
- const value = event.currentTarget.value;
680
- setIncludeValue(value);
681
- onIncludeChange(value);
682
- };
683
- const handleExcludeChange = (event) => {
684
- const value = event.currentTarget.value;
685
- setExcludeValue(value);
686
- onExcludeChange(value);
687
- };
688
- return (o$1("aside", Object.assign({ className: "sidebar" }, { children: [o$1("div", Object.assign({ className: "size-selectors" }, { children: availableSizeProperties.length > 1 &&
689
- availableSizeProperties.map((sizeProp) => {
690
- const id = `selector-${sizeProp}`;
691
- return (o$1("div", Object.assign({ className: "size-selector" }, { children: [o$1("input", { type: "radio", id: id, checked: sizeProp === sizeProperty, onChange: handleSizePropertyChange(sizeProp) }, void 0),
692
- o$1("label", Object.assign({ htmlFor: id }, { children: LABELS[sizeProp] }), void 0)] }), sizeProp));
693
- }) }), void 0),
694
- o$1("div", Object.assign({ className: "module-filters" }, { children: [o$1("div", Object.assign({ className: "module-filter" }, { children: [o$1("label", Object.assign({ htmlFor: "module-filter-exclude" }, { children: "Exclude" }), void 0),
695
- o$1("input", { type: "text", id: "module-filter-exclude", value: excludeValue, onInput: handleExcludeChange }, void 0)] }), void 0),
696
- o$1("div", Object.assign({ className: "module-filter" }, { children: [o$1("label", Object.assign({ htmlFor: "module-filter-include" }, { children: "Include" }), void 0),
697
- o$1("input", { type: "text", id: "module-filter-include", value: includeValue, onInput: handleIncludeChange }, void 0)] }), void 0)] }), void 0)] }), void 0));
698
- };
699
-
700
- const throttleFilter = (callback, limit) => {
701
- let waiting = false;
702
- return (val) => {
703
- if (!waiting) {
704
- callback(val);
705
- waiting = true;
706
- setTimeout(() => {
707
- waiting = false;
708
- }, limit);
709
- }
710
- };
711
- };
712
- const useFilter = () => {
713
- const [includeFilter, setIncludeFilter] = l("");
714
- const [excludeFilter, setExcludeFilter] = l("");
715
- const setIncludeFilterTrottled = d(() => throttleFilter(setIncludeFilter, 200), []);
716
- const setExcludeFilterTrottled = d(() => throttleFilter(setExcludeFilter, 200), []);
717
- const isModuleIncluded = d(() => {
718
- if (includeFilter === "") {
719
- return () => true;
720
- }
721
- try {
722
- const re = new RegExp(includeFilter);
723
- return ({ id }) => re.test(id);
724
- }
725
- catch (err) {
726
- return () => false;
727
- }
728
- }, [includeFilter]);
729
- const isModuleExcluded = d(() => {
730
- if (excludeFilter === "") {
731
- return () => false;
732
- }
733
- try {
734
- const re = new RegExp(excludeFilter);
735
- return ({ id }) => re.test(id);
736
- }
737
- catch (err) {
738
- return () => false;
739
- }
740
- }, [excludeFilter]);
741
- const isDefaultInclude = includeFilter === "";
742
- const getModuleFilterMultiplier = d(() => {
743
- return (data) => {
744
- if (isDefaultInclude) {
745
- return isModuleExcluded(data) ? 0 : 1;
746
- }
747
- return isModuleExcluded(data) && !isModuleIncluded(data) ? 0 : 1;
748
- };
749
- }, [isDefaultInclude, isModuleExcluded, isModuleIncluded]);
750
- return {
751
- getModuleFilterMultiplier,
752
- includeFilter,
753
- excludeFilter,
754
- setExcludeFilter: setExcludeFilterTrottled,
755
- setIncludeFilter: setIncludeFilterTrottled,
756
- };
757
- };
758
-
759
- function ascending(a, b) {
760
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
761
- }
762
-
763
- function bisector(f) {
764
- let delta = f;
765
- let compare = f;
766
-
767
- if (f.length === 1) {
768
- delta = (d, x) => f(d) - x;
769
- compare = ascendingComparator(f);
770
- }
771
-
772
- function left(a, x, lo, hi) {
773
- if (lo == null) lo = 0;
774
- if (hi == null) hi = a.length;
775
- while (lo < hi) {
776
- const mid = (lo + hi) >>> 1;
777
- if (compare(a[mid], x) < 0) lo = mid + 1;
778
- else hi = mid;
779
- }
780
- return lo;
781
- }
782
-
783
- function right(a, x, lo, hi) {
784
- if (lo == null) lo = 0;
785
- if (hi == null) hi = a.length;
786
- while (lo < hi) {
787
- const mid = (lo + hi) >>> 1;
788
- if (compare(a[mid], x) > 0) hi = mid;
789
- else lo = mid + 1;
790
- }
791
- return lo;
792
- }
793
-
794
- function center(a, x, lo, hi) {
795
- if (lo == null) lo = 0;
796
- if (hi == null) hi = a.length;
797
- const i = left(a, x, lo, hi - 1);
798
- return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;
799
- }
800
-
801
- return {left, center, right};
802
- }
803
-
804
- function ascendingComparator(f) {
805
- return (d, x) => ascending(f(d), x);
806
- }
807
-
808
- function number$1(x) {
809
- return x === null ? NaN : +x;
810
- }
811
-
812
- const ascendingBisect = bisector(ascending);
813
- const bisectRight = ascendingBisect.right;
814
- bisector(number$1).center;
815
-
816
- function getAugmentedNamespace(n) {
817
- if (n.__esModule) return n;
818
- var a = Object.defineProperty({}, '__esModule', {value: true});
819
- Object.keys(n).forEach(function (k) {
820
- var d = Object.getOwnPropertyDescriptor(n, k);
821
- Object.defineProperty(a, k, d.get ? d : {
822
- enumerable: true,
823
- get: function () {
824
- return n[k];
825
- }
826
- });
827
- });
828
- return a;
829
- }
830
-
831
- function createCommonjsModule(fn) {
832
- var module = { exports: {} };
833
- return fn(module, module.exports), module.exports;
834
- }
835
-
836
- var internmap = createCommonjsModule(function (module, exports) {
837
- // https://github.com/mbostock/internmap/ v1.0.1 Copyright 2021 Mike Bostock
838
- (function (global, factory) {
839
- factory(exports) ;
840
- }(this, (function (exports) {
841
- class InternMap extends Map {
842
- constructor(entries, key = keyof) {
843
- super();
844
- Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});
845
- if (entries != null) for (const [key, value] of entries) this.set(key, value);
846
- }
847
- get(key) {
848
- return super.get(intern_get(this, key));
849
- }
850
- has(key) {
851
- return super.has(intern_get(this, key));
852
- }
853
- set(key, value) {
854
- return super.set(intern_set(this, key), value);
855
- }
856
- delete(key) {
857
- return super.delete(intern_delete(this, key));
858
- }
859
- }
860
-
861
- class InternSet extends Set {
862
- constructor(values, key = keyof) {
863
- super();
864
- Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});
865
- if (values != null) for (const value of values) this.add(value);
866
- }
867
- has(value) {
868
- return super.has(intern_get(this, value));
869
- }
870
- add(value) {
871
- return super.add(intern_set(this, value));
872
- }
873
- delete(value) {
874
- return super.delete(intern_delete(this, value));
875
- }
876
- }
877
-
878
- function intern_get({_intern, _key}, value) {
879
- const key = _key(value);
880
- return _intern.has(key) ? _intern.get(key) : value;
881
- }
882
-
883
- function intern_set({_intern, _key}, value) {
884
- const key = _key(value);
885
- if (_intern.has(key)) return _intern.get(key);
886
- _intern.set(key, value);
887
- return value;
888
- }
889
-
890
- function intern_delete({_intern, _key}, value) {
891
- const key = _key(value);
892
- if (_intern.has(key)) {
893
- value = _intern.get(value);
894
- _intern.delete(key);
895
- }
896
- return value;
897
- }
898
-
899
- function keyof(value) {
900
- return value !== null && typeof value === "object" ? value.valueOf() : value;
901
- }
902
-
903
- exports.InternMap = InternMap;
904
- exports.InternSet = InternSet;
905
-
906
- Object.defineProperty(exports, '__esModule', { value: true });
907
-
908
- })));
909
- });
910
-
911
- function identity$1(x) {
912
- return x;
913
- }
914
-
915
- function group(values, ...keys) {
916
- return nest(values, identity$1, identity$1, keys);
917
- }
918
-
919
- function nest(values, map, reduce, keys) {
920
- return (function regroup(values, i) {
921
- if (i >= keys.length) return reduce(values);
922
- const groups = new internmap.InternMap();
923
- const keyof = keys[i++];
924
- let index = -1;
925
- for (const value of values) {
926
- const key = keyof(value, ++index, values);
927
- const group = groups.get(key);
928
- if (group) group.push(value);
929
- else groups.set(key, [value]);
930
- }
931
- for (const [key, values] of groups) {
932
- groups.set(key, regroup(values, i));
933
- }
934
- return map(groups);
935
- })(values, 0);
936
- }
937
-
938
- var e10 = Math.sqrt(50),
939
- e5 = Math.sqrt(10),
940
- e2 = Math.sqrt(2);
941
-
942
- function ticks(start, stop, count) {
943
- var reverse,
944
- i = -1,
945
- n,
946
- ticks,
947
- step;
948
-
949
- stop = +stop, start = +start, count = +count;
950
- if (start === stop && count > 0) return [start];
951
- if (reverse = stop < start) n = start, start = stop, stop = n;
952
- if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
953
-
954
- if (step > 0) {
955
- let r0 = Math.round(start / step), r1 = Math.round(stop / step);
956
- if (r0 * step < start) ++r0;
957
- if (r1 * step > stop) --r1;
958
- ticks = new Array(n = r1 - r0 + 1);
959
- while (++i < n) ticks[i] = (r0 + i) * step;
960
- } else {
961
- step = -step;
962
- let r0 = Math.round(start * step), r1 = Math.round(stop * step);
963
- if (r0 / step < start) ++r0;
964
- if (r1 / step > stop) --r1;
965
- ticks = new Array(n = r1 - r0 + 1);
966
- while (++i < n) ticks[i] = (r0 + i) / step;
967
- }
968
-
969
- if (reverse) ticks.reverse();
970
-
971
- return ticks;
972
- }
973
-
974
- function tickIncrement(start, stop, count) {
975
- var step = (stop - start) / Math.max(0, count),
976
- power = Math.floor(Math.log(step) / Math.LN10),
977
- error = step / Math.pow(10, power);
978
- return power >= 0
979
- ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
980
- : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
981
- }
982
-
983
- function tickStep(start, stop, count) {
984
- var step0 = Math.abs(stop - start) / Math.max(0, count),
985
- step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
986
- error = step0 / step1;
987
- if (error >= e10) step1 *= 10;
988
- else if (error >= e5) step1 *= 5;
989
- else if (error >= e2) step1 *= 2;
990
- return stop < start ? -step1 : step1;
991
- }
992
-
993
- const TOP_PADDING = 20;
994
- const PADDING = 2;
995
-
996
- const Node = ({ node, onMouseOver, onClick, selected }) => {
997
- const { getModuleColor } = F(StaticContext);
998
- const { backgroundColor, fontColor } = getModuleColor(node);
999
- const { x0, x1, y1, y0, data, children = null } = node;
1000
- const textRef = s();
1001
- const textRectRef = s();
1002
- const width = x1 - x0;
1003
- const height = y1 - y0;
1004
- const textProps = {
1005
- "font-size": "0.7em",
1006
- "dominant-baseline": "middle",
1007
- "text-anchor": "middle",
1008
- x: width / 2,
1009
- };
1010
- if (children != null) {
1011
- textProps.y = (TOP_PADDING + PADDING) / 2;
1012
- }
1013
- else {
1014
- textProps.y = height / 2;
1015
- }
1016
- h(() => {
1017
- if (width == 0 || height == 0) {
1018
- return;
1019
- }
1020
- if (textRectRef.current == null) {
1021
- textRectRef.current = textRef.current.getBoundingClientRect();
1022
- }
1023
- let scale = 1;
1024
- if (children != null) {
1025
- scale = Math.min((width * 0.9) / textRectRef.current.width, Math.min(height, TOP_PADDING + PADDING) / textRectRef.current.height);
1026
- scale = Math.min(1, scale);
1027
- textRef.current.setAttribute("y", String(Math.min(TOP_PADDING + PADDING, height) / 2 / scale));
1028
- textRef.current.setAttribute("x", String(width / 2 / scale));
1029
- }
1030
- else {
1031
- scale = Math.min((width * 0.9) / textRectRef.current.width, (height * 0.9) / textRectRef.current.height);
1032
- scale = Math.min(1, scale);
1033
- textRef.current.setAttribute("y", String(height / 2 / scale));
1034
- textRef.current.setAttribute("x", String(width / 2 / scale));
1035
- }
1036
- textRef.current.setAttribute("transform", `scale(${scale.toFixed(2)})`);
1037
- }, [children, height, width]);
1038
- if (width == 0 || height == 0) {
1039
- return null;
1040
- }
1041
- return (o$1("g", Object.assign({ className: "node", transform: `translate(${x0},${y0})`, onClick: (event) => {
1042
- event.stopPropagation();
1043
- onClick(node);
1044
- }, onMouseOver: (event) => {
1045
- event.stopPropagation();
1046
- onMouseOver(node);
1047
- } }, { children: [o$1("rect", { fill: backgroundColor, rx: 2, ry: 2, width: x1 - x0, height: y1 - y0, stroke: selected ? "#fff" : undefined, "stroke-width": selected ? 2 : undefined }, void 0),
1048
- o$1("text", Object.assign({ ref: textRef, fill: fontColor, onClick: (event) => {
1049
- var _a;
1050
- if (((_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.toString()) !== "") {
1051
- event.stopPropagation();
1052
- }
1053
- } }, textProps, { children: data.name }), void 0)] }), void 0));
1054
- };
1055
-
1056
- const TreeMap = ({ root, onNodeHover, selectedNode, onNodeClick }) => {
1057
- const { width, height, getModuleIds } = F(StaticContext);
1058
- console.time("layering");
1059
- // this will make groups by height
1060
- const nestedData = d(() => {
1061
- const nestedDataMap = group(root.descendants(), (d) => d.height);
1062
- const nestedData = Array.from(nestedDataMap, ([key, values]) => ({
1063
- key,
1064
- values,
1065
- }));
1066
- nestedData.sort((a, b) => b.key - a.key);
1067
- return nestedData;
1068
- }, [root]);
1069
- console.timeEnd("layering");
1070
- return (o$1("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${width} ${height}` }, { children: nestedData.map(({ key, values }) => {
1071
- return (o$1("g", Object.assign({ className: "layer" }, { children: values.map((node) => {
1072
- return (o$1(Node, { node: node, onMouseOver: onNodeHover, selected: selectedNode === node, onClick: onNodeClick }, getModuleIds(node.data).nodeUid.id));
1073
- }) }), key));
1074
- }) }), void 0));
1075
- };
1076
-
1077
- /*!
1078
- * bytes
1079
- * Copyright(c) 2012-2014 TJ Holowaychuk
1080
- * Copyright(c) 2015 Jed Watson
1081
- * MIT Licensed
1082
- */
1083
- var format_1 = format;
1084
-
1085
- /**
1086
- * Module variables.
1087
- * @private
1088
- */
1089
-
1090
- var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
1091
-
1092
- var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
1093
-
1094
- var map = {
1095
- b: 1,
1096
- kb: 1 << 10,
1097
- mb: 1 << 20,
1098
- gb: 1 << 30,
1099
- tb: Math.pow(1024, 4),
1100
- pb: Math.pow(1024, 5),
1101
- };
1102
-
1103
- /**
1104
- * Format the given value in bytes into a string.
1105
- *
1106
- * If the value is negative, it is kept as such. If it is a float,
1107
- * it is rounded.
1108
- *
1109
- * @param {number} value
1110
- * @param {object} [options]
1111
- * @param {number} [options.decimalPlaces=2]
1112
- * @param {number} [options.fixedDecimals=false]
1113
- * @param {string} [options.thousandsSeparator=]
1114
- * @param {string} [options.unit=]
1115
- * @param {string} [options.unitSeparator=]
1116
- *
1117
- * @returns {string|null}
1118
- * @public
1119
- */
1120
-
1121
- function format(value, options) {
1122
- if (!Number.isFinite(value)) {
1123
- return null;
1124
- }
1125
-
1126
- var mag = Math.abs(value);
1127
- var thousandsSeparator = (options && options.thousandsSeparator) || '';
1128
- var unitSeparator = (options && options.unitSeparator) || '';
1129
- var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2;
1130
- var fixedDecimals = Boolean(options && options.fixedDecimals);
1131
- var unit = (options && options.unit) || '';
1132
-
1133
- if (!unit || !map[unit.toLowerCase()]) {
1134
- if (mag >= map.pb) {
1135
- unit = 'PB';
1136
- } else if (mag >= map.tb) {
1137
- unit = 'TB';
1138
- } else if (mag >= map.gb) {
1139
- unit = 'GB';
1140
- } else if (mag >= map.mb) {
1141
- unit = 'MB';
1142
- } else if (mag >= map.kb) {
1143
- unit = 'KB';
1144
- } else {
1145
- unit = 'B';
1146
- }
1147
- }
1148
-
1149
- var val = value / map[unit.toLowerCase()];
1150
- var str = val.toFixed(decimalPlaces);
1151
-
1152
- if (!fixedDecimals) {
1153
- str = str.replace(formatDecimalsRegExp, '$1');
1154
- }
1155
-
1156
- if (thousandsSeparator) {
1157
- str = str.replace(formatThousandsRegExp, thousandsSeparator);
1158
- }
1159
-
1160
- return str + unitSeparator + unit;
1161
- }
1162
-
1163
- const Tooltip_marginX = 10;
1164
- const Tooltip_marginY = 30;
1165
- const SOURCEMAP_RENDERED = (o$1("span", { children: [" ", o$1("b", { children: LABELS.renderedLength }, void 0), " is a number of characters in the file after individual and ", o$1("br", {}, void 0), " whole bundle transformations according to sourcemap."] }, void 0));
1166
- const RENDRED = (o$1("span", { children: [o$1("b", { children: LABELS.renderedLength }, void 0), " is a byte size of individual file after transformations and treeshake."] }, void 0));
1167
- const COMPRESSED = (o$1("span", { children: [o$1("b", { children: LABELS.gzipLength }, void 0), " and ", o$1("b", { children: LABELS.brotliLength }, void 0), " is a byte size of individual file after individual", " ", "transformations,", o$1("br", {}, void 0), " treeshake and compression."] }, void 0));
1168
- const Tooltip = ({ node, visible, root, sizeProperty }) => {
1169
- const { availableSizeProperties, getModuleSize, data } = F(StaticContext);
1170
- const ref = s();
1171
- const [style, setStyle] = l({});
1172
- const content = d(() => {
1173
- if (!node)
1174
- return null;
1175
- const mainSize = getModuleSize(node.data, sizeProperty);
1176
- const percentageNum = (100 * mainSize) / getModuleSize(root.data, sizeProperty);
1177
- const percentage = percentageNum.toFixed(2);
1178
- const percentageString = percentage + "%";
1179
- const path = node
1180
- .ancestors()
1181
- .reverse()
1182
- .map((d) => d.data.name)
1183
- .join("/");
1184
- let dataNode = null;
1185
- if (!isModuleTree(node.data)) {
1186
- const mainUid = data.nodeParts[node.data.uid].mainUid;
1187
- dataNode = data.nodeMetas[mainUid];
1188
- }
1189
- return (o$1(y$1, { children: [o$1("div", { children: path }, void 0),
1190
- availableSizeProperties.map((sizeProp) => {
1191
- if (sizeProp === sizeProperty) {
1192
- return (o$1("div", { children: [o$1("b", { children: [LABELS[sizeProp], ": ", format_1(mainSize)] }, void 0), " ", "(", percentageString, ")"] }, void 0));
1193
- }
1194
- else {
1195
- return (o$1("div", { children: [LABELS[sizeProp], ": ", format_1(getModuleSize(node.data, sizeProp))] }, void 0));
1196
- }
1197
- }),
1198
- o$1("br", {}, void 0),
1199
- dataNode && dataNode.importedBy.length > 0 && (o$1("div", { children: [o$1("div", { children: [o$1("b", { children: "Imported By" }, void 0), ":"] }, void 0),
1200
- dataNode.importedBy.map(({ uid }) => {
1201
- const id = data.nodeMetas[uid].id;
1202
- return o$1("div", { children: id }, id);
1203
- })] }, void 0)),
1204
- o$1("br", {}, void 0),
1205
- o$1("small", { children: data.options.sourcemap ? SOURCEMAP_RENDERED : RENDRED }, void 0),
1206
- (data.options.gzip || data.options.brotli) && (o$1(y$1, { children: [o$1("br", {}, void 0),
1207
- o$1("small", { children: COMPRESSED }, void 0)] }, void 0))] }, void 0));
1208
- }, [availableSizeProperties, data, getModuleSize, node, root.data, sizeProperty]);
1209
- const updatePosition = (mouseCoords) => {
1210
- const pos = {
1211
- left: mouseCoords.x + Tooltip_marginX,
1212
- top: mouseCoords.y + Tooltip_marginY,
1213
- };
1214
- const boundingRect = ref.current.getBoundingClientRect();
1215
- if (pos.left + boundingRect.width > window.innerWidth) {
1216
- // Shifting horizontally
1217
- pos.left = window.innerWidth - boundingRect.width;
1218
- }
1219
- if (pos.top + boundingRect.height > window.innerHeight) {
1220
- // Flipping vertically
1221
- pos.top = mouseCoords.y - Tooltip_marginY - boundingRect.height;
1222
- }
1223
- setStyle(pos);
1224
- };
1225
- y(() => {
1226
- const handleMouseMove = (event) => {
1227
- updatePosition({
1228
- x: event.pageX,
1229
- y: event.pageY,
1230
- });
1231
- };
1232
- document.addEventListener("mousemove", handleMouseMove, true);
1233
- return () => {
1234
- document.removeEventListener("mousemove", handleMouseMove, true);
1235
- };
1236
- }, []);
1237
- return (o$1("div", Object.assign({ className: `tooltip ${visible ? "" : "tooltip-hidden"}`, ref: ref, style: style }, { children: content }), void 0));
1238
- };
1239
-
1240
- const Chart = ({ root, sizeProperty, selectedNode, setSelectedNode }) => {
1241
- const [showTooltip, setShowTooltip] = l(false);
1242
- const [tooltipNode, setTooltipNode] = l(undefined);
1243
- y(() => {
1244
- const handleMouseOut = () => {
1245
- setShowTooltip(false);
1246
- };
1247
- document.addEventListener("mouseover", handleMouseOut);
1248
- return () => {
1249
- document.removeEventListener("mouseover", handleMouseOut);
1250
- };
1251
- }, []);
1252
- return (o$1(y$1, { children: [o$1(TreeMap, { root: root, onNodeHover: (node) => {
1253
- setTooltipNode(node);
1254
- setShowTooltip(true);
1255
- }, selectedNode: selectedNode, onNodeClick: (node) => {
1256
- setSelectedNode(selectedNode === node ? undefined : node);
1257
- } }, void 0),
1258
- o$1(Tooltip, { visible: showTooltip, node: tooltipNode, root: root, sizeProperty: sizeProperty }, void 0)] }, void 0));
1259
- };
1260
-
1261
- const Main = () => {
1262
- const { availableSizeProperties, rawHierarchy, getModuleSize, layout, data } = F(StaticContext);
1263
- const [sizeProperty, setSizeProperty] = l(availableSizeProperties[0]);
1264
- const [selectedNode, setSelectedNode] = l(undefined);
1265
- const { getModuleFilterMultiplier, setExcludeFilter, setIncludeFilter } = useFilter();
1266
- console.time("getNodeSizeMultiplier");
1267
- const getNodeSizeMultiplier = d(() => {
1268
- const rootSize = getModuleSize(rawHierarchy.data, sizeProperty);
1269
- const selectedSize = selectedNode ? getModuleSize(selectedNode.data, sizeProperty) : 1;
1270
- const multiplier = rootSize * 0.2 > selectedSize ? (rootSize * 0.2) / selectedSize : 3;
1271
- if (selectedNode === undefined) {
1272
- return () => 1;
1273
- }
1274
- else if (isModuleTree(selectedNode.data)) {
1275
- const leaves = new Set(selectedNode.leaves().map((d) => d.data));
1276
- return (node) => {
1277
- if (leaves.has(node)) {
1278
- return multiplier;
1279
- }
1280
- return 1;
1281
- };
1282
- }
1283
- else {
1284
- return (node) => {
1285
- if (node === selectedNode.data) {
1286
- return multiplier;
1287
- }
1288
- return 1;
1289
- };
1290
- }
1291
- }, [getModuleSize, rawHierarchy.data, selectedNode, sizeProperty]);
1292
- console.timeEnd("getNodeSizeMultiplier");
1293
- console.time("root hierarchy compute");
1294
- // root here always be the same as rawHierarchy even after layouting
1295
- const root = d(() => {
1296
- const rootWithSizesAndSorted = rawHierarchy
1297
- .sum((node) => {
1298
- if (isModuleTree(node))
1299
- return 0;
1300
- const ownSize = getModuleSize(node, sizeProperty);
1301
- const zoomMultiplier = getNodeSizeMultiplier(node);
1302
- const filterMultiplier = getModuleFilterMultiplier(data.nodeMetas[data.nodeParts[node.uid].mainUid]);
1303
- return ownSize * zoomMultiplier * filterMultiplier;
1304
- })
1305
- .sort((a, b) => getModuleSize(a.data, sizeProperty) - getModuleSize(b.data, sizeProperty));
1306
- return layout(rootWithSizesAndSorted);
1307
- }, [data, getModuleFilterMultiplier, getModuleSize, getNodeSizeMultiplier, layout, rawHierarchy, sizeProperty]);
1308
- console.timeEnd("root hierarchy compute");
1309
- return (o$1(y$1, { children: [o$1(SideBar, { sizeProperty: sizeProperty, availableSizeProperties: availableSizeProperties, setSizeProperty: setSizeProperty, onExcludeChange: setExcludeFilter, onIncludeChange: setIncludeFilter }, void 0),
1310
- o$1(Chart, { root: root, sizeProperty: sizeProperty, selectedNode: selectedNode, setSelectedNode: setSelectedNode }, void 0)] }, void 0));
1311
- };
1312
-
1313
- function initRange(domain, range) {
1314
- switch (arguments.length) {
1315
- case 0: break;
1316
- case 1: this.range(domain); break;
1317
- default: this.range(range).domain(domain); break;
1318
- }
1319
- return this;
1320
- }
1321
-
1322
- function initInterpolator(domain, interpolator) {
1323
- switch (arguments.length) {
1324
- case 0: break;
1325
- case 1: {
1326
- if (typeof domain === "function") this.interpolator(domain);
1327
- else this.range(domain);
1328
- break;
1329
- }
1330
- default: {
1331
- this.domain(domain);
1332
- if (typeof interpolator === "function") this.interpolator(interpolator);
1333
- else this.range(interpolator);
1334
- break;
1335
- }
1336
- }
1337
- return this;
1338
- }
1339
-
1340
- function define(constructor, factory, prototype) {
1341
- constructor.prototype = factory.prototype = prototype;
1342
- prototype.constructor = constructor;
1343
- }
1344
-
1345
- function extend(parent, definition) {
1346
- var prototype = Object.create(parent.prototype);
1347
- for (var key in definition) prototype[key] = definition[key];
1348
- return prototype;
1349
- }
1350
-
1351
- function Color() {}
1352
-
1353
- var darker = 0.7;
1354
- var brighter = 1 / darker;
1355
-
1356
- var reI = "\\s*([+-]?\\d+)\\s*",
1357
- reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
1358
- reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
1359
- reHex = /^#([0-9a-f]{3,8})$/,
1360
- reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
1361
- reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
1362
- reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
1363
- reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
1364
- reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
1365
- reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
1366
-
1367
- var named = {
1368
- aliceblue: 0xf0f8ff,
1369
- antiquewhite: 0xfaebd7,
1370
- aqua: 0x00ffff,
1371
- aquamarine: 0x7fffd4,
1372
- azure: 0xf0ffff,
1373
- beige: 0xf5f5dc,
1374
- bisque: 0xffe4c4,
1375
- black: 0x000000,
1376
- blanchedalmond: 0xffebcd,
1377
- blue: 0x0000ff,
1378
- blueviolet: 0x8a2be2,
1379
- brown: 0xa52a2a,
1380
- burlywood: 0xdeb887,
1381
- cadetblue: 0x5f9ea0,
1382
- chartreuse: 0x7fff00,
1383
- chocolate: 0xd2691e,
1384
- coral: 0xff7f50,
1385
- cornflowerblue: 0x6495ed,
1386
- cornsilk: 0xfff8dc,
1387
- crimson: 0xdc143c,
1388
- cyan: 0x00ffff,
1389
- darkblue: 0x00008b,
1390
- darkcyan: 0x008b8b,
1391
- darkgoldenrod: 0xb8860b,
1392
- darkgray: 0xa9a9a9,
1393
- darkgreen: 0x006400,
1394
- darkgrey: 0xa9a9a9,
1395
- darkkhaki: 0xbdb76b,
1396
- darkmagenta: 0x8b008b,
1397
- darkolivegreen: 0x556b2f,
1398
- darkorange: 0xff8c00,
1399
- darkorchid: 0x9932cc,
1400
- darkred: 0x8b0000,
1401
- darksalmon: 0xe9967a,
1402
- darkseagreen: 0x8fbc8f,
1403
- darkslateblue: 0x483d8b,
1404
- darkslategray: 0x2f4f4f,
1405
- darkslategrey: 0x2f4f4f,
1406
- darkturquoise: 0x00ced1,
1407
- darkviolet: 0x9400d3,
1408
- deeppink: 0xff1493,
1409
- deepskyblue: 0x00bfff,
1410
- dimgray: 0x696969,
1411
- dimgrey: 0x696969,
1412
- dodgerblue: 0x1e90ff,
1413
- firebrick: 0xb22222,
1414
- floralwhite: 0xfffaf0,
1415
- forestgreen: 0x228b22,
1416
- fuchsia: 0xff00ff,
1417
- gainsboro: 0xdcdcdc,
1418
- ghostwhite: 0xf8f8ff,
1419
- gold: 0xffd700,
1420
- goldenrod: 0xdaa520,
1421
- gray: 0x808080,
1422
- green: 0x008000,
1423
- greenyellow: 0xadff2f,
1424
- grey: 0x808080,
1425
- honeydew: 0xf0fff0,
1426
- hotpink: 0xff69b4,
1427
- indianred: 0xcd5c5c,
1428
- indigo: 0x4b0082,
1429
- ivory: 0xfffff0,
1430
- khaki: 0xf0e68c,
1431
- lavender: 0xe6e6fa,
1432
- lavenderblush: 0xfff0f5,
1433
- lawngreen: 0x7cfc00,
1434
- lemonchiffon: 0xfffacd,
1435
- lightblue: 0xadd8e6,
1436
- lightcoral: 0xf08080,
1437
- lightcyan: 0xe0ffff,
1438
- lightgoldenrodyellow: 0xfafad2,
1439
- lightgray: 0xd3d3d3,
1440
- lightgreen: 0x90ee90,
1441
- lightgrey: 0xd3d3d3,
1442
- lightpink: 0xffb6c1,
1443
- lightsalmon: 0xffa07a,
1444
- lightseagreen: 0x20b2aa,
1445
- lightskyblue: 0x87cefa,
1446
- lightslategray: 0x778899,
1447
- lightslategrey: 0x778899,
1448
- lightsteelblue: 0xb0c4de,
1449
- lightyellow: 0xffffe0,
1450
- lime: 0x00ff00,
1451
- limegreen: 0x32cd32,
1452
- linen: 0xfaf0e6,
1453
- magenta: 0xff00ff,
1454
- maroon: 0x800000,
1455
- mediumaquamarine: 0x66cdaa,
1456
- mediumblue: 0x0000cd,
1457
- mediumorchid: 0xba55d3,
1458
- mediumpurple: 0x9370db,
1459
- mediumseagreen: 0x3cb371,
1460
- mediumslateblue: 0x7b68ee,
1461
- mediumspringgreen: 0x00fa9a,
1462
- mediumturquoise: 0x48d1cc,
1463
- mediumvioletred: 0xc71585,
1464
- midnightblue: 0x191970,
1465
- mintcream: 0xf5fffa,
1466
- mistyrose: 0xffe4e1,
1467
- moccasin: 0xffe4b5,
1468
- navajowhite: 0xffdead,
1469
- navy: 0x000080,
1470
- oldlace: 0xfdf5e6,
1471
- olive: 0x808000,
1472
- olivedrab: 0x6b8e23,
1473
- orange: 0xffa500,
1474
- orangered: 0xff4500,
1475
- orchid: 0xda70d6,
1476
- palegoldenrod: 0xeee8aa,
1477
- palegreen: 0x98fb98,
1478
- paleturquoise: 0xafeeee,
1479
- palevioletred: 0xdb7093,
1480
- papayawhip: 0xffefd5,
1481
- peachpuff: 0xffdab9,
1482
- peru: 0xcd853f,
1483
- pink: 0xffc0cb,
1484
- plum: 0xdda0dd,
1485
- powderblue: 0xb0e0e6,
1486
- purple: 0x800080,
1487
- rebeccapurple: 0x663399,
1488
- red: 0xff0000,
1489
- rosybrown: 0xbc8f8f,
1490
- royalblue: 0x4169e1,
1491
- saddlebrown: 0x8b4513,
1492
- salmon: 0xfa8072,
1493
- sandybrown: 0xf4a460,
1494
- seagreen: 0x2e8b57,
1495
- seashell: 0xfff5ee,
1496
- sienna: 0xa0522d,
1497
- silver: 0xc0c0c0,
1498
- skyblue: 0x87ceeb,
1499
- slateblue: 0x6a5acd,
1500
- slategray: 0x708090,
1501
- slategrey: 0x708090,
1502
- snow: 0xfffafa,
1503
- springgreen: 0x00ff7f,
1504
- steelblue: 0x4682b4,
1505
- tan: 0xd2b48c,
1506
- teal: 0x008080,
1507
- thistle: 0xd8bfd8,
1508
- tomato: 0xff6347,
1509
- turquoise: 0x40e0d0,
1510
- violet: 0xee82ee,
1511
- wheat: 0xf5deb3,
1512
- white: 0xffffff,
1513
- whitesmoke: 0xf5f5f5,
1514
- yellow: 0xffff00,
1515
- yellowgreen: 0x9acd32
1516
- };
1517
-
1518
- define(Color, color, {
1519
- copy: function(channels) {
1520
- return Object.assign(new this.constructor, this, channels);
1521
- },
1522
- displayable: function() {
1523
- return this.rgb().displayable();
1524
- },
1525
- hex: color_formatHex, // Deprecated! Use color.formatHex.
1526
- formatHex: color_formatHex,
1527
- formatHsl: color_formatHsl,
1528
- formatRgb: color_formatRgb,
1529
- toString: color_formatRgb
1530
- });
1531
-
1532
- function color_formatHex() {
1533
- return this.rgb().formatHex();
1534
- }
1535
-
1536
- function color_formatHsl() {
1537
- return hslConvert(this).formatHsl();
1538
- }
1539
-
1540
- function color_formatRgb() {
1541
- return this.rgb().formatRgb();
1542
- }
1543
-
1544
- function color(format) {
1545
- var m, l;
1546
- format = (format + "").trim().toLowerCase();
1547
- return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
1548
- : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
1549
- : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
1550
- : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
1551
- : null) // invalid hex
1552
- : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
1553
- : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
1554
- : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
1555
- : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
1556
- : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
1557
- : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
1558
- : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
1559
- : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
1560
- : null;
1561
- }
1562
-
1563
- function rgbn(n) {
1564
- return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
1565
- }
1566
-
1567
- function rgba(r, g, b, a) {
1568
- if (a <= 0) r = g = b = NaN;
1569
- return new Rgb(r, g, b, a);
1570
- }
1571
-
1572
- function rgbConvert(o) {
1573
- if (!(o instanceof Color)) o = color(o);
1574
- if (!o) return new Rgb;
1575
- o = o.rgb();
1576
- return new Rgb(o.r, o.g, o.b, o.opacity);
1577
- }
1578
-
1579
- function rgb(r, g, b, opacity) {
1580
- return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
1581
- }
1582
-
1583
- function Rgb(r, g, b, opacity) {
1584
- this.r = +r;
1585
- this.g = +g;
1586
- this.b = +b;
1587
- this.opacity = +opacity;
1588
- }
1589
-
1590
- define(Rgb, rgb, extend(Color, {
1591
- brighter: function(k) {
1592
- k = k == null ? brighter : Math.pow(brighter, k);
1593
- return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
1594
- },
1595
- darker: function(k) {
1596
- k = k == null ? darker : Math.pow(darker, k);
1597
- return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
1598
- },
1599
- rgb: function() {
1600
- return this;
1601
- },
1602
- displayable: function() {
1603
- return (-0.5 <= this.r && this.r < 255.5)
1604
- && (-0.5 <= this.g && this.g < 255.5)
1605
- && (-0.5 <= this.b && this.b < 255.5)
1606
- && (0 <= this.opacity && this.opacity <= 1);
1607
- },
1608
- hex: rgb_formatHex, // Deprecated! Use color.formatHex.
1609
- formatHex: rgb_formatHex,
1610
- formatRgb: rgb_formatRgb,
1611
- toString: rgb_formatRgb
1612
- }));
1613
-
1614
- function rgb_formatHex() {
1615
- return "#" + hex(this.r) + hex(this.g) + hex(this.b);
1616
- }
1617
-
1618
- function rgb_formatRgb() {
1619
- var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
1620
- return (a === 1 ? "rgb(" : "rgba(")
1621
- + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
1622
- + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
1623
- + Math.max(0, Math.min(255, Math.round(this.b) || 0))
1624
- + (a === 1 ? ")" : ", " + a + ")");
1625
- }
1626
-
1627
- function hex(value) {
1628
- value = Math.max(0, Math.min(255, Math.round(value) || 0));
1629
- return (value < 16 ? "0" : "") + value.toString(16);
1630
- }
1631
-
1632
- function hsla(h, s, l, a) {
1633
- if (a <= 0) h = s = l = NaN;
1634
- else if (l <= 0 || l >= 1) h = s = NaN;
1635
- else if (s <= 0) h = NaN;
1636
- return new Hsl(h, s, l, a);
1637
- }
1638
-
1639
- function hslConvert(o) {
1640
- if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
1641
- if (!(o instanceof Color)) o = color(o);
1642
- if (!o) return new Hsl;
1643
- if (o instanceof Hsl) return o;
1644
- o = o.rgb();
1645
- var r = o.r / 255,
1646
- g = o.g / 255,
1647
- b = o.b / 255,
1648
- min = Math.min(r, g, b),
1649
- max = Math.max(r, g, b),
1650
- h = NaN,
1651
- s = max - min,
1652
- l = (max + min) / 2;
1653
- if (s) {
1654
- if (r === max) h = (g - b) / s + (g < b) * 6;
1655
- else if (g === max) h = (b - r) / s + 2;
1656
- else h = (r - g) / s + 4;
1657
- s /= l < 0.5 ? max + min : 2 - max - min;
1658
- h *= 60;
1659
- } else {
1660
- s = l > 0 && l < 1 ? 0 : h;
1661
- }
1662
- return new Hsl(h, s, l, o.opacity);
1663
- }
1664
-
1665
- function hsl(h, s, l, opacity) {
1666
- return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
1667
- }
1668
-
1669
- function Hsl(h, s, l, opacity) {
1670
- this.h = +h;
1671
- this.s = +s;
1672
- this.l = +l;
1673
- this.opacity = +opacity;
1674
- }
1675
-
1676
- define(Hsl, hsl, extend(Color, {
1677
- brighter: function(k) {
1678
- k = k == null ? brighter : Math.pow(brighter, k);
1679
- return new Hsl(this.h, this.s, this.l * k, this.opacity);
1680
- },
1681
- darker: function(k) {
1682
- k = k == null ? darker : Math.pow(darker, k);
1683
- return new Hsl(this.h, this.s, this.l * k, this.opacity);
1684
- },
1685
- rgb: function() {
1686
- var h = this.h % 360 + (this.h < 0) * 360,
1687
- s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
1688
- l = this.l,
1689
- m2 = l + (l < 0.5 ? l : 1 - l) * s,
1690
- m1 = 2 * l - m2;
1691
- return new Rgb(
1692
- hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
1693
- hsl2rgb(h, m1, m2),
1694
- hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
1695
- this.opacity
1696
- );
1697
- },
1698
- displayable: function() {
1699
- return (0 <= this.s && this.s <= 1 || isNaN(this.s))
1700
- && (0 <= this.l && this.l <= 1)
1701
- && (0 <= this.opacity && this.opacity <= 1);
1702
- },
1703
- formatHsl: function() {
1704
- var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
1705
- return (a === 1 ? "hsl(" : "hsla(")
1706
- + (this.h || 0) + ", "
1707
- + (this.s || 0) * 100 + "%, "
1708
- + (this.l || 0) * 100 + "%"
1709
- + (a === 1 ? ")" : ", " + a + ")");
1710
- }
1711
- }));
1712
-
1713
- /* From FvD 13.37, CSS Color Module Level 3 */
1714
- function hsl2rgb(h, m1, m2) {
1715
- return (h < 60 ? m1 + (m2 - m1) * h / 60
1716
- : h < 180 ? m2
1717
- : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
1718
- : m1) * 255;
1719
- }
1720
-
1721
- const radians = Math.PI / 180;
1722
- const degrees = 180 / Math.PI;
1723
-
1724
- // https://observablehq.com/@mbostock/lab-and-rgb
1725
- const K = 18,
1726
- Xn = 0.96422,
1727
- Yn = 1,
1728
- Zn = 0.82521,
1729
- t0 = 4 / 29,
1730
- t1 = 6 / 29,
1731
- t2 = 3 * t1 * t1,
1732
- t3 = t1 * t1 * t1;
1733
-
1734
- function labConvert(o) {
1735
- if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
1736
- if (o instanceof Hcl) return hcl2lab(o);
1737
- if (!(o instanceof Rgb)) o = rgbConvert(o);
1738
- var r = rgb2lrgb(o.r),
1739
- g = rgb2lrgb(o.g),
1740
- b = rgb2lrgb(o.b),
1741
- y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
1742
- if (r === g && g === b) x = z = y; else {
1743
- x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
1744
- z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
1745
- }
1746
- return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
1747
- }
1748
-
1749
- function gray(l, opacity) {
1750
- return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
1751
- }
1752
-
1753
- function lab(l, a, b, opacity) {
1754
- return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
1755
- }
1756
-
1757
- function Lab(l, a, b, opacity) {
1758
- this.l = +l;
1759
- this.a = +a;
1760
- this.b = +b;
1761
- this.opacity = +opacity;
1762
- }
1763
-
1764
- define(Lab, lab, extend(Color, {
1765
- brighter: function(k) {
1766
- return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
1767
- },
1768
- darker: function(k) {
1769
- return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
1770
- },
1771
- rgb: function() {
1772
- var y = (this.l + 16) / 116,
1773
- x = isNaN(this.a) ? y : y + this.a / 500,
1774
- z = isNaN(this.b) ? y : y - this.b / 200;
1775
- x = Xn * lab2xyz(x);
1776
- y = Yn * lab2xyz(y);
1777
- z = Zn * lab2xyz(z);
1778
- return new Rgb(
1779
- lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
1780
- lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
1781
- lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
1782
- this.opacity
1783
- );
1784
- }
1785
- }));
1786
-
1787
- function xyz2lab(t) {
1788
- return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
1789
- }
1790
-
1791
- function lab2xyz(t) {
1792
- return t > t1 ? t * t * t : t2 * (t - t0);
1793
- }
1794
-
1795
- function lrgb2rgb(x) {
1796
- return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
1797
- }
1798
-
1799
- function rgb2lrgb(x) {
1800
- return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
1801
- }
1802
-
1803
- function hclConvert(o) {
1804
- if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
1805
- if (!(o instanceof Lab)) o = labConvert(o);
1806
- if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
1807
- var h = Math.atan2(o.b, o.a) * degrees;
1808
- return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
1809
- }
1810
-
1811
- function lch(l, c, h, opacity) {
1812
- return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
1813
- }
1814
-
1815
- function hcl(h, c, l, opacity) {
1816
- return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
1817
- }
1818
-
1819
- function Hcl(h, c, l, opacity) {
1820
- this.h = +h;
1821
- this.c = +c;
1822
- this.l = +l;
1823
- this.opacity = +opacity;
1824
- }
1825
-
1826
- function hcl2lab(o) {
1827
- if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
1828
- var h = o.h * radians;
1829
- return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
1830
- }
1831
-
1832
- define(Hcl, hcl, extend(Color, {
1833
- brighter: function(k) {
1834
- return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
1835
- },
1836
- darker: function(k) {
1837
- return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
1838
- },
1839
- rgb: function() {
1840
- return hcl2lab(this).rgb();
1841
- }
1842
- }));
1843
-
1844
- var A = -0.14861,
1845
- B = +1.78277,
1846
- C = -0.29227,
1847
- D = -0.90649,
1848
- E = +1.97294,
1849
- ED = E * D,
1850
- EB = E * B,
1851
- BC_DA = B * C - D * A;
1852
-
1853
- function cubehelixConvert(o) {
1854
- if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
1855
- if (!(o instanceof Rgb)) o = rgbConvert(o);
1856
- var r = o.r / 255,
1857
- g = o.g / 255,
1858
- b = o.b / 255,
1859
- l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
1860
- bl = b - l,
1861
- k = (E * (g - l) - C * bl) / D,
1862
- s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
1863
- h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;
1864
- return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
1865
- }
1866
-
1867
- function cubehelix(h, s, l, opacity) {
1868
- return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
1869
- }
1870
-
1871
- function Cubehelix(h, s, l, opacity) {
1872
- this.h = +h;
1873
- this.s = +s;
1874
- this.l = +l;
1875
- this.opacity = +opacity;
1876
- }
1877
-
1878
- define(Cubehelix, cubehelix, extend(Color, {
1879
- brighter: function(k) {
1880
- k = k == null ? brighter : Math.pow(brighter, k);
1881
- return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
1882
- },
1883
- darker: function(k) {
1884
- k = k == null ? darker : Math.pow(darker, k);
1885
- return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
1886
- },
1887
- rgb: function() {
1888
- var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,
1889
- l = +this.l,
1890
- a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
1891
- cosh = Math.cos(h),
1892
- sinh = Math.sin(h);
1893
- return new Rgb(
1894
- 255 * (l + a * (A * cosh + B * sinh)),
1895
- 255 * (l + a * (C * cosh + D * sinh)),
1896
- 255 * (l + a * (E * cosh)),
1897
- this.opacity
1898
- );
1899
- }
1900
- }));
1901
-
1902
- var src = /*#__PURE__*/Object.freeze({
1903
- __proto__: null,
1904
- color: color,
1905
- rgb: rgb,
1906
- hsl: hsl,
1907
- lab: lab,
1908
- hcl: hcl,
1909
- lch: lch,
1910
- gray: gray,
1911
- cubehelix: cubehelix
1912
- });
1913
-
1914
- var require$$0 = /*@__PURE__*/getAugmentedNamespace(src);
1915
-
1916
- var d3Interpolate = createCommonjsModule(function (module, exports) {
1917
- // https://d3js.org/d3-interpolate/ v2.0.1 Copyright 2020 Mike Bostock
1918
- (function (global, factory) {
1919
- factory(exports, require$$0) ;
1920
- }(this, function (exports, d3Color) {
1921
- function basis(t1, v0, v1, v2, v3) {
1922
- var t2 = t1 * t1, t3 = t2 * t1;
1923
- return ((1 - 3 * t1 + 3 * t2 - t3) * v0
1924
- + (4 - 6 * t2 + 3 * t3) * v1
1925
- + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2
1926
- + t3 * v3) / 6;
1927
- }
1928
-
1929
- function basis$1(values) {
1930
- var n = values.length - 1;
1931
- return function(t) {
1932
- var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),
1933
- v1 = values[i],
1934
- v2 = values[i + 1],
1935
- v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,
1936
- v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
1937
- return basis((t - i / n) * n, v0, v1, v2, v3);
1938
- };
1939
- }
1940
-
1941
- function basisClosed(values) {
1942
- var n = values.length;
1943
- return function(t) {
1944
- var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),
1945
- v0 = values[(i + n - 1) % n],
1946
- v1 = values[i % n],
1947
- v2 = values[(i + 1) % n],
1948
- v3 = values[(i + 2) % n];
1949
- return basis((t - i / n) * n, v0, v1, v2, v3);
1950
- };
1951
- }
1952
-
1953
- var constant = x => () => x;
1954
-
1955
- function linear(a, d) {
1956
- return function(t) {
1957
- return a + t * d;
1958
- };
1959
- }
1960
-
1961
- function exponential(a, b, y) {
1962
- return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {
1963
- return Math.pow(a + t * b, y);
1964
- };
1965
- }
1966
-
1967
- function hue(a, b) {
1968
- var d = b - a;
1969
- return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);
1970
- }
1971
-
1972
- function gamma(y) {
1973
- return (y = +y) === 1 ? nogamma : function(a, b) {
1974
- return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);
1975
- };
1976
- }
1977
-
1978
- function nogamma(a, b) {
1979
- var d = b - a;
1980
- return d ? linear(a, d) : constant(isNaN(a) ? b : a);
1981
- }
1982
-
1983
- var rgb = (function rgbGamma(y) {
1984
- var color = gamma(y);
1985
-
1986
- function rgb(start, end) {
1987
- var r = color((start = d3Color.rgb(start)).r, (end = d3Color.rgb(end)).r),
1988
- g = color(start.g, end.g),
1989
- b = color(start.b, end.b),
1990
- opacity = nogamma(start.opacity, end.opacity);
1991
- return function(t) {
1992
- start.r = r(t);
1993
- start.g = g(t);
1994
- start.b = b(t);
1995
- start.opacity = opacity(t);
1996
- return start + "";
1997
- };
1998
- }
1999
-
2000
- rgb.gamma = rgbGamma;
2001
-
2002
- return rgb;
2003
- })(1);
2004
-
2005
- function rgbSpline(spline) {
2006
- return function(colors) {
2007
- var n = colors.length,
2008
- r = new Array(n),
2009
- g = new Array(n),
2010
- b = new Array(n),
2011
- i, color;
2012
- for (i = 0; i < n; ++i) {
2013
- color = d3Color.rgb(colors[i]);
2014
- r[i] = color.r || 0;
2015
- g[i] = color.g || 0;
2016
- b[i] = color.b || 0;
2017
- }
2018
- r = spline(r);
2019
- g = spline(g);
2020
- b = spline(b);
2021
- color.opacity = 1;
2022
- return function(t) {
2023
- color.r = r(t);
2024
- color.g = g(t);
2025
- color.b = b(t);
2026
- return color + "";
2027
- };
2028
- };
2029
- }
2030
-
2031
- var rgbBasis = rgbSpline(basis$1);
2032
- var rgbBasisClosed = rgbSpline(basisClosed);
2033
-
2034
- function numberArray(a, b) {
2035
- if (!b) b = [];
2036
- var n = a ? Math.min(b.length, a.length) : 0,
2037
- c = b.slice(),
2038
- i;
2039
- return function(t) {
2040
- for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
2041
- return c;
2042
- };
2043
- }
2044
-
2045
- function isNumberArray(x) {
2046
- return ArrayBuffer.isView(x) && !(x instanceof DataView);
2047
- }
2048
-
2049
- function array(a, b) {
2050
- return (isNumberArray(b) ? numberArray : genericArray)(a, b);
2051
- }
2052
-
2053
- function genericArray(a, b) {
2054
- var nb = b ? b.length : 0,
2055
- na = a ? Math.min(nb, a.length) : 0,
2056
- x = new Array(na),
2057
- c = new Array(nb),
2058
- i;
2059
-
2060
- for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);
2061
- for (; i < nb; ++i) c[i] = b[i];
2062
-
2063
- return function(t) {
2064
- for (i = 0; i < na; ++i) c[i] = x[i](t);
2065
- return c;
2066
- };
2067
- }
2068
-
2069
- function date(a, b) {
2070
- var d = new Date;
2071
- return a = +a, b = +b, function(t) {
2072
- return d.setTime(a * (1 - t) + b * t), d;
2073
- };
2074
- }
2075
-
2076
- function number(a, b) {
2077
- return a = +a, b = +b, function(t) {
2078
- return a * (1 - t) + b * t;
2079
- };
2080
- }
2081
-
2082
- function object(a, b) {
2083
- var i = {},
2084
- c = {},
2085
- k;
2086
-
2087
- if (a === null || typeof a !== "object") a = {};
2088
- if (b === null || typeof b !== "object") b = {};
2089
-
2090
- for (k in b) {
2091
- if (k in a) {
2092
- i[k] = value(a[k], b[k]);
2093
- } else {
2094
- c[k] = b[k];
2095
- }
2096
- }
2097
-
2098
- return function(t) {
2099
- for (k in i) c[k] = i[k](t);
2100
- return c;
2101
- };
2102
- }
2103
-
2104
- var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
2105
- reB = new RegExp(reA.source, "g");
2106
-
2107
- function zero(b) {
2108
- return function() {
2109
- return b;
2110
- };
2111
- }
2112
-
2113
- function one(b) {
2114
- return function(t) {
2115
- return b(t) + "";
2116
- };
2117
- }
2118
-
2119
- function string(a, b) {
2120
- var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b
2121
- am, // current match in a
2122
- bm, // current match in b
2123
- bs, // string preceding current number in b, if any
2124
- i = -1, // index in s
2125
- s = [], // string constants and placeholders
2126
- q = []; // number interpolators
2127
-
2128
- // Coerce inputs to strings.
2129
- a = a + "", b = b + "";
2130
-
2131
- // Interpolate pairs of numbers in a & b.
2132
- while ((am = reA.exec(a))
2133
- && (bm = reB.exec(b))) {
2134
- if ((bs = bm.index) > bi) { // a string precedes the next number in b
2135
- bs = b.slice(bi, bs);
2136
- if (s[i]) s[i] += bs; // coalesce with previous string
2137
- else s[++i] = bs;
2138
- }
2139
- if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match
2140
- if (s[i]) s[i] += bm; // coalesce with previous string
2141
- else s[++i] = bm;
2142
- } else { // interpolate non-matching numbers
2143
- s[++i] = null;
2144
- q.push({i: i, x: number(am, bm)});
2145
- }
2146
- bi = reB.lastIndex;
2147
- }
2148
-
2149
- // Add remains of b.
2150
- if (bi < b.length) {
2151
- bs = b.slice(bi);
2152
- if (s[i]) s[i] += bs; // coalesce with previous string
2153
- else s[++i] = bs;
2154
- }
2155
-
2156
- // Special optimization for only a single match.
2157
- // Otherwise, interpolate each of the numbers and rejoin the string.
2158
- return s.length < 2 ? (q[0]
2159
- ? one(q[0].x)
2160
- : zero(b))
2161
- : (b = q.length, function(t) {
2162
- for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
2163
- return s.join("");
2164
- });
2165
- }
2166
-
2167
- function value(a, b) {
2168
- var t = typeof b, c;
2169
- return b == null || t === "boolean" ? constant(b)
2170
- : (t === "number" ? number
2171
- : t === "string" ? ((c = d3Color.color(b)) ? (b = c, rgb) : string)
2172
- : b instanceof d3Color.color ? rgb
2173
- : b instanceof Date ? date
2174
- : isNumberArray(b) ? numberArray
2175
- : Array.isArray(b) ? genericArray
2176
- : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object
2177
- : number)(a, b);
2178
- }
2179
-
2180
- function discrete(range) {
2181
- var n = range.length;
2182
- return function(t) {
2183
- return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
2184
- };
2185
- }
2186
-
2187
- function hue$1(a, b) {
2188
- var i = hue(+a, +b);
2189
- return function(t) {
2190
- var x = i(t);
2191
- return x - 360 * Math.floor(x / 360);
2192
- };
2193
- }
2194
-
2195
- function round(a, b) {
2196
- return a = +a, b = +b, function(t) {
2197
- return Math.round(a * (1 - t) + b * t);
2198
- };
2199
- }
2200
-
2201
- var degrees = 180 / Math.PI;
2202
-
2203
- var identity = {
2204
- translateX: 0,
2205
- translateY: 0,
2206
- rotate: 0,
2207
- skewX: 0,
2208
- scaleX: 1,
2209
- scaleY: 1
2210
- };
2211
-
2212
- function decompose(a, b, c, d, e, f) {
2213
- var scaleX, scaleY, skewX;
2214
- if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
2215
- if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
2216
- if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
2217
- if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
2218
- return {
2219
- translateX: e,
2220
- translateY: f,
2221
- rotate: Math.atan2(b, a) * degrees,
2222
- skewX: Math.atan(skewX) * degrees,
2223
- scaleX: scaleX,
2224
- scaleY: scaleY
2225
- };
2226
- }
2227
-
2228
- var svgNode;
2229
-
2230
- /* eslint-disable no-undef */
2231
- function parseCss(value) {
2232
- const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
2233
- return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
2234
- }
2235
-
2236
- function parseSvg(value) {
2237
- if (value == null) return identity;
2238
- if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
2239
- svgNode.setAttribute("transform", value);
2240
- if (!(value = svgNode.transform.baseVal.consolidate())) return identity;
2241
- value = value.matrix;
2242
- return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
2243
- }
2244
-
2245
- function interpolateTransform(parse, pxComma, pxParen, degParen) {
2246
-
2247
- function pop(s) {
2248
- return s.length ? s.pop() + " " : "";
2249
- }
2250
-
2251
- function translate(xa, ya, xb, yb, s, q) {
2252
- if (xa !== xb || ya !== yb) {
2253
- var i = s.push("translate(", null, pxComma, null, pxParen);
2254
- q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});
2255
- } else if (xb || yb) {
2256
- s.push("translate(" + xb + pxComma + yb + pxParen);
2257
- }
2258
- }
2259
-
2260
- function rotate(a, b, s, q) {
2261
- if (a !== b) {
2262
- if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path
2263
- q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)});
2264
- } else if (b) {
2265
- s.push(pop(s) + "rotate(" + b + degParen);
2266
- }
2267
- }
2268
-
2269
- function skewX(a, b, s, q) {
2270
- if (a !== b) {
2271
- q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)});
2272
- } else if (b) {
2273
- s.push(pop(s) + "skewX(" + b + degParen);
2274
- }
2275
- }
2276
-
2277
- function scale(xa, ya, xb, yb, s, q) {
2278
- if (xa !== xb || ya !== yb) {
2279
- var i = s.push(pop(s) + "scale(", null, ",", null, ")");
2280
- q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});
2281
- } else if (xb !== 1 || yb !== 1) {
2282
- s.push(pop(s) + "scale(" + xb + "," + yb + ")");
2283
- }
2284
- }
2285
-
2286
- return function(a, b) {
2287
- var s = [], // string constants and placeholders
2288
- q = []; // number interpolators
2289
- a = parse(a), b = parse(b);
2290
- translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
2291
- rotate(a.rotate, b.rotate, s, q);
2292
- skewX(a.skewX, b.skewX, s, q);
2293
- scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
2294
- a = b = null; // gc
2295
- return function(t) {
2296
- var i = -1, n = q.length, o;
2297
- while (++i < n) s[(o = q[i]).i] = o.x(t);
2298
- return s.join("");
2299
- };
2300
- };
2301
- }
2302
-
2303
- var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
2304
- var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
2305
-
2306
- var epsilon2 = 1e-12;
2307
-
2308
- function cosh(x) {
2309
- return ((x = Math.exp(x)) + 1 / x) / 2;
2310
- }
2311
-
2312
- function sinh(x) {
2313
- return ((x = Math.exp(x)) - 1 / x) / 2;
2314
- }
2315
-
2316
- function tanh(x) {
2317
- return ((x = Math.exp(2 * x)) - 1) / (x + 1);
2318
- }
2319
-
2320
- var zoom = (function zoomRho(rho, rho2, rho4) {
2321
-
2322
- // p0 = [ux0, uy0, w0]
2323
- // p1 = [ux1, uy1, w1]
2324
- function zoom(p0, p1) {
2325
- var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],
2326
- ux1 = p1[0], uy1 = p1[1], w1 = p1[2],
2327
- dx = ux1 - ux0,
2328
- dy = uy1 - uy0,
2329
- d2 = dx * dx + dy * dy,
2330
- i,
2331
- S;
2332
-
2333
- // Special case for u0 ≅ u1.
2334
- if (d2 < epsilon2) {
2335
- S = Math.log(w1 / w0) / rho;
2336
- i = function(t) {
2337
- return [
2338
- ux0 + t * dx,
2339
- uy0 + t * dy,
2340
- w0 * Math.exp(rho * t * S)
2341
- ];
2342
- };
2343
- }
2344
-
2345
- // General case.
2346
- else {
2347
- var d1 = Math.sqrt(d2),
2348
- b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
2349
- b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
2350
- r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
2351
- r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
2352
- S = (r1 - r0) / rho;
2353
- i = function(t) {
2354
- var s = t * S,
2355
- coshr0 = cosh(r0),
2356
- u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
2357
- return [
2358
- ux0 + u * dx,
2359
- uy0 + u * dy,
2360
- w0 * coshr0 / cosh(rho * s + r0)
2361
- ];
2362
- };
2363
- }
2364
-
2365
- i.duration = S * 1000 * rho / Math.SQRT2;
2366
-
2367
- return i;
2368
- }
2369
-
2370
- zoom.rho = function(_) {
2371
- var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;
2372
- return zoomRho(_1, _2, _4);
2373
- };
2374
-
2375
- return zoom;
2376
- })(Math.SQRT2, 2, 4);
2377
-
2378
- function hsl(hue) {
2379
- return function(start, end) {
2380
- var h = hue((start = d3Color.hsl(start)).h, (end = d3Color.hsl(end)).h),
2381
- s = nogamma(start.s, end.s),
2382
- l = nogamma(start.l, end.l),
2383
- opacity = nogamma(start.opacity, end.opacity);
2384
- return function(t) {
2385
- start.h = h(t);
2386
- start.s = s(t);
2387
- start.l = l(t);
2388
- start.opacity = opacity(t);
2389
- return start + "";
2390
- };
2391
- }
2392
- }
2393
-
2394
- var hsl$1 = hsl(hue);
2395
- var hslLong = hsl(nogamma);
2396
-
2397
- function lab(start, end) {
2398
- var l = nogamma((start = d3Color.lab(start)).l, (end = d3Color.lab(end)).l),
2399
- a = nogamma(start.a, end.a),
2400
- b = nogamma(start.b, end.b),
2401
- opacity = nogamma(start.opacity, end.opacity);
2402
- return function(t) {
2403
- start.l = l(t);
2404
- start.a = a(t);
2405
- start.b = b(t);
2406
- start.opacity = opacity(t);
2407
- return start + "";
2408
- };
2409
- }
2410
-
2411
- function hcl(hue) {
2412
- return function(start, end) {
2413
- var h = hue((start = d3Color.hcl(start)).h, (end = d3Color.hcl(end)).h),
2414
- c = nogamma(start.c, end.c),
2415
- l = nogamma(start.l, end.l),
2416
- opacity = nogamma(start.opacity, end.opacity);
2417
- return function(t) {
2418
- start.h = h(t);
2419
- start.c = c(t);
2420
- start.l = l(t);
2421
- start.opacity = opacity(t);
2422
- return start + "";
2423
- };
2424
- }
2425
- }
2426
-
2427
- var hcl$1 = hcl(hue);
2428
- var hclLong = hcl(nogamma);
2429
-
2430
- function cubehelix(hue) {
2431
- return (function cubehelixGamma(y) {
2432
- y = +y;
2433
-
2434
- function cubehelix(start, end) {
2435
- var h = hue((start = d3Color.cubehelix(start)).h, (end = d3Color.cubehelix(end)).h),
2436
- s = nogamma(start.s, end.s),
2437
- l = nogamma(start.l, end.l),
2438
- opacity = nogamma(start.opacity, end.opacity);
2439
- return function(t) {
2440
- start.h = h(t);
2441
- start.s = s(t);
2442
- start.l = l(Math.pow(t, y));
2443
- start.opacity = opacity(t);
2444
- return start + "";
2445
- };
2446
- }
2447
-
2448
- cubehelix.gamma = cubehelixGamma;
2449
-
2450
- return cubehelix;
2451
- })(1);
2452
- }
2453
-
2454
- var cubehelix$1 = cubehelix(hue);
2455
- var cubehelixLong = cubehelix(nogamma);
2456
-
2457
- function piecewise(interpolate, values) {
2458
- if (values === undefined) values = interpolate, interpolate = value;
2459
- var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);
2460
- while (i < n) I[i] = interpolate(v, v = values[++i]);
2461
- return function(t) {
2462
- var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));
2463
- return I[i](t - i);
2464
- };
2465
- }
2466
-
2467
- function quantize(interpolator, n) {
2468
- var samples = new Array(n);
2469
- for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));
2470
- return samples;
2471
- }
2472
-
2473
- exports.interpolate = value;
2474
- exports.interpolateArray = array;
2475
- exports.interpolateBasis = basis$1;
2476
- exports.interpolateBasisClosed = basisClosed;
2477
- exports.interpolateCubehelix = cubehelix$1;
2478
- exports.interpolateCubehelixLong = cubehelixLong;
2479
- exports.interpolateDate = date;
2480
- exports.interpolateDiscrete = discrete;
2481
- exports.interpolateHcl = hcl$1;
2482
- exports.interpolateHclLong = hclLong;
2483
- exports.interpolateHsl = hsl$1;
2484
- exports.interpolateHslLong = hslLong;
2485
- exports.interpolateHue = hue$1;
2486
- exports.interpolateLab = lab;
2487
- exports.interpolateNumber = number;
2488
- exports.interpolateNumberArray = numberArray;
2489
- exports.interpolateObject = object;
2490
- exports.interpolateRgb = rgb;
2491
- exports.interpolateRgbBasis = rgbBasis;
2492
- exports.interpolateRgbBasisClosed = rgbBasisClosed;
2493
- exports.interpolateRound = round;
2494
- exports.interpolateString = string;
2495
- exports.interpolateTransformCss = interpolateTransformCss;
2496
- exports.interpolateTransformSvg = interpolateTransformSvg;
2497
- exports.interpolateZoom = zoom;
2498
- exports.piecewise = piecewise;
2499
- exports.quantize = quantize;
2500
-
2501
- Object.defineProperty(exports, '__esModule', { value: true });
2502
-
2503
- }));
2504
- });
2505
-
2506
- function constants(x) {
2507
- return function() {
2508
- return x;
2509
- };
2510
- }
2511
-
2512
- function number(x) {
2513
- return +x;
2514
- }
2515
-
2516
- var unit = [0, 1];
2517
-
2518
- function identity(x) {
2519
- return x;
2520
- }
2521
-
2522
- function normalize(a, b) {
2523
- return (b -= (a = +a))
2524
- ? function(x) { return (x - a) / b; }
2525
- : constants(isNaN(b) ? NaN : 0.5);
2526
- }
2527
-
2528
- function clamper(a, b) {
2529
- var t;
2530
- if (a > b) t = a, a = b, b = t;
2531
- return function(x) { return Math.max(a, Math.min(b, x)); };
2532
- }
2533
-
2534
- // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
2535
- // interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].
2536
- function bimap(domain, range, interpolate) {
2537
- var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
2538
- if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
2539
- else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
2540
- return function(x) { return r0(d0(x)); };
2541
- }
2542
-
2543
- function polymap(domain, range, interpolate) {
2544
- var j = Math.min(domain.length, range.length) - 1,
2545
- d = new Array(j),
2546
- r = new Array(j),
2547
- i = -1;
2548
-
2549
- // Reverse descending domains.
2550
- if (domain[j] < domain[0]) {
2551
- domain = domain.slice().reverse();
2552
- range = range.slice().reverse();
2553
- }
2554
-
2555
- while (++i < j) {
2556
- d[i] = normalize(domain[i], domain[i + 1]);
2557
- r[i] = interpolate(range[i], range[i + 1]);
2558
- }
2559
-
2560
- return function(x) {
2561
- var i = bisectRight(domain, x, 1, j) - 1;
2562
- return r[i](d[i](x));
2563
- };
2564
- }
2565
-
2566
- function copy$1(source, target) {
2567
- return target
2568
- .domain(source.domain())
2569
- .range(source.range())
2570
- .interpolate(source.interpolate())
2571
- .clamp(source.clamp())
2572
- .unknown(source.unknown());
2573
- }
2574
-
2575
- function transformer$1() {
2576
- var domain = unit,
2577
- range = unit,
2578
- interpolate = d3Interpolate.interpolate,
2579
- transform,
2580
- untransform,
2581
- unknown,
2582
- clamp = identity,
2583
- piecewise,
2584
- output,
2585
- input;
2586
-
2587
- function rescale() {
2588
- var n = Math.min(domain.length, range.length);
2589
- if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);
2590
- piecewise = n > 2 ? polymap : bimap;
2591
- output = input = null;
2592
- return scale;
2593
- }
2594
-
2595
- function scale(x) {
2596
- return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));
2597
- }
2598
-
2599
- scale.invert = function(y) {
2600
- return clamp(untransform((input || (input = piecewise(range, domain.map(transform), d3Interpolate.interpolateNumber)))(y)));
2601
- };
2602
-
2603
- scale.domain = function(_) {
2604
- return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();
2605
- };
2606
-
2607
- scale.range = function(_) {
2608
- return arguments.length ? (range = Array.from(_), rescale()) : range.slice();
2609
- };
2610
-
2611
- scale.rangeRound = function(_) {
2612
- return range = Array.from(_), interpolate = d3Interpolate.interpolateRound, rescale();
2613
- };
2614
-
2615
- scale.clamp = function(_) {
2616
- return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;
2617
- };
2618
-
2619
- scale.interpolate = function(_) {
2620
- return arguments.length ? (interpolate = _, rescale()) : interpolate;
2621
- };
2622
-
2623
- scale.unknown = function(_) {
2624
- return arguments.length ? (unknown = _, scale) : unknown;
2625
- };
2626
-
2627
- return function(t, u) {
2628
- transform = t, untransform = u;
2629
- return rescale();
2630
- };
2631
- }
2632
-
2633
- function continuous() {
2634
- return transformer$1()(identity, identity);
2635
- }
2636
-
2637
- var d3Format = createCommonjsModule(function (module, exports) {
2638
- // https://d3js.org/d3-format/ v2.0.0 Copyright 2020 Mike Bostock
2639
- (function (global, factory) {
2640
- factory(exports) ;
2641
- }(this, (function (exports) {
2642
- function formatDecimal(x) {
2643
- return Math.abs(x = Math.round(x)) >= 1e21
2644
- ? x.toLocaleString("en").replace(/,/g, "")
2645
- : x.toString(10);
2646
- }
2647
-
2648
- // Computes the decimal coefficient and exponent of the specified number x with
2649
- // significant digits p, where x is positive and p is in [1, 21] or undefined.
2650
- // For example, formatDecimalParts(1.23) returns ["123", 0].
2651
- function formatDecimalParts(x, p) {
2652
- if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
2653
- var i, coefficient = x.slice(0, i);
2654
-
2655
- // The string returned by toExponential either has the form \d\.\d+e[-+]\d+
2656
- // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
2657
- return [
2658
- coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
2659
- +x.slice(i + 1)
2660
- ];
2661
- }
2662
-
2663
- function exponent(x) {
2664
- return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;
2665
- }
2666
-
2667
- function formatGroup(grouping, thousands) {
2668
- return function(value, width) {
2669
- var i = value.length,
2670
- t = [],
2671
- j = 0,
2672
- g = grouping[0],
2673
- length = 0;
2674
-
2675
- while (i > 0 && g > 0) {
2676
- if (length + g + 1 > width) g = Math.max(1, width - length);
2677
- t.push(value.substring(i -= g, i + g));
2678
- if ((length += g + 1) > width) break;
2679
- g = grouping[j = (j + 1) % grouping.length];
2680
- }
2681
-
2682
- return t.reverse().join(thousands);
2683
- };
2684
- }
2685
-
2686
- function formatNumerals(numerals) {
2687
- return function(value) {
2688
- return value.replace(/[0-9]/g, function(i) {
2689
- return numerals[+i];
2690
- });
2691
- };
2692
- }
2693
-
2694
- // [[fill]align][sign][symbol][0][width][,][.precision][~][type]
2695
- var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
2696
-
2697
- function formatSpecifier(specifier) {
2698
- if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
2699
- var match;
2700
- return new FormatSpecifier({
2701
- fill: match[1],
2702
- align: match[2],
2703
- sign: match[3],
2704
- symbol: match[4],
2705
- zero: match[5],
2706
- width: match[6],
2707
- comma: match[7],
2708
- precision: match[8] && match[8].slice(1),
2709
- trim: match[9],
2710
- type: match[10]
2711
- });
2712
- }
2713
-
2714
- formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
2715
-
2716
- function FormatSpecifier(specifier) {
2717
- this.fill = specifier.fill === undefined ? " " : specifier.fill + "";
2718
- this.align = specifier.align === undefined ? ">" : specifier.align + "";
2719
- this.sign = specifier.sign === undefined ? "-" : specifier.sign + "";
2720
- this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + "";
2721
- this.zero = !!specifier.zero;
2722
- this.width = specifier.width === undefined ? undefined : +specifier.width;
2723
- this.comma = !!specifier.comma;
2724
- this.precision = specifier.precision === undefined ? undefined : +specifier.precision;
2725
- this.trim = !!specifier.trim;
2726
- this.type = specifier.type === undefined ? "" : specifier.type + "";
2727
- }
2728
-
2729
- FormatSpecifier.prototype.toString = function() {
2730
- return this.fill
2731
- + this.align
2732
- + this.sign
2733
- + this.symbol
2734
- + (this.zero ? "0" : "")
2735
- + (this.width === undefined ? "" : Math.max(1, this.width | 0))
2736
- + (this.comma ? "," : "")
2737
- + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0))
2738
- + (this.trim ? "~" : "")
2739
- + this.type;
2740
- };
2741
-
2742
- // Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
2743
- function formatTrim(s) {
2744
- out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
2745
- switch (s[i]) {
2746
- case ".": i0 = i1 = i; break;
2747
- case "0": if (i0 === 0) i0 = i; i1 = i; break;
2748
- default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;
2749
- }
2750
- }
2751
- return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
2752
- }
2753
-
2754
- var prefixExponent;
2755
-
2756
- function formatPrefixAuto(x, p) {
2757
- var d = formatDecimalParts(x, p);
2758
- if (!d) return x + "";
2759
- var coefficient = d[0],
2760
- exponent = d[1],
2761
- i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
2762
- n = coefficient.length;
2763
- return i === n ? coefficient
2764
- : i > n ? coefficient + new Array(i - n + 1).join("0")
2765
- : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
2766
- : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!
2767
- }
2768
-
2769
- function formatRounded(x, p) {
2770
- var d = formatDecimalParts(x, p);
2771
- if (!d) return x + "";
2772
- var coefficient = d[0],
2773
- exponent = d[1];
2774
- return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
2775
- : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
2776
- : coefficient + new Array(exponent - coefficient.length + 2).join("0");
2777
- }
2778
-
2779
- var formatTypes = {
2780
- "%": (x, p) => (x * 100).toFixed(p),
2781
- "b": (x) => Math.round(x).toString(2),
2782
- "c": (x) => x + "",
2783
- "d": formatDecimal,
2784
- "e": (x, p) => x.toExponential(p),
2785
- "f": (x, p) => x.toFixed(p),
2786
- "g": (x, p) => x.toPrecision(p),
2787
- "o": (x) => Math.round(x).toString(8),
2788
- "p": (x, p) => formatRounded(x * 100, p),
2789
- "r": formatRounded,
2790
- "s": formatPrefixAuto,
2791
- "X": (x) => Math.round(x).toString(16).toUpperCase(),
2792
- "x": (x) => Math.round(x).toString(16)
2793
- };
2794
-
2795
- function identity(x) {
2796
- return x;
2797
- }
2798
-
2799
- var map = Array.prototype.map,
2800
- prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
2801
-
2802
- function formatLocale(locale) {
2803
- var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""),
2804
- currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
2805
- currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
2806
- decimal = locale.decimal === undefined ? "." : locale.decimal + "",
2807
- numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),
2808
- percent = locale.percent === undefined ? "%" : locale.percent + "",
2809
- minus = locale.minus === undefined ? "−" : locale.minus + "",
2810
- nan = locale.nan === undefined ? "NaN" : locale.nan + "";
2811
-
2812
- function newFormat(specifier) {
2813
- specifier = formatSpecifier(specifier);
2814
-
2815
- var fill = specifier.fill,
2816
- align = specifier.align,
2817
- sign = specifier.sign,
2818
- symbol = specifier.symbol,
2819
- zero = specifier.zero,
2820
- width = specifier.width,
2821
- comma = specifier.comma,
2822
- precision = specifier.precision,
2823
- trim = specifier.trim,
2824
- type = specifier.type;
2825
-
2826
- // The "n" type is an alias for ",g".
2827
- if (type === "n") comma = true, type = "g";
2828
-
2829
- // The "" type, and any invalid type, is an alias for ".12~g".
2830
- else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g";
2831
-
2832
- // If zero fill is specified, padding goes after sign and before digits.
2833
- if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
2834
-
2835
- // Compute the prefix and suffix.
2836
- // For SI-prefix, the suffix is lazily computed.
2837
- var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
2838
- suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
2839
-
2840
- // What format function should we use?
2841
- // Is this an integer type?
2842
- // Can this type generate exponential notation?
2843
- var formatType = formatTypes[type],
2844
- maybeSuffix = /[defgprs%]/.test(type);
2845
-
2846
- // Set the default precision if not specified,
2847
- // or clamp the specified precision to the supported range.
2848
- // For significant precision, it must be in [1, 21].
2849
- // For fixed precision, it must be in [0, 20].
2850
- precision = precision === undefined ? 6
2851
- : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
2852
- : Math.max(0, Math.min(20, precision));
2853
-
2854
- function format(value) {
2855
- var valuePrefix = prefix,
2856
- valueSuffix = suffix,
2857
- i, n, c;
2858
-
2859
- if (type === "c") {
2860
- valueSuffix = formatType(value) + valueSuffix;
2861
- value = "";
2862
- } else {
2863
- value = +value;
2864
-
2865
- // Determine the sign. -0 is not less than 0, but 1 / -0 is!
2866
- var valueNegative = value < 0 || 1 / value < 0;
2867
-
2868
- // Perform the initial formatting.
2869
- value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
2870
-
2871
- // Trim insignificant zeros.
2872
- if (trim) value = formatTrim(value);
2873
-
2874
- // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.
2875
- if (valueNegative && +value === 0 && sign !== "+") valueNegative = false;
2876
-
2877
- // Compute the prefix and suffix.
2878
- valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
2879
- valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
2880
-
2881
- // Break the formatted value into the integer “value” part that can be
2882
- // grouped, and fractional or exponential “suffix” part that is not.
2883
- if (maybeSuffix) {
2884
- i = -1, n = value.length;
2885
- while (++i < n) {
2886
- if (c = value.charCodeAt(i), 48 > c || c > 57) {
2887
- valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
2888
- value = value.slice(0, i);
2889
- break;
2890
- }
2891
- }
2892
- }
2893
- }
2894
-
2895
- // If the fill character is not "0", grouping is applied before padding.
2896
- if (comma && !zero) value = group(value, Infinity);
2897
-
2898
- // Compute the padding.
2899
- var length = valuePrefix.length + value.length + valueSuffix.length,
2900
- padding = length < width ? new Array(width - length + 1).join(fill) : "";
2901
-
2902
- // If the fill character is "0", grouping is applied after padding.
2903
- if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
2904
-
2905
- // Reconstruct the final output based on the desired alignment.
2906
- switch (align) {
2907
- case "<": value = valuePrefix + value + valueSuffix + padding; break;
2908
- case "=": value = valuePrefix + padding + value + valueSuffix; break;
2909
- case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;
2910
- default: value = padding + valuePrefix + value + valueSuffix; break;
2911
- }
2912
-
2913
- return numerals(value);
2914
- }
2915
-
2916
- format.toString = function() {
2917
- return specifier + "";
2918
- };
2919
-
2920
- return format;
2921
- }
2922
-
2923
- function formatPrefix(specifier, value) {
2924
- var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)),
2925
- e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,
2926
- k = Math.pow(10, -e),
2927
- prefix = prefixes[8 + e / 3];
2928
- return function(value) {
2929
- return f(k * value) + prefix;
2930
- };
2931
- }
2932
-
2933
- return {
2934
- format: newFormat,
2935
- formatPrefix: formatPrefix
2936
- };
2937
- }
2938
-
2939
- var locale;
2940
-
2941
- defaultLocale({
2942
- thousands: ",",
2943
- grouping: [3],
2944
- currency: ["$", ""]
2945
- });
2946
-
2947
- function defaultLocale(definition) {
2948
- locale = formatLocale(definition);
2949
- exports.format = locale.format;
2950
- exports.formatPrefix = locale.formatPrefix;
2951
- return locale;
2952
- }
2953
-
2954
- function precisionFixed(step) {
2955
- return Math.max(0, -exponent(Math.abs(step)));
2956
- }
2957
-
2958
- function precisionPrefix(step, value) {
2959
- return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));
2960
- }
2961
-
2962
- function precisionRound(step, max) {
2963
- step = Math.abs(step), max = Math.abs(max) - step;
2964
- return Math.max(0, exponent(max) - exponent(step)) + 1;
2965
- }
2966
-
2967
- exports.FormatSpecifier = FormatSpecifier;
2968
- exports.formatDefaultLocale = defaultLocale;
2969
- exports.formatLocale = formatLocale;
2970
- exports.formatSpecifier = formatSpecifier;
2971
- exports.precisionFixed = precisionFixed;
2972
- exports.precisionPrefix = precisionPrefix;
2973
- exports.precisionRound = precisionRound;
2974
-
2975
- Object.defineProperty(exports, '__esModule', { value: true });
2976
-
2977
- })));
2978
- });
2979
-
2980
- function tickFormat(start, stop, count, specifier) {
2981
- var step = tickStep(start, stop, count),
2982
- precision;
2983
- specifier = d3Format.formatSpecifier(specifier == null ? ",f" : specifier);
2984
- switch (specifier.type) {
2985
- case "s": {
2986
- var value = Math.max(Math.abs(start), Math.abs(stop));
2987
- if (specifier.precision == null && !isNaN(precision = d3Format.precisionPrefix(step, value))) specifier.precision = precision;
2988
- return d3Format.formatPrefix(specifier, value);
2989
- }
2990
- case "":
2991
- case "e":
2992
- case "g":
2993
- case "p":
2994
- case "r": {
2995
- if (specifier.precision == null && !isNaN(precision = d3Format.precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
2996
- break;
2997
- }
2998
- case "f":
2999
- case "%": {
3000
- if (specifier.precision == null && !isNaN(precision = d3Format.precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
3001
- break;
3002
- }
3003
- }
3004
- return d3Format.format(specifier);
3005
- }
3006
-
3007
- function linearish(scale) {
3008
- var domain = scale.domain;
3009
-
3010
- scale.ticks = function(count) {
3011
- var d = domain();
3012
- return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
3013
- };
3014
-
3015
- scale.tickFormat = function(count, specifier) {
3016
- var d = domain();
3017
- return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);
3018
- };
3019
-
3020
- scale.nice = function(count) {
3021
- if (count == null) count = 10;
3022
-
3023
- var d = domain();
3024
- var i0 = 0;
3025
- var i1 = d.length - 1;
3026
- var start = d[i0];
3027
- var stop = d[i1];
3028
- var prestep;
3029
- var step;
3030
- var maxIter = 10;
3031
-
3032
- if (stop < start) {
3033
- step = start, start = stop, stop = step;
3034
- step = i0, i0 = i1, i1 = step;
3035
- }
3036
-
3037
- while (maxIter-- > 0) {
3038
- step = tickIncrement(start, stop, count);
3039
- if (step === prestep) {
3040
- d[i0] = start;
3041
- d[i1] = stop;
3042
- return domain(d);
3043
- } else if (step > 0) {
3044
- start = Math.floor(start / step) * step;
3045
- stop = Math.ceil(stop / step) * step;
3046
- } else if (step < 0) {
3047
- start = Math.ceil(start * step) / step;
3048
- stop = Math.floor(stop * step) / step;
3049
- } else {
3050
- break;
3051
- }
3052
- prestep = step;
3053
- }
3054
-
3055
- return scale;
3056
- };
3057
-
3058
- return scale;
3059
- }
3060
-
3061
- function linear() {
3062
- var scale = continuous();
3063
-
3064
- scale.copy = function() {
3065
- return copy$1(scale, linear());
3066
- };
3067
-
3068
- initRange.apply(scale, arguments);
3069
-
3070
- return linearish(scale);
3071
- }
3072
-
3073
- function transformer() {
3074
- var x0 = 0,
3075
- x1 = 1,
3076
- t0,
3077
- t1,
3078
- k10,
3079
- transform,
3080
- interpolator = identity,
3081
- clamp = false,
3082
- unknown;
3083
-
3084
- function scale(x) {
3085
- return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));
3086
- }
3087
-
3088
- scale.domain = function(_) {
3089
- return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];
3090
- };
3091
-
3092
- scale.clamp = function(_) {
3093
- return arguments.length ? (clamp = !!_, scale) : clamp;
3094
- };
3095
-
3096
- scale.interpolator = function(_) {
3097
- return arguments.length ? (interpolator = _, scale) : interpolator;
3098
- };
3099
-
3100
- function range(interpolate) {
3101
- return function(_) {
3102
- var r0, r1;
3103
- return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];
3104
- };
3105
- }
3106
-
3107
- scale.range = range(d3Interpolate.interpolate);
3108
-
3109
- scale.rangeRound = range(d3Interpolate.interpolateRound);
3110
-
3111
- scale.unknown = function(_) {
3112
- return arguments.length ? (unknown = _, scale) : unknown;
3113
- };
3114
-
3115
- return function(t) {
3116
- transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);
3117
- return scale;
3118
- };
3119
- }
3120
-
3121
- function copy(source, target) {
3122
- return target
3123
- .domain(source.domain())
3124
- .interpolator(source.interpolator())
3125
- .clamp(source.clamp())
3126
- .unknown(source.unknown());
3127
- }
3128
-
3129
- function sequential() {
3130
- var scale = linearish(transformer()(identity));
3131
-
3132
- scale.copy = function() {
3133
- return copy(scale, sequential());
3134
- };
3135
-
3136
- return initInterpolator.apply(scale, arguments);
3137
- }
3138
-
3139
- const COLOR_BASE = "#cecece";
3140
-
3141
- // https://www.w3.org/TR/WCAG20/#relativeluminancedef
3142
- const rc = 0.2126;
3143
- const gc = 0.7152;
3144
- const bc = 0.0722;
3145
- // low-gamma adjust coefficient
3146
- const lowc = 1 / 12.92;
3147
- function adjustGamma(p) {
3148
- return Math.pow((p + 0.055) / 1.055, 2.4);
3149
- }
3150
- function relativeLuminance(o) {
3151
- const rsrgb = o.r / 255;
3152
- const gsrgb = o.g / 255;
3153
- const bsrgb = o.b / 255;
3154
- const r = rsrgb <= 0.03928 ? rsrgb * lowc : adjustGamma(rsrgb);
3155
- const g = gsrgb <= 0.03928 ? gsrgb * lowc : adjustGamma(gsrgb);
3156
- const b = bsrgb <= 0.03928 ? bsrgb * lowc : adjustGamma(bsrgb);
3157
- return r * rc + g * gc + b * bc;
3158
- }
3159
- const createRainbowColor = (root) => {
3160
- const colorParentMap = new Map();
3161
- colorParentMap.set(root, COLOR_BASE);
3162
- if (root.children != null) {
3163
- const colorScale = sequential([0, root.children.length], (n) => hsl(360 * n, 0.6, 0.85));
3164
- root.children.forEach((c, id) => {
3165
- colorParentMap.set(c, colorScale(id).toString());
3166
- });
3167
- }
3168
- const colorMap = new Map();
3169
- const lightScale = linear().domain([0, root.height]).range([0.9, 0.3]);
3170
- const getBackgroundColor = (node) => {
3171
- const parents = node.ancestors();
3172
- const colorStr = parents.length === 1 ? colorParentMap.get(parents[0]) : colorParentMap.get(parents[parents.length - 2]);
3173
- const hslColor = hsl(colorStr);
3174
- hslColor.l = lightScale(node.depth);
3175
- return hslColor;
3176
- };
3177
- return (node) => {
3178
- if (!colorMap.has(node)) {
3179
- const backgroundColor = getBackgroundColor(node);
3180
- const l = relativeLuminance(backgroundColor.rgb());
3181
- const fontColor = l > 0.179 ? "#000" : "#fff";
3182
- colorMap.set(node, {
3183
- backgroundColor: backgroundColor.toString(),
3184
- fontColor,
3185
- });
3186
- }
3187
- return colorMap.get(node);
3188
- };
3189
- };
3190
-
3191
- const StaticContext = q({});
3192
- const drawChart = (parentNode, data, width, height) => {
3193
- const availableSizeProperties = getAvailableSizeOptions(data.options);
3194
- console.time("layout create");
3195
- const layout = treemap()
3196
- .size([width, height])
3197
- .paddingOuter(PADDING)
3198
- .paddingTop(TOP_PADDING)
3199
- .paddingInner(PADDING)
3200
- .round(true)
3201
- .tile(treemapResquarify);
3202
- console.timeEnd("layout create");
3203
- console.time("rawHierarchy create");
3204
- const rawHierarchy = hierarchy(data.tree);
3205
- console.timeEnd("rawHierarchy create");
3206
- const nodeSizesCache = new Map();
3207
- const nodeIdsCache = new Map();
3208
- const getModuleSize = (node, sizeKey) => { var _a, _b; return (_b = (_a = nodeSizesCache.get(node)) === null || _a === void 0 ? void 0 : _a[sizeKey]) !== null && _b !== void 0 ? _b : 0; };
3209
- console.time("rawHierarchy eachAfter cache");
3210
- rawHierarchy.eachAfter((node) => {
3211
- var _a;
3212
- const nodeData = node.data;
3213
- nodeIdsCache.set(nodeData, {
3214
- nodeUid: generateUniqueId("node"),
3215
- clipUid: generateUniqueId("clip"),
3216
- });
3217
- const sizes = { renderedLength: 0, gzipLength: 0, brotliLength: 0 };
3218
- if (isModuleTree(nodeData)) {
3219
- for (const sizeKey of availableSizeProperties) {
3220
- sizes[sizeKey] = nodeData.children.reduce((acc, child) => getModuleSize(child, sizeKey) + acc, 0);
3221
- }
3222
- }
3223
- else {
3224
- for (const sizeKey of availableSizeProperties) {
3225
- sizes[sizeKey] = (_a = data.nodeParts[nodeData.uid][sizeKey]) !== null && _a !== void 0 ? _a : 0;
3226
- }
3227
- }
3228
- nodeSizesCache.set(nodeData, sizes);
3229
- });
3230
- console.timeEnd("rawHierarchy eachAfter cache");
3231
- const getModuleIds = (node) => nodeIdsCache.get(node);
3232
- console.time("color");
3233
- const getModuleColor = createRainbowColor(rawHierarchy);
3234
- console.timeEnd("color");
3235
- N(o$1(StaticContext.Provider, Object.assign({ value: {
3236
- data,
3237
- availableSizeProperties,
3238
- width,
3239
- height,
3240
- getModuleSize,
3241
- getModuleIds,
3242
- getModuleColor,
3243
- rawHierarchy,
3244
- layout,
3245
- } }, { children: o$1(Main, {}, void 0) }), void 0), parentNode);
3246
- };
3247
-
3248
- exports.StaticContext = StaticContext;
3249
- exports.default = drawChart;
3250
-
3251
- Object.defineProperty(exports, '__esModule', { value: true });
3252
-
3253
- return exports;
3254
-
3255
- }({}));
3256
- //# sourceMappingURL=treemap.js.map
3257
-
3258
- /*-->*/
3259
- </script>
3260
- <script>
3261
- /*<!--*/
3262
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"jsonforms-core.esm.js","children":[{"name":"src","children":[{"name":"generators","children":[{"uid":"cff0-1","name":"schema.ts"},{"uid":"cff0-59","name":"uischema.ts"},{"uid":"cff0-61","name":"Generate.ts"}]},{"name":"models","children":[{"uid":"cff0-3","name":"draft4.ts"},{"uid":"cff0-5","name":"uischema.ts"}]},{"name":"util","children":[{"uid":"cff0-7","name":"array.ts"},{"uid":"cff0-35","name":"path.ts"},{"uid":"cff0-37","name":"resolvers.ts"},{"uid":"cff0-39","name":"runtime.ts"},{"uid":"cff0-41","name":"util.ts"},{"uid":"cff0-43","name":"label.ts"},{"uid":"cff0-45","name":"renderer.ts"},{"uid":"cff0-47","name":"cell.ts"},{"uid":"cff0-49","name":"combinators.ts"},{"uid":"cff0-51","name":"ids.ts"},{"uid":"cff0-53","name":"schema.ts"},{"uid":"cff0-55","name":"uischema.ts"},{"uid":"cff0-57","name":"validator.ts"}]},{"name":"reducers","children":[{"uid":"cff0-9","name":"cells.ts"},{"uid":"cff0-13","name":"config.ts"},{"uid":"cff0-15","name":"core.ts"},{"uid":"cff0-17","name":"default-data.ts"},{"uid":"cff0-21","name":"i18n.ts"},{"uid":"cff0-23","name":"renderers.ts"},{"uid":"cff0-29","name":"uischemas.ts"},{"uid":"cff0-31","name":"reducers.ts"},{"uid":"cff0-33","name":"selectors.ts"}]},{"uid":"cff0-11","name":"configDefault.ts"},{"name":"i18n/i18nUtil.ts","uid":"cff0-19"},{"name":"testers","children":[{"uid":"cff0-25","name":"testers.ts"},{"uid":"cff0-27","name":"index.ts"}]},{"name":"actions","children":[{"uid":"cff0-63","name":"actions.ts"},{"uid":"cff0-65","name":"index.ts"}]},{"uid":"cff0-67","name":"Helpers.ts"},{"uid":"cff0-69","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"cff0-1":{"renderedLength":3843,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-0"},"cff0-3":{"renderedLength":4050,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-2"},"cff0-5":{"renderedLength":760,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-4"},"cff0-7":{"renderedLength":421,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-6"},"cff0-9":{"renderedLength":294,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-8"},"cff0-11":{"renderedLength":133,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-10"},"cff0-13":{"renderedLength":322,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-12"},"cff0-15":{"renderedLength":10156,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-14"},"cff0-17":{"renderedLength":434,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-16"},"cff0-19":{"renderedLength":2719,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-18"},"cff0-21":{"renderedLength":1754,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-20"},"cff0-23":{"renderedLength":370,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-22"},"cff0-25":{"renderedLength":8488,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-24"},"cff0-27":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-26"},"cff0-29":{"renderedLength":783,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-28"},"cff0-31":{"renderedLength":1846,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-30"},"cff0-33":{"renderedLength":573,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-32"},"cff0-35":{"renderedLength":1333,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-34"},"cff0-37":{"renderedLength":3040,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-36"},"cff0-39":{"renderedLength":3621,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-38"},"cff0-41":{"renderedLength":1498,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-40"},"cff0-43":{"renderedLength":1289,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-42"},"cff0-45":{"renderedLength":14103,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-44"},"cff0-47":{"renderedLength":2622,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-46"},"cff0-49":{"renderedLength":671,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-48"},"cff0-51":{"renderedLength":621,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-50"},"cff0-53":{"renderedLength":365,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-52"},"cff0-55":{"renderedLength":609,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-54"},"cff0-57":{"renderedLength":196,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-56"},"cff0-59":{"renderedLength":3310,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-58"},"cff0-61":{"renderedLength":137,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-60"},"cff0-63":{"renderedLength":3051,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-62"},"cff0-65":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-64"},"cff0-67":{"renderedLength":80,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-66"},"cff0-69":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"cff0-68"}},"nodeMetas":{"cff0-0":{"id":"/src/generators/schema.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-1"},"imported":[],"importedBy":[{"uid":"cff0-70"},{"uid":"cff0-60"}]},"cff0-2":{"id":"/src/models/draft4.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-3"},"imported":[],"importedBy":[{"uid":"cff0-71"}]},"cff0-4":{"id":"/src/models/uischema.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-5"},"imported":[],"importedBy":[{"uid":"cff0-71"}]},"cff0-6":{"id":"/src/util/array.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-7"},"imported":[],"importedBy":[{"uid":"cff0-73"},{"uid":"cff0-44"}]},"cff0-8":{"id":"/src/reducers/cells.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-9"},"imported":[{"uid":"cff0-64"}],"importedBy":[{"uid":"cff0-72"},{"uid":"cff0-30"}]},"cff0-10":{"id":"/src/configDefault.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-11"},"imported":[],"importedBy":[{"uid":"cff0-12"}]},"cff0-12":{"id":"/src/reducers/config.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-13"},"imported":[{"uid":"cff0-85"},{"uid":"cff0-64"},{"uid":"cff0-10"}],"importedBy":[{"uid":"cff0-72"},{"uid":"cff0-30"}]},"cff0-14":{"id":"/src/reducers/core.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-15"},"imported":[{"uid":"cff0-86"},{"uid":"cff0-87"},{"uid":"cff0-88"},{"uid":"cff0-89"},{"uid":"cff0-90"},{"uid":"cff0-91"},{"uid":"cff0-64"},{"uid":"cff0-73"}],"importedBy":[{"uid":"cff0-72"},{"uid":"cff0-30"},{"uid":"cff0-32"}]},"cff0-16":{"id":"/src/reducers/default-data.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-17"},"imported":[{"uid":"cff0-64"}],"importedBy":[{"uid":"cff0-72"},{"uid":"cff0-30"},{"uid":"cff0-32"}]},"cff0-18":{"id":"/src/i18n/i18nUtil.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-19"},"imported":[{"uid":"cff0-71"},{"uid":"cff0-72"},{"uid":"cff0-73"}],"importedBy":[{"uid":"cff0-75"}]},"cff0-20":{"id":"/src/reducers/i18n.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-21"},"imported":[{"uid":"cff0-75"},{"uid":"cff0-64"}],"importedBy":[{"uid":"cff0-72"},{"uid":"cff0-30"}]},"cff0-22":{"id":"/src/reducers/renderers.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-23"},"imported":[{"uid":"cff0-64"}],"importedBy":[{"uid":"cff0-72"},{"uid":"cff0-30"}]},"cff0-24":{"id":"/src/testers/testers.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-25"},"imported":[{"uid":"cff0-82"},{"uid":"cff0-88"},{"uid":"cff0-94"},{"uid":"cff0-95"},{"uid":"cff0-96"},{"uid":"cff0-97"},{"uid":"cff0-98"},{"uid":"cff0-99"},{"uid":"cff0-73"}],"importedBy":[{"uid":"cff0-26"}]},"cff0-26":{"id":"/src/testers/index.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-27"},"imported":[{"uid":"cff0-24"}],"importedBy":[{"uid":"cff0-68"},{"uid":"cff0-28"}]},"cff0-28":{"id":"/src/reducers/uischemas.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-29"},"imported":[{"uid":"cff0-92"},{"uid":"cff0-93"},{"uid":"cff0-64"},{"uid":"cff0-26"}],"importedBy":[{"uid":"cff0-72"},{"uid":"cff0-30"}]},"cff0-30":{"id":"/src/reducers/reducers.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-31"},"imported":[{"uid":"cff0-14"},{"uid":"cff0-16"},{"uid":"cff0-22"},{"uid":"cff0-28"},{"uid":"cff0-20"},{"uid":"cff0-70"},{"uid":"cff0-8"},{"uid":"cff0-12"},{"uid":"cff0-88"},{"uid":"cff0-72"}],"importedBy":[{"uid":"cff0-72"}]},"cff0-32":{"id":"/src/reducers/selectors.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-33"},"imported":[{"uid":"cff0-88"},{"uid":"cff0-14"},{"uid":"cff0-16"}],"importedBy":[{"uid":"cff0-72"}]},"cff0-34":{"id":"/src/util/path.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-35"},"imported":[{"uid":"cff0-82"},{"uid":"cff0-101"},{"uid":"cff0-71"}],"importedBy":[{"uid":"cff0-73"},{"uid":"cff0-42"},{"uid":"cff0-44"},{"uid":"cff0-36"},{"uid":"cff0-38"},{"uid":"cff0-40"}]},"cff0-36":{"id":"/src/util/resolvers.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-37"},"imported":[{"uid":"cff0-82"},{"uid":"cff0-88"},{"uid":"cff0-34"}],"importedBy":[{"uid":"cff0-73"},{"uid":"cff0-38"},{"uid":"cff0-40"}]},"cff0-38":{"id":"/src/util/runtime.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-39"},"imported":[{"uid":"cff0-103"},{"uid":"cff0-71"},{"uid":"cff0-36"},{"uid":"cff0-34"},{"uid":"cff0-72"}],"importedBy":[{"uid":"cff0-73"},{"uid":"cff0-46"},{"uid":"cff0-44"},{"uid":"cff0-40"}]},"cff0-40":{"id":"/src/util/util.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-41"},"imported":[{"uid":"cff0-82"},{"uid":"cff0-96"},{"uid":"cff0-99"},{"uid":"cff0-102"},{"uid":"cff0-36"},{"uid":"cff0-34"},{"uid":"cff0-38"}],"importedBy":[{"uid":"cff0-73"},{"uid":"cff0-46"},{"uid":"cff0-48"},{"uid":"cff0-44"}]},"cff0-42":{"id":"/src/util/label.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-43"},"imported":[{"uid":"cff0-83"},{"uid":"cff0-34"}],"importedBy":[{"uid":"cff0-73"},{"uid":"cff0-44"}]},"cff0-44":{"id":"/src/util/renderer.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-45"},"imported":[{"uid":"cff0-88"},{"uid":"cff0-71"},{"uid":"cff0-102"},{"uid":"cff0-72"},{"uid":"cff0-38"},{"uid":"cff0-42"},{"uid":"cff0-6"},{"uid":"cff0-40"},{"uid":"cff0-34"},{"uid":"cff0-64"},{"uid":"cff0-75"}],"importedBy":[{"uid":"cff0-73"},{"uid":"cff0-46"}]},"cff0-46":{"id":"/src/util/cell.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-47"},"imported":[{"uid":"cff0-82"},{"uid":"cff0-100"},{"uid":"cff0-72"},{"uid":"cff0-40"},{"uid":"cff0-38"},{"uid":"cff0-44"},{"uid":"cff0-75"}],"importedBy":[{"uid":"cff0-73"}]},"cff0-48":{"id":"/src/util/combinators.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-49"},"imported":[{"uid":"cff0-72"},{"uid":"cff0-40"}],"importedBy":[{"uid":"cff0-73"}]},"cff0-50":{"id":"/src/util/ids.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-51"},"imported":[],"importedBy":[{"uid":"cff0-73"}]},"cff0-52":{"id":"/src/util/schema.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-53"},"imported":[{"uid":"cff0-102"}],"importedBy":[{"uid":"cff0-73"}]},"cff0-54":{"id":"/src/util/uischema.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-55"},"imported":[{"uid":"cff0-82"},{"uid":"cff0-71"}],"importedBy":[{"uid":"cff0-73"}]},"cff0-56":{"id":"/src/util/validator.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-57"},"imported":[{"uid":"cff0-104"},{"uid":"cff0-105"}],"importedBy":[{"uid":"cff0-73"}]},"cff0-58":{"id":"/src/generators/uischema.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-59"},"imported":[{"uid":"cff0-82"},{"uid":"cff0-83"},{"uid":"cff0-84"},{"uid":"cff0-71"},{"uid":"cff0-73"}],"importedBy":[{"uid":"cff0-70"},{"uid":"cff0-60"}]},"cff0-60":{"id":"/src/generators/Generate.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-61"},"imported":[{"uid":"cff0-0"},{"uid":"cff0-58"}],"importedBy":[{"uid":"cff0-70"}]},"cff0-62":{"id":"/src/actions/actions.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-63"},"imported":[{"uid":"cff0-70"}],"importedBy":[{"uid":"cff0-64"}]},"cff0-64":{"id":"/src/actions/index.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-65"},"imported":[{"uid":"cff0-62"}],"importedBy":[{"uid":"cff0-68"},{"uid":"cff0-8"},{"uid":"cff0-12"},{"uid":"cff0-14"},{"uid":"cff0-16"},{"uid":"cff0-20"},{"uid":"cff0-22"},{"uid":"cff0-28"},{"uid":"cff0-44"}]},"cff0-66":{"id":"/src/Helpers.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-67"},"imported":[{"uid":"cff0-73"}],"importedBy":[{"uid":"cff0-68"}]},"cff0-68":{"id":"/src/index.ts","moduleParts":{"jsonforms-core.esm.js":"cff0-69"},"imported":[{"uid":"cff0-64"},{"uid":"cff0-70"},{"uid":"cff0-71"},{"uid":"cff0-72"},{"uid":"cff0-26"},{"uid":"cff0-73"},{"uid":"cff0-66"},{"uid":"cff0-74"},{"uid":"cff0-75"}],"importedBy":[],"isEntry":true},"cff0-70":{"id":"/src/generators/index.ts","moduleParts":{},"imported":[{"uid":"cff0-60"},{"uid":"cff0-0"},{"uid":"cff0-58"}],"importedBy":[{"uid":"cff0-68"},{"uid":"cff0-62"},{"uid":"cff0-30"}]},"cff0-71":{"id":"/src/models/index.ts","moduleParts":{},"imported":[{"uid":"cff0-2"},{"uid":"cff0-76"},{"uid":"cff0-77"},{"uid":"cff0-78"},{"uid":"cff0-4"}],"importedBy":[{"uid":"cff0-68"},{"uid":"cff0-58"},{"uid":"cff0-34"},{"uid":"cff0-44"},{"uid":"cff0-38"},{"uid":"cff0-54"},{"uid":"cff0-18"}]},"cff0-72":{"id":"/src/reducers/index.ts","moduleParts":{},"imported":[{"uid":"cff0-8"},{"uid":"cff0-12"},{"uid":"cff0-14"},{"uid":"cff0-16"},{"uid":"cff0-20"},{"uid":"cff0-30"},{"uid":"cff0-22"},{"uid":"cff0-32"},{"uid":"cff0-28"}],"importedBy":[{"uid":"cff0-68"},{"uid":"cff0-30"},{"uid":"cff0-46"},{"uid":"cff0-48"},{"uid":"cff0-44"},{"uid":"cff0-38"},{"uid":"cff0-18"}]},"cff0-73":{"id":"/src/util/index.ts","moduleParts":{},"imported":[{"uid":"cff0-6"},{"uid":"cff0-46"},{"uid":"cff0-48"},{"uid":"cff0-79"},{"uid":"cff0-50"},{"uid":"cff0-42"},{"uid":"cff0-34"},{"uid":"cff0-44"},{"uid":"cff0-36"},{"uid":"cff0-38"},{"uid":"cff0-52"},{"uid":"cff0-80"},{"uid":"cff0-54"},{"uid":"cff0-40"},{"uid":"cff0-56"}],"importedBy":[{"uid":"cff0-68"},{"uid":"cff0-66"},{"uid":"cff0-58"},{"uid":"cff0-14"},{"uid":"cff0-24"},{"uid":"cff0-18"}]},"cff0-74":{"id":"/src/store.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-68"}]},"cff0-75":{"id":"/src/i18n/index.ts","moduleParts":{},"imported":[{"uid":"cff0-81"},{"uid":"cff0-18"}],"importedBy":[{"uid":"cff0-68"},{"uid":"cff0-20"},{"uid":"cff0-46"},{"uid":"cff0-44"}]},"cff0-76":{"id":"/src/models/jsonSchema.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-71"}]},"cff0-77":{"id":"/src/models/jsonSchema4.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-71"}]},"cff0-78":{"id":"/src/models/jsonSchema7.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-71"}]},"cff0-79":{"id":"/src/util/Formatted.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-73"}]},"cff0-80":{"id":"/src/util/type.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-73"}]},"cff0-81":{"id":"/src/i18n/i18nTypes.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-75"}]},"cff0-82":{"id":"lodash/isEmpty","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-58"},{"uid":"cff0-24"},{"uid":"cff0-46"},{"uid":"cff0-34"},{"uid":"cff0-36"},{"uid":"cff0-54"},{"uid":"cff0-40"}],"isExternal":true},"cff0-83":{"id":"lodash/startCase","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-58"},{"uid":"cff0-42"}],"isExternal":true},"cff0-84":{"id":"lodash/keys","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-58"}],"isExternal":true},"cff0-85":{"id":"lodash/merge","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-12"}],"isExternal":true},"cff0-86":{"id":"lodash/cloneDeep","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-14"}],"isExternal":true},"cff0-87":{"id":"lodash/fp/set","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-14"}],"isExternal":true},"cff0-88":{"id":"lodash/get","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-14"},{"uid":"cff0-30"},{"uid":"cff0-32"},{"uid":"cff0-24"},{"uid":"cff0-44"},{"uid":"cff0-36"}],"isExternal":true},"cff0-89":{"id":"lodash/filter","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-14"}],"isExternal":true},"cff0-90":{"id":"lodash/isEqual","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-14"}],"isExternal":true},"cff0-91":{"id":"lodash/isFunction","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-14"}],"isExternal":true},"cff0-92":{"id":"lodash/maxBy","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-28"}],"isExternal":true},"cff0-93":{"id":"lodash/remove","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-28"}],"isExternal":true},"cff0-94":{"id":"lodash/endsWith","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-24"}],"isExternal":true},"cff0-95":{"id":"lodash/last","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-24"}],"isExternal":true},"cff0-96":{"id":"lodash/isArray","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-24"},{"uid":"cff0-40"}],"isExternal":true},"cff0-97":{"id":"lodash/reduce","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-24"}],"isExternal":true},"cff0-98":{"id":"lodash/toPairs","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-24"}],"isExternal":true},"cff0-99":{"id":"lodash/includes","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-24"},{"uid":"cff0-40"}],"isExternal":true},"cff0-100":{"id":"lodash/union","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-46"}],"isExternal":true},"cff0-101":{"id":"lodash/range","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-34"}],"isExternal":true},"cff0-102":{"id":"lodash/find","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-44"},{"uid":"cff0-52"},{"uid":"cff0-40"}],"isExternal":true},"cff0-103":{"id":"lodash/has","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-38"}],"isExternal":true},"cff0-104":{"id":"ajv","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-56"}],"isExternal":true},"cff0-105":{"id":"ajv-formats","moduleParts":{},"imported":[],"importedBy":[{"uid":"cff0-56"}],"isExternal":true}},"env":{"rollup":"2.61.1"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
3263
-
3264
- const run = () => {
3265
- const width = window.innerWidth;
3266
- const height = window.innerHeight;
3267
-
3268
- const chartNode = document.querySelector("main");
3269
- drawChart.default(chartNode, data, width, height);
3270
- };
3271
-
3272
- window.addEventListener('resize', run);
3273
-
3274
- document.addEventListener('DOMContentLoaded', run);
3275
- /*-->*/
3276
- </script>
3277
- </body>
3278
- </html>
3279
-