@watermarkinsights/ripple 5.4.0 → 5.5.0-2

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 (86) hide show
  1. package/dist/cjs/{chartFunctions-ef57119f.js → chartFunctions-ce6c7c16.js} +20 -21
  2. package/dist/cjs/{global-4ff34a0e.js → global-835ecb61.js} +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/priv-calendar.cjs.entry.js +13 -9
  5. package/dist/cjs/priv-navigator-item.cjs.entry.js +1 -1
  6. package/dist/cjs/ripple.cjs.js +1 -1
  7. package/dist/cjs/wm-chart.cjs.entry.js +3 -12
  8. package/dist/cjs/wm-date-range.cjs.entry.js +5 -1
  9. package/dist/cjs/wm-datepicker.cjs.entry.js +5 -1
  10. package/dist/cjs/wm-line-chart.cjs.entry.js +1 -1
  11. package/dist/cjs/wm-navigator.cjs.entry.js +12 -16
  12. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
  13. package/dist/collection/components/charts/chartFunctions.js +20 -21
  14. package/dist/collection/components/charts/wm-chart/wm-chart.css +4 -5
  15. package/dist/collection/components/charts/wm-chart/wm-chart.js +2 -11
  16. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +4 -5
  17. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +17 -9
  18. package/dist/collection/components/datepickers/wm-date-range.js +5 -1
  19. package/dist/collection/components/datepickers/wm-datepicker.js +5 -1
  20. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +3 -3
  21. package/dist/collection/components/wm-navigator/wm-navigator.css +1 -0
  22. package/dist/collection/components/wm-navigator/wm-navigator.js +13 -17
  23. package/dist/esm/{chartFunctions-d3fd6e7c.js → chartFunctions-0ebf83f3.js} +20 -21
  24. package/dist/esm/{global-588c6343.js → global-ec8d6686.js} +1 -1
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/esm/priv-calendar.entry.js +13 -9
  27. package/dist/esm/priv-navigator-item.entry.js +1 -1
  28. package/dist/esm/ripple.js +1 -1
  29. package/dist/esm/wm-chart.entry.js +3 -12
  30. package/dist/esm/wm-date-range.entry.js +5 -1
  31. package/dist/esm/wm-datepicker.entry.js +5 -1
  32. package/dist/esm/wm-line-chart.entry.js +1 -1
  33. package/dist/esm/wm-navigator.entry.js +12 -16
  34. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  35. package/dist/esm-es5/chartFunctions-0ebf83f3.js +1 -0
  36. package/dist/esm-es5/global-ec8d6686.js +1 -0
  37. package/dist/esm-es5/loader.js +1 -1
  38. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  39. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  40. package/dist/esm-es5/ripple.js +1 -1
  41. package/dist/esm-es5/wm-chart.entry.js +1 -1
  42. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  43. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  44. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  45. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  46. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  47. package/dist/ripple/p-011477e2.entry.js +1 -0
  48. package/dist/ripple/p-021ff5fa.system.entry.js +1 -0
  49. package/dist/ripple/p-204bdd73.entry.js +1 -0
  50. package/dist/ripple/{p-e7a64841.system.entry.js → p-28b70082.system.entry.js} +1 -1
  51. package/dist/ripple/p-361f6e59.system.js +1 -0
  52. package/dist/ripple/p-3b8b1b44.system.entry.js +1 -0
  53. package/dist/ripple/{p-f67fd802.system.entry.js → p-4a6854d3.system.entry.js} +1 -1
  54. package/dist/ripple/{p-e3de5bbd.system.entry.js → p-4c8db09c.system.entry.js} +1 -1
  55. package/dist/ripple/{p-0aa17cac.entry.js → p-4d0b1890.entry.js} +1 -1
  56. package/dist/ripple/p-5d0e2006.system.entry.js +1 -0
  57. package/dist/ripple/{p-763a01bc.system.js → p-811d5a9f.system.js} +1 -1
  58. package/dist/ripple/p-825bd63b.entry.js +1 -0
  59. package/dist/ripple/p-99dd083d.system.js +1 -0
  60. package/dist/ripple/p-a27d2177.entry.js +1 -0
  61. package/dist/ripple/p-ab0e197b.js +1 -0
  62. package/dist/ripple/{p-591918a4.entry.js → p-ade3d9a9.entry.js} +1 -1
  63. package/dist/ripple/p-c47811a2.entry.js +1 -0
  64. package/dist/ripple/{p-9a3e656a.entry.js → p-dbc112a6.entry.js} +1 -1
  65. package/dist/ripple/p-e3241417.system.entry.js +1 -0
  66. package/dist/ripple/p-f92bd0c1.js +1 -0
  67. package/dist/ripple/{p-49b7970e.system.entry.js → p-fd0aae67.system.entry.js} +1 -1
  68. package/dist/ripple/ripple.esm.js +1 -1
  69. package/dist/ripple/ripple.js +1 -1
  70. package/dist/types/global/interfaces.d.ts +1 -1
  71. package/package.json +1 -1
  72. package/dist/esm-es5/chartFunctions-d3fd6e7c.js +0 -1
  73. package/dist/esm-es5/global-588c6343.js +0 -1
  74. package/dist/ripple/p-0f0466c6.js +0 -1
  75. package/dist/ripple/p-2be33eb4.system.js +0 -1
  76. package/dist/ripple/p-3183bba8.entry.js +0 -1
  77. package/dist/ripple/p-4bacf5a7.system.entry.js +0 -1
  78. package/dist/ripple/p-5c10e2ae.entry.js +0 -1
  79. package/dist/ripple/p-75ba63ba.entry.js +0 -1
  80. package/dist/ripple/p-97aaa344.system.js +0 -1
  81. package/dist/ripple/p-bee9a5dc.js +0 -1
  82. package/dist/ripple/p-c91b10f3.system.entry.js +0 -1
  83. package/dist/ripple/p-cc4a429b.entry.js +0 -1
  84. package/dist/ripple/p-d86bd773.entry.js +0 -1
  85. package/dist/ripple/p-f4210450.system.entry.js +0 -1
  86. package/dist/ripple/p-fe8d02c3.system.entry.js +0 -1
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,r,e,i){function n(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,a){function s(t){try{u(i.next(t))}catch(t){a(t)}}function o(t){try{u(i["throw"](t))}catch(t){a(t)}}function u(t){t.done?e(t.value):n(t.value).then(s,o)}u((i=i.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(r){return u([t,r])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(e=0)),e)try{if(i=1,n&&(a=o[0]&2?n["return"]:o[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;if(n=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;n=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){e.label=o[1];break}if(o[0]===6&&e.label<a[1]){e.label=a[1];a=o;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(o);break}if(a[2])e.ops.pop();e.trys.pop();continue}o=r.call(t,e)}catch(t){o=[6,t];n=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,r,e){if(e||arguments.length===2)for(var i=0,n=r.length,a;i<n;i++){if(a||!(i in r)){if(!a)a=Array.prototype.slice.call(r,0,i);a[i]=r[i]}}return t.concat(a||Array.prototype.slice.call(r))};System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js"],(function(t){"use strict";var r,e,i,n,a;return{setters:[function(t){r=t.h},function(t){e=t.i;i=t.c;n=t.e;a=t.f}],execute:function(){t({b:U,c:L,d:K,e:j,f:P,g:D,h:z,i:X,j:B,k:d,l:Q,m:J,n:f,o:w,r:O});var s={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca",periwinkle:"#575195",gray:"#6b6b6b"};var o=t("a",{doughnut:{size:155,colors:[s.forest,s.gray],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[s.lavender,s.midnight,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[s.periwinkle,s.cyan,s.midnight,s.salmon,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[s.forest,s.gray],padding:0,category:"stackedBar"},bar2:{size:400,colors:[s.gray,s.periwinkle,s.midnight,s.cyan,s.salmon],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",s.cyan,"#8e4129",s.salmon],padding:0,category:"stackedBar"},bar4:{size:400,colors:[s.salmon,s.cyan,s.periwinkle],padding:0,category:"stackedBar"},bar5:{size:400,colors:[s.gray,s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[s.lavender],padding:0,category:"simpleBar"},bar7:{size:400,colors:[s.periwinkle,s.cyan,s.salmon,s.gray],padding:0,category:"simpleBar"}});function u(t){return t==="percentage"||t==="amount"?"show-values":""}var c=e.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"});var h=e.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function f(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function d(t,r,e){return e?Math.round(t*100/r):Math.round(t*1e4/r)/100}function l(t,r){return t*360/r}function v(t){return parseFloat((Math.floor(t*100)/100).toFixed(2))}function g(t,r,e,i){var n=v(t+t*r*Math.cos(Math.PI*e/180));var a=v(t+t*r*Math.sin(Math.PI*e/180));if(i!==undefined){var s=v(t+t*r*Math.cos(Math.PI*i/180));var o=v(t+t*r*Math.sin(Math.PI*i/180));return{x1:n,y1:a,x2:s,y2:o}}return{x:n,y:a}}function p(t,r,e,i,n){var a=v(n/2*t);return"A ".concat(a,", ").concat(a," 0 ").concat(r," ").concat(v(e),", ").concat(v(i))}function b(t,r,e,i,n){var a=(t-r)*(n-i)/(e-r)+i;return a<i?i:a>n?n:a}function m(t){return b(t,300,900,70,150)}function y(t){return Math.round(t/m(t))}function w(t,r){var e=t/r;var i=Math.pow(10,Math.floor(Math.log10(e)));var n=e/i;var a;if(n>5){a=10*i}else if(n>3){a=5*i}else if(n>2){a=3*i}else if(n>1.5){a=2*i}else if(n>1){a=1.5*i}else{a=i}return a}function x(t){if(this.popoverEl&&this.popoverEl.open&&t.key==="Enter"){var r=this.popoverEl.querySelector("button");r&&r.click()}}function k(t,r){if(this.popoverEl&&!this.isTabbing){r.coords={x:t.clientX,y:t.clientY};A(this.popoverEl,r);N(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function M(t,r){if(this.popoverEl&&this.isTabbing){this.focusedSliceId=r.id;r.coords=n(t.target);r.coords.x=r.coords.x+30;r.coords.y=r.coords.y+30;A(this.popoverEl,r);N(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function z(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault();this.isTabbing=true;C.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault();this.isTabbing=true;_.call(this);break;case"Tab":B.call(this);break;case"Escape":this.popoverEl.open=false;this.userIsNavigating=false;break}}function A(t,r){t.open=false;if(r.title&&r.text){t.sliceDetails=Object.assign({},r);window.setTimeout((function(){return t.open=true}),30)}}function _(){var t=a(document.activeElement);var r=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;S.call(this,r)}function C(){if(this.sliceEls){var t=a(document.activeElement);var r=this.sliceEls.indexOf(t);if(r===-1){r=0}else if(r===0){r=this.sliceEls.length-1}else{r-=1}S.call(this,r)}}function S(t){var r=this;if(this.sliceEls&&this.el){this.userIsNavigating=true;this.componentWrapperEl.tabIndex=-1;this.el.focusable=false;this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.sliceEls[t].tabIndex=0;this.sliceEls[t].focusable=true;this.sliceEls[t].focus();this.focusedSliceId=this.sliceEls[t].id;window.setTimeout((function(){if(r.popoverEl){r.popoverEl.open=true}}),10)}}function B(){var t=this;this.focusedSliceId=undefined;this.sliceEls&&this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.userIsNavigating=false;window.setTimeout((function(){t.componentWrapperEl.tabIndex=0;t.el.focusable=true;if(t.popoverEl){t.popoverEl.open=false}}),100)}function D(t){return __awaiter(this,void 0,void 0,(function(){var r,e,i;var n=this;return __generator(this,(function(a){this.slicesDetails=[];r=0;e=Array.from(this.el.children);this.total=e.reduce((function(t,r){return t+=parseInt(r.getAttribute("amount")||"0")}),0);i=__spreadArray([],o[t].colors,true);if(this.chartType==="bar2"&&this.el.children.length<=4){i.splice(2,1)}if(t==="bar3"&&e.length===2){i=[i[1],i[3]]}if(t==="doughnut2"&&e.length<5){i.splice(2,1);if(e.length<4){i.shift()}}if(t==="bar5"&&!this.notStartedColor){i.shift()}e.forEach((function(e,a){var o=parseInt(e.getAttribute("amount")||"0");var u=d(o,n.total,true);var c=a;if(t==="bar6"){c=0}var h={amount:o,perc:u,legend:e.getAttribute("legend"),color:i[c]||s.gray,offset:r,id:"".concat(n.uid,"-").concat(a+1),title:e.getAttribute("popover-title"),text:e.getAttribute("popover-text"),buttonText:e.getAttribute("popover-button-text"),sliceRef:e,inSmallCluster:false,index:a};r+=o;n.slicesDetails.push(h)}));return[2]}))}))}function F(t,r){var e=__spreadArray([],t,true).sort((function(t,r){return t.amount===r.amount?0:t.amount>r.amount?-1:1}));var i=0;e.filter((function(t){return t.amount>0})).forEach((function(t,n){var a=e[n===0?e.length-1:n-1];var s=e[n===e.length-1?0:n+1];var o=d(a.amount,r,true);var u=d(s.amount,r,true);var c=t.perc===0?8:5;var h=t.perc<4;var f=o<c;var l=u<c;var v=h&&(f||l);t.inSmallCluster=v;t.offset=i;i+=t.amount}));return e}function T(t,r,e){var i=l(r,this.total)-90;var n=t/this.total*360;var a=i+n;var s=n>180?"1 1":"0 1";var o=n>180?"1 0":"0 0";var u=this.chartDetails.size/2;var c=this.chartDetails.thickness;var h=1;var f=e==="doughnut";var d=1.5;var v=f?2.25:3;if(n===360){a-=.01}var b=g(u,h,i+d,a);var m=g(u,c,i+v,a);var y="M ".concat(b.x1,", ").concat(b.y1," ");var w=p(h,s,b.x2,b.y2,this.chartDetails.size);var x=" L ".concat(m.x2,", ").concat(m.y2," ");var k=p(c,o,m.x1,m.y1,this.chartDetails.size);return y+w+x+k+" z"}function j(){var t=e.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return r("div",{id:"chart-instructions"},t)}function I(){return r("defs",null,r("filter",{id:"wmHoverDropShadow"},r("feGaussianBlur",{stdDeviation:"3"}),r("feOffset",{result:"offsetblur"}),r("feFlood",{"flood-color":"#333"}),r("feComposite",{operator:"in",in2:"offsetblur"}),r("feMerge",null,r("feMergeNode",null),r("feMergeNode",{in:"SourceGraphic"}))))}function H(t,r,e){var i=r.map((function(t){return l(t.amount,e)}));var n=i.some((function(r){return r!==0&&r<t}));if(n){var a=i.map((function(r){return r==0?r:Math.max(r,t)}));var s=a.reduce((function(r,e){return r+(e>t&&e!==0?e:0)}),0);var o=a.reduce((function(r,e){return r+(e>t&&e!==0?0:e)}),0);var u=360-o;var c=s-u;var h=c/u;var f=a.map((function(r){return r>t?r-h*r:r==0?0:t}));var d=0;r=r.map((function(t,r){var i=f[r]/360*e;var n=d;d+=i;return Object.assign(Object.assign({},t),{amount:i,offset:n})}))}return r}function K(t){var e=this;var i=this.chartDetails.size+this.chartDetails.padding;var n=t==="doughnut";var a=n?this.slicesDetails:F(this.slicesDetails,this.total);a=H(7,a,this.total);return r("div",{class:"chart-wrapper doughnut-wrapper"},r("svg",{width:i+"px",height:i+"px",id:"graphic-".concat(this.uid),class:"doughnut-svg"},I(),a.map((function(r){return E.call(e,r,t)})),G.call(this),n?r("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},d(a[0].amount,this.total,true)+"%"):r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")"),"text-anchor":"middle","dominant-baseline":"middle"},a.map((function(t){return t.amount>0&&!t.inSmallCluster?W.call(e,t):""})))))}function N(t,r){t.forEach((function(t){if(t.dataset.segmentindex&&parseInt(t.dataset.segmentindex)!==r.index){t.classList.add("faded")}else{t.classList.remove("faded")}}))}function O(t){t.forEach((function(t){t.classList.remove("faded")}))}function E(t,e){var i=this;var n=d(t.amount,this.total,true)+"%";return!isNaN(t.amount)&&r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("path",{id:t.id,class:"segment doughnut-segment",fill:t.amount?t.color:"transparent",d:T.call(this,t.amount,t.offset,e),onClick:function(r){return k.call(i,r,t)},onFocus:function(r){return M.call(i,r,t)},onKeyDown:function(t){return x.call(i,t)},role:"img","aria-label":"".concat(t.legend,", ").concat(n),"data-segmentindex":t.index}))}function G(){return this.isTabbing?r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("use",{tabindex:-1,id:"kfbg1",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfstroke",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfbg2",xlinkHref:"#".concat(this.focusedSliceId)})):""}function W(t){var e=l(t.offset+t.amount/2,this.total);var i=g(this.chartDetails.size/2,1.4,e-90),n=i.x,a=i.y;return r("text",{class:"value",x:n+"px",y:a+"px","data-segmentindex":t.index},"".concat(t.perc>0?t.perc:"<1","%"))}function L(t){var e=this;var i=t==="bar";var n=this.el.shadowRoot.querySelectorAll(".value");if(n.length>0){requestAnimationFrame((function(){var t=[];var r=4;var i=false;n.forEach((function(e){e.classList.remove("hidden");var n=parseInt(e.dataset.value);if(t.length>0&&n!=0){var a=e.getBoundingClientRect().left-r;t.forEach((function(t){var r=parseInt(t.dataset.value);var s=t.getBoundingClientRect().right>a;if(s){var o=n<r?e:t;o.classList.add("hidden");i=true}}))}if(!e.classList.contains("hidden")&&n>0){t.push(e)}}));(e.isBar||e.isDoughnut)&&e.showHiddenValuesMessage(i)}))}return r("div",{class:"chart-wrapper bar-wrapper"},i?r("div",{class:"single-perc"},d(this.slicesDetails[0].amount,this.total,true)+"%"):"",this.chartType==="bar3"&&this.drawAxis(),r("div",{class:"inner-stacked-bar-wrapper ".concat(u(this.valueFormat))},!i?r("div",{class:"values"},this.slicesDetails.map((function(t){return e.renderBarText(t,5)}))):"",r("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((function(t){return R.call(e,t,5)}))),i?Q.call(this):""))}function R(t,e){var i=this;var n=d(t.amount,this.total,false);var a=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper");var s=a?a.offsetWidth:this.el.offsetWidth;var o=n/100*s>=e;var u=o||t.amount==0?"".concat(n,"%"):"".concat(e,"px");var c="";if(this.valueFormat=="percentage"){c="".concat(d(t.amount,this.total,true)," %")}else if(this.valueFormat=="amount"){c=t.amount.toString()}return r("div",{class:"segment stacked-bar-segment ".concat(d(t.amount,this.total,false)===0?"zero":""," ").concat(o?"":"fixed-width"),style:{backgroundColor:t.color,width:u},onClick:function(r){return k.call(i,r,t)},onFocus:function(r){return M.call(i,r,t)},onKeyDown:function(t){return x.call(i,t)},"data-segmentindex":t.index},r("span",{class:"sr-only"},"".concat(t.legend," ").concat(c)))}function U(t){var e=this;var n=this.slicesDetails.map((function(t){return t.amount})).reduce((function(t,r){return t>r?t:r}));var a=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);var s=48;var o=this.el.getBoundingClientRect().width;var c=o-a-s;var h=y(c);var d=w(n,h);var l=h*d;var v=Math.floor((l-n)/d);h-=v;this.el.style.setProperty("--backgroundSize",100/h+"%");this.el.style.setProperty("--labelWidth",this.labelWidth);if(t==="bar7"&&!this.showBarLegend){this.el.style.setProperty("--labelWidth","0px")}var g=[];this.slicesDetails.forEach((function(r){r.legend&&g.push(V(r.legend,e.showBarLegend,t));g.push(q.call(e,r,d,h,n))}));var p=[];for(var b=1;b<=h;b++){var m=f(i(b,d));p.push(r("div",{class:"tick"},r("span",null,m)))}var x=t==="bar6"&&this.showGrid&&this.el.getBoundingClientRect().width>300;return r("div",{class:"chart-wrapper simple-bar-wrapper"},r("div",{class:"chart ".concat(u(this.valueFormat))},x&&r("div",{class:"gridlines"}),r("div",{class:"rows"},g)),x&&r("div",{class:"x-axis","aria-hidden":"true"},r("div",{class:"zero"},r("span",null,"0")),p))}function V(t,e,i){var n=i==="bar7"&&!e?" hidden":"";return r("label",{class:"label".concat(n)},t)}function q(t,e,i,n){var a=this;var s=this.currentChartType==="bar6"?e*i:n;var o=d(t.amount,s,false);var u=o?o+"%":"1px";var c=f(t.amount);var h=this.valueFormat==="amount"?c:"";if(this.currentChartType==="bar6"&&this.valueFormat==="percentage"){h=t.amount+"%"}else if(this.currentChartType==="bar7"&&this.valueFormat==="percentage"){h=(this.total===0?"0":d(t.amount,this.total,true))+"%"}return r("div",{class:"bar segment",style:{backgroundColor:t.color,width:u},onClick:function(r){return k.call(a,r,t)},onFocus:function(r){return M.call(a,r,t)},onKeyDown:function(t){return x.call(a,t)},"data-segmentindex":t.index},r("div",{class:"value"},h))}function P(t){var e=this;if(this.showLegend){var i=this.slicesDetails.reduce((function(t,r){return t=r.inSmallCluster?true:t}),false);this.isDoughnut&&this.showHiddenValuesMessage(i);return r("div",{class:"legend-wrapper"},r("div",{class:"legend ".concat(t," ").concat(this.mode==="bar"?"--top":"--bottom"),"aria-hidden":"true"},this.slicesDetails.map((function(t){var r=e.printModeFormat=="amount"?"".concat(t.amount,"/").concat(e.total):"".concat(d(t.amount,e.total,true),"%");if(!!t.amount||!!t.legend){return J.call(e,{key:t.legend,color:t.color},r,t)}}))),this.isDoughnut&&!this.printMode&&X())}}function J(t,e,i){var n=this;if(e===void 0){e=""}if(i===void 0){i=null}var a=function(t){if(i){i.coords={x:t.clientX,y:t.clientY};A(n.popoverEl,i);N(Array.from(n.el.shadowRoot.querySelectorAll("[data-segmentindex")),i)}};return r("div",{class:"legend-item",onClick:function(t){return a(t)},"data-segmentindex":i?i.index:null},r("div",{class:"legend-color",style:{backgroundColor:t.color}}),r("div",{class:"legend-text"},t.key,e&&r("span",{class:"print-value ".concat(this.printMode?"force-visible":"")},": ",e)))}function Q(){if(this.completionMessage){return r("div",{class:"completion-message"},this.completionMessage)}}function X(){return r("div",{class:"hidden-values-warning hidden"},c,r("br",null),h)}}}}));
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as r,H as a,g as i}from"./p-568c595f.js";import{t as o,j as n,a as s,k as l,l as p,i as d}from"./p-e995f7f0.js";const c=class{constructor(r){e(this,r),this.wmDatepickerDateSelected=t(this,"wmDatepickerDateSelected",7),this.wmDatepickerInputBlurred=t(this,"wmDatepickerInputBlurred",7),this.openUp=!1,this.popupClicked=!1,this.toggleButtonClicked=!1,this.value="",this.disabled=!1,this.dateFormat="mm/dd/yyyy",this.errorMessage=void 0,this.labelPosition="top",this.label="",this.requiredField=!1,this.preselected=void 0,this.isExpanded=!1}get isDisabled(){return o(this.disabled)}get calendarDate(){let e=n(new Date);const t={"mm/dd/yyyy":"US","dd/mm/yyyy":"INT","yyyy/mm/dd":"ISO"};return this.value&&t[this.dateFormat]&&this.isValidIsoInternal(this.reformatDateInternal(t[this.dateFormat],"ISO",this.value))?e=this.reformatDateInternal(t[this.dateFormat],"ISO",this.value):this.preselected&&(e=this.preselected),e}handleDisabledChange(){s(this.el,this.isDisabled)}updateValue(){this.inputEl.value=this.value?this.value:""}announceError(){this.errorMessage&&setTimeout((()=>this.announce(this.errorMessage)),100)}togglePopup(){this.isExpanded?this.closePopup():this.openPopup(),this.toggleButtonClicked=!0}closePopup(e=!1){this.isExpanded=!1,this.calEl.view="day",this.calEl.view="day",this.popupEl.classList.remove("open"),window.setTimeout((()=>{this.popupEl.style.visibility="hidden"}),250),e&&this.toggleEl.focus()}openPopup(){this.openUp=l(this.el,this.popupEl.clientHeight,this.labelWrapperEl.clientHeight),p(this.el,336)?(this.popupEl.style.left="0",this.popupEl.style.right="auto"):(this.popupEl.style.right="0",this.popupEl.style.left="auto"),this.popupEl.style.visibility="visible",window.requestAnimationFrame((()=>{this.popupEl.classList.add("open")})),this.isExpanded=!0,this.calEl.focusDate=this.calendarDate,this.calEl.startDate=this.calendarDate,this.calEl.focusCell()}handleInput(e){this.value=e.target.value}handleInputBlur(){this.dpWrapperEl.classList.remove("focus"),this.wmDatepickerInputBlurred.emit()}handleInputFocus(){this.dpWrapperEl.classList.add("focus")}handleInputChange(){const e=new CustomEvent("change");this.el.dispatchEvent(e)}handleKey(e){"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),this.closePopup(!0))}blurHandler(){this.popupClicked||this.toggleButtonClicked||!this.isExpanded||this.closePopup(),this.popupClicked=!1,this.toggleButtonClicked=!1}handleBlurOnWindow(){this.isExpanded&&this.closePopup()}handleCellTriggered(e){let t=e.detail.cell,r=t.getAttribute("data-year")+"-"+t.getAttribute("data-month")+"-"+t.textContent.padStart(2,"0");this.wmDatepickerDateSelected.emit({date:r});const a=new CustomEvent("input");this.el.dispatchEvent(a);const i=new CustomEvent("change");this.el.dispatchEvent(i),this.closePopup(!0)}async reformatDate(e,t,r){return this.reformatDateInternal(e,t,r)}reformatDateInternal(e,t,r){if(!r)return"";if(!/^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/.test(r))return r;{const a=r.replace(/[\-\.]/gi,"/").split("/");switch(t){case"US":return a[1].padStart(2,"0")+"/"+a[2].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"INT":return a[2].padStart(2,"0")+"/"+a[1].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"ISO":if("US"===e)return a[2].padStart(4,"20")+"-"+a[0].padStart(2,"0")+"-"+a[1].padStart(2,"0");if("INT"===e)return a[2].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[0].padStart(2,"0");if("ISO"===e)return a[0].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[2].padStart(2,"0");default:return a.join("/")}}}async isValidIso(e){return this.isValidIsoInternal(e)}isValidIsoInternal(e){if(e&&/^\d\d\d\d[-]\d\d[-]\d\d$/.test(e)){const t=e.split("-"),r=parseInt(t[2],10),a=parseInt(t[1],10),i=parseInt(t[0],10);if(i<1e3||i>3e3||0==a||a>12)return!1;let o=[31,28,31,30,31,30,31,31,30,31,30,31];return(i%400==0||i%100!=0&&i%4==0)&&(o[1]=29),r>0&&r<=o[a-1]}return!1}componentWillLoad(){""===this.label&&console.error("You must include a label prop for the datepicker input (for accessibility reasons), even if the label position is none."),s(this.el,this.isDisabled)}componentDidLoad(){this.calEl.addEventListener("click",(()=>{this.popupClicked=!0}))}announce(e){this.liveRegionEl.textContent===e&&(e+=" "),this.liveRegionEl.textContent=e}render(){return r(a,{"aria-busy":"false",class:this.errorMessage?"invalid":""},r("div",{ref:e=>this.dpWrapperEl=e,class:`wrapper label-${this.labelPosition} ${this.errorMessage?"invalid":""}`},r("div",{class:"label-wrapper",ref:e=>this.labelWrapperEl=e},"none"!==this.labelPosition&&r("label",{id:"datepickerLabel",htmlFor:"date-input",class:"label",title:`${this.label} (${this.dateFormat})`},this.label,this.requiredField&&r("span",{"aria-hidden":"true",class:"required"},"*"))),r("div",null,r("div",{class:"single-wrapper input"},r("input",{disabled:this.isDisabled,type:"text",id:"single-date-input",class:"date-input",name:"date",placeholder:this.dateFormat,value:this.value,onFocus:()=>this.handleInputFocus(),onInput:e=>this.handleInput(e),onBlur:()=>this.handleInputBlur(),onChange:()=>this.handleInputChange(),ref:e=>this.inputEl=e,"aria-describedby":"error","aria-label":this.label,"aria-required":this.requiredField?"true":null}),r("div",{class:"container",id:"wm-container"},r("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-label":d.formatMessage({id:"date.selectDate",defaultMessage:"Select date",description:"Button text for screen readers."}),"aria-describedby":"single-date-input",ref:e=>this.toggleEl=e,"aria-expanded":`${this.isExpanded}`,class:"toggle",id:"toggle"},r("span",{class:"calendar",title:d.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})})),r("div",{class:`popup-wrapper ${this.calEl&&this.calEl.view}-view ${this.openUp?"expand-upwards":""}`,id:"popup-wrapper",ref:e=>this.popupEl=e,onClick:()=>this.popupClicked=!0},r("div",{tabIndex:0,onFocus:()=>this.calEl.focusLastFocusable()}),r("priv-calendar",{ref:e=>this.calEl=e,startDate:this.calendarDate,focusDate:this.calendarDate,class:"inside"}),r("div",{tabIndex:0,onFocus:()=>this.calEl.focusFirstFocusable()})),r("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),r("div",{id:"month-title",class:"sr-only"},d.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),r("div",{id:"year-title",class:"sr-only"},d.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"})))),r("div",{id:"error",class:"error"},this.errorMessage),r("div",{ref:e=>this.liveRegionEl=e,class:"sr-only","aria-live":"polite","aria-atomic":"true"}))))}static get delegatesFocus(){return!0}get el(){return i(this)}static get watchers(){return{disabled:["handleDisabledChange"],value:["updateValue"],errorMessage:["announceError"]}}};c.style=':host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-radius:3px;-webkit-margin-end:3px;margin-inline-end:3px}:host .wrapper .range-wrapper{max-width:257px;display:grid;grid-template-rows:minmax(21px, 1fr) 38px;grid-template-columns:120px 17px 120px;grid-template-areas:"start-label-wrapper . end-label-wrapper" "start-date-input hyphen end-date-input"}:host .wrapper .range-wrapper #start-label-wrapper{grid-area:start-label-wrapper}:host .wrapper .range-wrapper #end-label-wrapper{grid-area:end-label-wrapper}:host .wrapper .range-wrapper #start-date-input{grid-area:start-date-input}:host .wrapper .range-wrapper #hyphen{grid-area:hyphen}:host .wrapper .range-wrapper #end-date-input{grid-area:end-date-input}:host .wrapper .range-wrapper .label{text-wrap:wrap}:host .wrapper .range-wrapper.cal{max-width:305px;-webkit-column-gap:4px;-moz-column-gap:4px;column-gap:4px;grid-template-columns:120px 17px 120px 36px;grid-template-areas:"start-label-wrapper . end-label-wrapper ." "start-date-input hyphen end-date-input toggle-wrapper"}:host .wrapper .range-wrapper.cal #toggle-wrapper{grid-area:toggle-wrapper}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{c as wm_datepicker}
@@ -0,0 +1 @@
1
+ window.navigator.plugins.length>0&&console.log("Ripple component library","5.5.0-2"),window.addEventListener("keydown",(function(n){if("Tab"==n.key){var o=new Event("wmUserIsTabbing");window.dispatchEvent(o),document.querySelector("body").classList.add("wmcl-user-is-tabbing")}"ArrowLeft"!=n.key&&"ArrowUp"!=n.key&&"ArrowRight"!=n.key&&"ArrowDown"!=n.key||(o=new Event("wmUserIsKeying"),window.dispatchEvent(o),document.querySelector("body").classList.add("wmcl-user-is-keying"))})),window.addEventListener("mousedown",(function(){var n=new Event("wmUserIsNotTabbing");window.dispatchEvent(n),document.querySelector("body").classList.remove("wmcl-user-is-tabbing"),document.querySelector("body").classList.remove("wmcl-user-is-keying")}));const n=document.createElement("div");n.id="wm-tooltip-container";const o=document.createElement("div");o.id="wm-tooltip",o.classList.add("wm-tooltip"),o.setAttribute("popover","manual"),o.setAttribute("aria-hidden","true");const t=document.createElement("style");t.textContent="\n.wm-tooltip {\n position: fixed;\n overflow: hidden;\n pointer-events: none;\n line-height: normal;\n font-family: inherit;\n font-size: 0.875rem;\n text-transform: none;\n font-weight: normal;\n background: var(--wmcolor-tooltip-background);\n color: var(--wmcolor-tooltip-text);\n z-index: 999999;\n max-width: var(--wmTooltipMaxWidth, 13.75rem);\n margin-right: 1.5rem;\n padding: 0.375rem;\n transition-property: opacity;\n transition-delay: 0s;\n opacity: 0;\n inset: unset;\n top: 0;\n left: 0;\n transform: translateZ(0);\n will-change: transform;\n transform: translate(var(--wmTooltipLeft), var(--wmTooltipTop));\n border: none;\n}\n\n.wm-tooltip:popover-open {\n opacity: 0;\n}\n\n.wm-tooltip.show {\n transition-delay: 500ms;\n opacity: 1;\n}\n",document.head.appendChild(t),n.appendChild(o),document.querySelector("body").appendChild(n);
@@ -1 +1 @@
1
- import{r as o,c as t,h as r,g as e}from"./p-568c595f.js";const a=class{constructor(r){o(this,r),this.keydownOnNavItem=t(this,"keydownOnNavItem",7),this.selected=!1,this.focused=!1,this.link=""}handleKeyDown(o){const t=o.key,r=this.el;"Tab"!==t&&o.preventDefault(),this.keydownOnNavItem.emit({navItem:r,key:t})}render(){return r("div",{class:`navoption ${this.selected?"selected":""} ${this.focused?"focused":""}`},r("slot",null))}get el(){return e(this)}};a.style=":host{list-style:none;border-bottom:1px solid var(--wmcolor-navigator-item-border);width:100%;display:block;cursor:pointer}:host .navoption{color:var(--wmcolor-navigator-item-text);padding:0.9375rem 1.25rem;background:var(--wmcolor-navigator-item-background);font-size:0.875rem}:host .navoption.selected,:host .navoption:hover{background:var(--wmcolor-navigator-item-background-hover)}:host .navoption.focused:not(.selected){background:var(--wmcolor-navigator-item-background-focus);opacity:1}";export{a as priv_navigator_item}
1
+ import{r as o,c as t,h as r,g as a}from"./p-568c595f.js";const e=class{constructor(r){o(this,r),this.keydownOnNavItem=t(this,"keydownOnNavItem",7),this.selected=!1,this.focused=!1,this.link=""}handleKeyDown(o){const t=o.key,r=this.el;"Tab"!==t&&o.preventDefault(),this.keydownOnNavItem.emit({navItem:r,key:t})}render(){return r("div",{class:`navoption ${this.selected?"selected":""} ${this.focused?"focused":""}`},r("slot",null))}get el(){return a(this)}};e.style=":host{list-style:none;border-bottom:1px solid var(--wmcolor-navigator-item-border);width:100%;display:block;cursor:pointer}:host .navoption{color:var(--wmcolor-navigator-item-text);padding:0.9375rem 1.25rem;background:var(--wmcolor-navigator-item-background);font-size:0.875rem}:host .navoption.selected{background:var(--wmcolor-navigator-item-background-selected)}:host .navoption.focused,:host .navoption:hover{background:var(--wmcolor-navigator-item-background-focus);opacity:1}";export{e as priv_navigator_item}
@@ -0,0 +1 @@
1
+ import{r as e,f as t,h as r,H as o,g as a}from"./p-568c595f.js";import{g as n,d as p}from"./p-e995f7f0.js";import{a as s,h as i,g as l,r as h,b as c,c as m,d,e as w,f as b,i as g,j as x,k as f}from"./p-f92bd0c1.js";import{c as u}from"./p-d79fdf0b.js";const v=class{constructor(r){e(this,r),this.uid=n(),this.slicesDetails=[],this.debouncedSliceUpdate=p((async()=>{await l.call(this,this.currentChartType),t(this.el)}),100),this.chartType="doughnut1",this.label=void 0,this.labelWidth="150px",this.subinfo=void 0,this.valueFormat="none",this.showGrid=!0,this.showLegend=!0,this.showBarLegend=!1,this.notStartedColor=!1,this.printMode=!1,this.printModeFormat="amount",this.labelPosition="top",this.isTabbing=!1,this.userIsNavigating=!1,this.focusedSliceId=void 0}get popoverEl(){return this.el.shadowRoot.querySelector("priv-chart-popover")}get sliceEls(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))}get currentChartType(){return this.chartType}get chartDetails(){return s[this.currentChartType]}get ariaLabelText(){let e=`${this.label}`;return this.subinfo&&(e+=` ${this.subinfo}`),e}get isDoughnut(){return"doughnut"===this.chartDetails.category}get isStackedBar(){return"stackedBar"===this.chartDetails.category}get isSimpleBar(){return"simpleBar"===this.chartDetails.category}get isBar(){return this.isStackedBar||this.isSimpleBar}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKeydown(e){i.call(this,e)}showHiddenValuesMessage(e){const t=this.el.shadowRoot.querySelector(".hidden-values-warning");t?e?t.classList.remove("hidden"):t.classList.add("hidden"):requestAnimationFrame((()=>this.showHiddenValuesMessage(e)))}async componentWillLoad(){if(!this.label)throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.");await l.call(this,this.currentChartType),this.isDoughnut||new ResizeObserver((()=>{t(this.el)})).observe(this.el)}handleSliceUpdate(){this.debouncedSliceUpdate()}handlePopoverOpenChanged(e){if(!e.detail){const e=Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex]"));h(e)}}renderBarText(e,t){let o;"percentage"===this.valueFormat?o=0===e.perc&&e.amount>0?"<1%":`${e.perc}%`:"amount"===this.valueFormat&&(o=e.amount);const a=f(e.amount,this.total,!1),n=a/100*this.el.offsetWidth>=t;return r("div",{class:"value-wrapper "+(n?"":"fixed-width"),style:{width:n||0==e.amount?`${a}%`:`${t}px`}},r("span",{class:"value","data-value":e.amount,"data-segmentindex":e.index},e.amount>0&&o))}drawAxis(){if("bar3"===this.currentChartType)return r("svg",{class:"axis"},r("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),r("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),r("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),r("text",{x:"0.5",y:"-6"},"0%"),r("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}),r("text",{x:"100%",y:"-6"},"100%"))}renderChart(){return this.isSimpleBar?c.call(this,this.currentChartType):this.isStackedBar&&this.total>0?m.call(this,this.currentChartType):this.isDoughnut&&this.total>0?d.call(this,this.currentChartType):void 0}render(){return r(o,{onBlur:()=>x.call(this)},r("div",{ref:e=>this.componentWrapperEl=e,class:`component-wrapper ${this.currentChartType} ${this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""} ${"left"===this.labelPosition&&"bar4"===this.currentChartType?"left-label":""}`,role:"application","aria-label":this.ariaLabelText,tabindex:0,"aria-roledescription":u.interactiveChart,"aria-describedby":"chart-instructions"},r("label",{id:`label-${this.uid}`,class:`label --${this.labelPosition}`,htmlFor:`graphic-${this.uid}`},r("span",{class:"label-text"},this.label),this.subinfo?r("span",{class:"subinfo"},this.subinfo):""),this.isBar&&b.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&b.call(this,this.currentChartType),r("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":"",onIntChartPopoverOpenChanged:e=>this.handlePopoverOpenChanged(e)}),this.isBar&&!this.printMode&&g()),w())}static get delegatesFocus(){return!0}get el(){return a(this)}};v.style=":host{--wmcolor-chart-label-text-negative:var(--wmcolor-text-negative);--wmcolor-chart-label-text-positive:var(--wmcolor-text-positive);--wmcolor-chart-label-text:var(--wmcolor-text);--wmcolor-chart-subinfo-text:var(--wmcolor-text);--wmcolor-chart-value-text:var(--wmcolor-text);display:block}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;outline:none;}:host .component-wrapper:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:600;position:relative}:host .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:var(--wmcolor-chart-subinfo-text)}:host .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .label.--none{display:none}:host .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex;gap:2px;margin-bottom:8px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex;gap:2px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .segment{print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .segment.fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper .fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper .faded{opacity:0.3}:host .component-wrapper path:active,:host .component-wrapper path:hover,:host .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment:not(:focus-visible),:host .component-wrapper path:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper path:focus.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:active.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment:not(:focus-visible){-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper .stacked-bar-segment:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper #kfbg1{stroke:white;stroke-width:10px}:host .component-wrapper #kfstroke{stroke:var(--wmcolor-interactive-focus);stroke-width:6px}:host .component-wrapper #kfbg2{stroke:white;stroke-width:2px}:host .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,:host .component-wrapper.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,:host .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, var(--wmcolor-chart-gridline) 1px, transparent 1px);background-position:-1px;border-left:1px solid var(--wmcolor-chart-gridline);border-bottom:1px solid var(--wmcolor-chart-gridline);background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:focus.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:focus.bar:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.bar6 .bar:focus-visible,:host .component-wrapper.bar7 .bar:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .hidden-values-warning.hidden{display:none}@media print{:host .component-wrapper .hidden-values-warning{display:none}}:host #chart-instructions{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item.faded{opacity:0.3}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .legend-wrapper .legend .print-value{display:none}:host .component-wrapper .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .component-wrapper .legend-wrapper .legend .print-value{display:unset}}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}";export{v as wm_chart}
@@ -1 +1 @@
1
- import{r as t,f as i,h as e,H as o,g as s}from"./p-568c595f.js";import{d as r,E as n,x as a,F as l,G as h,H as c}from"./p-e995f7f0.js";import{n as p,o as d}from"./p-0f0466c6.js";import{l as g,c as v,g as x}from"./p-d79fdf0b.js";const u=class{constructor(i){t(this,i),this.minTickWidth=120,this.popoverData=[],this.focusedDataPoint=[0,0],this.dataPointMatrix=[],this.xIntervals=[],this.displayedXIntervals=[],this.yIntervals=[],this.lineStyles=[{color:"#8b86ca",icon:"f536"},{color:"#2e1b46",icon:"f12f"},{color:"#0089e4",icon:"f763"},{color:"#088000",icon:"f4ce"},{color:"#ea8500",icon:"f70a"},{color:"#d54f41",icon:"f536"},{color:"#146ca9",icon:"f6ff"}],this.debouncedResize=r((async()=>{this.displayedXIntervals=this.determineDisplayedXIntervals()}),100),this.label=void 0,this.description="",this.xAxisLabel=void 0,this.yAxisLabel=void 0,this.lineData=void 0,this.units="null,null",this.labelWidth="120px",this.highlightQualifier="highlighted",this.highlightStart=void 0,this.highlightEnd=void 0,this.visibilityToggles=!1,this.showDeltas=!1,this.yRange=void 0,this.parsedLineData={},this.popoverIndex=-1,this.focusedLine=-1,this.hiddenLines=[],this.isTabbing=!1,this.intervalSkip=0,this.announcement=""}parseData(){this.parsedLineData=JSON.parse(this.lineData),this.yIntervals=this.calcYIntervals().reverse(),this.xIntervals=Object.keys(Object.values(this.parsedLineData)[0]),this.displayedXIntervals=this.determineDisplayedXIntervals(),this.dataPointMatrix=Object.entries(this.parsedLineData).map((t=>this.buildLineDataPointDetails(t[0],t[1]))),this.popoverData=n(this.dataPointMatrix)}handleIntervalSkip(){this.parseData()}get hasPartialInterval(){return this.intervalSkip>0&&this.xIntervals.length%2==0}get parsedUnits(){return a(this.units).map((t=>"null"===t?null:t))}get visibilityToggleEls(){return this.legendEl.querySelectorAll("wm-button")}get lineEls(){return this.plotAreaEl.querySelectorAll(".line")}get firstVisibleLineIdx(){let t=0;for(;this.hiddenLines.includes(t);)t++;return t<this.dataPointMatrix.length?t:-1}get pointEls(){return this.plotAreaEl.querySelectorAll(".point")}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}componentWillLoad(){this.parseData()}componentDidLoad(){new ResizeObserver((()=>this.debouncedResize())).observe(this.el)}handleVisibilityToggleKeydown(t,i){switch(t.key){case"Tab":t.shiftKey||-1===this.firstVisibleLineIdx||(t.preventDefault(),this.announce(this.lineFocusMessage(this.firstVisibleLineIdx)),this.focusDataPoint(this.firstVisibleLineIdx,0));break;case"ArrowUp":case"ArrowLeft":t.preventDefault();const e=l(i,-1,this.dataPointMatrix.length-1);this.visibilityToggleEls[e].focus();break;case"ArrowDown":case"ArrowRight":t.preventDefault();const o=l(i,1,this.dataPointMatrix.length-1);this.visibilityToggleEls[o].focus()}}handleDataPointKeydown(t){const[i,e]=this.focusedDataPoint,o=this.lineEls[i].querySelectorAll(".point").length,s=this.dataPointMatrix.length;switch(t.key){case"Tab":t.shiftKey&&this.visibilityToggles&&(t.preventDefault(),this.visibilityToggleEls[0].focus());break;case"ArrowUp":t.preventDefault();let r=i;do{r=l(r,-1,s-1)}while(this.hiddenLines.includes(r));this.announce(this.lineFocusMessage(r)),this.focusDataPoint(r,e);break;case"ArrowDown":t.preventDefault();let n=i;do{n=l(n,1,s-1)}while(this.hiddenLines.includes(n));this.announce(this.lineFocusMessage(n)),this.focusDataPoint(n,e);break;case"ArrowLeft":t.preventDefault();const a=l(e,-1,o-1);this.focusDataPoint(i,a);break;case"ArrowRight":t.preventDefault();const h=l(e,1,o-1);this.focusDataPoint(i,h)}}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}lineFocusMessage(t){const i=this.dataPointMatrix[t][0].lineLabel,e=this.dataPointMatrix[t].filter((t=>null!==t.yValue)).length;return`${i}, line ${t+1} of ${this.dataPointMatrix.length} with ${e} data points`}focusDataPoint(t,i){const e=this.lineEls[t].querySelectorAll(".point")[i];this.pointEls.forEach((t=>t.tabIndex=-1)),e.tabIndex=0,e.focus(),this.focusedDataPoint=[t,i]}focusDataPointByEl(t){const i=parseInt(t.dataset.lineidx),e=Array.from(t.parentElement.querySelectorAll(".point")).indexOf(t);this.pointEls.forEach((t=>t.tabIndex=-1)),t.tabIndex=0,t.focus(),this.focusedDataPoint=[i,e]}calcYIntervals(){let t=[];if(this.yRange)t=a(this.yRange).map((t=>parseInt(t)));else{let i=[];Object.values(this.parsedLineData).flat().forEach((t=>i.push(...Object.values(t))));const e=i.filter((t=>null!==t));let o=Math.min(...e);const s=Math.max(...e);let r=d(s-o,4),n=r;for(;o%r!=0&&n>0;)o--,n--;r=d(s-o,4);let a=o;for(;a<=s+r;)t.push(a),a+=r}return t}determineDisplayedXIntervals(){const t=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?Math.round(this.plotAreaEl.clientWidth/this.minTickWidth):this.xIntervals.length,{skipInterval:i,skippedList:e}=h(this.xIntervals,t);return this.intervalSkip=i,e}buildLineDataPointDetails(t,i){let e=[];const o=Object.entries(i);let s;return o.forEach(((i,r)=>{const[n,a]=i;let l=100/(o.length-1)*r;const h=null===a?null:100-c(a,this.yIntervals[this.yIntervals.length-1],this.yIntervals[0]);0===r&&(l+=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?8/this.plotAreaEl.clientWidth*100:1),n!==this.highlightStart||s||(s=!0),e.push({lineLabel:t,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:s}),n===this.highlightEnd&&s&&(s=!1)})),e}toggleLineVisibility(t){this.hiddenLines.includes(t)?this.hiddenLines=this.hiddenLines.filter((i=>i!==t)):this.hiddenLines.push(t),i(this.el)}resetDataPointFocus(){this.popoverIndex=-1,this.pointEls.forEach((t=>t.tabIndex=-1)),-1!==this.firstVisibleLineIdx&&(this.lineEls[this.firstVisibleLineIdx].querySelectorAll(".point")[0].tabIndex=0,this.focusedDataPoint=[this.firstVisibleLineIdx,0])}calcDelta(t,i){let e;if(null===t.yValue||null===i.yValue)e=g.noData;else if(t.yValue==i.yValue)e="0%";else if(0==i.yValue)e="-";else{const o=Math.round((t.yValue-i.yValue)/i.yValue*100*100)/100;e=`${o>0?"+":""}${o}%`}return e}renderLegend(){const t=Object.keys(this.parsedLineData);return e("div",{ref:t=>this.legendEl=t,class:"legend"},t.map(((t,i)=>{const o=this.hiddenLines.includes(i);return e("div",{id:`legend-label-${i}`,class:"legend-label "+(-1!==this.focusedLine&&this.focusedLine!==i?"faded":""),onMouseEnter:()=>this.focusedLine=o?-1:i,onMouseLeave:()=>this.focusedLine=-1},this.renderIcon(i),t,this.visibilityToggles&&this.renderVisibilityToggle(t,i,o))})))}renderVisibilityToggle(t,i,o){return e("wm-button",{id:`visibility-button-${i}`,class:"visibility-toggle","label-for-identical-buttons":`${0===i?`Toggle line visibility list with ${this.dataPointMatrix.length} items`:""} ${o?x.show:x.hide} ${t} toggle ${o?"pressed":""}`,"button-type":"navigational",tooltip:o?x.show:x.hide,tooltipPosition:"bottom",icon:o?"f209":"f208",onClick:()=>this.toggleLineVisibility(i),onKeyDown:t=>this.handleVisibilityToggleKeydown(t,i),onFocus:()=>this.popoverIndex=-1})}renderIcon(t){const{color:i,icon:o}=this.lineStyles[t];return e("span",{class:"icon",style:{"--iconColor":i,"--icon":`"\\${o}"`,"--translation":5===t?"rotate(180deg)":"unset"}})}renderXIntervals(){return e("div",{class:"x-intervals",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`}},this.xIntervals.map((t=>e("span",{class:"x-interval "+(this.displayedXIntervals.includes(t)?"":"hidden")},t))))}renderYIntervals(){return e("div",{ref:t=>this.yIntervalsEl=t,class:"y-intervals"},this.yIntervals.map((t=>e("span",{class:"y-interval"},p(t)))))}renderData(){return this.dataPointMatrix.map(((t,i)=>{let o=this.focusedLine===i?"focused":"faded";const s=this.hiddenLines.includes(i);return e("div",{class:`line ${-1!==this.focusedLine?o:""} ${s?"hidden":""}`},this.renderLines(i),this.renderPoints(i))}))}renderPoints(t){const i=this.dataPointMatrix[t];return e("div",{class:"line-icons"},i.map(((o,s)=>{const{lineLabel:r,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:c}=o;if(null!==a){const{color:p,icon:d}=this.lineStyles[t],v=0===t&&0===s?0:void 0,x={"--icon":`"\\${d}"`,"--iconColor":p,"--xPosition":l+"%","--yPosition":h+"%","--translation":5===t?"translate(-50%, -50%) rotate(180deg)":"translate(-50%, -50%)"};let u=`${r} ${c?this.highlightQualifier:""} ${this.xAxisLabel} ${n+(this.parsedUnits[0]?this.parsedUnits[0]:"")}, ${this.yAxisLabel}: ${a+(this.parsedUnits[1]?this.parsedUnits[1]:"")}`;if(this.showDeltas&&s>0){const t=i[s-1];u+=`, ${g.getChangeSince(t.xValue)} ${this.calcDelta(o,t)}`}return e("span",{id:`${r}-${s}`,role:"img","aria-label":u,tabIndex:v,class:"point icon",style:x,"data-lineidx":t,"data-xvalue":n,onKeyDown:t=>this.handleDataPointKeydown(t),onFocus:()=>this.popoverIndex=s,onClick:t=>this.focusDataPointByEl(t.target),onMouseEnter:()=>this.popoverIndex=s})}})))}renderLines(t){const i=this.dataPointMatrix[t];return e("svg",{class:"line-svg"},i.map(((o,s)=>{if(null!==o.yValue&&s!==i.length-1&&null!==i[s+1].yValue){const{color:r}=this.lineStyles[t],{xPositionPercent:n,yPositionPercent:a}=o,{xPositionPercent:l,yPositionPercent:h}=i[s+1];return e("line",{x1:n+"%",y1:a+"%",x2:l+"%",y2:h+"%",stroke:r,"stroke-width":"2px"})}})))}renderHoverAreas(){return e("div",{class:"hover-area-wrapper",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`},onMouseLeave:()=>this.popoverIndex=-1},this.xIntervals.map(((t,i)=>e("div",{onMouseEnter:()=>this.popoverIndex=i}))))}renderPopover(){if(!(this.popoverData&&this.popoverData[this.popoverIndex]&&this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`)))return"";const t=this.popoverData[this.popoverIndex],i=t[0].xPositionPercent,o=t.map((t=>t.yPositionPercent)).filter((t=>null!==t)),s=o.reduce(((t,i)=>t+i),0)/o.length,r=this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`),n=this.el.getBoundingClientRect(),a=r.getBoundingClientRect(),l=a.left-n.left,h=n.right-a.right>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),c=l>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),p=8/this.plotAreaEl.clientWidth*100;let d={"--leftPosition":h?i+p+"%":"unset","--rightPosition":c?100-i+p+"%":"unset","--topPosition":s+"%",transform:"translateY(-50%)"};if(!c&&!h){const t=`0px - ${this.labelWidth} - 20px - ${this.yIntervalsEl.clientWidth+"px"} + ${this.el.scrollLeft+"px"} + 2px`;d={"--leftPosition":"0%","--topPosition":"0%",maxWidth:Math.min(this.el.clientWidth-2,400)+"px",transform:`translateX(calc(${t}))`}}return e("div",{ref:t=>this.popoverEl=t,class:"popover",style:d},e("div",{class:"title"},t[0].xValue,this.parsedUnits[0]&&e("span",{class:"unit --x"},"(",this.parsedUnits[0],")")),this.showDeltas&&this.popoverIndex>0&&e("div",{class:"comparison-title"},g.getChangeSince(this.popoverData[this.popoverIndex-1][0].xValue)),this.renderPopoverTable())}renderPopoverTable(){return e("table",{class:"popover-table"},this.popoverData[this.popoverIndex].map(((t,i)=>{if(!this.hiddenLines.includes(i)){const{lineLabel:o,yValue:s}=t,r=this.popoverIndex>0?this.popoverData[this.popoverIndex-1][i]:null,n=null!==s?(new Intl.NumberFormat).format(s):null;return e("tr",{class:"popover-row"},e("td",null,this.renderIcon(i)),e("td",{class:"row-label"},o),e("td",{class:"row-value"},null===s?g.noData:n,null!==s&&this.parsedUnits[1]&&e("span",{class:"unit --y"},this.parsedUnits[1])),this.showDeltas&&r&&this.renderDeltas(t,r))}})))}renderDeltas(t,i){const o=this.calcDelta(t,i),s="+"==o.toString()[0]||"-"==o?"positive":"-"==o.toString()[0]?"negative":"";return i&&e("td",{class:`delta --${s}`},o)}renderHoverIndicator(){return this.dataPointMatrix.length>0&&this.dataPointMatrix[0][this.popoverIndex]?e("div",{class:"hover-indicator",style:{"--xPosition":this.dataPointMatrix[0][this.popoverIndex].xPositionPercent+"%"}}):""}renderHighlight(){const t=this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent,i=this.highlightEnd?100-this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent:0;return e("div",{class:"highlight",style:{"--startPercentage":t+"%","--endPercentage":i+"%"}})}render(){return e(o,{onBlur:()=>this.resetDataPointFocus(),onMouseLeave:()=>this.popoverIndex=-1},e("div",{class:"component-wrapper",role:"application","aria-roledescription":v.interactiveChart,"aria-label":this.label,"aria-describedby":"chart-description"},this.renderLegend(),e("div",{class:"chart-wrapper"},e("div",{class:"chart-label --y-axis",style:{"--labelWidth":this.labelWidth}},this.yAxisLabel,this.parsedUnits[1]&&` (${this.parsedUnits[1]})`),this.renderYIntervals(),e("div",{ref:t=>this.plotAreaEl=t,class:"plot-area "+(this.hasPartialInterval?"":"right-border"),style:{"--backgroundSize":`${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`}},this.highlightStart&&this.renderHighlight(),this.renderData(),this.renderHoverAreas()),-1!==this.popoverIndex&&this.renderHoverIndicator(),-1!==this.popoverIndex&&this.renderPopover(),this.renderXIntervals(),e("div",{class:"chart-label --x-axis"},this.xAxisLabel,this.parsedUnits[0]&&` (${this.parsedUnits[0]})`)),e("div",{id:"chart-description",class:"sr-only"},`${g.instructions} ${this.description}`),e("div",{ref:t=>this.liveRegionEl=t,"aria-live":"polite",class:"sr-only"},this.announcement)))}get el(){return s(this)}static get watchers(){return{lineData:["parseData"],intervalSkip:["handleIntervalSkip"]}}};u.style=':host{--wmcolor-linechart-currentposition:var(--wmcolor-lavender);--wmcolor-linechart-delta-text-negative:var(--wmcolor-text-negative);--wmcolor-linechart-delta-text-positive:var(--wmcolor-text-positive);--wmcolor-linechart-gridline:var(--wmcolor-chart-gridline);--wmcolor-linechart-highlight-background:var(--wmcolor-interactive-background-highlight);--wmcolor-linechart-popover-background:var(--wmcolor-chart-popover-background);display:block;height:500px;width:100%;font-size:14px;overflow-y:visible;overflow-x:auto}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:562px;width:100%;height:100%;outline:none}:host .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;color:var(--iconColor);-webkit-transform:var(--translation, unset);transform:var(--translation, unset)}:host .icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:var(--icon);padding:0 3px;z-index:1}:host .icon:after{color:white;position:absolute;left:3px;-webkit-transform:scale(180%);transform:scale(180%);display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:var(--icon);z-index:0}:host .legend{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px 16px;margin-top:4px;margin-bottom:16px}:host .legend .legend-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:default;font-weight:600}:host .legend .legend-label.faded{opacity:0.3}:host .legend .legend-label .icon{margin-right:4px}:host .legend .visibility-toggle{margin-left:4px}:host .chart-wrapper{position:relative;-ms-flex-positive:1;flex-grow:1;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:1fr auto auto;margin-right:16px}:host .chart-label{font-size:14px;font-weight:600}:host .chart-label.--y-axis{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:var(--labelWidth);align-self:center;margin-right:16px;grid-area:1/1/2/2;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}:host .chart-label.--x-axis{margin-top:16px;text-align:center;grid-area:3/3/4/4}:host .y-intervals{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;grid-area:1/2/2/3;margin-right:4px}:host .y-intervals .y-interval{text-align:right}:host .x-intervals{display:grid;grid-template-columns:var(--columns);grid-area:2/3/3/4;line-height:1;margin-top:4px}:host .x-intervals .x-interval{text-align:center}:host .x-intervals .x-interval:first-child{text-align:left}:host .x-intervals .x-interval:last-child{text-align:right}:host .x-intervals .x-interval.hidden{visibility:hidden}:host .plot-area{position:relative;grid-area:1/3/2/4;background-image:linear-gradient(90deg, var(--wmcolor-linechart-gridline) 1px, transparent 1px);border-bottom:1px solid var(--wmcolor-linechart-gridline);background-size:var(--backgroundSize)}:host .plot-area.right-border{border-right:1px solid var(--wmcolor-linechart-gridline)}:host .line{position:absolute;width:100%;height:100%}:host .line .icon{position:absolute;-webkit-transform:var(--translation);transform:var(--translation);left:var(--xPosition);top:var(--yPosition);z-index:1}:host .line .icon:focus{z-index:2;outline:none}:host .line .icon:focus:before{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0;border-radius:3px}:host .line .line-svg{height:100%;width:100%}:host .line.faded{opacity:0.3}:host .line.focused{z-index:1}:host .line.hidden{visibility:hidden}:host .hover-area-wrapper{position:absolute;width:100%;height:100%;top:0;left:0;display:grid;grid-template-rows:1fr;grid-template-columns:var(--columns)}:host .hover-indicator{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;height:100%;width:2px;border:1px solid var(--wmcolor-linechart-currentposition);-webkit-transform:translateX(-50%);transform:translateX(-50%);left:var(--xPosition);grid-column:3/4;grid-row:1/2;pointer-events:none}:host .popover{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:400px;background-color:var(--wmcolor-linechart-popover-background);position:absolute;top:var(--topPosition, 0);left:var(--leftPosition, unset);right:var(--rightPosition, unset);padding:16px;border-radius:5px;-webkit-box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;z-index:3;grid-column:3/4;grid-row:1/2;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box}:host .popover .title{font-size:16px;font-weight:600}:host .popover .comparison-title{font-style:italic;margin-top:4px}:host .popover .unit{font-size:12px;font-weight:600}:host .popover .unit.--x{margin-left:4px}:host .popover .popover-table{margin-top:16px}:host .popover .popover-table .popover-row{line-height:1}:host .popover .popover-table .popover-row:not(:last-child) td{padding-bottom:8px}:host .popover .popover-table .popover-row .row-label{font-weight:600;padding-right:16px;overflow-wrap:anywhere}:host .popover .popover-table .popover-row .row-label .icon{margin-right:4px}:host .popover .popover-table .popover-row .row-value,:host .popover .popover-table .popover-row .delta{text-align:right;white-space:nowrap}:host .popover .popover-table .popover-row .delta{padding-left:12px;font-weight:600}:host .popover .popover-table .popover-row .delta.--positive{color:var(--wmcolor-linechart-delta-text-positive)}:host .popover .popover-table .popover-row .delta.--negative{color:var(--wmcolor-linechart-delta-text-negative)}:host .highlight{position:absolute;height:100%;background-color:color-mix(in srgb, var(--wmcolor-linechart-highlight-background) 60%, transparent);left:var(--startPercentage);right:var(--endPercentage)}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{u as wm_line_chart}
1
+ import{r as t,f as i,h as e,H as o,g as s}from"./p-568c595f.js";import{d as r,E as n,x as a,F as l,G as h,H as c}from"./p-e995f7f0.js";import{n as p,o as d}from"./p-f92bd0c1.js";import{l as g,c as v,g as x}from"./p-d79fdf0b.js";const u=class{constructor(i){t(this,i),this.minTickWidth=120,this.popoverData=[],this.focusedDataPoint=[0,0],this.dataPointMatrix=[],this.xIntervals=[],this.displayedXIntervals=[],this.yIntervals=[],this.lineStyles=[{color:"#8b86ca",icon:"f536"},{color:"#2e1b46",icon:"f12f"},{color:"#0089e4",icon:"f763"},{color:"#088000",icon:"f4ce"},{color:"#ea8500",icon:"f70a"},{color:"#d54f41",icon:"f536"},{color:"#146ca9",icon:"f6ff"}],this.debouncedResize=r((async()=>{this.displayedXIntervals=this.determineDisplayedXIntervals()}),100),this.label=void 0,this.description="",this.xAxisLabel=void 0,this.yAxisLabel=void 0,this.lineData=void 0,this.units="null,null",this.labelWidth="120px",this.highlightQualifier="highlighted",this.highlightStart=void 0,this.highlightEnd=void 0,this.visibilityToggles=!1,this.showDeltas=!1,this.yRange=void 0,this.parsedLineData={},this.popoverIndex=-1,this.focusedLine=-1,this.hiddenLines=[],this.isTabbing=!1,this.intervalSkip=0,this.announcement=""}parseData(){this.parsedLineData=JSON.parse(this.lineData),this.yIntervals=this.calcYIntervals().reverse(),this.xIntervals=Object.keys(Object.values(this.parsedLineData)[0]),this.displayedXIntervals=this.determineDisplayedXIntervals(),this.dataPointMatrix=Object.entries(this.parsedLineData).map((t=>this.buildLineDataPointDetails(t[0],t[1]))),this.popoverData=n(this.dataPointMatrix)}handleIntervalSkip(){this.parseData()}get hasPartialInterval(){return this.intervalSkip>0&&this.xIntervals.length%2==0}get parsedUnits(){return a(this.units).map((t=>"null"===t?null:t))}get visibilityToggleEls(){return this.legendEl.querySelectorAll("wm-button")}get lineEls(){return this.plotAreaEl.querySelectorAll(".line")}get firstVisibleLineIdx(){let t=0;for(;this.hiddenLines.includes(t);)t++;return t<this.dataPointMatrix.length?t:-1}get pointEls(){return this.plotAreaEl.querySelectorAll(".point")}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}componentWillLoad(){this.parseData()}componentDidLoad(){new ResizeObserver((()=>this.debouncedResize())).observe(this.el)}handleVisibilityToggleKeydown(t,i){switch(t.key){case"Tab":t.shiftKey||-1===this.firstVisibleLineIdx||(t.preventDefault(),this.announce(this.lineFocusMessage(this.firstVisibleLineIdx)),this.focusDataPoint(this.firstVisibleLineIdx,0));break;case"ArrowUp":case"ArrowLeft":t.preventDefault();const e=l(i,-1,this.dataPointMatrix.length-1);this.visibilityToggleEls[e].focus();break;case"ArrowDown":case"ArrowRight":t.preventDefault();const o=l(i,1,this.dataPointMatrix.length-1);this.visibilityToggleEls[o].focus()}}handleDataPointKeydown(t){const[i,e]=this.focusedDataPoint,o=this.lineEls[i].querySelectorAll(".point").length,s=this.dataPointMatrix.length;switch(t.key){case"Tab":t.shiftKey&&this.visibilityToggles&&(t.preventDefault(),this.visibilityToggleEls[0].focus());break;case"ArrowUp":t.preventDefault();let r=i;do{r=l(r,-1,s-1)}while(this.hiddenLines.includes(r));this.announce(this.lineFocusMessage(r)),this.focusDataPoint(r,e);break;case"ArrowDown":t.preventDefault();let n=i;do{n=l(n,1,s-1)}while(this.hiddenLines.includes(n));this.announce(this.lineFocusMessage(n)),this.focusDataPoint(n,e);break;case"ArrowLeft":t.preventDefault();const a=l(e,-1,o-1);this.focusDataPoint(i,a);break;case"ArrowRight":t.preventDefault();const h=l(e,1,o-1);this.focusDataPoint(i,h)}}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}lineFocusMessage(t){const i=this.dataPointMatrix[t][0].lineLabel,e=this.dataPointMatrix[t].filter((t=>null!==t.yValue)).length;return`${i}, line ${t+1} of ${this.dataPointMatrix.length} with ${e} data points`}focusDataPoint(t,i){const e=this.lineEls[t].querySelectorAll(".point")[i];this.pointEls.forEach((t=>t.tabIndex=-1)),e.tabIndex=0,e.focus(),this.focusedDataPoint=[t,i]}focusDataPointByEl(t){const i=parseInt(t.dataset.lineidx),e=Array.from(t.parentElement.querySelectorAll(".point")).indexOf(t);this.pointEls.forEach((t=>t.tabIndex=-1)),t.tabIndex=0,t.focus(),this.focusedDataPoint=[i,e]}calcYIntervals(){let t=[];if(this.yRange)t=a(this.yRange).map((t=>parseInt(t)));else{let i=[];Object.values(this.parsedLineData).flat().forEach((t=>i.push(...Object.values(t))));const e=i.filter((t=>null!==t));let o=Math.min(...e);const s=Math.max(...e);let r=d(s-o,4),n=r;for(;o%r!=0&&n>0;)o--,n--;r=d(s-o,4);let a=o;for(;a<=s+r;)t.push(a),a+=r}return t}determineDisplayedXIntervals(){const t=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?Math.round(this.plotAreaEl.clientWidth/this.minTickWidth):this.xIntervals.length,{skipInterval:i,skippedList:e}=h(this.xIntervals,t);return this.intervalSkip=i,e}buildLineDataPointDetails(t,i){let e=[];const o=Object.entries(i);let s;return o.forEach(((i,r)=>{const[n,a]=i;let l=100/(o.length-1)*r;const h=null===a?null:100-c(a,this.yIntervals[this.yIntervals.length-1],this.yIntervals[0]);0===r&&(l+=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?8/this.plotAreaEl.clientWidth*100:1),n!==this.highlightStart||s||(s=!0),e.push({lineLabel:t,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:s}),n===this.highlightEnd&&s&&(s=!1)})),e}toggleLineVisibility(t){this.hiddenLines.includes(t)?this.hiddenLines=this.hiddenLines.filter((i=>i!==t)):this.hiddenLines.push(t),i(this.el)}resetDataPointFocus(){this.popoverIndex=-1,this.pointEls.forEach((t=>t.tabIndex=-1)),-1!==this.firstVisibleLineIdx&&(this.lineEls[this.firstVisibleLineIdx].querySelectorAll(".point")[0].tabIndex=0,this.focusedDataPoint=[this.firstVisibleLineIdx,0])}calcDelta(t,i){let e;if(null===t.yValue||null===i.yValue)e=g.noData;else if(t.yValue==i.yValue)e="0%";else if(0==i.yValue)e="-";else{const o=Math.round((t.yValue-i.yValue)/i.yValue*100*100)/100;e=`${o>0?"+":""}${o}%`}return e}renderLegend(){const t=Object.keys(this.parsedLineData);return e("div",{ref:t=>this.legendEl=t,class:"legend"},t.map(((t,i)=>{const o=this.hiddenLines.includes(i);return e("div",{id:`legend-label-${i}`,class:"legend-label "+(-1!==this.focusedLine&&this.focusedLine!==i?"faded":""),onMouseEnter:()=>this.focusedLine=o?-1:i,onMouseLeave:()=>this.focusedLine=-1},this.renderIcon(i),t,this.visibilityToggles&&this.renderVisibilityToggle(t,i,o))})))}renderVisibilityToggle(t,i,o){return e("wm-button",{id:`visibility-button-${i}`,class:"visibility-toggle","label-for-identical-buttons":`${0===i?`Toggle line visibility list with ${this.dataPointMatrix.length} items`:""} ${o?x.show:x.hide} ${t} toggle ${o?"pressed":""}`,"button-type":"navigational",tooltip:o?x.show:x.hide,tooltipPosition:"bottom",icon:o?"f209":"f208",onClick:()=>this.toggleLineVisibility(i),onKeyDown:t=>this.handleVisibilityToggleKeydown(t,i),onFocus:()=>this.popoverIndex=-1})}renderIcon(t){const{color:i,icon:o}=this.lineStyles[t];return e("span",{class:"icon",style:{"--iconColor":i,"--icon":`"\\${o}"`,"--translation":5===t?"rotate(180deg)":"unset"}})}renderXIntervals(){return e("div",{class:"x-intervals",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`}},this.xIntervals.map((t=>e("span",{class:"x-interval "+(this.displayedXIntervals.includes(t)?"":"hidden")},t))))}renderYIntervals(){return e("div",{ref:t=>this.yIntervalsEl=t,class:"y-intervals"},this.yIntervals.map((t=>e("span",{class:"y-interval"},p(t)))))}renderData(){return this.dataPointMatrix.map(((t,i)=>{let o=this.focusedLine===i?"focused":"faded";const s=this.hiddenLines.includes(i);return e("div",{class:`line ${-1!==this.focusedLine?o:""} ${s?"hidden":""}`},this.renderLines(i),this.renderPoints(i))}))}renderPoints(t){const i=this.dataPointMatrix[t];return e("div",{class:"line-icons"},i.map(((o,s)=>{const{lineLabel:r,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:c}=o;if(null!==a){const{color:p,icon:d}=this.lineStyles[t],v=0===t&&0===s?0:void 0,x={"--icon":`"\\${d}"`,"--iconColor":p,"--xPosition":l+"%","--yPosition":h+"%","--translation":5===t?"translate(-50%, -50%) rotate(180deg)":"translate(-50%, -50%)"};let u=`${r} ${c?this.highlightQualifier:""} ${this.xAxisLabel} ${n+(this.parsedUnits[0]?this.parsedUnits[0]:"")}, ${this.yAxisLabel}: ${a+(this.parsedUnits[1]?this.parsedUnits[1]:"")}`;if(this.showDeltas&&s>0){const t=i[s-1];u+=`, ${g.getChangeSince(t.xValue)} ${this.calcDelta(o,t)}`}return e("span",{id:`${r}-${s}`,role:"img","aria-label":u,tabIndex:v,class:"point icon",style:x,"data-lineidx":t,"data-xvalue":n,onKeyDown:t=>this.handleDataPointKeydown(t),onFocus:()=>this.popoverIndex=s,onClick:t=>this.focusDataPointByEl(t.target),onMouseEnter:()=>this.popoverIndex=s})}})))}renderLines(t){const i=this.dataPointMatrix[t];return e("svg",{class:"line-svg"},i.map(((o,s)=>{if(null!==o.yValue&&s!==i.length-1&&null!==i[s+1].yValue){const{color:r}=this.lineStyles[t],{xPositionPercent:n,yPositionPercent:a}=o,{xPositionPercent:l,yPositionPercent:h}=i[s+1];return e("line",{x1:n+"%",y1:a+"%",x2:l+"%",y2:h+"%",stroke:r,"stroke-width":"2px"})}})))}renderHoverAreas(){return e("div",{class:"hover-area-wrapper",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`},onMouseLeave:()=>this.popoverIndex=-1},this.xIntervals.map(((t,i)=>e("div",{onMouseEnter:()=>this.popoverIndex=i}))))}renderPopover(){if(!(this.popoverData&&this.popoverData[this.popoverIndex]&&this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`)))return"";const t=this.popoverData[this.popoverIndex],i=t[0].xPositionPercent,o=t.map((t=>t.yPositionPercent)).filter((t=>null!==t)),s=o.reduce(((t,i)=>t+i),0)/o.length,r=this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`),n=this.el.getBoundingClientRect(),a=r.getBoundingClientRect(),l=a.left-n.left,h=n.right-a.right>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),c=l>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),p=8/this.plotAreaEl.clientWidth*100;let d={"--leftPosition":h?i+p+"%":"unset","--rightPosition":c?100-i+p+"%":"unset","--topPosition":s+"%",transform:"translateY(-50%)"};if(!c&&!h){const t=`0px - ${this.labelWidth} - 20px - ${this.yIntervalsEl.clientWidth+"px"} + ${this.el.scrollLeft+"px"} + 2px`;d={"--leftPosition":"0%","--topPosition":"0%",maxWidth:Math.min(this.el.clientWidth-2,400)+"px",transform:`translateX(calc(${t}))`}}return e("div",{ref:t=>this.popoverEl=t,class:"popover",style:d},e("div",{class:"title"},t[0].xValue,this.parsedUnits[0]&&e("span",{class:"unit --x"},"(",this.parsedUnits[0],")")),this.showDeltas&&this.popoverIndex>0&&e("div",{class:"comparison-title"},g.getChangeSince(this.popoverData[this.popoverIndex-1][0].xValue)),this.renderPopoverTable())}renderPopoverTable(){return e("table",{class:"popover-table"},this.popoverData[this.popoverIndex].map(((t,i)=>{if(!this.hiddenLines.includes(i)){const{lineLabel:o,yValue:s}=t,r=this.popoverIndex>0?this.popoverData[this.popoverIndex-1][i]:null,n=null!==s?(new Intl.NumberFormat).format(s):null;return e("tr",{class:"popover-row"},e("td",null,this.renderIcon(i)),e("td",{class:"row-label"},o),e("td",{class:"row-value"},null===s?g.noData:n,null!==s&&this.parsedUnits[1]&&e("span",{class:"unit --y"},this.parsedUnits[1])),this.showDeltas&&r&&this.renderDeltas(t,r))}})))}renderDeltas(t,i){const o=this.calcDelta(t,i),s="+"==o.toString()[0]||"-"==o?"positive":"-"==o.toString()[0]?"negative":"";return i&&e("td",{class:`delta --${s}`},o)}renderHoverIndicator(){return this.dataPointMatrix.length>0&&this.dataPointMatrix[0][this.popoverIndex]?e("div",{class:"hover-indicator",style:{"--xPosition":this.dataPointMatrix[0][this.popoverIndex].xPositionPercent+"%"}}):""}renderHighlight(){const t=this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent,i=this.highlightEnd?100-this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent:0;return e("div",{class:"highlight",style:{"--startPercentage":t+"%","--endPercentage":i+"%"}})}render(){return e(o,{onBlur:()=>this.resetDataPointFocus(),onMouseLeave:()=>this.popoverIndex=-1},e("div",{class:"component-wrapper",role:"application","aria-roledescription":v.interactiveChart,"aria-label":this.label,"aria-describedby":"chart-description"},this.renderLegend(),e("div",{class:"chart-wrapper"},e("div",{class:"chart-label --y-axis",style:{"--labelWidth":this.labelWidth}},this.yAxisLabel,this.parsedUnits[1]&&` (${this.parsedUnits[1]})`),this.renderYIntervals(),e("div",{ref:t=>this.plotAreaEl=t,class:"plot-area "+(this.hasPartialInterval?"":"right-border"),style:{"--backgroundSize":`${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`}},this.highlightStart&&this.renderHighlight(),this.renderData(),this.renderHoverAreas()),-1!==this.popoverIndex&&this.renderHoverIndicator(),-1!==this.popoverIndex&&this.renderPopover(),this.renderXIntervals(),e("div",{class:"chart-label --x-axis"},this.xAxisLabel,this.parsedUnits[0]&&` (${this.parsedUnits[0]})`)),e("div",{id:"chart-description",class:"sr-only"},`${g.instructions} ${this.description}`),e("div",{ref:t=>this.liveRegionEl=t,"aria-live":"polite",class:"sr-only"},this.announcement)))}get el(){return s(this)}static get watchers(){return{lineData:["parseData"],intervalSkip:["handleIntervalSkip"]}}};u.style=':host{--wmcolor-linechart-currentposition:var(--wmcolor-lavender);--wmcolor-linechart-delta-text-negative:var(--wmcolor-text-negative);--wmcolor-linechart-delta-text-positive:var(--wmcolor-text-positive);--wmcolor-linechart-gridline:var(--wmcolor-chart-gridline);--wmcolor-linechart-highlight-background:var(--wmcolor-interactive-background-highlight);--wmcolor-linechart-popover-background:var(--wmcolor-chart-popover-background);display:block;height:500px;width:100%;font-size:14px;overflow-y:visible;overflow-x:auto}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:562px;width:100%;height:100%;outline:none}:host .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;color:var(--iconColor);-webkit-transform:var(--translation, unset);transform:var(--translation, unset)}:host .icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:var(--icon);padding:0 3px;z-index:1}:host .icon:after{color:white;position:absolute;left:3px;-webkit-transform:scale(180%);transform:scale(180%);display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:var(--icon);z-index:0}:host .legend{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px 16px;margin-top:4px;margin-bottom:16px}:host .legend .legend-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:default;font-weight:600}:host .legend .legend-label.faded{opacity:0.3}:host .legend .legend-label .icon{margin-right:4px}:host .legend .visibility-toggle{margin-left:4px}:host .chart-wrapper{position:relative;-ms-flex-positive:1;flex-grow:1;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:1fr auto auto;margin-right:16px}:host .chart-label{font-size:14px;font-weight:600}:host .chart-label.--y-axis{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:var(--labelWidth);align-self:center;margin-right:16px;grid-area:1/1/2/2;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}:host .chart-label.--x-axis{margin-top:16px;text-align:center;grid-area:3/3/4/4}:host .y-intervals{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;grid-area:1/2/2/3;margin-right:4px}:host .y-intervals .y-interval{text-align:right}:host .x-intervals{display:grid;grid-template-columns:var(--columns);grid-area:2/3/3/4;line-height:1;margin-top:4px}:host .x-intervals .x-interval{text-align:center}:host .x-intervals .x-interval:first-child{text-align:left}:host .x-intervals .x-interval:last-child{text-align:right}:host .x-intervals .x-interval.hidden{visibility:hidden}:host .plot-area{position:relative;grid-area:1/3/2/4;background-image:linear-gradient(90deg, var(--wmcolor-linechart-gridline) 1px, transparent 1px);border-bottom:1px solid var(--wmcolor-linechart-gridline);background-size:var(--backgroundSize)}:host .plot-area.right-border{border-right:1px solid var(--wmcolor-linechart-gridline)}:host .line{position:absolute;width:100%;height:100%}:host .line .icon{position:absolute;-webkit-transform:var(--translation);transform:var(--translation);left:var(--xPosition);top:var(--yPosition);z-index:1}:host .line .icon:focus{z-index:2;outline:none}:host .line .icon:focus:before{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0;border-radius:3px}:host .line .line-svg{height:100%;width:100%}:host .line.faded{opacity:0.3}:host .line.focused{z-index:1}:host .line.hidden{visibility:hidden}:host .hover-area-wrapper{position:absolute;width:100%;height:100%;top:0;left:0;display:grid;grid-template-rows:1fr;grid-template-columns:var(--columns)}:host .hover-indicator{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;height:100%;width:2px;border:1px solid var(--wmcolor-linechart-currentposition);-webkit-transform:translateX(-50%);transform:translateX(-50%);left:var(--xPosition);grid-column:3/4;grid-row:1/2;pointer-events:none}:host .popover{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:400px;background-color:var(--wmcolor-linechart-popover-background);position:absolute;top:var(--topPosition, 0);left:var(--leftPosition, unset);right:var(--rightPosition, unset);padding:16px;border-radius:5px;-webkit-box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;z-index:3;grid-column:3/4;grid-row:1/2;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box}:host .popover .title{font-size:16px;font-weight:600}:host .popover .comparison-title{font-style:italic;margin-top:4px}:host .popover .unit{font-size:12px;font-weight:600}:host .popover .unit.--x{margin-left:4px}:host .popover .popover-table{margin-top:16px}:host .popover .popover-table .popover-row{line-height:1}:host .popover .popover-table .popover-row:not(:last-child) td{padding-bottom:8px}:host .popover .popover-table .popover-row .row-label{font-weight:600;padding-right:16px;overflow-wrap:anywhere}:host .popover .popover-table .popover-row .row-label .icon{margin-right:4px}:host .popover .popover-table .popover-row .row-value,:host .popover .popover-table .popover-row .delta{text-align:right;white-space:nowrap}:host .popover .popover-table .popover-row .delta{padding-left:12px;font-weight:600}:host .popover .popover-table .popover-row .delta.--positive{color:var(--wmcolor-linechart-delta-text-positive)}:host .popover .popover-table .popover-row .delta.--negative{color:var(--wmcolor-linechart-delta-text-negative)}:host .highlight{position:absolute;height:100%;background-color:color-mix(in srgb, var(--wmcolor-linechart-highlight-background) 60%, transparent);left:var(--startPercentage);right:var(--endPercentage)}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{u as wm_line_chart}
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,a){function p(e){try{s(o.next(e))}catch(e){a(e)}}function i(e){try{s(o["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):n(e.value).then(p,i)}s((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,p;return p={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function i(e){return function(t){return s([e,t])}}function s(i){if(o)throw new TypeError("Generator is already executing.");while(p&&(p=0,i[0]&&(r=0)),r)try{if(o=1,n&&(a=i[0]&2?n["return"]:i[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;if(n=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;n=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){r.label=i[1];break}if(i[0]===6&&r.label<a[1]){r.label=a[1];a=i;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(i);break}if(a[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e];n=0}finally{o=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js","./p-99dd083d.system.js","./p-1ac66a15.system.js"],(function(e){"use strict";var t,r,o,n,a,p,i,s,l,c,h,m,d,w,b,u,f,g,x,v;return{setters:[function(e){t=e.r;r=e.f;o=e.h;n=e.H;a=e.g},function(e){p=e.g;i=e.d},function(e){s=e.a;l=e.h;c=e.g;h=e.r;m=e.b;d=e.c;w=e.d;b=e.e;u=e.f;f=e.i;g=e.j;x=e.k},function(e){v=e.c}],execute:function(){var k=":host{--wmcolor-chart-label-text-negative:var(--wmcolor-text-negative);--wmcolor-chart-label-text-positive:var(--wmcolor-text-positive);--wmcolor-chart-label-text:var(--wmcolor-text);--wmcolor-chart-subinfo-text:var(--wmcolor-text);--wmcolor-chart-value-text:var(--wmcolor-text);display:block}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;outline:none;}:host .component-wrapper:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:600;position:relative}:host .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:var(--wmcolor-chart-subinfo-text)}:host .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .label.--none{display:none}:host .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex;gap:2px;margin-bottom:8px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex;gap:2px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .segment{print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .segment.fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper .fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper .faded{opacity:0.3}:host .component-wrapper path:active,:host .component-wrapper path:hover,:host .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment:not(:focus-visible),:host .component-wrapper path:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper path:focus.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:active.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment:not(:focus-visible){-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper .stacked-bar-segment:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper #kfbg1{stroke:white;stroke-width:10px}:host .component-wrapper #kfstroke{stroke:var(--wmcolor-interactive-focus);stroke-width:6px}:host .component-wrapper #kfbg2{stroke:white;stroke-width:2px}:host .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,:host .component-wrapper.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,:host .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, var(--wmcolor-chart-gridline) 1px, transparent 1px);background-position:-1px;border-left:1px solid var(--wmcolor-chart-gridline);border-bottom:1px solid var(--wmcolor-chart-gridline);background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:focus.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:focus.bar:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.bar6 .bar:focus-visible,:host .component-wrapper.bar7 .bar:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .hidden-values-warning.hidden{display:none}@media print{:host .component-wrapper .hidden-values-warning{display:none}}:host #chart-instructions{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item.faded{opacity:0.3}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .legend-wrapper .legend .print-value{display:none}:host .component-wrapper .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .component-wrapper .legend-wrapper .legend .print-value{display:unset}}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}";var y=e("wm_chart",function(){function e(e){var o=this;t(this,e);this.uid=p();this.slicesDetails=[];this.debouncedSliceUpdate=i((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,c.call(this,this.currentChartType)];case 1:e.sent();r(this.el);return[2]}}))}))}),100);this.chartType="doughnut1";this.label=undefined;this.labelWidth="150px";this.subinfo=undefined;this.valueFormat="none";this.showGrid=true;this.showLegend=true;this.showBarLegend=false;this.notStartedColor=false;this.printMode=false;this.printModeFormat="amount";this.labelPosition="top";this.isTabbing=false;this.userIsNavigating=false;this.focusedSliceId=undefined}Object.defineProperty(e.prototype,"popoverEl",{get:function(){return this.el.shadowRoot.querySelector("priv-chart-popover")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"sliceEls",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"currentChartType",{get:function(){return this.chartType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return s[this.currentChartType]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDoughnut",{get:function(){return this.chartDetails.category==="doughnut"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isStackedBar",{get:function(){return this.chartDetails.category==="stackedBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSimpleBar",{get:function(){return this.chartDetails.category==="simpleBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return this.isStackedBar||this.isSimpleBar},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){l.call(this,e)};e.prototype.showHiddenValuesMessage=function(e){var t=this;var r=this.el.shadowRoot.querySelector(".hidden-values-warning");if(r){e?r.classList.remove("hidden"):r.classList.add("hidden")}else{requestAnimationFrame((function(){return t.showHiddenValuesMessage(e)}))}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(o){switch(o.label){case 0:if(!this.label){throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}return[4,c.call(this,this.currentChartType)];case 1:o.sent();if(!this.isDoughnut){e=new ResizeObserver((function(){r(t.el)}));e.observe(this.el)}return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.handlePopoverOpenChanged=function(e){var t=e.detail;if(!t){var r=Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex]"));h(r)}};e.prototype.renderBarText=function(e,t){var r;if(this.valueFormat==="percentage"){r=e.perc===0&&e.amount>0?"<1%":"".concat(e.perc,"%")}else if(this.valueFormat==="amount"){r=e.amount}var n=x(e.amount,this.total,false);var a=this.el.offsetWidth;var p=n/100*a>=t;var i=p||e.amount==0?"".concat(n,"%"):"".concat(t,"px");return o("div",{class:"value-wrapper ".concat(p?"":"fixed-width"),style:{width:i}},o("span",{class:"value","data-value":e.amount,"data-segmentindex":e.index},e.amount>0&&r))};e.prototype.drawAxis=function(){if(this.currentChartType==="bar3"){return o("svg",{class:"axis"},o("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),o("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),o("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),o("text",{x:"0.5",y:"-6"},"0%"),o("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}),o("text",{x:"100%",y:"-6"},"100%"))}};e.prototype.renderChart=function(){if(this.isSimpleBar){return m.call(this,this.currentChartType)}else if(this.isStackedBar&&this.total>0){return d.call(this,this.currentChartType)}else if(this.isDoughnut&&this.total>0){return w.call(this,this.currentChartType)}};e.prototype.render=function(){var e=this;return o(n,{onBlur:function(){return g.call(e)}},o("div",{ref:function(t){return e.componentWrapperEl=t},class:"component-wrapper ".concat(this.currentChartType," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""," ").concat(this.labelPosition==="left"&&this.currentChartType==="bar4"?"left-label":""),role:"application","aria-label":this.ariaLabelText,tabindex:0,"aria-roledescription":v.interactiveChart,"aria-describedby":"chart-instructions"},o("label",{id:"label-".concat(this.uid),class:"label --".concat(this.labelPosition),htmlFor:"graphic-".concat(this.uid)},o("span",{class:"label-text"},this.label),this.subinfo?o("span",{class:"subinfo"},this.subinfo):""),this.isBar&&u.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&u.call(this,this.currentChartType),o("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":"",onIntChartPopoverOpenChanged:function(t){return e.handlePopoverOpenChanged(t)}}),this.isBar&&!this.printMode&&f()),b())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());y.style=k}}}));
@@ -0,0 +1 @@
1
+ import{h as t}from"./p-568c595f.js";import{i as s,c as i,e,f as n}from"./p-e995f7f0.js";const a="#ff5f4e",r="#19a1a9",o="#088000",h="#2e1b46",c="#8b86ca",d="#575195",l="#6b6b6b",u={doughnut:{size:155,colors:[o,l],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[c,h,l],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[d,r,h,a,l],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[c,h,"#0089e4",o,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[o,l],padding:0,category:"stackedBar"},bar2:{size:400,colors:[l,d,h,r,a],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",r,"#8e4129",a],padding:0,category:"stackedBar"},bar4:{size:400,colors:[a,r,d],padding:0,category:"stackedBar"},bar5:{size:400,colors:[l,c,h,"#0089e4",o,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[c],padding:0,category:"simpleBar"},bar7:{size:400,colors:[d,r,a,l],padding:0,category:"simpleBar"}};function f(t){return"percentage"===t||"amount"===t?"show-values":""}const g=s.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"}),p=s.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function b(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function m(t,s,i){return i?Math.round(100*t/s):Math.round(1e4*t/s)/100}function v(t,s){return 360*t/s}function x(t){return parseFloat((Math.floor(100*t)/100).toFixed(2))}function w(t,s,i,e){var n=x(t+t*s*Math.cos(Math.PI*i/180)),a=x(t+t*s*Math.sin(Math.PI*i/180));return void 0!==e?{x1:n,y1:a,x2:x(t+t*s*Math.cos(Math.PI*e/180)),y2:x(t+t*s*Math.sin(Math.PI*e/180))}:{x:n,y:a}}function $(t,s,i,e,n){var a=x(n/2*t);return`A ${a}, ${a} 0 ${s} ${x(i)}, ${x(e)}`}function k(t,s){const i=t/s,e=10**Math.floor(Math.log10(i)),n=i/e;let a;return a=n>5?10*e:n>3?5*e:n>2?3*e:n>1.5?2*e:n>1?1.5*e:e,a}function y(t){if(this.popoverEl&&this.popoverEl.open&&"Enter"===t.key){const t=this.popoverEl.querySelector("button");t&&t.click()}}function M(t,s){this.popoverEl&&!this.isTabbing&&(s.coords={x:t.clientX,y:t.clientY},A(this.popoverEl,s),K(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),s))}function z(t,s){this.popoverEl&&this.isTabbing&&(this.focusedSliceId=s.id,s.coords=e(t.target),s.coords.x=s.coords.x+30,s.coords.y=s.coords.y+30,A(this.popoverEl,s),K(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),s))}function C(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault(),this.isTabbing=!0,D.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.isTabbing=!0,B.call(this);break;case"Tab":j.call(this);break;case"Escape":this.popoverEl.open=!1,this.userIsNavigating=!1}}function A(t,s){t.open=!1,s.title&&s.text&&(t.sliceDetails=Object.assign({},s),window.setTimeout((()=>t.open=!0),30))}function B(){const t=n(document.activeElement),s=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;F.call(this,s)}function D(){if(this.sliceEls){const t=n(document.activeElement);let s=this.sliceEls.indexOf(t);-1===s?s=0:0===s?s=this.sliceEls.length-1:s-=1,F.call(this,s)}}function F(t){this.sliceEls&&this.el&&(this.userIsNavigating=!0,this.componentWrapperEl.tabIndex=-1,this.el.focusable=!1,this.sliceEls.map((t=>{t.tabIndex=-1,t.focusable=!1})),this.sliceEls[t].tabIndex=0,this.sliceEls[t].focusable=!0,this.sliceEls[t].focus(),this.focusedSliceId=this.sliceEls[t].id,window.setTimeout((()=>{this.popoverEl&&(this.popoverEl.open=!0)}),10))}function j(){this.focusedSliceId=void 0,this.sliceEls&&this.sliceEls.map((t=>{t.tabIndex=-1,t.focusable=!1})),this.userIsNavigating=!1,window.setTimeout((()=>{this.componentWrapperEl.tabIndex=0,this.el.focusable=!0,this.popoverEl&&(this.popoverEl.open=!1)}),100)}async function I(t){this.slicesDetails=[];let s=0;const i=Array.from(this.el.children);this.total=i.reduce(((t,s)=>t+parseInt(s.getAttribute("amount")||"0")),0);let e=[...u[t].colors];"bar2"===this.chartType&&this.el.children.length<=4&&e.splice(2,1),"bar3"===t&&2===i.length&&(e=[e[1],e[3]]),"doughnut2"===t&&i.length<5&&(e.splice(2,1),i.length<4&&e.shift()),"bar5"!==t||this.notStartedColor||e.shift(),i.forEach(((i,n)=>{const a=parseInt(i.getAttribute("amount")||"0"),r=m(a,this.total,!0);let o=n;"bar6"===t&&(o=0);const h={amount:a,perc:r,legend:i.getAttribute("legend"),color:e[o]||l,offset:s,id:`${this.uid}-${n+1}`,title:i.getAttribute("popover-title"),text:i.getAttribute("popover-text"),buttonText:i.getAttribute("popover-button-text"),sliceRef:i,inSmallCluster:!1,index:n};s+=a,this.slicesDetails.push(h)}))}function S(t,s,i){const e=v(s,this.total)-90,n=t/this.total*360;let a=e+n;const r=n>180?"1 1":"0 1",o=n>180?"1 0":"0 0",h=this.chartDetails.size/2,c=this.chartDetails.thickness,d="doughnut"===i?2.25:3;360===n&&(a-=.01);const l=w(h,1,e+1.5,a),u=w(h,c,e+d,a);return`M ${l.x1}, ${l.y1} `+$(1,r,l.x2,l.y2,this.chartDetails.size)+` L ${u.x2}, ${u.y2} `+$(c,o,u.x1,u.y1,this.chartDetails.size)+" z"}function T(){const i=s.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return t("div",{id:"chart-instructions"},i)}function H(s){const i=this.chartDetails.size+this.chartDetails.padding,e="doughnut"===s;let n=e?this.slicesDetails:function(t,s){let i=[...t].sort(((t,s)=>t.amount===s.amount?0:t.amount>s.amount?-1:1)),e=0;return i.filter((t=>t.amount>0)).forEach(((t,n)=>{const a=i[n===i.length-1?0:n+1],r=m(i[0===n?i.length-1:n-1].amount,s,!0),o=m(a.amount,s,!0),h=0===t.perc?8:5;t.inSmallCluster=t.perc<4&&(r<h||o<h),t.offset=e,e+=t.amount})),i}(this.slicesDetails,this.total);return n=function(t,s,i){const e=s.map((t=>v(t.amount,i)));if(e.some((t=>0!==t&&t<7))){const t=e.map((t=>0==t?t:Math.max(t,7))),n=t.reduce(((t,s)=>t+(s>7&&0!==s?s:0)),0),a=360-t.reduce(((t,s)=>t+(s>7&&0!==s?0:s)),0),r=(n-a)/a,o=t.map((t=>t>7?t-r*t:0==t?0:7));let h=0;s=s.map(((t,s)=>{const e=o[s]/360*i,n=h;return h+=e,Object.assign(Object.assign({},t),{amount:e,offset:n})}))}return s}(0,n,this.total),t("div",{class:"chart-wrapper doughnut-wrapper"},t("svg",{width:i+"px",height:i+"px",id:`graphic-${this.uid}`,class:"doughnut-svg"},t("defs",null,t("filter",{id:"wmHoverDropShadow"},t("feGaussianBlur",{stdDeviation:"3"}),t("feOffset",{result:"offsetblur"}),t("feFlood",{"flood-color":"#333"}),t("feComposite",{operator:"in",in2:"offsetblur"}),t("feMerge",null,t("feMergeNode",null),t("feMergeNode",{in:"SourceGraphic"})))),n.map((t=>O.call(this,t,s))),W.call(this),e?t("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},m(n[0].amount,this.total,!0)+"%"):t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`,"text-anchor":"middle","dominant-baseline":"middle"},n.map((t=>t.amount>0&&!t.inSmallCluster?E.call(this,t):"")))))}function K(t,s){t.forEach((t=>{t.dataset.segmentindex&&parseInt(t.dataset.segmentindex)!==s.index?t.classList.add("faded"):t.classList.remove("faded")}))}function N(t){t.forEach((t=>{t.classList.remove("faded")}))}function O(s,i){const e=m(s.amount,this.total,!0)+"%";return!isNaN(s.amount)&&t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`},t("path",{id:s.id,class:"segment doughnut-segment",fill:s.amount?s.color:"transparent",d:S.call(this,s.amount,s.offset,i),onClick:t=>M.call(this,t,s),onFocus:t=>z.call(this,t,s),onKeyDown:t=>y.call(this,t),role:"img","aria-label":`${s.legend}, ${e}`,"data-segmentindex":s.index}))}function W(){return this.isTabbing?t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`},t("use",{tabindex:-1,id:"kfbg1",xlinkHref:`#${this.focusedSliceId}`}),t("use",{tabindex:-1,id:"kfstroke",xlinkHref:`#${this.focusedSliceId}`}),t("use",{tabindex:-1,id:"kfbg2",xlinkHref:`#${this.focusedSliceId}`})):""}function E(s){const i=v(s.offset+s.amount/2,this.total);let{x:e,y:n}=w(this.chartDetails.size/2,1.4,i-90);return t("text",{class:"value",x:e+"px",y:n+"px","data-segmentindex":s.index},`${s.perc>0?s.perc:"<1"}%`)}function G(s){const i="bar"===s,e=this.el.shadowRoot.querySelectorAll(".value");return e.length>0&&requestAnimationFrame((()=>{let t=[],s=!1;e.forEach((i=>{i.classList.remove("hidden");const e=parseInt(i.dataset.value);if(t.length>0&&0!=e){const n=i.getBoundingClientRect().left-4;t.forEach((t=>{const a=parseInt(t.dataset.value);t.getBoundingClientRect().right>n&&((e<a?i:t).classList.add("hidden"),s=!0)}))}!i.classList.contains("hidden")&&e>0&&t.push(i)})),(this.isBar||this.isDoughnut)&&this.showHiddenValuesMessage(s)})),t("div",{class:"chart-wrapper bar-wrapper"},i?t("div",{class:"single-perc"},m(this.slicesDetails[0].amount,this.total,!0)+"%"):"","bar3"===this.chartType&&this.drawAxis(),t("div",{class:`inner-stacked-bar-wrapper ${f(this.valueFormat)}`},i?"":t("div",{class:"values"},this.slicesDetails.map((t=>this.renderBarText(t,5)))),t("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((t=>L.call(this,t,5)))),i?J.call(this):""))}function L(s,i){const e=m(s.amount,this.total,!1),n=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper"),a=e/100*(n?n.offsetWidth:this.el.offsetWidth)>=i,r=a||0==s.amount?`${e}%`:`${i}px`;let o="";return"percentage"==this.valueFormat?o=`${m(s.amount,this.total,!0)} %`:"amount"==this.valueFormat&&(o=s.amount.toString()),t("div",{class:`segment stacked-bar-segment ${0===m(s.amount,this.total,!1)?"zero":""} ${a?"":"fixed-width"}`,style:{backgroundColor:s.color,width:r},onClick:t=>M.call(this,t,s),onFocus:t=>z.call(this,t,s),onKeyDown:t=>y.call(this,t),"data-segmentindex":s.index},t("span",{class:"sr-only"},`${s.legend} ${o}`))}function R(s){const e=this.slicesDetails.map((t=>t.amount)).reduce(((t,s)=>t>s?t:s)),n=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);let a=(r=this.el.getBoundingClientRect().width-n-48,Math.round(r/function(t){return function(t){let s=80*(t-300)/600+70;return s<70?70:s>150?150:s}(t)}(r)));var r;let o=k(e,a);const h=Math.floor((a*o-e)/o);a-=h,this.el.style.setProperty("--backgroundSize",100/a+"%"),this.el.style.setProperty("--labelWidth",this.labelWidth),"bar7"!==s||this.showBarLegend||this.el.style.setProperty("--labelWidth","0px");const c=[];this.slicesDetails.forEach((i=>{i.legend&&c.push(function(s,i,e){return t("label",{class:`label${"bar7"!==e||i?"":" hidden"}`},s)}(i.legend,this.showBarLegend,s)),c.push(U.call(this,i,o,a,e))}));const d=[];for(let s=1;s<=a;s++){const e=b(i(s,o));d.push(t("div",{class:"tick"},t("span",null,e)))}const l="bar6"===s&&this.showGrid&&this.el.getBoundingClientRect().width>300;return t("div",{class:"chart-wrapper simple-bar-wrapper"},t("div",{class:`chart ${f(this.valueFormat)}`},l&&t("div",{class:"gridlines"}),t("div",{class:"rows"},c)),l&&t("div",{class:"x-axis","aria-hidden":"true"},t("div",{class:"zero"},t("span",null,"0")),d))}function U(s,i,e,n){const a=m(s.amount,"bar6"===this.currentChartType?i*e:n,!1),r=a?a+"%":"1px",o=b(s.amount);let h="amount"===this.valueFormat?o:"";return"bar6"===this.currentChartType&&"percentage"===this.valueFormat?h=s.amount+"%":"bar7"===this.currentChartType&&"percentage"===this.valueFormat&&(h=(0===this.total?"0":m(s.amount,this.total,!0))+"%"),t("div",{class:"bar segment",style:{backgroundColor:s.color,width:r},onClick:t=>M.call(this,t,s),onFocus:t=>z.call(this,t,s),onKeyDown:t=>y.call(this,t),"data-segmentindex":s.index},t("div",{class:"value"},h))}function V(s){if(this.showLegend){const i=this.slicesDetails.reduce(((t,s)=>!!s.inSmallCluster||t),!1);return this.isDoughnut&&this.showHiddenValuesMessage(i),t("div",{class:"legend-wrapper"},t("div",{class:`legend ${s} ${"bar"===this.mode?"--top":"--bottom"}`,"aria-hidden":"true"},this.slicesDetails.map((t=>{const s="amount"==this.printModeFormat?`${t.amount}/${this.total}`:`${m(t.amount,this.total,!0)}%`;if(t.amount||t.legend)return q.call(this,{key:t.legend,color:t.color},s,t)}))),this.isDoughnut&&!this.printMode&&P())}}function q(s,i="",e=null){const n=t=>{e&&(e.coords={x:t.clientX,y:t.clientY},A(this.popoverEl,e),K(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),e))};return t("div",{class:"legend-item",onClick:t=>n(t),"data-segmentindex":e?e.index:null},t("div",{class:"legend-color",style:{backgroundColor:s.color}}),t("div",{class:"legend-text"},s.key,i&&t("span",{class:"print-value "+(this.printMode?"force-visible":"")},": ",i)))}function J(){if(this.completionMessage)return t("div",{class:"completion-message"},this.completionMessage)}function P(){return t("div",{class:"hidden-values-warning hidden"},g,t("br",null),p)}export{u as a,R as b,G as c,H as d,T as e,V as f,I as g,C as h,P as i,j,m as k,J as l,q as m,b as n,k as o,N as r}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,i,e,r){function n(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r["throw"](t))}catch(t){o(t)}}function l(t){t.done?e(t.value):n(t.value).then(a,s)}l((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,n,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return l([t,i])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(e=0)),e)try{if(r=1,n&&(o=s[0]&2?n["return"]:s[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;if(n=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;n=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){e.label=s[1];break}if(s[0]===6&&e.label<o[1]){e.label=o[1];o=s;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(s);break}if(o[2])e.ops.pop();e.trys.pop();continue}s=i.call(t,e)}catch(t){s=[6,t];n=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js","./p-97aaa344.system.js","./p-1ac66a15.system.js"],(function(t){"use strict";var i,e,r,n,o,a,s,l,h,c,u,f,p,v,d,g;return{setters:[function(t){i=t.r;e=t.f;r=t.h;n=t.H;o=t.g},function(t){a=t.d;s=t.E;l=t.x;h=t.F;c=t.G;u=t.H},function(t){f=t.n;p=t.o},function(t){v=t.l;d=t.c;g=t.g}],execute:function(){var b=':host{--wmcolor-linechart-currentposition:var(--wmcolor-lavender);--wmcolor-linechart-delta-text-negative:var(--wmcolor-text-negative);--wmcolor-linechart-delta-text-positive:var(--wmcolor-text-positive);--wmcolor-linechart-gridline:var(--wmcolor-chart-gridline);--wmcolor-linechart-highlight-background:var(--wmcolor-interactive-background-highlight);--wmcolor-linechart-popover-background:var(--wmcolor-chart-popover-background);display:block;height:500px;width:100%;font-size:14px;overflow-y:visible;overflow-x:auto}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:562px;width:100%;height:100%;outline:none}:host .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;color:var(--iconColor);-webkit-transform:var(--translation, unset);transform:var(--translation, unset)}:host .icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:var(--icon);padding:0 3px;z-index:1}:host .icon:after{color:white;position:absolute;left:3px;-webkit-transform:scale(180%);transform:scale(180%);display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:var(--icon);z-index:0}:host .legend{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px 16px;margin-top:4px;margin-bottom:16px}:host .legend .legend-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:default;font-weight:600}:host .legend .legend-label.faded{opacity:0.3}:host .legend .legend-label .icon{margin-right:4px}:host .legend .visibility-toggle{margin-left:4px}:host .chart-wrapper{position:relative;-ms-flex-positive:1;flex-grow:1;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:1fr auto auto;margin-right:16px}:host .chart-label{font-size:14px;font-weight:600}:host .chart-label.--y-axis{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:var(--labelWidth);align-self:center;margin-right:16px;grid-area:1/1/2/2;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}:host .chart-label.--x-axis{margin-top:16px;text-align:center;grid-area:3/3/4/4}:host .y-intervals{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;grid-area:1/2/2/3;margin-right:4px}:host .y-intervals .y-interval{text-align:right}:host .x-intervals{display:grid;grid-template-columns:var(--columns);grid-area:2/3/3/4;line-height:1;margin-top:4px}:host .x-intervals .x-interval{text-align:center}:host .x-intervals .x-interval:first-child{text-align:left}:host .x-intervals .x-interval:last-child{text-align:right}:host .x-intervals .x-interval.hidden{visibility:hidden}:host .plot-area{position:relative;grid-area:1/3/2/4;background-image:linear-gradient(90deg, var(--wmcolor-linechart-gridline) 1px, transparent 1px);border-bottom:1px solid var(--wmcolor-linechart-gridline);background-size:var(--backgroundSize)}:host .plot-area.right-border{border-right:1px solid var(--wmcolor-linechart-gridline)}:host .line{position:absolute;width:100%;height:100%}:host .line .icon{position:absolute;-webkit-transform:var(--translation);transform:var(--translation);left:var(--xPosition);top:var(--yPosition);z-index:1}:host .line .icon:focus{z-index:2;outline:none}:host .line .icon:focus:before{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0;border-radius:3px}:host .line .line-svg{height:100%;width:100%}:host .line.faded{opacity:0.3}:host .line.focused{z-index:1}:host .line.hidden{visibility:hidden}:host .hover-area-wrapper{position:absolute;width:100%;height:100%;top:0;left:0;display:grid;grid-template-rows:1fr;grid-template-columns:var(--columns)}:host .hover-indicator{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;height:100%;width:2px;border:1px solid var(--wmcolor-linechart-currentposition);-webkit-transform:translateX(-50%);transform:translateX(-50%);left:var(--xPosition);grid-column:3/4;grid-row:1/2;pointer-events:none}:host .popover{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:400px;background-color:var(--wmcolor-linechart-popover-background);position:absolute;top:var(--topPosition, 0);left:var(--leftPosition, unset);right:var(--rightPosition, unset);padding:16px;border-radius:5px;-webkit-box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;z-index:3;grid-column:3/4;grid-row:1/2;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box}:host .popover .title{font-size:16px;font-weight:600}:host .popover .comparison-title{font-style:italic;margin-top:4px}:host .popover .unit{font-size:12px;font-weight:600}:host .popover .unit.--x{margin-left:4px}:host .popover .popover-table{margin-top:16px}:host .popover .popover-table .popover-row{line-height:1}:host .popover .popover-table .popover-row:not(:last-child) td{padding-bottom:8px}:host .popover .popover-table .popover-row .row-label{font-weight:600;padding-right:16px;overflow-wrap:anywhere}:host .popover .popover-table .popover-row .row-label .icon{margin-right:4px}:host .popover .popover-table .popover-row .row-value,:host .popover .popover-table .popover-row .delta{text-align:right;white-space:nowrap}:host .popover .popover-table .popover-row .delta{padding-left:12px;font-weight:600}:host .popover .popover-table .popover-row .delta.--positive{color:var(--wmcolor-linechart-delta-text-positive)}:host .popover .popover-table .popover-row .delta.--negative{color:var(--wmcolor-linechart-delta-text-negative)}:host .highlight{position:absolute;height:100%;background-color:color-mix(in srgb, var(--wmcolor-linechart-highlight-background) 60%, transparent);left:var(--startPercentage);right:var(--endPercentage)}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var x=t("wm_line_chart",function(){function t(t){var e=this;i(this,t);this.minTickWidth=120;this.popoverData=[];this.focusedDataPoint=[0,0];this.dataPointMatrix=[];this.xIntervals=[];this.displayedXIntervals=[];this.yIntervals=[];this.lineStyles=[{color:"#8b86ca",icon:"f536"},{color:"#2e1b46",icon:"f12f"},{color:"#0089e4",icon:"f763"},{color:"#088000",icon:"f4ce"},{color:"#ea8500",icon:"f70a"},{color:"#d54f41",icon:"f536"},{color:"#146ca9",icon:"f6ff"}];this.debouncedResize=a((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){this.displayedXIntervals=this.determineDisplayedXIntervals();return[2]}))}))}),100);this.label=undefined;this.description="";this.xAxisLabel=undefined;this.yAxisLabel=undefined;this.lineData=undefined;this.units="null,null";this.labelWidth="120px";this.highlightQualifier="highlighted";this.highlightStart=undefined;this.highlightEnd=undefined;this.visibilityToggles=false;this.showDeltas=false;this.yRange=undefined;this.parsedLineData={};this.popoverIndex=-1;this.focusedLine=-1;this.hiddenLines=[];this.isTabbing=false;this.intervalSkip=0;this.announcement=""}t.prototype.parseData=function(){var t=this;this.parsedLineData=JSON.parse(this.lineData);this.yIntervals=this.calcYIntervals().reverse();this.xIntervals=Object.keys(Object.values(this.parsedLineData)[0]);this.displayedXIntervals=this.determineDisplayedXIntervals();this.dataPointMatrix=Object.entries(this.parsedLineData).map((function(i){return t.buildLineDataPointDetails(i[0],i[1])}));this.popoverData=s(this.dataPointMatrix)};t.prototype.handleIntervalSkip=function(){this.parseData()};Object.defineProperty(t.prototype,"hasPartialInterval",{get:function(){return this.intervalSkip>0&&this.xIntervals.length%2===0},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"parsedUnits",{get:function(){return l(this.units).map((function(t){return t==="null"?null:t}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"visibilityToggleEls",{get:function(){return this.legendEl.querySelectorAll("wm-button")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"lineEls",{get:function(){return this.plotAreaEl.querySelectorAll(".line")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"firstVisibleLineIdx",{get:function(){var t=0;while(this.hiddenLines.includes(t)){t++}return t<this.dataPointMatrix.length?t:-1},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"pointEls",{get:function(){return this.plotAreaEl.querySelectorAll(".point")},enumerable:false,configurable:true});t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.componentWillLoad=function(){this.parseData()};t.prototype.componentDidLoad=function(){var t=this;var i=new ResizeObserver((function(){return t.debouncedResize()}));i.observe(this.el)};t.prototype.handleVisibilityToggleKeydown=function(t,i){switch(t.key){case"Tab":if(!t.shiftKey&&this.firstVisibleLineIdx!==-1){t.preventDefault();this.announce(this.lineFocusMessage(this.firstVisibleLineIdx));this.focusDataPoint(this.firstVisibleLineIdx,0)}break;case"ArrowUp":case"ArrowLeft":t.preventDefault();var e=h(i,-1,this.dataPointMatrix.length-1);this.visibilityToggleEls[e].focus();break;case"ArrowDown":case"ArrowRight":t.preventDefault();var r=h(i,1,this.dataPointMatrix.length-1);this.visibilityToggleEls[r].focus();break}};t.prototype.handleDataPointKeydown=function(t){var i=this.focusedDataPoint,e=i[0],r=i[1];var n=this.lineEls[e].querySelectorAll(".point").length;var o=this.dataPointMatrix.length;switch(t.key){case"Tab":if(t.shiftKey&&this.visibilityToggles){t.preventDefault();this.visibilityToggleEls[0].focus()}break;case"ArrowUp":t.preventDefault();var a=e;do{a=h(a,-1,o-1)}while(this.hiddenLines.includes(a));this.announce(this.lineFocusMessage(a));this.focusDataPoint(a,r);break;case"ArrowDown":t.preventDefault();var s=e;do{s=h(s,1,o-1)}while(this.hiddenLines.includes(s));this.announce(this.lineFocusMessage(s));this.focusDataPoint(s,r);break;case"ArrowLeft":t.preventDefault();var l=h(r,-1,n-1);this.focusDataPoint(e,l);break;case"ArrowRight":t.preventDefault();var c=h(r,1,n-1);this.focusDataPoint(e,c);break}};t.prototype.announce=function(t){if(this.liveRegionEl.textContent===t){t+=" "}this.announcement=t};t.prototype.lineFocusMessage=function(t){var i=this.dataPointMatrix[t][0].lineLabel;var e=this.dataPointMatrix[t].filter((function(t){return t.yValue!==null})).length;return"".concat(i,", line ").concat(t+1," of ").concat(this.dataPointMatrix.length," with ").concat(e," data points")};t.prototype.focusDataPoint=function(t,i){var e=this.lineEls[t];var r=e.querySelectorAll(".point")[i];this.pointEls.forEach((function(t){return t.tabIndex=-1}));r.tabIndex=0;r.focus();this.focusedDataPoint=[t,i]};t.prototype.focusDataPointByEl=function(t){var i=parseInt(t.dataset.lineidx);var e=Array.from(t.parentElement.querySelectorAll(".point")).indexOf(t);this.pointEls.forEach((function(t){return t.tabIndex=-1}));t.tabIndex=0;t.focus();this.focusedDataPoint=[i,e]};t.prototype.calcYIntervals=function(){var t=[];if(this.yRange){t=l(this.yRange).map((function(t){return parseInt(t)}))}else{var i=[];var e=Object.values(this.parsedLineData).flat();e.forEach((function(t){return i.push.apply(i,Object.values(t))}));var r=i.filter((function(t){return t!==null}));var n=Math.min.apply(Math,r);var o=Math.max.apply(Math,r);var a=p(o-n,4);var s=a;while(n%a!==0&&s>0){n--;s--}a=p(o-n,4);var h=n;while(h<=o+a){t.push(h);h+=a}}return t};t.prototype.determineDisplayedXIntervals=function(){var t=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?Math.round(this.plotAreaEl.clientWidth/this.minTickWidth):this.xIntervals.length;var i=c(this.xIntervals,t),e=i.skipInterval,r=i.skippedList;this.intervalSkip=e;return r};t.prototype.buildLineDataPointDetails=function(t,i){var e=this;var r=[];var n=Object.entries(i);var o;n.forEach((function(i,a){var s=i[0],l=i[1];var h=100/(n.length-1)*a;var c=l===null?null:100-u(l,e.yIntervals[e.yIntervals.length-1],e.yIntervals[0]);if(a===0){h+=e.plotAreaEl&&e.plotAreaEl.clientWidth>0?8/e.plotAreaEl.clientWidth*100:1}if(s===e.highlightStart&&!o){o=true}r.push({lineLabel:t,xValue:s,yValue:l,xPositionPercent:h,yPositionPercent:c,highlighted:o});if(s===e.highlightEnd&&o){o=false}}));return r};t.prototype.toggleLineVisibility=function(t){if(this.hiddenLines.includes(t)){this.hiddenLines=this.hiddenLines.filter((function(i){return i!==t}))}else{this.hiddenLines.push(t)}e(this.el)};t.prototype.resetDataPointFocus=function(){this.popoverIndex=-1;this.pointEls.forEach((function(t){return t.tabIndex=-1}));if(this.firstVisibleLineIdx!==-1){var t=this.lineEls[this.firstVisibleLineIdx];var i=t.querySelectorAll(".point")[0];i.tabIndex=0;this.focusedDataPoint=[this.firstVisibleLineIdx,0]}};t.prototype.calcDelta=function(t,i){var e;if(t.yValue===null||i.yValue===null){e=v.noData}else if(t.yValue==i.yValue){e="0%"}else if(i.yValue==0){e="-"}else{var r=(t.yValue-i.yValue)/i.yValue*100;var n=Math.round(r*100)/100;e="".concat(n>0?"+":"").concat(n,"%")}return e};t.prototype.renderLegend=function(){var t=this;var i=Object.keys(this.parsedLineData);return r("div",{ref:function(i){return t.legendEl=i},class:"legend"},i.map((function(i,e){var n=t.hiddenLines.includes(e);var o=t.focusedLine!==-1&&t.focusedLine!==e;return r("div",{id:"legend-label-".concat(e),class:"legend-label ".concat(o?"faded":""),onMouseEnter:function(){return t.focusedLine=n?-1:e},onMouseLeave:function(){return t.focusedLine=-1}},t.renderIcon(e),i,t.visibilityToggles&&t.renderVisibilityToggle(i,e,n))})))};t.prototype.renderVisibilityToggle=function(t,i,e){var n=this;return r("wm-button",{id:"visibility-button-".concat(i),class:"visibility-toggle","label-for-identical-buttons":"".concat(i===0?"Toggle line visibility list with ".concat(this.dataPointMatrix.length," items"):""," ").concat(e?g.show:g.hide," ").concat(t," toggle ").concat(e?"pressed":""),"button-type":"navigational",tooltip:e?g.show:g.hide,tooltipPosition:"bottom",icon:e?"f209":"f208",onClick:function(){return n.toggleLineVisibility(i)},onKeyDown:function(t){return n.handleVisibilityToggleKeydown(t,i)},onFocus:function(){return n.popoverIndex=-1}})};t.prototype.renderIcon=function(t){var i=this.lineStyles[t],e=i.color,n=i.icon;var o={"--iconColor":e,"--icon":'"\\'.concat(n,'"'),"--translation":t===5?"rotate(180deg)":"unset"};return r("span",{class:"icon",style:o})};t.prototype.renderXIntervals=function(){var t=this;var i={"--columns":".5fr repeat(".concat(this.xIntervals.length-2,", 1fr) .5fr")};return r("div",{class:"x-intervals",style:i},this.xIntervals.map((function(i){return r("span",{class:"x-interval ".concat(t.displayedXIntervals.includes(i)?"":"hidden")},i)})))};t.prototype.renderYIntervals=function(){var t=this;return r("div",{ref:function(i){return t.yIntervalsEl=i},class:"y-intervals"},this.yIntervals.map((function(t){return r("span",{class:"y-interval"},f(t))})))};t.prototype.renderData=function(){var t=this;return this.dataPointMatrix.map((function(i,e){var n=t.focusedLine===e?"focused":"faded";var o=t.hiddenLines.includes(e);return r("div",{class:"line ".concat(t.focusedLine!==-1?n:""," ").concat(o?"hidden":"")},t.renderLines(e),t.renderPoints(e))}))};t.prototype.renderPoints=function(t){var i=this;var e=this.dataPointMatrix[t];return r("div",{class:"line-icons"},e.map((function(n,o){var a=n.lineLabel,s=n.xValue,l=n.yValue,h=n.xPositionPercent,c=n.yPositionPercent,u=n.highlighted;if(l!==null){var f=i.lineStyles[t],p=f.color,d=f.icon;var g=t===0&&o===0?0:undefined;var b={"--icon":'"\\'.concat(d,'"'),"--iconColor":p,"--xPosition":h+"%","--yPosition":c+"%","--translation":t===5?"translate(-50%, -50%) rotate(180deg)":"translate(-50%, -50%)"};var x="".concat(a," ").concat(u?i.highlightQualifier:""," ").concat(i.xAxisLabel," ").concat(s+(i.parsedUnits[0]?i.parsedUnits[0]:""),", ").concat(i.yAxisLabel,": ").concat(l+(i.parsedUnits[1]?i.parsedUnits[1]:""));if(i.showDeltas&&o>0){var m=e[o-1];var w=v.getChangeSince(m.xValue);x+=", ".concat(w," ").concat(i.calcDelta(n,m))}return r("span",{id:"".concat(a,"-").concat(o),role:"img","aria-label":x,tabIndex:g,class:"point icon",style:b,"data-lineidx":t,"data-xvalue":s,onKeyDown:function(t){return i.handleDataPointKeydown(t)},onFocus:function(){return i.popoverIndex=o},onClick:function(t){return i.focusDataPointByEl(t.target)},onMouseEnter:function(){return i.popoverIndex=o}})}})))};t.prototype.renderLines=function(t){var i=this;var e=this.dataPointMatrix[t];return r("svg",{class:"line-svg"},e.map((function(n,o){var a=n.yValue!==null&&o!==e.length-1&&e[o+1].yValue!==null;if(a){var s=i.lineStyles[t].color;var l=n.xPositionPercent,h=n.yPositionPercent;var c=e[o+1],u=c.xPositionPercent,f=c.yPositionPercent;return r("line",{x1:l+"%",y1:h+"%",x2:u+"%",y2:f+"%",stroke:s,"stroke-width":"2px"})}})))};t.prototype.renderHoverAreas=function(){var t=this;var i={"--columns":".5fr repeat(".concat(this.xIntervals.length-2,", 1fr) .5fr")};return r("div",{class:"hover-area-wrapper",style:i,onMouseLeave:function(){return t.popoverIndex=-1}},this.xIntervals.map((function(i,e){return r("div",{onMouseEnter:function(){return t.popoverIndex=e}})})))};t.prototype.renderPopover=function(){var t=this;var i=this.popoverData&&this.popoverData[this.popoverIndex]&&this.plotAreaEl.querySelector('.point[data-xvalue="'.concat(this.dataPointMatrix[0][this.popoverIndex].xValue,'"]'));if(!i){return""}var e=this.popoverData[this.popoverIndex];var n=e[0].xPositionPercent;var o=e.map((function(t){return t.yPositionPercent})).filter((function(t){return t!==null}));var a=o.reduce((function(t,i){return t+i}),0)/o.length;var s=this.plotAreaEl.querySelector('.point[data-xvalue="'.concat(this.dataPointMatrix[0][this.popoverIndex].xValue,'"]'));var l=this.el.getBoundingClientRect();var h=s.getBoundingClientRect();var c=l.right-h.right;var u=h.left-l.left;var f=c>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400);var p=u>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400);var d=8/this.plotAreaEl.clientWidth*100;var g={"--leftPosition":f?n+d+"%":"unset","--rightPosition":p?100-n+d+"%":"unset","--topPosition":a+"%",transform:"translateY(-50%)"};if(!p&&!f){var b="0px - ".concat(this.labelWidth," - 20px - ").concat(this.yIntervalsEl.clientWidth+"px"," + ").concat(this.el.scrollLeft+"px"," + 2px");g={"--leftPosition":"0%","--topPosition":"0%",maxWidth:Math.min(this.el.clientWidth-2,400)+"px",transform:"translateX(calc(".concat(b,"))")}}return r("div",{ref:function(i){return t.popoverEl=i},class:"popover",style:g},r("div",{class:"title"},e[0].xValue,this.parsedUnits[0]&&r("span",{class:"unit --x"},"(",this.parsedUnits[0],")")),this.showDeltas&&this.popoverIndex>0&&r("div",{class:"comparison-title"},v.getChangeSince(this.popoverData[this.popoverIndex-1][0].xValue)),this.renderPopoverTable())};t.prototype.renderPopoverTable=function(){var t=this;var i=this.popoverData[this.popoverIndex];return r("table",{class:"popover-table"},i.map((function(i,e){if(!t.hiddenLines.includes(e)){var n=i.lineLabel,o=i.yValue;var a=t.popoverIndex>0?t.popoverData[t.popoverIndex-1][e]:null;var s=o!==null?(new Intl.NumberFormat).format(o):null;return r("tr",{class:"popover-row"},r("td",null,t.renderIcon(e)),r("td",{class:"row-label"},n),r("td",{class:"row-value"},o===null?v.noData:s,o!==null&&t.parsedUnits[1]&&r("span",{class:"unit --y"},t.parsedUnits[1])),t.showDeltas&&a&&t.renderDeltas(i,a))}})))};t.prototype.renderDeltas=function(t,i){var e=this.calcDelta(t,i);var n=e.toString()[0]=="+"||e=="-"?"positive":e.toString()[0]=="-"?"negative":"";return i&&r("td",{class:"delta --".concat(n)},e)};t.prototype.renderHoverIndicator=function(){var t=this.dataPointMatrix.length>0&&this.dataPointMatrix[0][this.popoverIndex];if(!t){return""}var i=this.dataPointMatrix[0][this.popoverIndex].xPositionPercent;var e={"--xPosition":i+"%"};return r("div",{class:"hover-indicator",style:e})};t.prototype.renderHighlight=function(){var t=this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent;var i=this.highlightEnd?100-this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent:0;var e={"--startPercentage":t+"%","--endPercentage":i+"%"};return r("div",{class:"highlight",style:e})};t.prototype.render=function(){var t=this;return r(n,{onBlur:function(){return t.resetDataPointFocus()},onMouseLeave:function(){return t.popoverIndex=-1}},r("div",{class:"component-wrapper",role:"application","aria-roledescription":d.interactiveChart,"aria-label":this.label,"aria-describedby":"chart-description"},this.renderLegend(),r("div",{class:"chart-wrapper"},r("div",{class:"chart-label --y-axis",style:{"--labelWidth":this.labelWidth}},this.yAxisLabel,this.parsedUnits[1]&&" (".concat(this.parsedUnits[1],")")),this.renderYIntervals(),r("div",{ref:function(i){return t.plotAreaEl=i},class:"plot-area ".concat(this.hasPartialInterval?"":"right-border"),style:{"--backgroundSize":"".concat(this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent,"%")}},this.highlightStart&&this.renderHighlight(),this.renderData(),this.renderHoverAreas()),this.popoverIndex!==-1&&this.renderHoverIndicator(),this.popoverIndex!==-1&&this.renderPopover(),this.renderXIntervals(),r("div",{class:"chart-label --x-axis"},this.xAxisLabel,this.parsedUnits[0]&&" (".concat(this.parsedUnits[0],")"))),r("div",{id:"chart-description",class:"sr-only"},"".concat(v.instructions," ").concat(this.description)),r("div",{ref:function(i){return t.liveRegionEl=i},"aria-live":"polite",class:"sr-only"},this.announcement)))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{lineData:["parseData"],intervalSkip:["handleIntervalSkip"]}},enumerable:false,configurable:true});return t}());x.style=b}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,i,e,r){function n(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r["throw"](t))}catch(t){o(t)}}function l(t){t.done?e(t.value):n(t.value).then(a,s)}l((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,n,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return l([t,i])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(e=0)),e)try{if(r=1,n&&(o=s[0]&2?n["return"]:s[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;if(n=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;n=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){e.label=s[1];break}if(s[0]===6&&e.label<o[1]){e.label=o[1];o=s;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(s);break}if(o[2])e.ops.pop();e.trys.pop();continue}s=i.call(t,e)}catch(t){s=[6,t];n=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js","./p-99dd083d.system.js","./p-1ac66a15.system.js"],(function(t){"use strict";var i,e,r,n,o,a,s,l,h,c,u,f,p,v,d,g;return{setters:[function(t){i=t.r;e=t.f;r=t.h;n=t.H;o=t.g},function(t){a=t.d;s=t.E;l=t.x;h=t.F;c=t.G;u=t.H},function(t){f=t.n;p=t.o},function(t){v=t.l;d=t.c;g=t.g}],execute:function(){var b=':host{--wmcolor-linechart-currentposition:var(--wmcolor-lavender);--wmcolor-linechart-delta-text-negative:var(--wmcolor-text-negative);--wmcolor-linechart-delta-text-positive:var(--wmcolor-text-positive);--wmcolor-linechart-gridline:var(--wmcolor-chart-gridline);--wmcolor-linechart-highlight-background:var(--wmcolor-interactive-background-highlight);--wmcolor-linechart-popover-background:var(--wmcolor-chart-popover-background);display:block;height:500px;width:100%;font-size:14px;overflow-y:visible;overflow-x:auto}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:562px;width:100%;height:100%;outline:none}:host .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;color:var(--iconColor);-webkit-transform:var(--translation, unset);transform:var(--translation, unset)}:host .icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:var(--icon);padding:0 3px;z-index:1}:host .icon:after{color:white;position:absolute;left:3px;-webkit-transform:scale(180%);transform:scale(180%);display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:var(--icon);z-index:0}:host .legend{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px 16px;margin-top:4px;margin-bottom:16px}:host .legend .legend-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:default;font-weight:600}:host .legend .legend-label.faded{opacity:0.3}:host .legend .legend-label .icon{margin-right:4px}:host .legend .visibility-toggle{margin-left:4px}:host .chart-wrapper{position:relative;-ms-flex-positive:1;flex-grow:1;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:1fr auto auto;margin-right:16px}:host .chart-label{font-size:14px;font-weight:600}:host .chart-label.--y-axis{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:var(--labelWidth);align-self:center;margin-right:16px;grid-area:1/1/2/2;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}:host .chart-label.--x-axis{margin-top:16px;text-align:center;grid-area:3/3/4/4}:host .y-intervals{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;grid-area:1/2/2/3;margin-right:4px}:host .y-intervals .y-interval{text-align:right}:host .x-intervals{display:grid;grid-template-columns:var(--columns);grid-area:2/3/3/4;line-height:1;margin-top:4px}:host .x-intervals .x-interval{text-align:center}:host .x-intervals .x-interval:first-child{text-align:left}:host .x-intervals .x-interval:last-child{text-align:right}:host .x-intervals .x-interval.hidden{visibility:hidden}:host .plot-area{position:relative;grid-area:1/3/2/4;background-image:linear-gradient(90deg, var(--wmcolor-linechart-gridline) 1px, transparent 1px);border-bottom:1px solid var(--wmcolor-linechart-gridline);background-size:var(--backgroundSize)}:host .plot-area.right-border{border-right:1px solid var(--wmcolor-linechart-gridline)}:host .line{position:absolute;width:100%;height:100%}:host .line .icon{position:absolute;-webkit-transform:var(--translation);transform:var(--translation);left:var(--xPosition);top:var(--yPosition);z-index:1}:host .line .icon:focus{z-index:2;outline:none}:host .line .icon:focus:before{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0;border-radius:3px}:host .line .line-svg{height:100%;width:100%}:host .line.faded{opacity:0.3}:host .line.focused{z-index:1}:host .line.hidden{visibility:hidden}:host .hover-area-wrapper{position:absolute;width:100%;height:100%;top:0;left:0;display:grid;grid-template-rows:1fr;grid-template-columns:var(--columns)}:host .hover-indicator{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;height:100%;width:2px;border:1px solid var(--wmcolor-linechart-currentposition);-webkit-transform:translateX(-50%);transform:translateX(-50%);left:var(--xPosition);grid-column:3/4;grid-row:1/2;pointer-events:none}:host .popover{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:400px;background-color:var(--wmcolor-linechart-popover-background);position:absolute;top:var(--topPosition, 0);left:var(--leftPosition, unset);right:var(--rightPosition, unset);padding:16px;border-radius:5px;-webkit-box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;z-index:3;grid-column:3/4;grid-row:1/2;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box}:host .popover .title{font-size:16px;font-weight:600}:host .popover .comparison-title{font-style:italic;margin-top:4px}:host .popover .unit{font-size:12px;font-weight:600}:host .popover .unit.--x{margin-left:4px}:host .popover .popover-table{margin-top:16px}:host .popover .popover-table .popover-row{line-height:1}:host .popover .popover-table .popover-row:not(:last-child) td{padding-bottom:8px}:host .popover .popover-table .popover-row .row-label{font-weight:600;padding-right:16px;overflow-wrap:anywhere}:host .popover .popover-table .popover-row .row-label .icon{margin-right:4px}:host .popover .popover-table .popover-row .row-value,:host .popover .popover-table .popover-row .delta{text-align:right;white-space:nowrap}:host .popover .popover-table .popover-row .delta{padding-left:12px;font-weight:600}:host .popover .popover-table .popover-row .delta.--positive{color:var(--wmcolor-linechart-delta-text-positive)}:host .popover .popover-table .popover-row .delta.--negative{color:var(--wmcolor-linechart-delta-text-negative)}:host .highlight{position:absolute;height:100%;background-color:color-mix(in srgb, var(--wmcolor-linechart-highlight-background) 60%, transparent);left:var(--startPercentage);right:var(--endPercentage)}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var x=t("wm_line_chart",function(){function t(t){var e=this;i(this,t);this.minTickWidth=120;this.popoverData=[];this.focusedDataPoint=[0,0];this.dataPointMatrix=[];this.xIntervals=[];this.displayedXIntervals=[];this.yIntervals=[];this.lineStyles=[{color:"#8b86ca",icon:"f536"},{color:"#2e1b46",icon:"f12f"},{color:"#0089e4",icon:"f763"},{color:"#088000",icon:"f4ce"},{color:"#ea8500",icon:"f70a"},{color:"#d54f41",icon:"f536"},{color:"#146ca9",icon:"f6ff"}];this.debouncedResize=a((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){this.displayedXIntervals=this.determineDisplayedXIntervals();return[2]}))}))}),100);this.label=undefined;this.description="";this.xAxisLabel=undefined;this.yAxisLabel=undefined;this.lineData=undefined;this.units="null,null";this.labelWidth="120px";this.highlightQualifier="highlighted";this.highlightStart=undefined;this.highlightEnd=undefined;this.visibilityToggles=false;this.showDeltas=false;this.yRange=undefined;this.parsedLineData={};this.popoverIndex=-1;this.focusedLine=-1;this.hiddenLines=[];this.isTabbing=false;this.intervalSkip=0;this.announcement=""}t.prototype.parseData=function(){var t=this;this.parsedLineData=JSON.parse(this.lineData);this.yIntervals=this.calcYIntervals().reverse();this.xIntervals=Object.keys(Object.values(this.parsedLineData)[0]);this.displayedXIntervals=this.determineDisplayedXIntervals();this.dataPointMatrix=Object.entries(this.parsedLineData).map((function(i){return t.buildLineDataPointDetails(i[0],i[1])}));this.popoverData=s(this.dataPointMatrix)};t.prototype.handleIntervalSkip=function(){this.parseData()};Object.defineProperty(t.prototype,"hasPartialInterval",{get:function(){return this.intervalSkip>0&&this.xIntervals.length%2===0},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"parsedUnits",{get:function(){return l(this.units).map((function(t){return t==="null"?null:t}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"visibilityToggleEls",{get:function(){return this.legendEl.querySelectorAll("wm-button")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"lineEls",{get:function(){return this.plotAreaEl.querySelectorAll(".line")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"firstVisibleLineIdx",{get:function(){var t=0;while(this.hiddenLines.includes(t)){t++}return t<this.dataPointMatrix.length?t:-1},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"pointEls",{get:function(){return this.plotAreaEl.querySelectorAll(".point")},enumerable:false,configurable:true});t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.componentWillLoad=function(){this.parseData()};t.prototype.componentDidLoad=function(){var t=this;var i=new ResizeObserver((function(){return t.debouncedResize()}));i.observe(this.el)};t.prototype.handleVisibilityToggleKeydown=function(t,i){switch(t.key){case"Tab":if(!t.shiftKey&&this.firstVisibleLineIdx!==-1){t.preventDefault();this.announce(this.lineFocusMessage(this.firstVisibleLineIdx));this.focusDataPoint(this.firstVisibleLineIdx,0)}break;case"ArrowUp":case"ArrowLeft":t.preventDefault();var e=h(i,-1,this.dataPointMatrix.length-1);this.visibilityToggleEls[e].focus();break;case"ArrowDown":case"ArrowRight":t.preventDefault();var r=h(i,1,this.dataPointMatrix.length-1);this.visibilityToggleEls[r].focus();break}};t.prototype.handleDataPointKeydown=function(t){var i=this.focusedDataPoint,e=i[0],r=i[1];var n=this.lineEls[e].querySelectorAll(".point").length;var o=this.dataPointMatrix.length;switch(t.key){case"Tab":if(t.shiftKey&&this.visibilityToggles){t.preventDefault();this.visibilityToggleEls[0].focus()}break;case"ArrowUp":t.preventDefault();var a=e;do{a=h(a,-1,o-1)}while(this.hiddenLines.includes(a));this.announce(this.lineFocusMessage(a));this.focusDataPoint(a,r);break;case"ArrowDown":t.preventDefault();var s=e;do{s=h(s,1,o-1)}while(this.hiddenLines.includes(s));this.announce(this.lineFocusMessage(s));this.focusDataPoint(s,r);break;case"ArrowLeft":t.preventDefault();var l=h(r,-1,n-1);this.focusDataPoint(e,l);break;case"ArrowRight":t.preventDefault();var c=h(r,1,n-1);this.focusDataPoint(e,c);break}};t.prototype.announce=function(t){if(this.liveRegionEl.textContent===t){t+=" "}this.announcement=t};t.prototype.lineFocusMessage=function(t){var i=this.dataPointMatrix[t][0].lineLabel;var e=this.dataPointMatrix[t].filter((function(t){return t.yValue!==null})).length;return"".concat(i,", line ").concat(t+1," of ").concat(this.dataPointMatrix.length," with ").concat(e," data points")};t.prototype.focusDataPoint=function(t,i){var e=this.lineEls[t];var r=e.querySelectorAll(".point")[i];this.pointEls.forEach((function(t){return t.tabIndex=-1}));r.tabIndex=0;r.focus();this.focusedDataPoint=[t,i]};t.prototype.focusDataPointByEl=function(t){var i=parseInt(t.dataset.lineidx);var e=Array.from(t.parentElement.querySelectorAll(".point")).indexOf(t);this.pointEls.forEach((function(t){return t.tabIndex=-1}));t.tabIndex=0;t.focus();this.focusedDataPoint=[i,e]};t.prototype.calcYIntervals=function(){var t=[];if(this.yRange){t=l(this.yRange).map((function(t){return parseInt(t)}))}else{var i=[];var e=Object.values(this.parsedLineData).flat();e.forEach((function(t){return i.push.apply(i,Object.values(t))}));var r=i.filter((function(t){return t!==null}));var n=Math.min.apply(Math,r);var o=Math.max.apply(Math,r);var a=p(o-n,4);var s=a;while(n%a!==0&&s>0){n--;s--}a=p(o-n,4);var h=n;while(h<=o+a){t.push(h);h+=a}}return t};t.prototype.determineDisplayedXIntervals=function(){var t=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?Math.round(this.plotAreaEl.clientWidth/this.minTickWidth):this.xIntervals.length;var i=c(this.xIntervals,t),e=i.skipInterval,r=i.skippedList;this.intervalSkip=e;return r};t.prototype.buildLineDataPointDetails=function(t,i){var e=this;var r=[];var n=Object.entries(i);var o;n.forEach((function(i,a){var s=i[0],l=i[1];var h=100/(n.length-1)*a;var c=l===null?null:100-u(l,e.yIntervals[e.yIntervals.length-1],e.yIntervals[0]);if(a===0){h+=e.plotAreaEl&&e.plotAreaEl.clientWidth>0?8/e.plotAreaEl.clientWidth*100:1}if(s===e.highlightStart&&!o){o=true}r.push({lineLabel:t,xValue:s,yValue:l,xPositionPercent:h,yPositionPercent:c,highlighted:o});if(s===e.highlightEnd&&o){o=false}}));return r};t.prototype.toggleLineVisibility=function(t){if(this.hiddenLines.includes(t)){this.hiddenLines=this.hiddenLines.filter((function(i){return i!==t}))}else{this.hiddenLines.push(t)}e(this.el)};t.prototype.resetDataPointFocus=function(){this.popoverIndex=-1;this.pointEls.forEach((function(t){return t.tabIndex=-1}));if(this.firstVisibleLineIdx!==-1){var t=this.lineEls[this.firstVisibleLineIdx];var i=t.querySelectorAll(".point")[0];i.tabIndex=0;this.focusedDataPoint=[this.firstVisibleLineIdx,0]}};t.prototype.calcDelta=function(t,i){var e;if(t.yValue===null||i.yValue===null){e=v.noData}else if(t.yValue==i.yValue){e="0%"}else if(i.yValue==0){e="-"}else{var r=(t.yValue-i.yValue)/i.yValue*100;var n=Math.round(r*100)/100;e="".concat(n>0?"+":"").concat(n,"%")}return e};t.prototype.renderLegend=function(){var t=this;var i=Object.keys(this.parsedLineData);return r("div",{ref:function(i){return t.legendEl=i},class:"legend"},i.map((function(i,e){var n=t.hiddenLines.includes(e);var o=t.focusedLine!==-1&&t.focusedLine!==e;return r("div",{id:"legend-label-".concat(e),class:"legend-label ".concat(o?"faded":""),onMouseEnter:function(){return t.focusedLine=n?-1:e},onMouseLeave:function(){return t.focusedLine=-1}},t.renderIcon(e),i,t.visibilityToggles&&t.renderVisibilityToggle(i,e,n))})))};t.prototype.renderVisibilityToggle=function(t,i,e){var n=this;return r("wm-button",{id:"visibility-button-".concat(i),class:"visibility-toggle","label-for-identical-buttons":"".concat(i===0?"Toggle line visibility list with ".concat(this.dataPointMatrix.length," items"):""," ").concat(e?g.show:g.hide," ").concat(t," toggle ").concat(e?"pressed":""),"button-type":"navigational",tooltip:e?g.show:g.hide,tooltipPosition:"bottom",icon:e?"f209":"f208",onClick:function(){return n.toggleLineVisibility(i)},onKeyDown:function(t){return n.handleVisibilityToggleKeydown(t,i)},onFocus:function(){return n.popoverIndex=-1}})};t.prototype.renderIcon=function(t){var i=this.lineStyles[t],e=i.color,n=i.icon;var o={"--iconColor":e,"--icon":'"\\'.concat(n,'"'),"--translation":t===5?"rotate(180deg)":"unset"};return r("span",{class:"icon",style:o})};t.prototype.renderXIntervals=function(){var t=this;var i={"--columns":".5fr repeat(".concat(this.xIntervals.length-2,", 1fr) .5fr")};return r("div",{class:"x-intervals",style:i},this.xIntervals.map((function(i){return r("span",{class:"x-interval ".concat(t.displayedXIntervals.includes(i)?"":"hidden")},i)})))};t.prototype.renderYIntervals=function(){var t=this;return r("div",{ref:function(i){return t.yIntervalsEl=i},class:"y-intervals"},this.yIntervals.map((function(t){return r("span",{class:"y-interval"},f(t))})))};t.prototype.renderData=function(){var t=this;return this.dataPointMatrix.map((function(i,e){var n=t.focusedLine===e?"focused":"faded";var o=t.hiddenLines.includes(e);return r("div",{class:"line ".concat(t.focusedLine!==-1?n:""," ").concat(o?"hidden":"")},t.renderLines(e),t.renderPoints(e))}))};t.prototype.renderPoints=function(t){var i=this;var e=this.dataPointMatrix[t];return r("div",{class:"line-icons"},e.map((function(n,o){var a=n.lineLabel,s=n.xValue,l=n.yValue,h=n.xPositionPercent,c=n.yPositionPercent,u=n.highlighted;if(l!==null){var f=i.lineStyles[t],p=f.color,d=f.icon;var g=t===0&&o===0?0:undefined;var b={"--icon":'"\\'.concat(d,'"'),"--iconColor":p,"--xPosition":h+"%","--yPosition":c+"%","--translation":t===5?"translate(-50%, -50%) rotate(180deg)":"translate(-50%, -50%)"};var x="".concat(a," ").concat(u?i.highlightQualifier:""," ").concat(i.xAxisLabel," ").concat(s+(i.parsedUnits[0]?i.parsedUnits[0]:""),", ").concat(i.yAxisLabel,": ").concat(l+(i.parsedUnits[1]?i.parsedUnits[1]:""));if(i.showDeltas&&o>0){var m=e[o-1];var w=v.getChangeSince(m.xValue);x+=", ".concat(w," ").concat(i.calcDelta(n,m))}return r("span",{id:"".concat(a,"-").concat(o),role:"img","aria-label":x,tabIndex:g,class:"point icon",style:b,"data-lineidx":t,"data-xvalue":s,onKeyDown:function(t){return i.handleDataPointKeydown(t)},onFocus:function(){return i.popoverIndex=o},onClick:function(t){return i.focusDataPointByEl(t.target)},onMouseEnter:function(){return i.popoverIndex=o}})}})))};t.prototype.renderLines=function(t){var i=this;var e=this.dataPointMatrix[t];return r("svg",{class:"line-svg"},e.map((function(n,o){var a=n.yValue!==null&&o!==e.length-1&&e[o+1].yValue!==null;if(a){var s=i.lineStyles[t].color;var l=n.xPositionPercent,h=n.yPositionPercent;var c=e[o+1],u=c.xPositionPercent,f=c.yPositionPercent;return r("line",{x1:l+"%",y1:h+"%",x2:u+"%",y2:f+"%",stroke:s,"stroke-width":"2px"})}})))};t.prototype.renderHoverAreas=function(){var t=this;var i={"--columns":".5fr repeat(".concat(this.xIntervals.length-2,", 1fr) .5fr")};return r("div",{class:"hover-area-wrapper",style:i,onMouseLeave:function(){return t.popoverIndex=-1}},this.xIntervals.map((function(i,e){return r("div",{onMouseEnter:function(){return t.popoverIndex=e}})})))};t.prototype.renderPopover=function(){var t=this;var i=this.popoverData&&this.popoverData[this.popoverIndex]&&this.plotAreaEl.querySelector('.point[data-xvalue="'.concat(this.dataPointMatrix[0][this.popoverIndex].xValue,'"]'));if(!i){return""}var e=this.popoverData[this.popoverIndex];var n=e[0].xPositionPercent;var o=e.map((function(t){return t.yPositionPercent})).filter((function(t){return t!==null}));var a=o.reduce((function(t,i){return t+i}),0)/o.length;var s=this.plotAreaEl.querySelector('.point[data-xvalue="'.concat(this.dataPointMatrix[0][this.popoverIndex].xValue,'"]'));var l=this.el.getBoundingClientRect();var h=s.getBoundingClientRect();var c=l.right-h.right;var u=h.left-l.left;var f=c>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400);var p=u>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400);var d=8/this.plotAreaEl.clientWidth*100;var g={"--leftPosition":f?n+d+"%":"unset","--rightPosition":p?100-n+d+"%":"unset","--topPosition":a+"%",transform:"translateY(-50%)"};if(!p&&!f){var b="0px - ".concat(this.labelWidth," - 20px - ").concat(this.yIntervalsEl.clientWidth+"px"," + ").concat(this.el.scrollLeft+"px"," + 2px");g={"--leftPosition":"0%","--topPosition":"0%",maxWidth:Math.min(this.el.clientWidth-2,400)+"px",transform:"translateX(calc(".concat(b,"))")}}return r("div",{ref:function(i){return t.popoverEl=i},class:"popover",style:g},r("div",{class:"title"},e[0].xValue,this.parsedUnits[0]&&r("span",{class:"unit --x"},"(",this.parsedUnits[0],")")),this.showDeltas&&this.popoverIndex>0&&r("div",{class:"comparison-title"},v.getChangeSince(this.popoverData[this.popoverIndex-1][0].xValue)),this.renderPopoverTable())};t.prototype.renderPopoverTable=function(){var t=this;var i=this.popoverData[this.popoverIndex];return r("table",{class:"popover-table"},i.map((function(i,e){if(!t.hiddenLines.includes(e)){var n=i.lineLabel,o=i.yValue;var a=t.popoverIndex>0?t.popoverData[t.popoverIndex-1][e]:null;var s=o!==null?(new Intl.NumberFormat).format(o):null;return r("tr",{class:"popover-row"},r("td",null,t.renderIcon(e)),r("td",{class:"row-label"},n),r("td",{class:"row-value"},o===null?v.noData:s,o!==null&&t.parsedUnits[1]&&r("span",{class:"unit --y"},t.parsedUnits[1])),t.showDeltas&&a&&t.renderDeltas(i,a))}})))};t.prototype.renderDeltas=function(t,i){var e=this.calcDelta(t,i);var n=e.toString()[0]=="+"||e=="-"?"positive":e.toString()[0]=="-"?"negative":"";return i&&r("td",{class:"delta --".concat(n)},e)};t.prototype.renderHoverIndicator=function(){var t=this.dataPointMatrix.length>0&&this.dataPointMatrix[0][this.popoverIndex];if(!t){return""}var i=this.dataPointMatrix[0][this.popoverIndex].xPositionPercent;var e={"--xPosition":i+"%"};return r("div",{class:"hover-indicator",style:e})};t.prototype.renderHighlight=function(){var t=this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent;var i=this.highlightEnd?100-this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent:0;var e={"--startPercentage":t+"%","--endPercentage":i+"%"};return r("div",{class:"highlight",style:e})};t.prototype.render=function(){var t=this;return r(n,{onBlur:function(){return t.resetDataPointFocus()},onMouseLeave:function(){return t.popoverIndex=-1}},r("div",{class:"component-wrapper",role:"application","aria-roledescription":d.interactiveChart,"aria-label":this.label,"aria-describedby":"chart-description"},this.renderLegend(),r("div",{class:"chart-wrapper"},r("div",{class:"chart-label --y-axis",style:{"--labelWidth":this.labelWidth}},this.yAxisLabel,this.parsedUnits[1]&&" (".concat(this.parsedUnits[1],")")),this.renderYIntervals(),r("div",{ref:function(i){return t.plotAreaEl=i},class:"plot-area ".concat(this.hasPartialInterval?"":"right-border"),style:{"--backgroundSize":"".concat(this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent,"%")}},this.highlightStart&&this.renderHighlight(),this.renderData(),this.renderHoverAreas()),this.popoverIndex!==-1&&this.renderHoverIndicator(),this.popoverIndex!==-1&&this.renderPopover(),this.renderXIntervals(),r("div",{class:"chart-label --x-axis"},this.xAxisLabel,this.parsedUnits[0]&&" (".concat(this.parsedUnits[0],")"))),r("div",{id:"chart-description",class:"sr-only"},"".concat(v.instructions," ").concat(this.description)),r("div",{ref:function(i){return t.liveRegionEl=i},"aria-live":"polite",class:"sr-only"},this.announcement)))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{lineData:["parseData"],intervalSkip:["handleIntervalSkip"]}},enumerable:false,configurable:true});return t}());x.style=b}}}));
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-568c595f.js";export{s as setNonce}from"./p-568c595f.js";import"./p-bee9a5dc.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((e=>a(JSON.parse('[["p-3a44e1c8",[[17,"wm-file",{"name":[1],"type":[1],"fileActions":[1,"file-actions"],"lastUpdated":[1,"last-updated"],"progress":[514],"size":[1],"uploadedBy":[1,"uploaded-by"],"errorMessage":[1,"error-message"],"showInfo":[1025,"show-info"]}]]],["p-62a8f09c",[[17,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"keydownOnTabItem","handleKeydown"]],{"selectedTab":["setSelected"]}],[17,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]}],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]}]]],["p-cc4a429b",[[17,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"itemIndexToFocus":[32]},[[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]],{"products":["parseData"]}]]],["p-a03f7141",[[17,"wm-navigation",{"open":[1540]},[[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]],{"open":["handleStateChange"]}],[17,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[17,"wm-navigation-item",{"href":[1],"text":[1],"active":[4]}]]],["p-d86bd773",[[17,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"isTabbing":[32],"mode":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]],{"mode":["handleModeUpdate"]}],[17,"wm-progress-monitor",{"breakpoint":[8],"groupLegend":[1,"group-legend"],"barLabelsWidth":[1,"bar-labels-width"]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-5c10e2ae",[[17,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"labelWidth":[1,"label-width"],"subinfo":[1],"valueFormat":[1,"value-format"],"showGrid":[4,"show-grid"],"showLegend":[4,"show-legend"],"showBarLegend":[4,"show-bar-legend"],"notStartedColor":[4,"not-started-color"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"labelPosition":[1,"label-position"],"isTabbing":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["p-0aa17cac",[[17,"wm-date-range",{"dateFormat":[1,"date-format"],"disabled":[4],"errorMessage":[513,"error-message"],"invalidStart":[4,"invalid-start"],"invalidEnd":[4,"invalid-end"],"labelStart":[1,"label-start"],"labelEnd":[1,"label-end"],"preselected":[1],"requiredField":[4,"required-field"],"valueStart":[1025,"value-start"],"valueEnd":[1025,"value-end"],"availSpace":[32],"isExpanded":[32],"reformatDate":[64],"isValidISO":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"],[0,"outOfCal","handleOutOfCal"],[0,"cellHovered","handleCellHovered"],[9,"resize","setAvailSpace"]],{"disabled":["handleDisabled"],"valueStart":["updateValueStart"],"valueEnd":["updateValueEnd"],"errorMessage":["handleErrorMessage"]}]]],["p-3183bba8",[[17,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1,"label-position"],"label":[1],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"reformatDate":[64],"isValidIso":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"cellTriggered","handleCellTriggered"]],{"disabled":["handleDisabledChange"],"value":["updateValue"],"errorMessage":["announceError"]}]]],["p-9a3e656a",[[1,"wm-line-chart",{"label":[1],"description":[1],"xAxisLabel":[1,"x-axis-label"],"yAxisLabel":[1,"y-axis-label"],"lineData":[513,"line-data"],"units":[1],"labelWidth":[1,"label-width"],"highlightQualifier":[1,"highlight-qualifier"],"highlightStart":[1,"highlight-start"],"highlightEnd":[1,"highlight-end"],"visibilityToggles":[4,"visibility-toggles"],"showDeltas":[4,"show-deltas"],"yRange":[1,"y-range"],"parsedLineData":[32],"popoverIndex":[32],"focusedLine":[32],"hiddenLines":[32],"isTabbing":[32],"intervalSkip":[32],"announcement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"lineData":["parseData"],"intervalSkip":["handleIntervalSkip"]}]]],["p-3568472c",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}]]],["p-e83a98d3",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]}]]],["p-8159cdf5",[[17,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"announcement":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"numResults":["handleNumResultsUpdate"],"disabled":["handleDisabledChange"]}]]],["p-48e09589",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-c885c7f9",[[17,"wm-file-list",{"showInfo":[1,"show-info"]}]]],["p-c4b9d46d",[[17,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"inputWidth":[1,"input-width"],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"symbolBefore":[1,"symbol-before"],"symbolAfter":[1,"symbol-after"],"textAfter":[1,"text-after"],"type":[1],"step":[2],"min":[2],"max":[2],"isSubmit":[4,"is-submit"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-822618d7",[[4,"wm-modal",{"open":[1540],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"uid":[1537],"returnFocusEl":[32],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},null,{"open":["toggleModal"]}]]],["p-45abd8fe",[[17,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeSize":[4,"is-large-size"],"srAnnouncement":[32]},null,{"totalItems":["calculateTotalPages"],"itemsPerPage":["calculateTotalPages"]}]]],["p-bf636261",[[1,"wm-snackbar",{"notifications":[1537],"isTabbing":[32],"announcement":[32]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]],{"notifications":["updateSnacks"]}]]],["p-7326b62a",[[17,"wm-tag-input",{"label":[1],"errorMessage":[1,"error-message"],"info":[1],"labelPosition":[1,"label-position"],"maxTags":[2,"max-tags"],"placeholder":[1025],"requiredField":[4,"required-field"],"tagInputType":[1,"tag-input-type"],"helpText":[1,"help-text"],"addNew":[4,"add-new"],"characterLimit":[2,"character-limit"],"colHeaders":[1,"col-headers"],"colWidths":[1,"col-widths"],"colWrap":[1,"col-wrap"],"isKeying":[32],"isExpanded":[32],"liveRegionMessage":[32],"focusedOption":[32],"focusedColumn":[32],"focusedTagIndex":[32],"tagsList":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"privTagOptionSelected","handleTagOptionSelected"],[0,"privTagOptionDeselected","handleTagOptionDeselected"],[4,"click","handleClick"],[11,"scroll","dismissTooltip"],[0,"blur","handleBlur"]],{"errorMessage":["announceError"]}]]],["p-42d1c301",[[0,"wm-tag-option",{"selected":[1540],"locked":[4],"col1":[1],"col2":[1],"col3":[1],"col4":[1],"emitSelectedEvent":[64],"emitDeselectedEvent":[64]},null,{"selected":["handleSelected"]}]]],["p-31976813",[[1,"wm-textarea",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"inputWidth":[1,"input-width"],"inputHeight":[1,"input-height"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-2b05bf05",[[17,"wm-timepicker",{"disabled":[4],"value":[1025],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"isValidTime":[64],"reformatTime":[64]},[[0,"keydown","handleKey"]],{"disabled":["handleDisabledChange"],"value":["handleValueChange"],"errorMessage":["announceError"]}]]],["p-33679b9d",[[17,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipPosition":[1537,"tooltip-position"],"targetSize":[1,"target-size"],"isOpen":[32]},[[0,"keydown","handleKeydown"],[4,"click","handleClick"]]]]],["p-09a31f0c",[[17,"wm-uploader",{"label":[1],"buttonText":[1,"button-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1,"max-size"],"maxFiles":[2,"max-files"],"errorMessage":[1,"error-message"],"requiredField":[4,"required-field"],"showInfo":[1,"show-info"],"isTabbing":[32],"notif":[32],"isCondensed":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmFileErrorCleared","handleFileErrorCleared"],[0,"wmFileDelete","storeDeletedId"]],{"errorMessage":["announceError"]}]]],["p-88ebddd7",[[0,"wm-wrapper"]]],["p-902a54c5",[[17,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"]}]]],["p-591918a4",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["p-75ba63ba",[[0,"priv-calendar",{"disabled":[4],"view":[1025],"focusDate":[1025,"focus-date"],"startDate":[1,"start-date"],"endDate":[1,"end-date"],"hoverDate":[1,"hover-date"],"focusFirstFocusable":[64],"focusLastFocusable":[64],"focusCell":[64]},[[0,"keydown","handleKey"]],{"focusDate":["handleFocusDate"]}]]],["p-a8524a48",[[0,"priv-chart-popover",{"open":[1028],"sliceDetails":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]],{"open":["handleOpenChange"],"sliceDetails":["handleDetailsChange"]}]]],["p-bc5e9d24",[[17,"wm-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"isExpanded":[32],"announcement":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"intCloneClicked","handleOptionCloneSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstOption"],[0,"wmEndKeyPressed","moveToLastOption"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmLetterPressed","findAndFocusOption"]],{"errorMessage":["announceError"],"disabled":["handleDisabledChange"]}],[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4],"searchTerm":[32]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]],{"selected":["syncAriaSelected"],"disabled":["syncAriaDisabled","updateDisabledOnClick"]}]]],["p-884294c6",[[17,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"icon":[1537],"iconSize":[1,"icon-size"],"iconRotate":[2,"icon-rotate"],"iconFlip":[1,"icon-flip"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"isSubmit":[4,"is-submit"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[11,"scroll","handleScroll"],[0,"keydown","handleKeydown"]],{"buttonType":["validateType"],"icon":["updateIcon"],"disabled":["handleDisabledChange"]}]]],["p-eaac6bcd",[[17,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"darkMode":[4,"dark-mode"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"icon":[1025],"description":[1]},[[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]],{"disabled":["setOnClick"]}]]]]'),e)));
1
+ import{p as e,b as a}from"./p-568c595f.js";export{s as setNonce}from"./p-568c595f.js";import"./p-ab0e197b.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((e=>a(JSON.parse('[["p-3a44e1c8",[[17,"wm-file",{"name":[1],"type":[1],"fileActions":[1,"file-actions"],"lastUpdated":[1,"last-updated"],"progress":[514],"size":[1],"uploadedBy":[1,"uploaded-by"],"errorMessage":[1,"error-message"],"showInfo":[1025,"show-info"]}]]],["p-62a8f09c",[[17,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"keydownOnTabItem","handleKeydown"]],{"selectedTab":["setSelected"]}],[17,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]}],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]}]]],["p-204bdd73",[[17,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"itemIndexToFocus":[32]},[[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]],{"products":["parseData"]}]]],["p-a03f7141",[[17,"wm-navigation",{"open":[1540]},[[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]],{"open":["handleStateChange"]}],[17,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[17,"wm-navigation-item",{"href":[1],"text":[1],"active":[4]}]]],["p-011477e2",[[17,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"isTabbing":[32],"mode":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]],{"mode":["handleModeUpdate"]}],[17,"wm-progress-monitor",{"breakpoint":[8],"groupLegend":[1,"group-legend"],"barLabelsWidth":[1,"bar-labels-width"]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-c47811a2",[[17,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"labelWidth":[1,"label-width"],"subinfo":[1],"valueFormat":[1,"value-format"],"showGrid":[4,"show-grid"],"showLegend":[4,"show-legend"],"showBarLegend":[4,"show-bar-legend"],"notStartedColor":[4,"not-started-color"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"labelPosition":[1,"label-position"],"isTabbing":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["p-4d0b1890",[[17,"wm-date-range",{"dateFormat":[1,"date-format"],"disabled":[4],"errorMessage":[513,"error-message"],"invalidStart":[4,"invalid-start"],"invalidEnd":[4,"invalid-end"],"labelStart":[1,"label-start"],"labelEnd":[1,"label-end"],"preselected":[1],"requiredField":[4,"required-field"],"valueStart":[1025,"value-start"],"valueEnd":[1025,"value-end"],"availSpace":[32],"isExpanded":[32],"reformatDate":[64],"isValidISO":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"],[0,"outOfCal","handleOutOfCal"],[0,"cellHovered","handleCellHovered"],[9,"resize","setAvailSpace"]],{"disabled":["handleDisabled"],"valueStart":["updateValueStart"],"valueEnd":["updateValueEnd"],"errorMessage":["handleErrorMessage"]}]]],["p-a27d2177",[[17,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1,"label-position"],"label":[1],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"reformatDate":[64],"isValidIso":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"cellTriggered","handleCellTriggered"]],{"disabled":["handleDisabledChange"],"value":["updateValue"],"errorMessage":["announceError"]}]]],["p-dbc112a6",[[1,"wm-line-chart",{"label":[1],"description":[1],"xAxisLabel":[1,"x-axis-label"],"yAxisLabel":[1,"y-axis-label"],"lineData":[513,"line-data"],"units":[1],"labelWidth":[1,"label-width"],"highlightQualifier":[1,"highlight-qualifier"],"highlightStart":[1,"highlight-start"],"highlightEnd":[1,"highlight-end"],"visibilityToggles":[4,"visibility-toggles"],"showDeltas":[4,"show-deltas"],"yRange":[1,"y-range"],"parsedLineData":[32],"popoverIndex":[32],"focusedLine":[32],"hiddenLines":[32],"isTabbing":[32],"intervalSkip":[32],"announcement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"lineData":["parseData"],"intervalSkip":["handleIntervalSkip"]}]]],["p-3568472c",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}]]],["p-e83a98d3",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]}]]],["p-8159cdf5",[[17,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"announcement":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"numResults":["handleNumResultsUpdate"],"disabled":["handleDisabledChange"]}]]],["p-48e09589",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-c885c7f9",[[17,"wm-file-list",{"showInfo":[1,"show-info"]}]]],["p-c4b9d46d",[[17,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"inputWidth":[1,"input-width"],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"symbolBefore":[1,"symbol-before"],"symbolAfter":[1,"symbol-after"],"textAfter":[1,"text-after"],"type":[1],"step":[2],"min":[2],"max":[2],"isSubmit":[4,"is-submit"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-822618d7",[[4,"wm-modal",{"open":[1540],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"uid":[1537],"returnFocusEl":[32],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},null,{"open":["toggleModal"]}]]],["p-45abd8fe",[[17,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeSize":[4,"is-large-size"],"srAnnouncement":[32]},null,{"totalItems":["calculateTotalPages"],"itemsPerPage":["calculateTotalPages"]}]]],["p-bf636261",[[1,"wm-snackbar",{"notifications":[1537],"isTabbing":[32],"announcement":[32]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]],{"notifications":["updateSnacks"]}]]],["p-7326b62a",[[17,"wm-tag-input",{"label":[1],"errorMessage":[1,"error-message"],"info":[1],"labelPosition":[1,"label-position"],"maxTags":[2,"max-tags"],"placeholder":[1025],"requiredField":[4,"required-field"],"tagInputType":[1,"tag-input-type"],"helpText":[1,"help-text"],"addNew":[4,"add-new"],"characterLimit":[2,"character-limit"],"colHeaders":[1,"col-headers"],"colWidths":[1,"col-widths"],"colWrap":[1,"col-wrap"],"isKeying":[32],"isExpanded":[32],"liveRegionMessage":[32],"focusedOption":[32],"focusedColumn":[32],"focusedTagIndex":[32],"tagsList":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"privTagOptionSelected","handleTagOptionSelected"],[0,"privTagOptionDeselected","handleTagOptionDeselected"],[4,"click","handleClick"],[11,"scroll","dismissTooltip"],[0,"blur","handleBlur"]],{"errorMessage":["announceError"]}]]],["p-42d1c301",[[0,"wm-tag-option",{"selected":[1540],"locked":[4],"col1":[1],"col2":[1],"col3":[1],"col4":[1],"emitSelectedEvent":[64],"emitDeselectedEvent":[64]},null,{"selected":["handleSelected"]}]]],["p-31976813",[[1,"wm-textarea",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"inputWidth":[1,"input-width"],"inputHeight":[1,"input-height"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-2b05bf05",[[17,"wm-timepicker",{"disabled":[4],"value":[1025],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"isValidTime":[64],"reformatTime":[64]},[[0,"keydown","handleKey"]],{"disabled":["handleDisabledChange"],"value":["handleValueChange"],"errorMessage":["announceError"]}]]],["p-33679b9d",[[17,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipPosition":[1537,"tooltip-position"],"targetSize":[1,"target-size"],"isOpen":[32]},[[0,"keydown","handleKeydown"],[4,"click","handleClick"]]]]],["p-09a31f0c",[[17,"wm-uploader",{"label":[1],"buttonText":[1,"button-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1,"max-size"],"maxFiles":[2,"max-files"],"errorMessage":[1,"error-message"],"requiredField":[4,"required-field"],"showInfo":[1,"show-info"],"isTabbing":[32],"notif":[32],"isCondensed":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmFileErrorCleared","handleFileErrorCleared"],[0,"wmFileDelete","storeDeletedId"]],{"errorMessage":["announceError"]}]]],["p-88ebddd7",[[0,"wm-wrapper"]]],["p-902a54c5",[[17,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"]}]]],["p-ade3d9a9",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["p-825bd63b",[[0,"priv-calendar",{"disabled":[4],"view":[1025],"focusDate":[1025,"focus-date"],"startDate":[1,"start-date"],"endDate":[1,"end-date"],"hoverDate":[1,"hover-date"],"focusFirstFocusable":[64],"focusLastFocusable":[64],"focusCell":[64]},[[0,"keydown","handleKey"]],{"focusDate":["handleFocusDate"]}]]],["p-a8524a48",[[0,"priv-chart-popover",{"open":[1028],"sliceDetails":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]],{"open":["handleOpenChange"],"sliceDetails":["handleDetailsChange"]}]]],["p-bc5e9d24",[[17,"wm-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"isExpanded":[32],"announcement":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"intCloneClicked","handleOptionCloneSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstOption"],[0,"wmEndKeyPressed","moveToLastOption"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmLetterPressed","findAndFocusOption"]],{"errorMessage":["announceError"],"disabled":["handleDisabledChange"]}],[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4],"searchTerm":[32]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]],{"selected":["syncAriaSelected"],"disabled":["syncAriaDisabled","updateDisabledOnClick"]}]]],["p-884294c6",[[17,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"icon":[1537],"iconSize":[1,"icon-size"],"iconRotate":[2,"icon-rotate"],"iconFlip":[1,"icon-flip"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"isSubmit":[4,"is-submit"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[11,"scroll","handleScroll"],[0,"keydown","handleKeydown"]],{"buttonType":["validateType"],"icon":["updateIcon"],"disabled":["handleDisabledChange"]}]]],["p-eaac6bcd",[[17,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"darkMode":[4,"dark-mode"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"icon":[1025],"description":[1]},[[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]],{"disabled":["setOnClick"]}]]]]'),e)));