@watermarkinsights/ripple 3.37.0 → 3.38.0

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 (157) hide show
  1. package/dist/cjs/{chartFunctions-4d828b26.js → chartFunctions-5441fbec.js} +1 -1
  2. package/dist/cjs/{functions-0c27162e.js → functions-500629f8.js} +1 -1
  3. package/dist/cjs/{global-a2ca8069.js → global-b0628445.js} +1 -1
  4. package/dist/cjs/{intl-022a42a1.js → intl-821d2be2.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
  7. package/dist/cjs/priv-datepicker.cjs.entry.js +1 -1
  8. package/dist/cjs/ripple.cjs.js +2 -2
  9. package/dist/cjs/wm-action-menu_2.cjs.entry.js +1 -1
  10. package/dist/cjs/wm-button.cjs.entry.js +1 -1
  11. package/dist/cjs/wm-chart.cjs.entry.js +3 -3
  12. package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
  13. package/dist/cjs/wm-file.cjs.entry.js +1 -1
  14. package/dist/cjs/wm-input.cjs.entry.js +2 -2
  15. package/dist/cjs/wm-line-chart.cjs.entry.js +3 -3
  16. package/dist/cjs/wm-modal-header.cjs.entry.js +2 -2
  17. package/dist/cjs/wm-modal.cjs.entry.js +2 -2
  18. package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
  19. package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
  20. package/dist/cjs/wm-network-uploader.cjs.entry.js +2 -2
  21. package/dist/cjs/wm-option_2.cjs.entry.js +2 -2
  22. package/dist/cjs/wm-pagination.cjs.entry.js +1 -1
  23. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
  24. package/dist/cjs/wm-search.cjs.entry.js +2 -2
  25. package/dist/cjs/wm-snackbar.cjs.entry.js +2 -2
  26. package/dist/cjs/wm-tab-item_3.cjs.entry.js +1 -1
  27. package/dist/cjs/wm-tag-input.cjs.entry.js +2 -2
  28. package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
  29. package/dist/cjs/wm-toggletip.cjs.entry.js +1 -1
  30. package/dist/cjs/wm-uploader.cjs.entry.js +2 -2
  31. package/dist/collection/collection-manifest.json +1 -1
  32. package/dist/collection/components/wm-modal/wm-modal.css +1 -0
  33. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1 -1
  34. package/dist/esm/{chartFunctions-f4f3252e.js → chartFunctions-73e3dec2.js} +1 -1
  35. package/dist/esm/{functions-d52b728c.js → functions-25f9ef6d.js} +1 -1
  36. package/dist/esm/{global-06801d00.js → global-9d3664e6.js} +1 -1
  37. package/dist/esm/{intl-9809c77c.js → intl-c3678c68.js} +1 -1
  38. package/dist/esm/loader.js +2 -2
  39. package/dist/esm/priv-chart-popover.entry.js +1 -1
  40. package/dist/esm/priv-datepicker.entry.js +1 -1
  41. package/dist/esm/ripple.js +2 -2
  42. package/dist/esm/wm-action-menu_2.entry.js +1 -1
  43. package/dist/esm/wm-button.entry.js +1 -1
  44. package/dist/esm/wm-chart.entry.js +3 -3
  45. package/dist/esm/wm-datepicker.entry.js +1 -1
  46. package/dist/esm/wm-file.entry.js +1 -1
  47. package/dist/esm/wm-input.entry.js +2 -2
  48. package/dist/esm/wm-line-chart.entry.js +3 -3
  49. package/dist/esm/wm-modal-header.entry.js +2 -2
  50. package/dist/esm/wm-modal.entry.js +2 -2
  51. package/dist/esm/wm-navigation_3.entry.js +2 -2
  52. package/dist/esm/wm-navigator.entry.js +1 -1
  53. package/dist/esm/wm-network-uploader.entry.js +2 -2
  54. package/dist/esm/wm-option_2.entry.js +2 -2
  55. package/dist/esm/wm-pagination.entry.js +1 -1
  56. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  57. package/dist/esm/wm-search.entry.js +2 -2
  58. package/dist/esm/wm-snackbar.entry.js +2 -2
  59. package/dist/esm/wm-tab-item_3.entry.js +1 -1
  60. package/dist/esm/wm-tag-input.entry.js +2 -2
  61. package/dist/esm/wm-timepicker.entry.js +1 -1
  62. package/dist/esm/wm-toggletip.entry.js +1 -1
  63. package/dist/esm/wm-uploader.entry.js +2 -2
  64. package/dist/esm-es5/{chartFunctions-f4f3252e.js → chartFunctions-73e3dec2.js} +1 -1
  65. package/dist/esm-es5/{functions-d52b728c.js → functions-25f9ef6d.js} +1 -1
  66. package/dist/esm-es5/{global-06801d00.js → global-9d3664e6.js} +1 -1
  67. package/dist/esm-es5/{intl-9809c77c.js → intl-c3678c68.js} +1 -1
  68. package/dist/esm-es5/loader.js +1 -1
  69. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  70. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  71. package/dist/esm-es5/ripple.js +1 -1
  72. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  73. package/dist/esm-es5/wm-button.entry.js +1 -1
  74. package/dist/esm-es5/wm-chart.entry.js +1 -1
  75. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  76. package/dist/esm-es5/wm-file.entry.js +1 -1
  77. package/dist/esm-es5/wm-input.entry.js +1 -1
  78. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  79. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  80. package/dist/esm-es5/wm-modal.entry.js +1 -1
  81. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  82. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  83. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  84. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  85. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  86. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  87. package/dist/esm-es5/wm-search.entry.js +1 -1
  88. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  89. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  90. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  91. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  92. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  93. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  94. package/dist/ripple/{p-dd01929e.system.entry.js → p-0259d353.system.entry.js} +1 -1
  95. package/dist/ripple/{p-c1857a16.entry.js → p-0afff679.entry.js} +1 -1
  96. package/dist/ripple/{p-5d592297.system.entry.js → p-0b0f8667.system.entry.js} +1 -1
  97. package/dist/ripple/{p-84e55d9e.entry.js → p-0ed2b6df.entry.js} +1 -1
  98. package/dist/ripple/{p-b982a342.entry.js → p-0ef2737d.entry.js} +1 -1
  99. package/dist/ripple/{p-adf76148.entry.js → p-11b91d75.entry.js} +1 -1
  100. package/dist/ripple/{p-ba31d982.system.js → p-161d5e7c.system.js} +1 -1
  101. package/dist/ripple/{p-24d9f6fe.entry.js → p-1841a3a5.entry.js} +1 -1
  102. package/dist/ripple/{p-8f273c5b.system.entry.js → p-1d62ea4d.system.entry.js} +1 -1
  103. package/dist/ripple/{p-f9539737.system.entry.js → p-2570ec1f.system.entry.js} +1 -1
  104. package/dist/ripple/{p-50623da2.entry.js → p-26985b84.entry.js} +1 -1
  105. package/dist/ripple/{p-20df08be.system.entry.js → p-2d2d30a5.system.entry.js} +1 -1
  106. package/dist/ripple/{p-e882a31f.system.entry.js → p-323e5fff.system.entry.js} +1 -1
  107. package/dist/ripple/{p-5e55eb56.system.js → p-32d973fa.system.js} +1 -1
  108. package/dist/ripple/{p-fbb44f76.system.entry.js → p-426ba254.system.entry.js} +1 -1
  109. package/dist/ripple/{p-cab12cec.system.entry.js → p-45376571.system.entry.js} +1 -1
  110. package/dist/ripple/{p-725c757a.entry.js → p-4a3f88f8.entry.js} +1 -1
  111. package/dist/ripple/{p-c3915cfe.system.entry.js → p-5257b743.system.entry.js} +1 -1
  112. package/dist/ripple/{p-06871476.entry.js → p-56298c7d.entry.js} +1 -1
  113. package/dist/ripple/{p-fea4bc00.entry.js → p-5fbec5ff.entry.js} +1 -1
  114. package/dist/ripple/{p-11763c02.entry.js → p-631a011f.entry.js} +1 -1
  115. package/dist/ripple/{p-364753eb.js → p-653943d0.js} +1 -1
  116. package/dist/ripple/{p-7f722888.entry.js → p-6a2b7449.entry.js} +1 -1
  117. package/dist/ripple/{p-5c1b2132.system.entry.js → p-6ca3c1c0.system.entry.js} +1 -1
  118. package/dist/ripple/{p-9e29176c.entry.js → p-6cef908c.entry.js} +1 -1
  119. package/dist/ripple/{p-3b50511c.system.entry.js → p-6dd460d3.system.entry.js} +1 -1
  120. package/dist/ripple/{p-2ebac749.entry.js → p-73bd2015.entry.js} +1 -1
  121. package/dist/ripple/{p-27efb4d0.system.js → p-7471439a.system.js} +1 -1
  122. package/dist/ripple/{p-d72b00a0.entry.js → p-86bd1f20.entry.js} +1 -1
  123. package/dist/ripple/{p-25c1bd67.system.entry.js → p-8debafc6.system.entry.js} +1 -1
  124. package/dist/ripple/{p-cd7cc5c6.js → p-8e001d5e.js} +1 -1
  125. package/dist/ripple/p-96625959.system.entry.js +1 -0
  126. package/dist/ripple/{p-185c3645.entry.js → p-98488132.entry.js} +1 -1
  127. package/dist/ripple/{p-74a92541.system.entry.js → p-98b6e5da.system.entry.js} +1 -1
  128. package/dist/ripple/{p-fd354e00.system.js → p-9e5a95f9.system.js} +1 -1
  129. package/dist/ripple/{p-39e17683.system.js → p-a0ab477c.system.js} +1 -1
  130. package/dist/ripple/{p-2acf8af1.system.entry.js → p-a6f28b0b.system.entry.js} +1 -1
  131. package/dist/ripple/{p-26031cd0.system.entry.js → p-ae20ba70.system.entry.js} +1 -1
  132. package/dist/ripple/{p-9cb8f41b.entry.js → p-b8580615.entry.js} +1 -1
  133. package/dist/ripple/{p-d8de670a.system.entry.js → p-b91e3f86.system.entry.js} +1 -1
  134. package/dist/ripple/{p-80ca72ff.system.entry.js → p-ba6a3364.system.entry.js} +1 -1
  135. package/dist/ripple/{p-e0f270e2.system.entry.js → p-bbffc0d1.system.entry.js} +1 -1
  136. package/dist/ripple/{p-fcdd9e03.system.entry.js → p-bedd750c.system.entry.js} +1 -1
  137. package/dist/ripple/{p-89bf36c8.system.entry.js → p-ca265cea.system.entry.js} +1 -1
  138. package/dist/ripple/{p-da01c531.entry.js → p-cbe31120.entry.js} +1 -1
  139. package/dist/ripple/{p-42aeb9bb.js → p-d3accb39.js} +1 -1
  140. package/dist/ripple/{p-3ec4ae19.entry.js → p-d3f4e391.entry.js} +1 -1
  141. package/dist/ripple/{p-ae97bf6c.system.entry.js → p-e6038b0f.system.entry.js} +1 -1
  142. package/dist/ripple/{p-697ba13b.entry.js → p-e9a21714.entry.js} +1 -1
  143. package/dist/ripple/{p-ed3e41ed.entry.js → p-e9e2e4c4.entry.js} +1 -1
  144. package/dist/ripple/{p-aae11e37.system.entry.js → p-f0b5cc80.system.entry.js} +1 -1
  145. package/dist/ripple/{p-ff888d78.js → p-f0d87250.js} +1 -1
  146. package/dist/ripple/{p-fd91cd58.entry.js → p-f1fae497.entry.js} +1 -1
  147. package/dist/ripple/{p-53f5e969.system.entry.js → p-f8512877.system.entry.js} +1 -1
  148. package/dist/ripple/{p-4b59b16a.entry.js → p-f8654cb1.entry.js} +1 -1
  149. package/dist/ripple/{p-198f596b.entry.js → p-f8b58321.entry.js} +1 -1
  150. package/dist/ripple/{p-535e7286.entry.js → p-fa641a36.entry.js} +1 -1
  151. package/dist/ripple/ripple.esm.js +1 -1
  152. package/dist/ripple/ripple.js +1 -1
  153. package/package.json +1 -1
  154. package/dist/ripple/p-50be6128.system.entry.js +0 -1
  155. package/dist/types/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.d.ts +0 -11
  156. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +0 -138
  157. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +0 -85
@@ -1 +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-30bf24f8.system.js","./p-5e55eb56.system.js","./p-ba31d982.system.js","./p-27efb4d0.system.js"],(function(e){"use strict";var t,r,o,n,a,p,i,s,l,c,h,m,b,d,u,w,g,f,x,y;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.g;l=e.a;c=e.h;h=e.b;m=e.r;b=e.c;d=e.d;u=e.e;w=e.f;g=e.i;f=e.j;x=e.k},function(e){y=e.c}],execute:function(){var v=":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 .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}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type){margin-right:2px}: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:not(:last-of-type){margin-right:2px}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}: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,:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment{-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,:host .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .stacked-bar-segment:active.doughnut-segment,:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment,:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment{-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.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.doughnut2b label,:host .component-wrapper.doughnut2b .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.doughnut0,:host .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,:host .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,: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.bar1 .chart-wrapper .inner-stacked-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,: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.bar1,:host .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,: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.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,: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.bar2b,:host .component-wrapper.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper,:host .component-wrapper.bar2b .inner-stacked-bar-wrapper,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar2b .inner-stacked-bar-wrapper.show-values,: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,:host .component-wrapper.bar6 .bar:hover.bar,:host .component-wrapper.bar6 .bar:focus.bar,:host .component-wrapper.bar7 .bar:active.bar,:host .component-wrapper.bar7 .bar:hover.bar,:host .component-wrapper.bar7 .bar:focus.bar{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}: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 #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.bar1,: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: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}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";var k=e("wm_chart",function(){function e(e){var o=this;t(this,e);this.uid=p();this.slicesDetails=[];this.handleStackedBarResize=i((function(){return __awaiter(o,void 0,void 0,(function(){var e,t,r,o;return __generator(this,(function(n){e=false;t=this.el.shadowRoot.querySelectorAll(".value");if(t.length){r=t.length?t[0].getBoundingClientRect().right:0;o=4;t.forEach((function(t,n){if(n>0){var a=t.getBoundingClientRect();if(a.left-o<r&&t.textContent!==""){t.classList.add("hidden");e=true}else{t.classList.remove("hidden");r=a.right}}}))}this.hasHiddenBarValue=e;return[2]}))}))}),100);this.debouncedUpdate=i((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){r(this.el);return[2]}))}))}),10);this.debouncedSliceUpdate=i((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,s.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.completionMessage=undefined;this.valueFormat=undefined;this.showValues=undefined;this.showGrid=true;this.showLegend=true;this.showBarLegend=false;this.notStartedColor=false;this.labelPosition="top";this.isTabbing=false;this.userIsNavigating=false;this.hasHiddenBarValue=false}Object.defineProperty(e.prototype,"tempValueFormat",{get:function(){return this.valueFormat||this.showValues||"none"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hybridType",{get:function(){return window.innerWidth>1340?"doughnut0":"bar1"},enumerable:false,configurable:true});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(){var e=this.chartType;if(this.chartType==="hybrid"){e=this.hybridType}else if(this.chartType==="doughnut2"&&this.el.children.length>3){e="doughnut2b"}else if(this.chartType==="bar2"&&this.el.children.length>4){e="bar2b"}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return l[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){c.call(this,e)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(r){switch(r.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.")}if(this.showValues){console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead.")}return[4,s.call(this,this.currentChartType)];case 1:r.sent();if(this.chartType==="hybrid"||!this.isDoughnut){e=new ResizeObserver((function(){t.isStackedBar?t.handleStackedBarResize():t.debouncedUpdate()}));e.observe(this.el)}return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.renderBarText=function(e,t){var r;if(this.tempValueFormat==="percentage"){r=e.perc===0&&e.amount>0?"<1%":"".concat(e.perc,"%")}else if(this.tempValueFormat==="amount"){r=e.amount}return o("div",{class:"value-wrapper",style:{width:"calc(".concat(h(e.amount,this.total,false),"%\n ").concat(t!==this.slicesDetails.length-1?" - 2px":"")}},o("span",{class:"value"},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 b.call(this,this.currentChartType)}else if(this.isDoughnut&&this.total>0){return d.call(this,this.currentChartType)}};e.prototype.render=function(){var e=this;return o(n,{onBlur:function(){return x.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":y.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&&w.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&w.call(this,this.currentChartType),o("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),this.currentChartType==="doughnut0"?g.call(this):"",this.hasHiddenBarValue&&f()),u())};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}());k.style=v}}}));
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-30bf24f8.system.js","./p-32d973fa.system.js","./p-161d5e7c.system.js","./p-7471439a.system.js"],(function(e){"use strict";var t,r,o,n,a,p,i,s,l,c,h,m,b,d,u,w,g,f,x,y;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.g;l=e.a;c=e.h;h=e.b;m=e.r;b=e.c;d=e.d;u=e.e;w=e.f;g=e.i;f=e.j;x=e.k},function(e){y=e.c}],execute:function(){var v=":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 .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}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type){margin-right:2px}: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:not(:last-of-type){margin-right:2px}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}: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,:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment{-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,:host .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .stacked-bar-segment:active.doughnut-segment,:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment,:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment{-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.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.doughnut2b label,:host .component-wrapper.doughnut2b .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.doughnut0,:host .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,:host .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,: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.bar1 .chart-wrapper .inner-stacked-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,: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.bar1,:host .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,: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.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,: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.bar2b,:host .component-wrapper.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper,:host .component-wrapper.bar2b .inner-stacked-bar-wrapper,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar2b .inner-stacked-bar-wrapper.show-values,: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,:host .component-wrapper.bar6 .bar:hover.bar,:host .component-wrapper.bar6 .bar:focus.bar,:host .component-wrapper.bar7 .bar:active.bar,:host .component-wrapper.bar7 .bar:hover.bar,:host .component-wrapper.bar7 .bar:focus.bar{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}: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 #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.bar1,: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: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}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";var k=e("wm_chart",function(){function e(e){var o=this;t(this,e);this.uid=p();this.slicesDetails=[];this.handleStackedBarResize=i((function(){return __awaiter(o,void 0,void 0,(function(){var e,t,r,o;return __generator(this,(function(n){e=false;t=this.el.shadowRoot.querySelectorAll(".value");if(t.length){r=t.length?t[0].getBoundingClientRect().right:0;o=4;t.forEach((function(t,n){if(n>0){var a=t.getBoundingClientRect();if(a.left-o<r&&t.textContent!==""){t.classList.add("hidden");e=true}else{t.classList.remove("hidden");r=a.right}}}))}this.hasHiddenBarValue=e;return[2]}))}))}),100);this.debouncedUpdate=i((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){r(this.el);return[2]}))}))}),10);this.debouncedSliceUpdate=i((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,s.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.completionMessage=undefined;this.valueFormat=undefined;this.showValues=undefined;this.showGrid=true;this.showLegend=true;this.showBarLegend=false;this.notStartedColor=false;this.labelPosition="top";this.isTabbing=false;this.userIsNavigating=false;this.hasHiddenBarValue=false}Object.defineProperty(e.prototype,"tempValueFormat",{get:function(){return this.valueFormat||this.showValues||"none"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hybridType",{get:function(){return window.innerWidth>1340?"doughnut0":"bar1"},enumerable:false,configurable:true});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(){var e=this.chartType;if(this.chartType==="hybrid"){e=this.hybridType}else if(this.chartType==="doughnut2"&&this.el.children.length>3){e="doughnut2b"}else if(this.chartType==="bar2"&&this.el.children.length>4){e="bar2b"}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return l[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){c.call(this,e)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(r){switch(r.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.")}if(this.showValues){console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead.")}return[4,s.call(this,this.currentChartType)];case 1:r.sent();if(this.chartType==="hybrid"||!this.isDoughnut){e=new ResizeObserver((function(){t.isStackedBar?t.handleStackedBarResize():t.debouncedUpdate()}));e.observe(this.el)}return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.renderBarText=function(e,t){var r;if(this.tempValueFormat==="percentage"){r=e.perc===0&&e.amount>0?"<1%":"".concat(e.perc,"%")}else if(this.tempValueFormat==="amount"){r=e.amount}return o("div",{class:"value-wrapper",style:{width:"calc(".concat(h(e.amount,this.total,false),"%\n ").concat(t!==this.slicesDetails.length-1?" - 2px":"")}},o("span",{class:"value"},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 b.call(this,this.currentChartType)}else if(this.isDoughnut&&this.total>0){return d.call(this,this.currentChartType)}};e.prototype.render=function(){var e=this;return o(n,{onBlur:function(){return x.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":y.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&&w.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&w.call(this,this.currentChartType),o("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),this.currentChartType==="doughnut0"?g.call(this):"",this.hasHiddenBarValue&&f()),u())};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}());k.style=v}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,t,e,r){function n(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,i){function a(o){try{l(r.next(o))}catch(o){i(o)}}function s(o){try{l(r["throw"](o))}catch(o){i(o)}}function l(o){o.done?e(o.value):n(o.value).then(a,s)}l((r=r.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(o){return function(t){return l([o,t])}}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&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=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(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){e.label=s[1];break}if(s[0]===6&&e.label<i[1]){e.label=i[1];i=s;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(s);break}if(i[2])e.ops.pop();e.trys.pop();continue}s=t.call(o,e)}catch(o){s=[6,o];n=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-30bf24f8.system.js","./p-313b6073.system.js","./p-5e55eb56.system.js","./p-27efb4d0.system.js"],(function(o){"use strict";var t,e,r,n,i,a,s,l,d,c,u,b,m,p;return{setters:[function(o){t=o.r;e=o.c;r=o.f;n=o.h;i=o.H;a=o.g},function(o){s=o.g;l=o.p;d=o.a;c=o.d},function(o){u=o.g;b=o.i;m=o.x},function(o){p=o.g}],execute:function(){var h=':host .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:100%;border:2px solid transparent;font-family:inherit;font-size:0.75rem;font-weight:700;min-height:2.75rem;padding:12px 1.3333333333em;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button{min-height:3.3333333333em}}:host .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}:host .wm-button::-moz-focus-inner{border:0;outline:none}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark){-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner{border:0}:host .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);outline:none}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-button .mdi{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}:host .wm-button:not(.-icononly):not(.-navigational) .mdi{margin-right:0.3125rem;font-size:0.875rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly){background:var(--wmcolor-button-background-primary);color:var(--wmcolor-button-text-primary)}:host .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-primary-hover)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-primary-ondark);background:var(--wmcolor-button-background-primary-ondark)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-primary-hover-ondark)}:host .wm-button.-secondary{color:var(--wmcolor-button-text-secondary);border:2px solid var(--wmcolor-button-border-secondary);background:var(--wmcolor-button-background-secondary)}:host .wm-button.-secondary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-secondary-hover);color:var(--wmcolor-button-text-secondary-hover);border-color:transparent}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-secondary-ondark);background:var(--wmcolor-button-background-secondary-ondark);border-color:var(--wmcolor-button-border-secondary-ondark)}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-secondary-hover-ondark);background:var(--wmcolor-button-background-secondary-hover-ondark);border-color:transparent}:host .wm-button.-textonly{color:var(--wmcolor-button-text-textonly);-webkit-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding:0;height:auto;min-height:unset;border-radius:0;line-height:1;overflow-wrap:anywhere}:host .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly:focus{outline:none}:host .wm-button.-textonly::-moz-focus-inner{border:0;outline:none}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-interactive-focus-textonly)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-interactive-focus-textonly) 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-interactive-focus-textonly-ondark)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-interactive-focus-textonly-ondark) 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline}:host .wm-button.-textonly.dark{color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete{color:var(--wmcolor-button-background-delete)}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-icononly,:host .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,:host .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly .mdi,:host .wm-button.-navigational .mdi{font-size:1.12rem}:host .wm-button.-icononly{border-width:1px !important;color:var(--wmcolor-button-icon-icononly);border-color:var(--wmcolor-button-border-icononly);background-color:var(--wmcolor-button-background-icononly)}:host .wm-button.-icononly: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}:host .wm-button.-icononly:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-icononly-hover);color:var(--wmcolor-button-icon-icononly-hover);border-color:transparent}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-icononly-ondark);background:var(--wmcolor-button-background-icononly-ondark);border-color:var(--wmcolor-button-border-icononly-ondark)}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-icononly-hover-ondark);background:var(--wmcolor-button-background-icononly-hover-ondark);border-color:transparent}:host .wm-button.-navigational{border:none !important;background-color:var(--wmcolor-button-background-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:var(--wmcolor-button-background-navigational-hover)}:host .wm-button.-navigational: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}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational-ondark);background:var(--wmcolor-button-background-navigational-ondark)}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-navigational-hover-ondark);background:var(--wmcolor-button-background-navigational-hover-ondark)}:host .wm-button.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark){background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-pairnegative{background:var(--wmcolor-button-background-negative);border-color:var(--wmcolor-button-background-negative);color:var(--wmcolor-button-text-negative)}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-negative-hover);border-color:var(--wmcolor-button-background-negative-hover)}:host .wm-button.-pairpositive{background:var(--wmcolor-button-background-positive);border-color:var(--wmcolor-button-background-positive);color:var(--wmcolor-button-text-positive)}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-positive-hover);border-color:var(--wmcolor-button-background-positive-hover)}:host .wm-button.-selector,:host .wm-button.-selector-primary{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;border-radius:3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;font-weight:700;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selector,:host .wm-button.-selector-primary{height:2.5rem}}:host .wm-button.-selector:before,:host .wm-button.-selector-primary: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:"\\f140";position:absolute;right:0.5625rem;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);font-size:1.12rem;font-weight:700;pointer-events:none}:host .wm-button.-selector:active,:host .wm-button.-selector-primary:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selector::-moz-focus-inner,:host .wm-button.-selector-primary::-moz-focus-inner{border:0}:host .wm-button.-selector .overflowcontrol,:host .wm-button.-selector-primary .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button.-selector{background:var(--wmcolor-button-background-selector);color:var(--wmcolor-button-text-selector);border-color:var(--wmcolor-button-border-selector)}:host .wm-button.-selector:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selector-hover);color:var(--wmcolor-button-text-selector-hover);border-color:transparent}:host .wm-button.-selector.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selector-ondark);border-color:var(--wmcolor-button-border-selector-ondark);background:var(--wmcolor-button-background-selector-ondark)}:host .wm-button.-selector.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selector-hover-ondark);background:var(--wmcolor-button-background-selector-hover-ondark);border-color:transparent}:host .wm-button.-selector-primary{background:var(--wmcolor-button-background-selectorprimary);color:var(--wmcolor-button-text-selectorprimary)}:host .wm-button.-selector-primary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selectorprimary-hover)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selectorprimary-ondark);background:var(--wmcolor-button-background-selectorprimary-ondark)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selectorprimary-hover-ondark);background:var(--wmcolor-button-background-selectorprimary-hover-ondark)}:host .wm-button:disabled,:host .wm-button.disabled{cursor:default;pointer-events:none}:host .wm-button:disabled.-secondary:not(.-permanentlydelete),:host .wm-button.disabled.-secondary:not(.-permanentlydelete){-webkit-box-shadow:none;box-shadow:none;border-color:var(--wmcolor-button-border-secondary-disabled);color:var(--wmcolor-button-text-secondary-disabled)}:host .wm-button:disabled.-primary,:host .wm-button.disabled.-primary{background:var(--wmcolor-button-background-primary-disabled);color:var(--wmcolor-button-text-primary-disabled)}:host .wm-button:disabled.-permanentlydelete,:host .wm-button.disabled.-permanentlydelete{background:var(--wmcolor-button-background-delete-disabled);color:var(--wmcolor-button-text-delete-disabled);border-color:var(--wmcolor-button-background-delete-disabled)}:host .wm-button:disabled.-pairnegative,:host .wm-button.disabled.-pairnegative{background:var(--wmcolor-button-background-negative-disabled);border-color:var(--wmcolor-button-background-negative-disabled);color:var(--wmcolor-button-text-negative-disabled)}:host .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-pairpositive{background:var(--wmcolor-button-background-positive-disabled);border-color:var(--wmcolor-button-background-positive-disabled);color:var(--wmcolor-button-text-positive-disabled)}:host .wm-button:disabled.-selector,:host .wm-button.disabled.-selector{color:var(--wmcolor-button-text-selector-disabled);border-color:var(--wmcolor-button-border-selector-disabled)}:host .wm-button:disabled.-selector-primary,:host .wm-button.disabled.-selector-primary{background:var(--wmcolor-button-background-selectorprimary-disabled);color:var(--wmcolor-button-text-selectorprimary-disabled)}:host .wm-button:disabled.-navigational,:host .wm-button.disabled.-navigational{color:var(--wmcolor-button-icon-navigational-disabled)}:host .wm-button:disabled.-icononly,:host .wm-button.disabled.-icononly{color:var(--wmcolor-button-icon-icononly-disabled);border-color:var(--wmcolor-button-border-icononly-disabled)}:host .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly{color:var(--wmcolor-button-text-textonly-disabled);background:transparent}:host .wm-button:disabled.dark.-icononly,:host .wm-button.disabled.dark.-icononly{background:transparent;color:var(--wmcolor-button-icon-icononly-disabled-ondark);border-color:var(--wmcolor-button-border-icononly-disabled-ondark)}:host .wm-button:disabled.dark.-navigational,:host .wm-button.disabled.dark.-navigational{color:var(--wmcolor-button-icon-navigational-disabled-ondark)}:host .wm-button:disabled.dark.-textonly,:host .wm-button.disabled.dark.-textonly{color:var(--wmcolor-button-text-textonly-disabled-ondark)}:host .wm-button:disabled.dark.-primary,:host .wm-button.disabled.dark.-primary{color:var(--wmcolor-button-text-primary-disabled-ondark);background:var(--wmcolor-button-background-primary-disabled-ondark)}:host .wm-button:disabled.dark.-secondary,:host .wm-button.disabled.dark.-secondary{background:transparent;color:var(--wmcolor-button-text-secondary-disabled-ondark);border-color:var(--wmcolor-button-border-secondary-disabled-ondark)}:host .wm-button:disabled.dark.-selector,:host .wm-button.disabled.dark.-selector{color:var(--wmcolor-button-text-selector-disabled-ondark);border-color:var(--wmcolor-button-border-selector-disabled-ondark);background:var(--wmcolor-button-background-selector-disabled-ondark)}:host .wm-button:disabled.dark.-selector-primary,:host .wm-button.disabled.dark.-selector-primary{color:var(--wmcolor-button-text-selectorprimary-disabled-ondark);background:var(--wmcolor-button-background-selectorprimary-disabled-ondark)}:host .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),:host .wm-button.disabled.dark.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete-disabled-ondark);color:var(--wmcolor-button-text-delete-disabled-ondark)}:host a.wm-button,:host label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host{width:100%;position:relative}:host[dir=RTL] .mdi{margin-left:0.3125rem;margin-right:0}:host input:focus+.wm-button.user-is-tabbing{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-uploader-button-focus) !important;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-uploader-button-focus) !important;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-uploader-button-focus) !important}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}.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}.header{position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}.header .notif-wrapper{-ms-flex-align:end;align-items:flex-end}.notif-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.notif-wrapper .notif{font-size:0.875rem;font-style:italic;margin-top:0.25rem}@media (max-width: 60.9375rem){.descr{margin-bottom:0.5rem}.notif-wrapper{margin-bottom:1rem}.header .notif-wrapper{-ms-flex-align:start;align-items:flex-start}}.file-info{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.file-info+.file-controls{-ms-flex:none;flex:none;margin-left:1rem}.empty-block{margin:5rem auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.empty-block .upload-file{margin-bottom:1.875rem}.empty-block .empty-message{font-size:1.5rem;margin-bottom:0.4375rem}.empty-block .notif-wrapper{-ms-flex-pack:center;justify-content:center}.empty-block .notif-wrapper .wm-button{width:auto}ul{list-style:none;padding:0;width:100%}ul li{font-size:0.875rem}ul li .file{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:relative;height:3.75rem;padding:0.5rem 1.25rem;background:var(--wmcolor-file-background);border:1px solid var(--wmcolor-file-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}ul li .file+.file{margin-top:1.25rem}ul li .file .filename{font-weight:500}ul li .file .filedate{margin-left:3.75rem;font-weight:normal;font-style:italic}ul li .file wm-button+wm-button{margin-left:1rem}ul.file-list .file.--saved,ul.inprogress-list .file{margin-bottom:1.625rem}ul .progress{position:absolute;left:0;top:0;right:0;height:8px}ul.error-list li{margin-bottom:1.25rem;color:var(--wmcolor-text-error)}ul.error-list li .file{border:1px solid var(--wmcolor-file-border-error);background-color:var(--wmcolor-file-background-error);height:3.75rem}ul .error-message{padding-top:0.25rem;font-style:italic}';var g=o("wm_network_uploader",function(){function o(o){t(this,o);this.wmNetworkUploaderFilesChanged=e(this,"wmNetworkUploaderFilesChanged",7);this.inputId=u();this.isTabbing=false;this.fileList=[];this.inProgressList=[];this.errorList=[];this.notif=undefined;this.snackbar=[];this.numFilesInProgress=undefined;this.getPath=undefined;this.requestUploadPath=undefined;this.uploadPath=undefined;this.requestDownloadPath=undefined;this.deletePath=undefined;this.associatedData=undefined;this.buttonText=undefined;this.emptyStateText=undefined;this.icon=undefined;this.fileTypes="pdf txt log xml doc docx xls xlsx ppt pptx gif jpg jpeg png csv";this.maxSize=100;this.maxFiles=undefined;this.sortBy="date"}o.prototype.toggleTabbingOn=function(){this.isTabbing=true};o.prototype.toggleTabbingOff=function(){this.isTabbing=false};o.prototype.handleUploadProgress=function(o){var t=this;this.inProgressList.map((function(e){if(e.name===o.detail.file_name){e.progress=o.detail.progress;r(t.el)}}));if(o.detail.progress===100){this.numFilesInProgress-=1}if(!this.srProgress&&this.numFilesInProgress){var e=this.numFilesInProgress;this.srProgress=setInterval((function(){var o=t.inProgressList.reduce((function(o,t){return t.progress?o+t.progress:o}),0);if(t.liveRegion){t.liveRegion.innerHTML=b.formatMessage({id:"uploader.uploadProgress",defaultMessage:"Upload progress: {percentage}%"},{percentage:Math.floor(o/e)})}}),5e3)}};o.prototype.handleFinishedSnack=function(o){this.snackbar=this.snackbar.filter((function(t){return t.id!==o.detail.id}))};o.prototype.setMaxSize=function(){this.maxSize=this.maxSize>100?100:this.maxSize};o.prototype.uploadNotifications=function(o,t){var e=this;if(t>0&&o===0){setTimeout((function(){e.notif=null}),20*1e3);var n=b.formatMessage({id:"uploader.finishedUploading",defaultMessage:"Finished uploading"});this.notif={id:5,message:n};if(this.liveRegion){this.liveRegion.innerHTML=n}this.numFilesInProgress=null;clearInterval(this.srProgress);r(this.el)}else if(o>0&&o!=t){var n=b.formatMessage({id:"uploader.filesUploading",defaultMessage:"{num, plural, one {1 file uploading} other {# files uploading}}"},{num:o});this.notif={id:6,message:n};if(this.liveRegion){this.liveRegion.innerHTML=n}r(this.el)}};o.prototype.emitFileListEvent=function(){this.wmNetworkUploaderFilesChanged.emit(this.fileList)};o.prototype.formatDate=function(o,t,e){var r=Date.parse(o);if(t.match(/^[a-zA-Z]*(-[a-zA-Z0-9]*)*$/g)){try{Intl.getCanonicalLocales(t)}catch(o){t="en-us"}}else{return o}if(!!r){var n=new Date(r);var i=n.getFullYear();var a=("0"+(n.getMonth()+1)).substr(-2);var s=("0"+n.getDate()).substr(-2);var l=n.toLocaleTimeString([t,"en-us"],{timeZone:e,hour:"numeric",minute:"numeric"});return"".concat(i,"/").concat(a,"/").concat(s," ").concat(l)}else{return o}};o.prototype.isValidSize=function(o){return o/1024/1024<=this.maxSize};o.prototype.isDuplicate=function(o){return this.fileList.find((function(t){return t.file_name===o}))};o.prototype.isEmpty=function(){return!this.fileList.length&&!this.inProgressList.length&&!this.errorList.length};Object.defineProperty(o.prototype,"isDisabled",{get:function(){var o=!!this.maxFiles&&this.fileList.length>=this.maxFiles;if(!this.notif){if(o){var t=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"});this.notif={id:1,message:t};if(this.liveRegion){this.liveRegion.innerHTML=t}}else{this.notif=null}}else if(this.notif.id===1){if(!o){this.notif=null}}return o||this.numFilesInProgress>0},enumerable:false,configurable:true});o.prototype.purgeProgressList=function(o){this.inProgressList=this.inProgressList.filter((function(t){return t.progress!==100&&t.name!==o.file_name}))};o.prototype.getExistingFiles=function(){var o=this;s(this.getPath).then((function(t){t.map((function(t){return o.purgeProgressList(t)}));if(o.sortBy==="name"){t.sort((function(o,t){return o.file_name.localeCompare(t.file_name)}))}o.fileList=t})).catch((function(o){console.error(o)}))};o.prototype.clearErrors=function(){this.errorList=[];this.notif=null};o.prototype.handleFiles=function(o){var t=this;var e=Array.from(o.target.files);var n=this.fileTypes.split(" ").join(", ");if(!!this.maxFiles&&this.fileList.length+e.length>this.maxFiles){var i=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"});this.notif={id:2,message:i};if(this.liveRegion){this.liveRegion.innerHTML=i}}else{e&&e.map((function(o){if(!m(o,t.fileTypes)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.invalidFileType",defaultMessage:"The file type is invalid. Accepted types: {validTypes}"},{validTypes:n})};t.errorList.push(e)}else if(!t.isValidSize(o.size)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.fileTooLarge",defaultMessage:"The selected file is too large. Maximum file size is {size}Mb"},{size:t.maxSize})};t.errorList.push(e)}else if(t.isDuplicate(o.name)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.duplicateName",defaultMessage:"A file with this name already exists."})};t.errorList.push(e)}else{t.inProgressList.push(o)}r(t.el)}));if(this.inProgressList.length>0){this.numFilesInProgress=this.inProgressList.length;this.inProgressList.map((function(o,e){t.uploadFile(o,e)}))}}o.target.value=""};o.prototype.uploadFile=function(o,t){var e=this;s(this.requestUploadPath+t.toString()).then((function(t){return __awaiter(e,void 0,void 0,(function(){var e,r,n;var i=this;return __generator(this,(function(a){switch(a.label){case 0:e=JSON.parse(this.associatedData);r=Object.assign(Object.assign({},e),{file_name:o.name,mime_type:o.type,file_path:t.path,document_uuid:t.guid});n=function(t){var e=t.lengthComputable&&t.total!==0?t.loaded/t.total*100:0;var r=new CustomEvent("wmUploadProgress",{detail:{file_name:o.name,progress:e}});i.el.dispatchEvent(r)};return[4,l(t.url,o,n)];case 1:a.sent();return[4,d(this.uploadPath,r)];case 2:a.sent();this.getExistingFiles();return[2]}}))}))})).catch((function(o){e.numFilesInProgress=null;e.inProgressList=[];e.notif={id:3,message:p.genericError};console.error(o)}))};o.prototype.downloadFile=function(o,t){this.clearErrors();var e={file_path:t,file_uuid:o};d(this.requestDownloadPath,e).then((function(o){window.location.assign(o.url)})).catch((function(o){console.error(o)}))};o.prototype.deleteFile=function(o){var t=this;this.clearErrors();this.snackbar.push({message:b.formatMessage({id:"uploader.fileDeleted",defaultMessage:"{fileName} was deleted."},{fileName:o.file_name}),id:o.uuid,link:""});this.fileList=this.fileList.filter((function(t){return t.uuid!==o.uuid}));c("".concat(this.deletePath,"/").concat(o.uuid)).catch((function(e){t.notif={id:4,message:b.formatMessage({id:"uploader.fileNotDeleted",defaultMessage:"{fileName} could not be deleted."},{fileName:o.file_name})};t.getExistingFiles();console.error(e)}))};o.prototype.componentWillLoad=function(){if(!this.getPath){throw new Error("wm-network-uploader: get-path is a required prop")}if(!this.requestUploadPath){throw new Error("wm-network-uploader: request-upload-path is a required prop")}if(!this.uploadPath){throw new Error("wm-network-uploader: upload-path is a required prop")}if(!this.requestDownloadPath){throw new Error("wm-network-uploader: request-download-path is a required prop")}if(!this.deletePath){throw new Error("wm-network-uploader: delete-path is a required prop")}if(!this.buttonText){throw new Error("wm-network-uploader: button-text is a required prop")}if(!this.emptyStateText){throw new Error("wm-network-uploader: empty-state-text is a required prop")}if(!this.associatedData){throw new Error("wm-network-uploader: associated-data is a required prop")}this.setMaxSize();this.clearErrors()};o.prototype.componentDidLoad=function(){this.getExistingFiles();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};o.prototype.uploadButtonOnClick=function(o){var t=this;if(this.isDisabled){o.preventDefault();if(this.liveRegion){var e=!!this.maxFiles&&this.fileList.length>=this.maxFiles;var r="";if(this.numFilesInProgress>0){r=b.formatMessage({id:"uploader.waitToUpload",defaultMessage:"Please wait for current upload to complete before uploading new files.",description:"Message for screen reader users"})}else if(e){r=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"})}if(r){this.liveRegion.innerHTML="";new Promise((function(o){setTimeout((function(){o("")}),500)})).then((function(){return t.liveRegion.innerHTML=r}))}}}else{this.clearErrors()}};o.prototype.renderUploadSvg=function(){return n("svg",{class:"upload-file",width:"91",height:"84",viewBox:"0 0 91 84"},n("path",{transform:"rotate(-180.000000) translate(-452, -255.5)",fill:"#eae8ec",d:"M361,249.681818 L361,197.318182 C361,194.118182 365.555061,191.5 371.122358,191.5 L391.316463,191.5 L391.286495,200.562515 L369.871211,200.600292 L369.885404,200.622146 L369.886423,246.655947 L443.657038,246.840767 L443.657038,200.622146 L421.683537,200.622146 L421.683537,191.5 L441.978865,191.5 C447.546162,191.5 452,194.118182 452,197.318182 L452,249.681818 C452,252.881818 447.546162,255.5 441.978865,255.5 L371.122358,255.5 C365.504449,255.5 361,252.881818 361,249.681818 Z M391.5,207 L406,221 L420.5,207 L409.625,207 L409.625,172 L402.375,172 L402.375,207 L391.5,207 Z"}))};o.prototype.renderIcon=function(){var o=this.icon&&this.icon==="f066";return this.icon&&n("span",{class:"mdi ".concat(o?"rotate":"")},String.fromCodePoint(parseInt("0x".concat(this.icon))))};o.prototype.renderNotif=function(){return this.notif?n("span",{class:"notif"},this.notif.message):""};o.prototype.renderUploadButton=function(o){var t=this;return n("div",{class:"notif-wrapper"},n("input",{name:this.inputId,id:this.inputId,class:"sr-only",type:"file",multiple:true,onClick:function(o){return t.uploadButtonOnClick(o)},onChange:function(o){return t.handleFiles(o)}}),n("label",{htmlFor:this.inputId,class:"wm-button ".concat(o).concat(this.isTabbing?" user-is-tabbing":"")},this.renderIcon(),this.buttonText),this.renderNotif())};o.prototype.renderWithItems=function(){return n("div",null,n("div",{class:"header"},n("div",{class:"descr"},n("slot",null)),this.renderUploadButton(this.isDisabled?"disabled":"")),this.renderErrorList(),this.renderInProgressList(),this.renderFileList())};o.prototype.renderEmptyState=function(){return n("div",null,n("div",{class:"header"},n("div",{class:"descr"},n("slot",null))),n("div",{class:"empty-block"},this.renderUploadSvg(),n("div",{class:"empty-message"},this.emptyStateText),this.renderUploadButton("-primary empty-button")))};o.prototype.renderErrorList=function(){if(!!this.errorList.length){if(this.liveRegion){var o=this.errorList.reduce((function(o,t){return o+"".concat(t.file_name,": ").concat(t.message," ")}),"");this.liveRegion.innerHTML=o}return n("ul",{class:"error-list"},this.errorList.map((function(o){return n("li",null,n("div",{class:"file --error"},n("div",{class:"file-info"},n("span",{class:"filename"},o.file_name))),n("div",{class:"error-message"},o.message))})))}};o.prototype.renderInProgressList=function(){return n("ul",{class:"inprogress-list"},this.inProgressList.map((function(o){return n("li",null,n("div",{class:"file --progress"},n("div",{class:"progress",style:{background:"linear-gradient(to right, rgba(67, 126, 142, 1) ".concat(o.progress,"%, transparent ").concat(o.progress,"%)")}}),n("div",{class:"file-info"},n("span",{class:"filename"},o.name," ",n("span",{class:"sr-only"},"uploading")))))})))};o.prototype.renderFile=function(o){var t=this;return n("li",null,n("div",{class:"file --saved"},n("div",{class:"file-info"},n("span",{class:"filename"},o.file_name),n("span",{class:"filedate"},this.formatDate(o.updated_at,b.locale,Intl.DateTimeFormat().resolvedOptions().timeZone))),n("div",{class:"file-controls"},n("wm-button",{class:"download-button","button-type":"icononly",tooltip:"download","label-for-identical-buttons":"download ".concat(o.file_name),icon:"f1da",onClick:function(){return t.downloadFile(o.uuid,o.file_path)}}),n("wm-button",{class:"delete-button","button-type":"icononly",tooltip:"remove","label-for-identical-buttons":"remove ".concat(o.file_name),icon:"f1c0",onClick:function(){return t.deleteFile(o)}}))))};o.prototype.renderFileList=function(){var o=this;return n("ul",{class:"file-list"},this.fileList.map((function(t){return o.renderFile(t)})))};o.prototype.render=function(){var o=this;return n(i,null,this.isEmpty()?this.renderEmptyState():this.renderWithItems(),n("wm-snackbar",{notifications:JSON.stringify(this.snackbar)}),n("div",{ref:function(t){return o.liveRegion=t},class:"live-region sr-only","aria-live":"assertive","aria-atomic":"true"}))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{maxSize:["setMaxSize"],numFilesInProgress:["uploadNotifications"],fileList:["emitFileListEvent"]}},enumerable:false,configurable:true});return o}());g.style=h}}}));
1
+ var __awaiter=this&&this.__awaiter||function(o,t,e,r){function n(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,i){function a(o){try{l(r.next(o))}catch(o){i(o)}}function s(o){try{l(r["throw"](o))}catch(o){i(o)}}function l(o){o.done?e(o.value):n(o.value).then(a,s)}l((r=r.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(o){return function(t){return l([o,t])}}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&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=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(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){e.label=s[1];break}if(s[0]===6&&e.label<i[1]){e.label=i[1];i=s;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(s);break}if(i[2])e.ops.pop();e.trys.pop();continue}s=t.call(o,e)}catch(o){s=[6,o];n=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-30bf24f8.system.js","./p-313b6073.system.js","./p-32d973fa.system.js","./p-7471439a.system.js"],(function(o){"use strict";var t,e,r,n,i,a,s,l,d,c,u,b,m,p;return{setters:[function(o){t=o.r;e=o.c;r=o.f;n=o.h;i=o.H;a=o.g},function(o){s=o.g;l=o.p;d=o.a;c=o.d},function(o){u=o.g;b=o.i;m=o.x},function(o){p=o.g}],execute:function(){var h=':host .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:100%;border:2px solid transparent;font-family:inherit;font-size:0.75rem;font-weight:700;min-height:2.75rem;padding:12px 1.3333333333em;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button{min-height:3.3333333333em}}:host .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}:host .wm-button::-moz-focus-inner{border:0;outline:none}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark){-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner{border:0}:host .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);outline:none}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-button .mdi{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}:host .wm-button:not(.-icononly):not(.-navigational) .mdi{margin-right:0.3125rem;font-size:0.875rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly){background:var(--wmcolor-button-background-primary);color:var(--wmcolor-button-text-primary)}:host .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-primary-hover)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-primary-ondark);background:var(--wmcolor-button-background-primary-ondark)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-primary-hover-ondark)}:host .wm-button.-secondary{color:var(--wmcolor-button-text-secondary);border:2px solid var(--wmcolor-button-border-secondary);background:var(--wmcolor-button-background-secondary)}:host .wm-button.-secondary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-secondary-hover);color:var(--wmcolor-button-text-secondary-hover);border-color:transparent}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-secondary-ondark);background:var(--wmcolor-button-background-secondary-ondark);border-color:var(--wmcolor-button-border-secondary-ondark)}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-secondary-hover-ondark);background:var(--wmcolor-button-background-secondary-hover-ondark);border-color:transparent}:host .wm-button.-textonly{color:var(--wmcolor-button-text-textonly);-webkit-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding:0;height:auto;min-height:unset;border-radius:0;line-height:1;overflow-wrap:anywhere}:host .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly:focus{outline:none}:host .wm-button.-textonly::-moz-focus-inner{border:0;outline:none}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-interactive-focus-textonly)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-interactive-focus-textonly) 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-interactive-focus-textonly-ondark)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-interactive-focus-textonly-ondark) 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline}:host .wm-button.-textonly.dark{color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete{color:var(--wmcolor-button-background-delete)}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-icononly,:host .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,:host .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly .mdi,:host .wm-button.-navigational .mdi{font-size:1.12rem}:host .wm-button.-icononly{border-width:1px !important;color:var(--wmcolor-button-icon-icononly);border-color:var(--wmcolor-button-border-icononly);background-color:var(--wmcolor-button-background-icononly)}:host .wm-button.-icononly: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}:host .wm-button.-icononly:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-icononly-hover);color:var(--wmcolor-button-icon-icononly-hover);border-color:transparent}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-icononly-ondark);background:var(--wmcolor-button-background-icononly-ondark);border-color:var(--wmcolor-button-border-icononly-ondark)}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-icononly-hover-ondark);background:var(--wmcolor-button-background-icononly-hover-ondark);border-color:transparent}:host .wm-button.-navigational{border:none !important;background-color:var(--wmcolor-button-background-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:var(--wmcolor-button-background-navigational-hover)}:host .wm-button.-navigational: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}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational-ondark);background:var(--wmcolor-button-background-navigational-ondark)}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-navigational-hover-ondark);background:var(--wmcolor-button-background-navigational-hover-ondark)}:host .wm-button.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark){background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-pairnegative{background:var(--wmcolor-button-background-negative);border-color:var(--wmcolor-button-background-negative);color:var(--wmcolor-button-text-negative)}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-negative-hover);border-color:var(--wmcolor-button-background-negative-hover)}:host .wm-button.-pairpositive{background:var(--wmcolor-button-background-positive);border-color:var(--wmcolor-button-background-positive);color:var(--wmcolor-button-text-positive)}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-positive-hover);border-color:var(--wmcolor-button-background-positive-hover)}:host .wm-button.-selector,:host .wm-button.-selector-primary{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;border-radius:3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;font-weight:700;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selector,:host .wm-button.-selector-primary{height:2.5rem}}:host .wm-button.-selector:before,:host .wm-button.-selector-primary: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:"\\f140";position:absolute;right:0.5625rem;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);font-size:1.12rem;font-weight:700;pointer-events:none}:host .wm-button.-selector:active,:host .wm-button.-selector-primary:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selector::-moz-focus-inner,:host .wm-button.-selector-primary::-moz-focus-inner{border:0}:host .wm-button.-selector .overflowcontrol,:host .wm-button.-selector-primary .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button.-selector{background:var(--wmcolor-button-background-selector);color:var(--wmcolor-button-text-selector);border-color:var(--wmcolor-button-border-selector)}:host .wm-button.-selector:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selector-hover);color:var(--wmcolor-button-text-selector-hover);border-color:transparent}:host .wm-button.-selector.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selector-ondark);border-color:var(--wmcolor-button-border-selector-ondark);background:var(--wmcolor-button-background-selector-ondark)}:host .wm-button.-selector.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selector-hover-ondark);background:var(--wmcolor-button-background-selector-hover-ondark);border-color:transparent}:host .wm-button.-selector-primary{background:var(--wmcolor-button-background-selectorprimary);color:var(--wmcolor-button-text-selectorprimary)}:host .wm-button.-selector-primary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selectorprimary-hover)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selectorprimary-ondark);background:var(--wmcolor-button-background-selectorprimary-ondark)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selectorprimary-hover-ondark);background:var(--wmcolor-button-background-selectorprimary-hover-ondark)}:host .wm-button:disabled,:host .wm-button.disabled{cursor:default;pointer-events:none}:host .wm-button:disabled.-secondary:not(.-permanentlydelete),:host .wm-button.disabled.-secondary:not(.-permanentlydelete){-webkit-box-shadow:none;box-shadow:none;border-color:var(--wmcolor-button-border-secondary-disabled);color:var(--wmcolor-button-text-secondary-disabled)}:host .wm-button:disabled.-primary,:host .wm-button.disabled.-primary{background:var(--wmcolor-button-background-primary-disabled);color:var(--wmcolor-button-text-primary-disabled)}:host .wm-button:disabled.-permanentlydelete,:host .wm-button.disabled.-permanentlydelete{background:var(--wmcolor-button-background-delete-disabled);color:var(--wmcolor-button-text-delete-disabled);border-color:var(--wmcolor-button-background-delete-disabled)}:host .wm-button:disabled.-pairnegative,:host .wm-button.disabled.-pairnegative{background:var(--wmcolor-button-background-negative-disabled);border-color:var(--wmcolor-button-background-negative-disabled);color:var(--wmcolor-button-text-negative-disabled)}:host .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-pairpositive{background:var(--wmcolor-button-background-positive-disabled);border-color:var(--wmcolor-button-background-positive-disabled);color:var(--wmcolor-button-text-positive-disabled)}:host .wm-button:disabled.-selector,:host .wm-button.disabled.-selector{color:var(--wmcolor-button-text-selector-disabled);border-color:var(--wmcolor-button-border-selector-disabled)}:host .wm-button:disabled.-selector-primary,:host .wm-button.disabled.-selector-primary{background:var(--wmcolor-button-background-selectorprimary-disabled);color:var(--wmcolor-button-text-selectorprimary-disabled)}:host .wm-button:disabled.-navigational,:host .wm-button.disabled.-navigational{color:var(--wmcolor-button-icon-navigational-disabled)}:host .wm-button:disabled.-icononly,:host .wm-button.disabled.-icononly{color:var(--wmcolor-button-icon-icononly-disabled);border-color:var(--wmcolor-button-border-icononly-disabled)}:host .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly{color:var(--wmcolor-button-text-textonly-disabled);background:transparent}:host .wm-button:disabled.dark.-icononly,:host .wm-button.disabled.dark.-icononly{background:transparent;color:var(--wmcolor-button-icon-icononly-disabled-ondark);border-color:var(--wmcolor-button-border-icononly-disabled-ondark)}:host .wm-button:disabled.dark.-navigational,:host .wm-button.disabled.dark.-navigational{color:var(--wmcolor-button-icon-navigational-disabled-ondark)}:host .wm-button:disabled.dark.-textonly,:host .wm-button.disabled.dark.-textonly{color:var(--wmcolor-button-text-textonly-disabled-ondark)}:host .wm-button:disabled.dark.-primary,:host .wm-button.disabled.dark.-primary{color:var(--wmcolor-button-text-primary-disabled-ondark);background:var(--wmcolor-button-background-primary-disabled-ondark)}:host .wm-button:disabled.dark.-secondary,:host .wm-button.disabled.dark.-secondary{background:transparent;color:var(--wmcolor-button-text-secondary-disabled-ondark);border-color:var(--wmcolor-button-border-secondary-disabled-ondark)}:host .wm-button:disabled.dark.-selector,:host .wm-button.disabled.dark.-selector{color:var(--wmcolor-button-text-selector-disabled-ondark);border-color:var(--wmcolor-button-border-selector-disabled-ondark);background:var(--wmcolor-button-background-selector-disabled-ondark)}:host .wm-button:disabled.dark.-selector-primary,:host .wm-button.disabled.dark.-selector-primary{color:var(--wmcolor-button-text-selectorprimary-disabled-ondark);background:var(--wmcolor-button-background-selectorprimary-disabled-ondark)}:host .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),:host .wm-button.disabled.dark.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete-disabled-ondark);color:var(--wmcolor-button-text-delete-disabled-ondark)}:host a.wm-button,:host label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host{width:100%;position:relative}:host[dir=RTL] .mdi{margin-left:0.3125rem;margin-right:0}:host input:focus+.wm-button.user-is-tabbing{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-uploader-button-focus) !important;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-uploader-button-focus) !important;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-uploader-button-focus) !important}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}.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}.header{position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}.header .notif-wrapper{-ms-flex-align:end;align-items:flex-end}.notif-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.notif-wrapper .notif{font-size:0.875rem;font-style:italic;margin-top:0.25rem}@media (max-width: 60.9375rem){.descr{margin-bottom:0.5rem}.notif-wrapper{margin-bottom:1rem}.header .notif-wrapper{-ms-flex-align:start;align-items:flex-start}}.file-info{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.file-info+.file-controls{-ms-flex:none;flex:none;margin-left:1rem}.empty-block{margin:5rem auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.empty-block .upload-file{margin-bottom:1.875rem}.empty-block .empty-message{font-size:1.5rem;margin-bottom:0.4375rem}.empty-block .notif-wrapper{-ms-flex-pack:center;justify-content:center}.empty-block .notif-wrapper .wm-button{width:auto}ul{list-style:none;padding:0;width:100%}ul li{font-size:0.875rem}ul li .file{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:relative;height:3.75rem;padding:0.5rem 1.25rem;background:var(--wmcolor-file-background);border:1px solid var(--wmcolor-file-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}ul li .file+.file{margin-top:1.25rem}ul li .file .filename{font-weight:500}ul li .file .filedate{margin-left:3.75rem;font-weight:normal;font-style:italic}ul li .file wm-button+wm-button{margin-left:1rem}ul.file-list .file.--saved,ul.inprogress-list .file{margin-bottom:1.625rem}ul .progress{position:absolute;left:0;top:0;right:0;height:8px}ul.error-list li{margin-bottom:1.25rem;color:var(--wmcolor-text-error)}ul.error-list li .file{border:1px solid var(--wmcolor-file-border-error);background-color:var(--wmcolor-file-background-error);height:3.75rem}ul .error-message{padding-top:0.25rem;font-style:italic}';var g=o("wm_network_uploader",function(){function o(o){t(this,o);this.wmNetworkUploaderFilesChanged=e(this,"wmNetworkUploaderFilesChanged",7);this.inputId=u();this.isTabbing=false;this.fileList=[];this.inProgressList=[];this.errorList=[];this.notif=undefined;this.snackbar=[];this.numFilesInProgress=undefined;this.getPath=undefined;this.requestUploadPath=undefined;this.uploadPath=undefined;this.requestDownloadPath=undefined;this.deletePath=undefined;this.associatedData=undefined;this.buttonText=undefined;this.emptyStateText=undefined;this.icon=undefined;this.fileTypes="pdf txt log xml doc docx xls xlsx ppt pptx gif jpg jpeg png csv";this.maxSize=100;this.maxFiles=undefined;this.sortBy="date"}o.prototype.toggleTabbingOn=function(){this.isTabbing=true};o.prototype.toggleTabbingOff=function(){this.isTabbing=false};o.prototype.handleUploadProgress=function(o){var t=this;this.inProgressList.map((function(e){if(e.name===o.detail.file_name){e.progress=o.detail.progress;r(t.el)}}));if(o.detail.progress===100){this.numFilesInProgress-=1}if(!this.srProgress&&this.numFilesInProgress){var e=this.numFilesInProgress;this.srProgress=setInterval((function(){var o=t.inProgressList.reduce((function(o,t){return t.progress?o+t.progress:o}),0);if(t.liveRegion){t.liveRegion.innerHTML=b.formatMessage({id:"uploader.uploadProgress",defaultMessage:"Upload progress: {percentage}%"},{percentage:Math.floor(o/e)})}}),5e3)}};o.prototype.handleFinishedSnack=function(o){this.snackbar=this.snackbar.filter((function(t){return t.id!==o.detail.id}))};o.prototype.setMaxSize=function(){this.maxSize=this.maxSize>100?100:this.maxSize};o.prototype.uploadNotifications=function(o,t){var e=this;if(t>0&&o===0){setTimeout((function(){e.notif=null}),20*1e3);var n=b.formatMessage({id:"uploader.finishedUploading",defaultMessage:"Finished uploading"});this.notif={id:5,message:n};if(this.liveRegion){this.liveRegion.innerHTML=n}this.numFilesInProgress=null;clearInterval(this.srProgress);r(this.el)}else if(o>0&&o!=t){var n=b.formatMessage({id:"uploader.filesUploading",defaultMessage:"{num, plural, one {1 file uploading} other {# files uploading}}"},{num:o});this.notif={id:6,message:n};if(this.liveRegion){this.liveRegion.innerHTML=n}r(this.el)}};o.prototype.emitFileListEvent=function(){this.wmNetworkUploaderFilesChanged.emit(this.fileList)};o.prototype.formatDate=function(o,t,e){var r=Date.parse(o);if(t.match(/^[a-zA-Z]*(-[a-zA-Z0-9]*)*$/g)){try{Intl.getCanonicalLocales(t)}catch(o){t="en-us"}}else{return o}if(!!r){var n=new Date(r);var i=n.getFullYear();var a=("0"+(n.getMonth()+1)).substr(-2);var s=("0"+n.getDate()).substr(-2);var l=n.toLocaleTimeString([t,"en-us"],{timeZone:e,hour:"numeric",minute:"numeric"});return"".concat(i,"/").concat(a,"/").concat(s," ").concat(l)}else{return o}};o.prototype.isValidSize=function(o){return o/1024/1024<=this.maxSize};o.prototype.isDuplicate=function(o){return this.fileList.find((function(t){return t.file_name===o}))};o.prototype.isEmpty=function(){return!this.fileList.length&&!this.inProgressList.length&&!this.errorList.length};Object.defineProperty(o.prototype,"isDisabled",{get:function(){var o=!!this.maxFiles&&this.fileList.length>=this.maxFiles;if(!this.notif){if(o){var t=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"});this.notif={id:1,message:t};if(this.liveRegion){this.liveRegion.innerHTML=t}}else{this.notif=null}}else if(this.notif.id===1){if(!o){this.notif=null}}return o||this.numFilesInProgress>0},enumerable:false,configurable:true});o.prototype.purgeProgressList=function(o){this.inProgressList=this.inProgressList.filter((function(t){return t.progress!==100&&t.name!==o.file_name}))};o.prototype.getExistingFiles=function(){var o=this;s(this.getPath).then((function(t){t.map((function(t){return o.purgeProgressList(t)}));if(o.sortBy==="name"){t.sort((function(o,t){return o.file_name.localeCompare(t.file_name)}))}o.fileList=t})).catch((function(o){console.error(o)}))};o.prototype.clearErrors=function(){this.errorList=[];this.notif=null};o.prototype.handleFiles=function(o){var t=this;var e=Array.from(o.target.files);var n=this.fileTypes.split(" ").join(", ");if(!!this.maxFiles&&this.fileList.length+e.length>this.maxFiles){var i=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"});this.notif={id:2,message:i};if(this.liveRegion){this.liveRegion.innerHTML=i}}else{e&&e.map((function(o){if(!m(o,t.fileTypes)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.invalidFileType",defaultMessage:"The file type is invalid. Accepted types: {validTypes}"},{validTypes:n})};t.errorList.push(e)}else if(!t.isValidSize(o.size)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.fileTooLarge",defaultMessage:"The selected file is too large. Maximum file size is {size}Mb"},{size:t.maxSize})};t.errorList.push(e)}else if(t.isDuplicate(o.name)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.duplicateName",defaultMessage:"A file with this name already exists."})};t.errorList.push(e)}else{t.inProgressList.push(o)}r(t.el)}));if(this.inProgressList.length>0){this.numFilesInProgress=this.inProgressList.length;this.inProgressList.map((function(o,e){t.uploadFile(o,e)}))}}o.target.value=""};o.prototype.uploadFile=function(o,t){var e=this;s(this.requestUploadPath+t.toString()).then((function(t){return __awaiter(e,void 0,void 0,(function(){var e,r,n;var i=this;return __generator(this,(function(a){switch(a.label){case 0:e=JSON.parse(this.associatedData);r=Object.assign(Object.assign({},e),{file_name:o.name,mime_type:o.type,file_path:t.path,document_uuid:t.guid});n=function(t){var e=t.lengthComputable&&t.total!==0?t.loaded/t.total*100:0;var r=new CustomEvent("wmUploadProgress",{detail:{file_name:o.name,progress:e}});i.el.dispatchEvent(r)};return[4,l(t.url,o,n)];case 1:a.sent();return[4,d(this.uploadPath,r)];case 2:a.sent();this.getExistingFiles();return[2]}}))}))})).catch((function(o){e.numFilesInProgress=null;e.inProgressList=[];e.notif={id:3,message:p.genericError};console.error(o)}))};o.prototype.downloadFile=function(o,t){this.clearErrors();var e={file_path:t,file_uuid:o};d(this.requestDownloadPath,e).then((function(o){window.location.assign(o.url)})).catch((function(o){console.error(o)}))};o.prototype.deleteFile=function(o){var t=this;this.clearErrors();this.snackbar.push({message:b.formatMessage({id:"uploader.fileDeleted",defaultMessage:"{fileName} was deleted."},{fileName:o.file_name}),id:o.uuid,link:""});this.fileList=this.fileList.filter((function(t){return t.uuid!==o.uuid}));c("".concat(this.deletePath,"/").concat(o.uuid)).catch((function(e){t.notif={id:4,message:b.formatMessage({id:"uploader.fileNotDeleted",defaultMessage:"{fileName} could not be deleted."},{fileName:o.file_name})};t.getExistingFiles();console.error(e)}))};o.prototype.componentWillLoad=function(){if(!this.getPath){throw new Error("wm-network-uploader: get-path is a required prop")}if(!this.requestUploadPath){throw new Error("wm-network-uploader: request-upload-path is a required prop")}if(!this.uploadPath){throw new Error("wm-network-uploader: upload-path is a required prop")}if(!this.requestDownloadPath){throw new Error("wm-network-uploader: request-download-path is a required prop")}if(!this.deletePath){throw new Error("wm-network-uploader: delete-path is a required prop")}if(!this.buttonText){throw new Error("wm-network-uploader: button-text is a required prop")}if(!this.emptyStateText){throw new Error("wm-network-uploader: empty-state-text is a required prop")}if(!this.associatedData){throw new Error("wm-network-uploader: associated-data is a required prop")}this.setMaxSize();this.clearErrors()};o.prototype.componentDidLoad=function(){this.getExistingFiles();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};o.prototype.uploadButtonOnClick=function(o){var t=this;if(this.isDisabled){o.preventDefault();if(this.liveRegion){var e=!!this.maxFiles&&this.fileList.length>=this.maxFiles;var r="";if(this.numFilesInProgress>0){r=b.formatMessage({id:"uploader.waitToUpload",defaultMessage:"Please wait for current upload to complete before uploading new files.",description:"Message for screen reader users"})}else if(e){r=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"})}if(r){this.liveRegion.innerHTML="";new Promise((function(o){setTimeout((function(){o("")}),500)})).then((function(){return t.liveRegion.innerHTML=r}))}}}else{this.clearErrors()}};o.prototype.renderUploadSvg=function(){return n("svg",{class:"upload-file",width:"91",height:"84",viewBox:"0 0 91 84"},n("path",{transform:"rotate(-180.000000) translate(-452, -255.5)",fill:"#eae8ec",d:"M361,249.681818 L361,197.318182 C361,194.118182 365.555061,191.5 371.122358,191.5 L391.316463,191.5 L391.286495,200.562515 L369.871211,200.600292 L369.885404,200.622146 L369.886423,246.655947 L443.657038,246.840767 L443.657038,200.622146 L421.683537,200.622146 L421.683537,191.5 L441.978865,191.5 C447.546162,191.5 452,194.118182 452,197.318182 L452,249.681818 C452,252.881818 447.546162,255.5 441.978865,255.5 L371.122358,255.5 C365.504449,255.5 361,252.881818 361,249.681818 Z M391.5,207 L406,221 L420.5,207 L409.625,207 L409.625,172 L402.375,172 L402.375,207 L391.5,207 Z"}))};o.prototype.renderIcon=function(){var o=this.icon&&this.icon==="f066";return this.icon&&n("span",{class:"mdi ".concat(o?"rotate":"")},String.fromCodePoint(parseInt("0x".concat(this.icon))))};o.prototype.renderNotif=function(){return this.notif?n("span",{class:"notif"},this.notif.message):""};o.prototype.renderUploadButton=function(o){var t=this;return n("div",{class:"notif-wrapper"},n("input",{name:this.inputId,id:this.inputId,class:"sr-only",type:"file",multiple:true,onClick:function(o){return t.uploadButtonOnClick(o)},onChange:function(o){return t.handleFiles(o)}}),n("label",{htmlFor:this.inputId,class:"wm-button ".concat(o).concat(this.isTabbing?" user-is-tabbing":"")},this.renderIcon(),this.buttonText),this.renderNotif())};o.prototype.renderWithItems=function(){return n("div",null,n("div",{class:"header"},n("div",{class:"descr"},n("slot",null)),this.renderUploadButton(this.isDisabled?"disabled":"")),this.renderErrorList(),this.renderInProgressList(),this.renderFileList())};o.prototype.renderEmptyState=function(){return n("div",null,n("div",{class:"header"},n("div",{class:"descr"},n("slot",null))),n("div",{class:"empty-block"},this.renderUploadSvg(),n("div",{class:"empty-message"},this.emptyStateText),this.renderUploadButton("-primary empty-button")))};o.prototype.renderErrorList=function(){if(!!this.errorList.length){if(this.liveRegion){var o=this.errorList.reduce((function(o,t){return o+"".concat(t.file_name,": ").concat(t.message," ")}),"");this.liveRegion.innerHTML=o}return n("ul",{class:"error-list"},this.errorList.map((function(o){return n("li",null,n("div",{class:"file --error"},n("div",{class:"file-info"},n("span",{class:"filename"},o.file_name))),n("div",{class:"error-message"},o.message))})))}};o.prototype.renderInProgressList=function(){return n("ul",{class:"inprogress-list"},this.inProgressList.map((function(o){return n("li",null,n("div",{class:"file --progress"},n("div",{class:"progress",style:{background:"linear-gradient(to right, rgba(67, 126, 142, 1) ".concat(o.progress,"%, transparent ").concat(o.progress,"%)")}}),n("div",{class:"file-info"},n("span",{class:"filename"},o.name," ",n("span",{class:"sr-only"},"uploading")))))})))};o.prototype.renderFile=function(o){var t=this;return n("li",null,n("div",{class:"file --saved"},n("div",{class:"file-info"},n("span",{class:"filename"},o.file_name),n("span",{class:"filedate"},this.formatDate(o.updated_at,b.locale,Intl.DateTimeFormat().resolvedOptions().timeZone))),n("div",{class:"file-controls"},n("wm-button",{class:"download-button","button-type":"icononly",tooltip:"download","label-for-identical-buttons":"download ".concat(o.file_name),icon:"f1da",onClick:function(){return t.downloadFile(o.uuid,o.file_path)}}),n("wm-button",{class:"delete-button","button-type":"icononly",tooltip:"remove","label-for-identical-buttons":"remove ".concat(o.file_name),icon:"f1c0",onClick:function(){return t.deleteFile(o)}}))))};o.prototype.renderFileList=function(){var o=this;return n("ul",{class:"file-list"},this.fileList.map((function(t){return o.renderFile(t)})))};o.prototype.render=function(){var o=this;return n(i,null,this.isEmpty()?this.renderEmptyState():this.renderWithItems(),n("wm-snackbar",{notifications:JSON.stringify(this.snackbar)}),n("div",{ref:function(t){return o.liveRegion=t},class:"live-region sr-only","aria-live":"assertive","aria-atomic":"true"}))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{maxSize:["setMaxSize"],numFilesInProgress:["uploadNotifications"],fileList:["emitFileListEvent"]}},enumerable:false,configurable:true});return o}());g.style=h}}}));
@@ -1 +1 @@
1
- import{r as t,c as e,f as o,h as i,H as r,g as s}from"./p-b5bedd63.js";import{g as a,d as n,u as h,i as l,v as d,w as c,l as p,h as g,s as w,o as m}from"./p-ff888d78.js";import{g as u}from"./p-cd7cc5c6.js";const b=class{constructor(i){t(this,i),this.wmTagInputChanged=e(this,"wmTagInputChanged",7),this.uid=this.el.id?this.el.id:a(),this.openUp=!1,this.inModal=!1,this.debouncedUpdate=n((()=>o(this.el)),30),this.label=void 0,this.labelPosition="top",this.options="",this.selectedTags="",this.info=void 0,this.errorMessage=void 0,this.addNew=!0,this.placeholder=void 0,this.requiredField=!1,this.characterLimit=50,this.maxTags=void 0,this.tagInputType="dropdown",this.colHeaders=void 0,this.colWidths=void 0,this.colWrap=void 0,this.messageConfig="",this.focusedListItem=void 0,this.focusedTag=null,this.tablePosition={row:0,column:1},this.isExpanded=!1,this.tagsList=h(this.selectedTags),this.optionsList=h(this.options),this.charCount=0,this.liveRegionMessage=""}get tooltipVisible(){return document.getElementById("wm-tooltip").classList.contains("show")}get focusedElement(){return this.el.shadowRoot.activeElement}get listItemEls(){return Array.from(this.dropdownEl.querySelectorAll("li"))}get tagEls(){return this.tagAreaEl?Array.from(this.tagAreaEl.querySelectorAll(".tag")):[]}get nonLockedTagEls(){return this.tagEls.filter((t=>!t.classList.contains("locked")))}get optionEls(){return Array.from(this.dropdownEl.querySelectorAll(".option"))}get wmRowEls(){return Array.from(this.el.querySelectorAll("wm-tag-input-row"))}get localRowEls(){return Array.from(this.el.shadowRoot.querySelectorAll("tr"))}get filteredRows(){return this.wmRowEls.filter((t=>{const e=this.inputEl?this.inputEl.value.toLowerCase():"";return[t.col1,t.col2,t.col3,t.col4].join("").toLowerCase().includes(e)}))}get nonLockedTagsList(){let t=[];return"table"===this.tagInputType?this.tagsList.forEach((e=>{this.wmRowEls.filter((t=>e===t.id))[0].locked||t.push(e)})):"dropdown"===this.tagInputType&&(t=this.tagsList),t}get tagLimitReached(){return!!(this.maxTags&&this.tagsList.length>=this.maxTags)}get noResultsMessage(){return l.formatMessage({id:"tagInput.noResults",defaultMessage:"No results match your search.",description:"Message displayed when a user's search returns empty."})}get componentMessages(){const t={addNewHelpText:l.formatMessage({id:"tagInput.addNewHelpText",defaultMessage:"Press the Enter or Comma key to add a new tag.",description:"Help text appearing in a dropdown. Use imperative"}),selectionHelpText:l.formatMessage({id:"tagInput.selectionHelpText",defaultMessage:"Search and select a tag.",description:"Help text appearing in a dropdown. Use imperative"}),maxTagsReached:l.formatMessage({id:"tagInput.maxTagsReached",defaultMessage:"No more tags can be added because the limit has been reached."}),tagAreaInstructions:l.formatMessage({id:"tagInput.tagAreaInstructions",defaultMessage:"tag selection. Press Backspace or Delete to remove a tag."}),tagsAdded:l.formatMessage({id:"tagInput.tagsAdded",defaultMessage:"Tags added",description:"For the user to understand how close they are to the tag limit, followed by x/y count"})},e=d(this.messageConfig);return e?Object.assign(Object.assign({},t),e):t}get inputMinimumWidth(){const t=getComputedStyle(this.inputEl),e=getComputedStyle(this.tagEls[this.tagEls.length-1]),o=[t.paddingLeft,t.paddingRight,t.marginLeft,t.marginRight,e.marginRight].reduce(((t,e)=>t+parseInt(e.replace("px",""))),0);return Math.max(150,c(this.inputEl,this.placeholder).width+o)}generateTagAddedMessage(t){return l.formatMessage({id:"tagInput.tagAdded",defaultMessage:"{tagName} added.",description:"A confirmation for adding a tag."},{tagName:t})}generateTagAlreadyAddedMessage(t){return l.formatMessage({id:"tagInput.tagAlreadyAdded",defaultMessage:"{tagName} has already been added.",description:"An alert for adding a tag that is already present."},{tagName:t})}componentWillLoad(){this.placeholder||(this.placeholder=this.createPlaceholderDefault(this.addNew,!!this.options)),this.label||console.error("wm-tag-input must have a label property"),this.consolidateSelectedTags(),this.el.focus=()=>{const t=this.nonLockedTagEls[0];t?(this.tagAreaEl.focus(),this.focusTag(t)):this.inputEl.focus()},new ResizeObserver((()=>this.debouncedUpdate())).observe(this.el),this.el.closest("wm-modal")&&(this.inModal=!0)}componentDidLoad(){this.tagEls.forEach((t=>t.classList.remove("highlight")))}componentDidRender(){this.positionInput(),this.tagEls.forEach((t=>{const e=t.querySelector(".tag-text"),o=this.el.shadowRoot.querySelector(".tags-and-input-wrapper"),i=e.getBoundingClientRect().left,r=o.getBoundingClientRect().right-10-8-28;let s=t.dataset.tag;if("table"===this.tagInputType){const t=this.el.querySelector(`#${s}`);s=t?t.col1:""}e.textContent=p(e,s,r-i,5)}))}consolidateSelectedTags(){this.tagsList.forEach((t=>{this.includesCaseInsensitive(this.optionsList,t)||(this.options+=`${this.options.length>0?",":""}${t}`)})),this.optionsList=h(this.options)}createPlaceholderDefault(t,e){const o=l.formatMessage({id:"tagInput.placeholderAddAndSearch",defaultMessage:"Add or search for a tag",description:"Placeholder text. Use imperative"}),i=l.formatMessage({id:"tagInput.placeholderSearch",defaultMessage:"Search and select a tag",description:"Placeholder text. Use imperative"}),r=l.formatMessage({id:"tagInput.placeholderAdd",defaultMessage:"Add a new tag",description:"Placeholder text. Use imperative"});let s="";return t&&e?s=o:!t&&e?s=i:t&&(s=r),s}reflectSelectedTags(t,e){let o="",i=this.tagsList;o=t.length>e.length?t.filter((t=>!e.includes(t)))[0]:e.filter((e=>!t.includes(e)))[0],"table"===this.tagInputType&&(o=this.wmRowEls.filter((t=>t.id===o))[0],i=this.tagsList.map((t=>this.el.querySelector(`#${t}`)))),this.selectedTags=this.listToCSV(this.tagsList),this.wmTagInputChanged.emit({value:i,tagChanged:o})}handleErrorMessageChange(){this.errorMessage&&this.announce(this.errorMessage)}handleRowUpdate(){o(this.el)}closeIfNotElOrChild(t){const e=t.target!==this.el&&!this.el.shadowRoot.contains(t.target);"dropdown"===this.tagInputType&&e&&this.isExpanded&&this.closeDropdown()}dismissTooltip(){this.tooltipVisible&&g()}handleInputKeyDown(t){switch(/^.$/.test(t.key)&&this.inputEl.value.length>=this.characterLimit&&this.announce(this.generateCharacterLimitWarning(this.inputEl.value.length,this.characterLimit)),t.stopPropagation(),t.key){case"Enter":t.preventDefault(),this.handleInputEnter();break;case"ArrowDown":t.preventDefault(),this.handleInputArrowDown();break;case"ArrowUp":t.preventDefault(),this.handleInputArrowUp();break;case"ArrowLeft":"table"===this.tagInputType&&this.tablePosition.row&&(t.preventDefault(),this.moveLeftCell());break;case"ArrowRight":"table"===this.tagInputType&&this.tablePosition.row&&(t.preventDefault(),this.moveRightCell());break;case"Escape":"dropdown"===this.tagInputType&&this.isExpanded&&this.closeDropdown();break;case"ArrowLeft":case"Backspace":this.handleInputBackspace()}}handleInputFocus(){"dropdown"===this.tagInputType&&(this.openDropdown(),this.clearListItemFocus()),o(this.el)}handleInputChanged(t){this.charCount=t.length,"dropdown"===this.tagInputType?(this.clearListItemFocus(),this.charCount>=this.characterLimit-5&&this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit)),this.isExpanded||this.openDropdown()):"table"===this.tagInputType&&this.clearCellFocus(),t.includes(",")&&this.addNew?(t.split(",").forEach((t=>this.submitInput(this.addNew,t.trim()))),this.announce(this.generateTagAddedMessage(t.split(",").join(", ")))):this.announceExistingOptions()}handleInputEnter(){"dropdown"===this.tagInputType?this.focusedListItem?this.handleListItemClick(this.focusedListItem):this.submitInput(this.addNew,this.inputEl.value.trim()):"table"===this.tagInputType&&this.tablePosition.row>0&&this.handleTableRowClick(this.localRowEls[this.tablePosition.row].id)}submitInput(t,e){const o=e.match(/\S/);t&&o&&(this.addTag(e),this.optionsList=this.addOption(e),this.resetInput())}handleInputArrowDown(){"table"===this.tagInputType?this.moveDownRow():"dropdown"===this.tagInputType&&this.isExpanded?this.moveDownListItem():"dropdown"===this.tagInputType&&this.openDropdown()}handleInputArrowUp(){"table"===this.tagInputType?this.moveUpRow():"dropdown"===this.tagInputType&&this.isExpanded?this.moveUpListItem():"dropdown"===this.tagInputType&&this.openDropdown()}handleInputBackspace(){""===this.inputEl.value&&this.tagsList.length>0&&window.requestAnimationFrame((()=>{this.nonLockedTagsList.length>0&&(this.tagAreaEl.focus(),this.focusTag(this.tagEls[this.tagEls.length-1]))}))}handleListItemKeyDown(t){const e=t.target;switch(t.key){case"Enter":case" ":t.preventDefault(),e.click();break;case"ArrowDown":t.preventDefault(),this.moveDownListItem();break;case"ArrowUp":t.preventDefault(),this.moveUpListItem();break;case"Escape":this.focusedElement!==this.inputEl?this.inputEl.focus():"dropdown"===this.tagInputType&&this.closeDropdown()}}handleListItemClick(t){const e=t.dataset.option.trim()||"";this.includesCaseInsensitive(this.tagsList,e)?this.announce(this.generateTagAlreadyAddedMessage(e)):(this.resetInput(),this.addTag(e),this.optionsList=this.addOption(e),this.focusedListItem=null)}handleTableRowClick(t){this.el.querySelector(`#${t}`).locked||(this.includesCaseInsensitive(this.tagsList,t)?this.removeTag(t):this.tagLimitReached||(this.addTag(t),this.resetInput()))}handleTagAreaKeyDown(t){switch(t.key){case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.moveLeftTag();break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.moveRightTag();break;case"Backspace":case"Delete":this.handleTagAreaDelete()}}handleTagAreaDelete(){const t=this.focusedTag&&this.focusedTag.classList.contains("locked");this.focusedTag&&!t&&(this.removeTag(this.focusedTag.dataset.tag),0===this.nonLockedTagsList.length?this.inputEl.focus():(this.focusedTag=this.focusedTag===this.tagEls[this.tagEls.length-1]?this.tagEls[this.tagEls.length-2]:this.focusedTag,this.focusTag(this.focusedTag)))}handleBlur(t,e){const o=t.relatedTarget!==e&&!this.el.shadowRoot.contains(t.relatedTarget);this.dismissTooltip(),this.clearCellFocus(),o&&(this.fieldWrapperEl.classList.remove("focused"),"dropdown"===this.tagInputType&&this.closeDropdown())}handleCellMouseEnter(t){const e=t.target,o=e.querySelector(".cell-content-wrapper");o.scrollWidth>o.clientWidth&&w("bottom",e,e.innerText)}handleTagAreaFocus(){"dropdown"===this.tagInputType&&this.closeDropdown();const t=this.nonLockedTagEls[0];t&&this.focusTag(t)}handleRemoveButtonClick(t){this.moveLeftTag(),this.removeTag(t)}moveDownListItem(){if(this.listItemEls.length>0){this.focusListItem(this.focusedListItem&&this.focusedListItem.nextElementSibling?this.focusedListItem.nextElementSibling:this.listItemEls[0])}}moveUpListItem(){if(this.listItemEls.length>0){const t=this.listItemEls[this.listItemEls.length-1];this.focusedListItem?this.focusedListItem.previousElementSibling?this.focusListItem(this.focusedListItem.previousElementSibling):this.clearListItemFocus():this.focusListItem(t)}}moveDownRow(){this.filteredRows.length>0&&(0===this.tablePosition.row||this.tablePosition.row===this.filteredRows.length?this.tablePosition.row=1:this.tablePosition.row++,this.filteredRows[this.tablePosition.row-1].locked?this.moveDownRow():this.focusCell(this.tablePosition))}moveUpRow(){if(this.filteredRows.length>0){0===this.tablePosition.row?this.tablePosition.row=this.filteredRows.length:1===this.tablePosition.row?this.tablePosition.row=0:this.tablePosition.row--;const t=this.filteredRows[this.tablePosition.row-1];t&&t.locked?this.moveUpRow():t?this.focusCell(this.tablePosition):this.clearCellFocus()}}moveLeftCell(){1!=this.tablePosition.column&&(this.tablePosition.column--,this.focusCell(this.tablePosition))}moveRightCell(){const t=h(this.colHeaders).length;this.tablePosition.column<t&&(this.tablePosition.column++,this.focusCell(this.tablePosition))}moveLeftTag(){const t=this.tagEls[this.tagEls.length-1];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.previousElementSibling)?this.focusedTag.previousElementSibling:t,this.focusedTag.classList.contains("locked")&&this.nonLockedTagEls.length>0?this.moveLeftTag():this.focusTag(this.focusedTag)}moveRightTag(){const t=this.tagEls[0];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.nextElementSibling)?this.focusedTag.nextElementSibling:t,this.focusedTag.classList.contains("locked")?this.moveRightTag():this.focusTag(this.focusedTag)}addOption(t){let e=this.optionsList;return this.includesCaseInsensitive(this.optionsList,t)||(e=e.concat(t)),e}removeOption(t){this.optionsList=this.filterCaseInsensitive(this.optionsList,t)}addTag(t){let e=this.tagsList;const o=this.includesCaseInsensitive(this.tagsList,t),i=this.optionsList.filter((e=>e.toLowerCase()===t.toLowerCase()))[0];if(!o){let o=t;"table"===this.tagInputType&&(o=this.el.querySelector(`#${t}`).col1),this.announce(this.generateTagAddedMessage(o)),this.tagsList=e.concat(i||t),this.tagLimitReached?this.tagAreaEl.focus():window.requestAnimationFrame((()=>this.tagsAndInputWrapperEl.scrollTop=this.tagsAndInputWrapperEl.scrollHeight))}}removeTag(t){let e=t;"table"===this.tagInputType&&(e=this.el.querySelector(`#${t}`).col1);const o=l.formatMessage({id:"tagInput.tagRemoved",defaultMessage:"{tag} removed"},{tag:e});if(this.announce(o),this.tagsList=this.filterCaseInsensitive(this.tagsList,t),"dropdown"===this.tagInputType){const e=h(this.options);this.includesCaseInsensitive(this.optionsList,t)&&!this.includesCaseInsensitive(e,t)&&this.removeOption(t)}}focusListItem(t){this.focusedListItem=t,this.inputEl.setAttribute("aria-activedescendant",this.focusedListItem.id),t.scrollIntoView({block:"nearest"})}focusTag(t){t.classList.contains("locked")?(this.focusedTag=null,this.tagAreaEl.setAttribute("aria-activedescendant","")):(this.focusedTag=t,this.tagAreaEl.setAttribute("aria-activedescendant",this.focusedTag.id),this.focusedTag.scrollIntoView({block:"nearest"})),window.requestAnimationFrame((()=>{g();const e=t.querySelector(".tag-text"),o=t.dataset.tag;o!==e.textContent&&e.textContent.includes("...")&&w("bottom",t,o)}))}focusCell(t){if(this.clearCellFocus(!1),t.row){const e=this.localRowEls[t.row],o=e.querySelectorAll("td")[t.column-1],i=o.querySelector(".cell-content-wrapper"),r=i.scrollWidth>i.clientWidth;e.classList.add("focused"),o.classList.add("focused"),o.scrollIntoView({block:"nearest"}),this.inputEl.setAttribute("aria-activedescendant",o.id),this.dismissTooltip(),r&&w("bottom",o,o.innerText)}}clearTagFocus(){this.tagAreaEl.setAttribute("aria-activedescendant",""),this.focusedTag=null}clearCellFocus(t=!0){this.inputEl.setAttribute("aria-activedescendant",""),t&&(this.tablePosition={row:0,column:1}),this.localRowEls.forEach((t=>{t.classList.remove("focused"),t.querySelectorAll("td").forEach((t=>{t.classList.remove("focused")}))}))}openDropdown(){this.openUp=m(this.el,this.dropdownEl.clientHeight,this.el.clientHeight,-2),this.isExpanded=!0}closeDropdown(){this.clearListItemFocus(),this.isExpanded=!1}clearListItemFocus(){this.focusedListItem=null,this.inputEl.setAttribute("aria-activedescendant",""),this.listItemEls.forEach((t=>{t.classList.remove("focused")}))}resetInput(){this.charCount=0,this.inputEl.value=""}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.liveRegionMessage=t}announceExistingOptions(){window.requestAnimationFrame((()=>{let t=0;"dropdown"===this.tagInputType?t=this.optionEls.length:"table"===this.tagInputType&&(t=this.filteredRows.length);const e=l.formatMessage({id:"tagInput.existingOptions",defaultMessage:"{num, plural, one {1 existing option.} other {# existing options.}}"},{num:t});this.announce(e)}))}generateCharacterLimitWarning(t,e){let o=u.getCharactersEntered(t,e);return t>=e&&(o+=` ${u.characterLimitReached}`),o}positionInput(){const t=this.tagEls[this.tagEls.length-1];if(this.inputEl.style.position="static",this.inputEl.style.width="100%",this.inputEl.classList.add("extended"),t){const e=this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right;e>=this.inputMinimumWidth&&(this.inputEl.style.position="absolute",this.inputEl.style.top=t.offsetTop.toString()+"px",this.inputEl.style.width=(e-8).toString()+"px",this.inputEl.classList.remove("extended"))}}handleTagMouseEnter(t){const e=t.target.querySelector(".tag-text").textContent,o=t.target.dataset.tag;e!==o&&e.includes("...")&&w("bottom",t.target,o)}listToCSV(t){return t.join(",")}includesCaseInsensitive(t,e){return t.map((t=>t.toLowerCase())).includes(e.toLowerCase())}filterCaseInsensitive(t,e){return t.filter((t=>t.toLowerCase()!==e.toLowerCase()))}sortCaseInsensitive(t){return t.sort(((t,e)=>(t=t.toLowerCase())>(e=e.toLowerCase())?1:t<e?-1:0))}renderTags(){let t=[],e=[];return this.tagsList.forEach(((o,r)=>{const s=`tag${r+1}`;let a="",n=!1;if("dropdown"===this.tagInputType)a=o;else if("table"===this.tagInputType){const t=this.el.querySelector(`#${o}`);a=t?t.col1:"",n=!!t&&t.locked}(n?t:e).push(i("li",{id:s,class:`tag highlight ${this.focusedTag&&this.focusedTag.id===s?"focused":""} ${n?"locked":""}`,"data-tag":o,role:"option",onMouseEnter:t=>this.handleTagMouseEnter(t),onMouseLeave:g},i("span",{class:"sr-only"},o),i("span",{class:"tag-text","aria-hidden":"true"},a),n?i("div",{class:"icon lock"}):i("button",{class:"icon remove-btn",tabIndex:-1,onClick:()=>this.handleRemoveButtonClick(o)})))})),[...t,...e]}renderDropdown(){return i("div",{class:`dropdown-wrapper ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,ref:t=>this.dropdownEl=t},i("div",{id:"help-text",class:"help-text"},this.renderHelpText()),i("ul",{class:"dropdown",id:"dropdown",role:"listbox","aria-multiselectable":"true","aria-expanded":!!this.isExpanded&&"true","aria-label":this.label,tabindex:-1},this.inputEl&&this.renderAddNewButton(),this.renderListItems(this.optionsList)))}renderListItems(t){return t=this.sortCaseInsensitive(t),this.inputEl&&this.inputEl.value&&(t=this.optionsList.filter((t=>t.toLowerCase().includes(this.inputEl.value.toLowerCase())))),t.map(((t,e)=>{const o=`option${e+1}`,r=this.focusedListItem&&this.focusedListItem.id===o,s=this.includesCaseInsensitive(this.tagsList,t);return i("li",{class:"option "+(r?"focused":""),role:"option",id:o,"data-option":t,"aria-selected":s?"true":"false","aria-disabled":s?"true":"false",onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t.target)},t)}))}renderAddNewButton(){const t=this.inputEl.value.match(/\S/),e=this.includesCaseInsensitive(this.optionsList,this.inputEl.value.trim());if(this.addNew&&t&&!e){const t="add-new-btn",e=this.focusedListItem&&this.focusedListItem.id===t;return i("li",{role:"option",class:"add-new-btn "+(e?"focused":""),id:t,"data-option":this.inputEl.value,onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t.target),tabIndex:e?0:-1},`Add "${this.inputEl.value.trim()}"`)}return""}renderHelpText(){let t="";return this.optionsList.length>0&&(t+=this.componentMessages.selectionHelpText),this.addNew&&(t+=" "+this.componentMessages.addNewHelpText),t}renderTagCounter(){if(this.maxTags)return i("div",{class:"lower-row"},i("div",{id:"max-tags"},`${this.componentMessages.tagsAdded}: ${this.tagsList.length}/${this.maxTags}`,this.tagLimitReached&&` - ${this.componentMessages.maxTagsReached}`))}renderTable(){return i("div",{class:"table-wrapper",onScroll:()=>this.dismissTooltip()},i("table",{id:"table",role:"grid",class:this.colWidths?"fixed-widths":"","aria-label":this.label,"aria-multiselectable":"true"},this.renderTableHeaders(),this.filteredRows.length?this.renderTableRows():i("div",{class:"no-results"},this.noResultsMessage)))}renderTableHeaders(){return i("tr",{class:"headers",role:"row"},h(this.colHeaders).map(((t,e)=>{let o="wrap";return this.colWrap&&h(this.colWrap)[e]&&(o=h(this.colWrap)[e]),i("th",{class:`header-cell ${o}`,role:"columnheader",width:this.colWidths?h(this.colWidths)[e]:""},t)})))}renderTableRows(){return this.filteredRows.map((t=>{const e=this.includesCaseInsensitive(this.tagsList,t.id);return i("tr",{id:t.id,class:`${t.locked?"locked":""} ${e?"selected":""}`,role:"row",onClick:()=>this.handleTableRowClick(t.id)},this.renderTableCells(t))}))}renderTableCells(t){const e=[t.col1,t.col2,t.col3,t.col4].filter((t=>!!t)),o=this.includesCaseInsensitive(this.tagsList,t.id);return e.map(((e,r)=>{const s=`${t.id}-col${r+1}`;let a="wrap";return this.colWrap&&h(this.colWrap)[r]&&(a=h(this.colWrap)[r]),i("td",{id:s,role:"gridcell","aria-describedby":`${s}-description`,"aria-selected":o.toString(),onMouseEnter:t=>this.handleCellMouseEnter(t),onMouseLeave:()=>this.dismissTooltip()},i("div",{class:`cell-content-wrapper ${a}`},e),i("div",{class:"description",id:`${s}-description`},t.locked?"locked":""))}))}render(){return i(r,{id:this.uid},i("div",{class:`wrapper label-${this.labelPosition} ${this.errorMessage?"invalid":""}`},i("div",{class:"label-wrapper"},i("label",{class:"label",htmlFor:`input${this.uid}`},this.label,this.requiredField&&i("span",{class:"required","aria-hidden":"true"},"*"))),i("div",{class:`field-wrapper ${this.focusedElement?"focused":""} ${this.errorMessage?"invalid":""}`,ref:t=>this.fieldWrapperEl=t},i("div",{class:"upper-row"},i("div",{class:"tags-and-input-wrapper "+(this.inModal?"in-modal":""),ref:t=>this.tagsAndInputWrapperEl=t},this.tagsList.length>0&&i("ul",{ref:t=>this.tagAreaEl=t,class:"tag-area",role:"listbox","aria-activedescendant":"","aria-orientation":"horizontal","aria-label":`${this.label} ${this.tagsList.length>0?this.componentMessages.tagAreaInstructions:""}`,tabindex:this.nonLockedTagsList.length>0?0:-1,"aria-describedby":"info max-tags",onFocus:()=>this.handleTagAreaFocus(),onBlur:t=>{this.clearTagFocus(),this.handleBlur(t,this.el)},onKeyDown:t=>this.handleTagAreaKeyDown(t)},this.renderTags()),i("input",{id:`input${this.uid}`,class:"input "+(this.tagLimitReached?"hidden":""),role:"combobox",ref:t=>this.inputEl=t,autocomplete:"off","aria-required":this.requiredField?"true":null,"aria-controls":this.tagInputType,"aria-describedby":"help-text"+(this.errorMessage?" error ":""),"aria-label":`${this.label} ${"dropdown"===this.tagInputType?u.getCharacterLimit(this.characterLimit):""}`,"aria-expanded":"dropdown"===this.tagInputType?this.isExpanded.toString():null,placeholder:this.placeholder,maxLength:"dropdown"===this.tagInputType?this.characterLimit:void 0,onInput:()=>this.handleInputChanged(this.inputEl.value),onBlur:t=>{this.handleBlur(t,this.el)},onFocus:()=>this.handleInputFocus(),onKeyDown:t=>this.handleInputKeyDown(t)})),"dropdown"===this.tagInputType&&i("div",{class:"character-count"},this.charCount,"/",this.characterLimit)),this.renderTagCounter(),"dropdown"===this.tagInputType&&this.renderDropdown()),this.info&&i("div",{id:"info",class:"info-text"},this.info),this.errorMessage&&i("div",{id:"error"},this.errorMessage),i("div",{class:"sr-only","aria-live":"assertive",ref:t=>this.liveRegionEl=t,"aria-atomic":"true"},this.liveRegionMessage),"table"===this.tagInputType&&this.renderTable()))}static get delegatesFocus(){return!0}get el(){return s(this)}static get watchers(){return{tagsList:["reflectSelectedTags"],errorMessage:["handleErrorMessageChange"]}}};b.style=':host{--wmcolor-taginput-altrow-background-table:var(--wmcolor-table-altrow-background);--wmcolor-taginput-border:var(--wmcolor-input-border);--wmcolor-taginput-charcount-background:var(--wmcolor-input-charcount-background);--wmcolor-taginput-header-background-table:var(--wmcolor-table-header-background);--wmcolor-taginput-help-text:var(--wmcolor-text);--wmcolor-taginput-icon:var(--wmcolor-icon-accent);--wmcolor-taginput-maxtags-background:var(--wmcolor-background-readonly);--wmcolor-taginput-maxtags-border:var(--wmcolor-input-border);--wmcolor-taginput-maxtags-text:var(--wmcolor-text);--wmcolor-taginput-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-taginput-option-background:var(--wmcolor-option-background);--wmcolor-taginput-option-border:var(--wmcolor-option-border);--wmcolor-taginput-option-text-selected:var(--wmcolor-option-text-disabled);--wmcolor-taginput-option-text:var(--wmcolor-interactive);--wmcolor-taginput-row-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-taginput-row-background-selected:var(--wmcolor-table-row-background-selected);--wmcolor-taginput-row-background-table:var(--wmcolor-table-row-background);--wmcolor-taginput-row-border-selected:var(--wmcolor-table-row-border-selected);--wmcolor-taginput-tag-background-focus:var(--wmcolor-palelilacgray-dark);--wmcolor-taginput-tag-background-highlight:var(--wmcolor-background-highlight);--wmcolor-taginput-tag-background-locked:var(--wmcolor-interactive-disabled);--wmcolor-taginput-tag-background:var(--wmcolor-palelilacgray);--wmcolor-taginput-tag-text-locked:var(--wmcolor-text-ondark);--wmcolor-taginput-tag-text:var(--wmcolor-text);--wmcolor-taginput-tagbutton-background-hover:var(--wmcolor-button-background-icononly-hover);--wmcolor-taginput-tagbutton-border:var(--wmcolor-button-border-icononly);--wmcolor-taginput-tagbutton-icon-hover:var(--wmcolor-button-icon-icononly-hover);--wmcolor-taginput-tagbutton-icon:var(--wmcolor-button-icon-icononly);font-family:inherit;width:100%;display:block;max-height:80vh}:host *{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}: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{width:100%;height:100%;max-height:inherit;min-height:inherit;position:relative}:host .field-wrapper{position:relative;width:100%;border:1px solid;border-color:var(--wmcolor-taginput-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px}:host .field-wrapper.focused{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);outline:none;border-color:var(--wmcolor-input-border-focus)}:host .field-wrapper.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:not(.label-left) .field-wrapper{-ms-flex-negative:0;flex-shrink:0}:host .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:var(--wmcolor-taginput-charcount-background);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .tags-and-input-wrapper{position:relative;width:100%;padding:8px 8px 8px 0;overflow:auto;max-height:200px}:host .tags-and-input-wrapper.in-modal{max-height:20vh}:host .upper-row{width:100%;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:justify;justify-content:space-between}:host .upper-row:before{-ms-flex-item-align:start;align-self:flex-start;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:"\\f349";color:var(--wmcolor-taginput-icon);padding:0.75rem 0.5rem 0.75rem 0.75rem;line-height:normal;font-size:1.12rem}:host .lower-row{width:100%;min-height:1.875rem}:host #max-tags{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:1.875rem;background-color:var(--wmcolor-taginput-maxtags-background);padding:0.5rem 1rem;color:var(--wmcolor-taginput-maxtags-text);font-size:0.875rem;border-top:1px solid var(--wmcolor-taginput-maxtags-border);border-radius:0 0 3px 3px}:host .tag-area{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:0;margin:0;gap:8px}:host .tag-area:focus{outline:none}:host .tag-area [role=option]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:1.75rem;list-style:none;color:var(--wmcolor-taginput-tag-text);background-color:var(--wmcolor-taginput-tag-background);padding:0.5rem 0.625rem;-webkit-transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);white-space:pre}:host .tag-area [role=option].highlight{-webkit-animation:fadeIn 1s;animation:fadeIn 1s}@-webkit-keyframes fadeIn{0%{background-color:var(--wmcolor-taginput-tag-background)}50%{background-color:var(--wmcolor-taginput-tag-background-highlight)}100%{background-color:var(--wmcolor-taginput-tag-background)}}@keyframes fadeIn{0%{background-color:var(--wmcolor-taginput-tag-background)}50%{background-color:var(--wmcolor-taginput-tag-background-highlight)}100%{background-color:var(--wmcolor-taginput-tag-background)}}:host .tag-area [role=option].focused{background-color:var(--wmcolor-taginput-tag-background-focus)}:host .tag-area [role=option].locked{background-color:var(--wmcolor-taginput-tag-background-locked);color:var(--wmcolor-taginput-tag-text-locked)}:host .tag-area [role=option] .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:1.25rem;width:1.25rem;padding:0;margin-left:0.5rem}:host .tag-area [role=option] .icon.remove-btn{border:1px solid var(--wmcolor-taginput-tagbutton-border);color:var(--wmcolor-taginput-tagbutton-icon);border-radius:50%;cursor:pointer;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1)}:host .tag-area [role=option] .icon.remove-btn:hover{color:var(--wmcolor-taginput-tagbutton-icon-hover);background-color:var(--wmcolor-taginput-tagbutton-background-hover)}:host .tag-area [role=option] .icon.remove-btn: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:"\\f156"}:host .tag-area [role=option] .icon.lock{color:var(--wmcolor-taginput-tag-text-locked)}:host .tag-area [role=option] .icon.lock: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:"\\f341"}:host .input{font-family:inherit;border:none;height:1.75rem;padding:0;margin:0;right:8px}:host .input.hidden{display:none}:host .input:focus{outline:none}:host .tag-area+.input.extended{-webkit-margin-before:8px;margin-block-start:8px}:host .dropdown-wrapper{margin:0;padding:0;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:calc(100% + 2px);right:0;z-index:100;width:100%;font-size:0.875rem}:host .dropdown-wrapper .dropdown{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;margin:0;padding:0}:host .dropdown-wrapper.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .dropdown-wrapper.upwards{top:unset;bottom:calc(100% + 2px);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .dropdown-wrapper li,:host .dropdown-wrapper div{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 1rem;background:var(--wmcolor-taginput-option-background);list-style:none;min-height:2.6875rem;white-space:pre-wrap;overflow-wrap:anywhere}:host .dropdown-wrapper li[role=option],:host .dropdown-wrapper li.add-new-btn,:host .dropdown-wrapper div[role=option],:host .dropdown-wrapper div.add-new-btn{cursor:pointer;color:var(--wmcolor-taginput-option-text);font-weight:bold;width:100%;border:none}:host .dropdown-wrapper li[role=option][aria-selected=true],:host .dropdown-wrapper li.add-new-btn[aria-selected=true],:host .dropdown-wrapper div[role=option][aria-selected=true],:host .dropdown-wrapper div.add-new-btn[aria-selected=true]{color:var(--wmcolor-taginput-option-text-selected);font-style:italic;font-weight:normal;cursor:unset}:host .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper li[role=option].focused,:host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper li.add-new-btn.focused,:host .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper div[role=option].focused,:host .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper div.add-new-btn.focused{outline:none;background:var(--wmcolor-taginput-option-background-hover)}:host .dropdown-wrapper li.help-text,:host .dropdown-wrapper div.help-text{color:var(--wmcolor-taginput-help-text);height:auto;min-height:2.6875rem;padding-top:0.25rem;padding-bottom:0.25rem;white-space:normal}:host .dropdown-wrapper li:not(:last-child),:host .dropdown-wrapper div:not(:last-child){border-bottom:2px solid var(--wmcolor-taginput-option-border)}:host .info-text{font-style:italic;margin-top:0.25rem}:host .table-wrapper{overflow:auto;margin-top:1.5rem}:host .table-wrapper #table{width:100%;border-spacing:0px}:host .table-wrapper #table.fixed-widths{table-layout:fixed}:host .table-wrapper #table .headers{height:2.5rem;background-color:var(--wmcolor-taginput-header-background-table)}:host .table-wrapper #table .headers th{text-align:left;font-size:0.75rem;font-weight:700;text-transform:uppercase;padding:0 1.5rem}:host .table-wrapper tr:nth-child(even){background-color:var(--wmcolor-taginput-altrow-background-table)}:host .table-wrapper tr.selected{background-color:var(--wmcolor-taginput-row-background-selected);-webkit-box-shadow:inset 0 0 0 1px var(--wmcolor-taginput-row-border-selected);box-shadow:inset 0 0 0 1px var(--wmcolor-taginput-row-border-selected);font-weight:500}:host .table-wrapper tr.focused:not(.locked),:host .table-wrapper tr:hover:not(.locked){background-color:var(--wmcolor-taginput-row-background-hover);-webkit-box-shadow:none;box-shadow:none}:host .table-wrapper tr.locked td{cursor:auto}:host .table-wrapper tr.locked td:first-child .cell-content-wrapper: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:"\\f33e";margin-right:0.5rem;color:var(--wmcolor-taginput-tag-text)}:host .table-wrapper td{height:3.75rem;vertical-align:middle;padding:0 1.5rem;cursor:pointer}:host .table-wrapper td.focused{-webkit-box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px var(--wmcolor-interactive-focus)}:host .table-wrapper td .cell-content-wrapper.trunc{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .table-wrapper td .description{display:none}:host .no-results{padding:1.25rem 1.5rem}: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}:host #error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem}';export{b as wm_tag_input}
1
+ import{r as t,c as e,f as o,h as i,H as r,g as s}from"./p-b5bedd63.js";import{g as a,d as n,u as h,i as l,v as d,w as c,l as p,h as g,s as w,o as m}from"./p-f0d87250.js";import{g as u}from"./p-8e001d5e.js";const b=class{constructor(i){t(this,i),this.wmTagInputChanged=e(this,"wmTagInputChanged",7),this.uid=this.el.id?this.el.id:a(),this.openUp=!1,this.inModal=!1,this.debouncedUpdate=n((()=>o(this.el)),30),this.label=void 0,this.labelPosition="top",this.options="",this.selectedTags="",this.info=void 0,this.errorMessage=void 0,this.addNew=!0,this.placeholder=void 0,this.requiredField=!1,this.characterLimit=50,this.maxTags=void 0,this.tagInputType="dropdown",this.colHeaders=void 0,this.colWidths=void 0,this.colWrap=void 0,this.messageConfig="",this.focusedListItem=void 0,this.focusedTag=null,this.tablePosition={row:0,column:1},this.isExpanded=!1,this.tagsList=h(this.selectedTags),this.optionsList=h(this.options),this.charCount=0,this.liveRegionMessage=""}get tooltipVisible(){return document.getElementById("wm-tooltip").classList.contains("show")}get focusedElement(){return this.el.shadowRoot.activeElement}get listItemEls(){return Array.from(this.dropdownEl.querySelectorAll("li"))}get tagEls(){return this.tagAreaEl?Array.from(this.tagAreaEl.querySelectorAll(".tag")):[]}get nonLockedTagEls(){return this.tagEls.filter((t=>!t.classList.contains("locked")))}get optionEls(){return Array.from(this.dropdownEl.querySelectorAll(".option"))}get wmRowEls(){return Array.from(this.el.querySelectorAll("wm-tag-input-row"))}get localRowEls(){return Array.from(this.el.shadowRoot.querySelectorAll("tr"))}get filteredRows(){return this.wmRowEls.filter((t=>{const e=this.inputEl?this.inputEl.value.toLowerCase():"";return[t.col1,t.col2,t.col3,t.col4].join("").toLowerCase().includes(e)}))}get nonLockedTagsList(){let t=[];return"table"===this.tagInputType?this.tagsList.forEach((e=>{this.wmRowEls.filter((t=>e===t.id))[0].locked||t.push(e)})):"dropdown"===this.tagInputType&&(t=this.tagsList),t}get tagLimitReached(){return!!(this.maxTags&&this.tagsList.length>=this.maxTags)}get noResultsMessage(){return l.formatMessage({id:"tagInput.noResults",defaultMessage:"No results match your search.",description:"Message displayed when a user's search returns empty."})}get componentMessages(){const t={addNewHelpText:l.formatMessage({id:"tagInput.addNewHelpText",defaultMessage:"Press the Enter or Comma key to add a new tag.",description:"Help text appearing in a dropdown. Use imperative"}),selectionHelpText:l.formatMessage({id:"tagInput.selectionHelpText",defaultMessage:"Search and select a tag.",description:"Help text appearing in a dropdown. Use imperative"}),maxTagsReached:l.formatMessage({id:"tagInput.maxTagsReached",defaultMessage:"No more tags can be added because the limit has been reached."}),tagAreaInstructions:l.formatMessage({id:"tagInput.tagAreaInstructions",defaultMessage:"tag selection. Press Backspace or Delete to remove a tag."}),tagsAdded:l.formatMessage({id:"tagInput.tagsAdded",defaultMessage:"Tags added",description:"For the user to understand how close they are to the tag limit, followed by x/y count"})},e=d(this.messageConfig);return e?Object.assign(Object.assign({},t),e):t}get inputMinimumWidth(){const t=getComputedStyle(this.inputEl),e=getComputedStyle(this.tagEls[this.tagEls.length-1]),o=[t.paddingLeft,t.paddingRight,t.marginLeft,t.marginRight,e.marginRight].reduce(((t,e)=>t+parseInt(e.replace("px",""))),0);return Math.max(150,c(this.inputEl,this.placeholder).width+o)}generateTagAddedMessage(t){return l.formatMessage({id:"tagInput.tagAdded",defaultMessage:"{tagName} added.",description:"A confirmation for adding a tag."},{tagName:t})}generateTagAlreadyAddedMessage(t){return l.formatMessage({id:"tagInput.tagAlreadyAdded",defaultMessage:"{tagName} has already been added.",description:"An alert for adding a tag that is already present."},{tagName:t})}componentWillLoad(){this.placeholder||(this.placeholder=this.createPlaceholderDefault(this.addNew,!!this.options)),this.label||console.error("wm-tag-input must have a label property"),this.consolidateSelectedTags(),this.el.focus=()=>{const t=this.nonLockedTagEls[0];t?(this.tagAreaEl.focus(),this.focusTag(t)):this.inputEl.focus()},new ResizeObserver((()=>this.debouncedUpdate())).observe(this.el),this.el.closest("wm-modal")&&(this.inModal=!0)}componentDidLoad(){this.tagEls.forEach((t=>t.classList.remove("highlight")))}componentDidRender(){this.positionInput(),this.tagEls.forEach((t=>{const e=t.querySelector(".tag-text"),o=this.el.shadowRoot.querySelector(".tags-and-input-wrapper"),i=e.getBoundingClientRect().left,r=o.getBoundingClientRect().right-10-8-28;let s=t.dataset.tag;if("table"===this.tagInputType){const t=this.el.querySelector(`#${s}`);s=t?t.col1:""}e.textContent=p(e,s,r-i,5)}))}consolidateSelectedTags(){this.tagsList.forEach((t=>{this.includesCaseInsensitive(this.optionsList,t)||(this.options+=`${this.options.length>0?",":""}${t}`)})),this.optionsList=h(this.options)}createPlaceholderDefault(t,e){const o=l.formatMessage({id:"tagInput.placeholderAddAndSearch",defaultMessage:"Add or search for a tag",description:"Placeholder text. Use imperative"}),i=l.formatMessage({id:"tagInput.placeholderSearch",defaultMessage:"Search and select a tag",description:"Placeholder text. Use imperative"}),r=l.formatMessage({id:"tagInput.placeholderAdd",defaultMessage:"Add a new tag",description:"Placeholder text. Use imperative"});let s="";return t&&e?s=o:!t&&e?s=i:t&&(s=r),s}reflectSelectedTags(t,e){let o="",i=this.tagsList;o=t.length>e.length?t.filter((t=>!e.includes(t)))[0]:e.filter((e=>!t.includes(e)))[0],"table"===this.tagInputType&&(o=this.wmRowEls.filter((t=>t.id===o))[0],i=this.tagsList.map((t=>this.el.querySelector(`#${t}`)))),this.selectedTags=this.listToCSV(this.tagsList),this.wmTagInputChanged.emit({value:i,tagChanged:o})}handleErrorMessageChange(){this.errorMessage&&this.announce(this.errorMessage)}handleRowUpdate(){o(this.el)}closeIfNotElOrChild(t){const e=t.target!==this.el&&!this.el.shadowRoot.contains(t.target);"dropdown"===this.tagInputType&&e&&this.isExpanded&&this.closeDropdown()}dismissTooltip(){this.tooltipVisible&&g()}handleInputKeyDown(t){switch(/^.$/.test(t.key)&&this.inputEl.value.length>=this.characterLimit&&this.announce(this.generateCharacterLimitWarning(this.inputEl.value.length,this.characterLimit)),t.stopPropagation(),t.key){case"Enter":t.preventDefault(),this.handleInputEnter();break;case"ArrowDown":t.preventDefault(),this.handleInputArrowDown();break;case"ArrowUp":t.preventDefault(),this.handleInputArrowUp();break;case"ArrowLeft":"table"===this.tagInputType&&this.tablePosition.row&&(t.preventDefault(),this.moveLeftCell());break;case"ArrowRight":"table"===this.tagInputType&&this.tablePosition.row&&(t.preventDefault(),this.moveRightCell());break;case"Escape":"dropdown"===this.tagInputType&&this.isExpanded&&this.closeDropdown();break;case"ArrowLeft":case"Backspace":this.handleInputBackspace()}}handleInputFocus(){"dropdown"===this.tagInputType&&(this.openDropdown(),this.clearListItemFocus()),o(this.el)}handleInputChanged(t){this.charCount=t.length,"dropdown"===this.tagInputType?(this.clearListItemFocus(),this.charCount>=this.characterLimit-5&&this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit)),this.isExpanded||this.openDropdown()):"table"===this.tagInputType&&this.clearCellFocus(),t.includes(",")&&this.addNew?(t.split(",").forEach((t=>this.submitInput(this.addNew,t.trim()))),this.announce(this.generateTagAddedMessage(t.split(",").join(", ")))):this.announceExistingOptions()}handleInputEnter(){"dropdown"===this.tagInputType?this.focusedListItem?this.handleListItemClick(this.focusedListItem):this.submitInput(this.addNew,this.inputEl.value.trim()):"table"===this.tagInputType&&this.tablePosition.row>0&&this.handleTableRowClick(this.localRowEls[this.tablePosition.row].id)}submitInput(t,e){const o=e.match(/\S/);t&&o&&(this.addTag(e),this.optionsList=this.addOption(e),this.resetInput())}handleInputArrowDown(){"table"===this.tagInputType?this.moveDownRow():"dropdown"===this.tagInputType&&this.isExpanded?this.moveDownListItem():"dropdown"===this.tagInputType&&this.openDropdown()}handleInputArrowUp(){"table"===this.tagInputType?this.moveUpRow():"dropdown"===this.tagInputType&&this.isExpanded?this.moveUpListItem():"dropdown"===this.tagInputType&&this.openDropdown()}handleInputBackspace(){""===this.inputEl.value&&this.tagsList.length>0&&window.requestAnimationFrame((()=>{this.nonLockedTagsList.length>0&&(this.tagAreaEl.focus(),this.focusTag(this.tagEls[this.tagEls.length-1]))}))}handleListItemKeyDown(t){const e=t.target;switch(t.key){case"Enter":case" ":t.preventDefault(),e.click();break;case"ArrowDown":t.preventDefault(),this.moveDownListItem();break;case"ArrowUp":t.preventDefault(),this.moveUpListItem();break;case"Escape":this.focusedElement!==this.inputEl?this.inputEl.focus():"dropdown"===this.tagInputType&&this.closeDropdown()}}handleListItemClick(t){const e=t.dataset.option.trim()||"";this.includesCaseInsensitive(this.tagsList,e)?this.announce(this.generateTagAlreadyAddedMessage(e)):(this.resetInput(),this.addTag(e),this.optionsList=this.addOption(e),this.focusedListItem=null)}handleTableRowClick(t){this.el.querySelector(`#${t}`).locked||(this.includesCaseInsensitive(this.tagsList,t)?this.removeTag(t):this.tagLimitReached||(this.addTag(t),this.resetInput()))}handleTagAreaKeyDown(t){switch(t.key){case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.moveLeftTag();break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.moveRightTag();break;case"Backspace":case"Delete":this.handleTagAreaDelete()}}handleTagAreaDelete(){const t=this.focusedTag&&this.focusedTag.classList.contains("locked");this.focusedTag&&!t&&(this.removeTag(this.focusedTag.dataset.tag),0===this.nonLockedTagsList.length?this.inputEl.focus():(this.focusedTag=this.focusedTag===this.tagEls[this.tagEls.length-1]?this.tagEls[this.tagEls.length-2]:this.focusedTag,this.focusTag(this.focusedTag)))}handleBlur(t,e){const o=t.relatedTarget!==e&&!this.el.shadowRoot.contains(t.relatedTarget);this.dismissTooltip(),this.clearCellFocus(),o&&(this.fieldWrapperEl.classList.remove("focused"),"dropdown"===this.tagInputType&&this.closeDropdown())}handleCellMouseEnter(t){const e=t.target,o=e.querySelector(".cell-content-wrapper");o.scrollWidth>o.clientWidth&&w("bottom",e,e.innerText)}handleTagAreaFocus(){"dropdown"===this.tagInputType&&this.closeDropdown();const t=this.nonLockedTagEls[0];t&&this.focusTag(t)}handleRemoveButtonClick(t){this.moveLeftTag(),this.removeTag(t)}moveDownListItem(){if(this.listItemEls.length>0){this.focusListItem(this.focusedListItem&&this.focusedListItem.nextElementSibling?this.focusedListItem.nextElementSibling:this.listItemEls[0])}}moveUpListItem(){if(this.listItemEls.length>0){const t=this.listItemEls[this.listItemEls.length-1];this.focusedListItem?this.focusedListItem.previousElementSibling?this.focusListItem(this.focusedListItem.previousElementSibling):this.clearListItemFocus():this.focusListItem(t)}}moveDownRow(){this.filteredRows.length>0&&(0===this.tablePosition.row||this.tablePosition.row===this.filteredRows.length?this.tablePosition.row=1:this.tablePosition.row++,this.filteredRows[this.tablePosition.row-1].locked?this.moveDownRow():this.focusCell(this.tablePosition))}moveUpRow(){if(this.filteredRows.length>0){0===this.tablePosition.row?this.tablePosition.row=this.filteredRows.length:1===this.tablePosition.row?this.tablePosition.row=0:this.tablePosition.row--;const t=this.filteredRows[this.tablePosition.row-1];t&&t.locked?this.moveUpRow():t?this.focusCell(this.tablePosition):this.clearCellFocus()}}moveLeftCell(){1!=this.tablePosition.column&&(this.tablePosition.column--,this.focusCell(this.tablePosition))}moveRightCell(){const t=h(this.colHeaders).length;this.tablePosition.column<t&&(this.tablePosition.column++,this.focusCell(this.tablePosition))}moveLeftTag(){const t=this.tagEls[this.tagEls.length-1];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.previousElementSibling)?this.focusedTag.previousElementSibling:t,this.focusedTag.classList.contains("locked")&&this.nonLockedTagEls.length>0?this.moveLeftTag():this.focusTag(this.focusedTag)}moveRightTag(){const t=this.tagEls[0];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.nextElementSibling)?this.focusedTag.nextElementSibling:t,this.focusedTag.classList.contains("locked")?this.moveRightTag():this.focusTag(this.focusedTag)}addOption(t){let e=this.optionsList;return this.includesCaseInsensitive(this.optionsList,t)||(e=e.concat(t)),e}removeOption(t){this.optionsList=this.filterCaseInsensitive(this.optionsList,t)}addTag(t){let e=this.tagsList;const o=this.includesCaseInsensitive(this.tagsList,t),i=this.optionsList.filter((e=>e.toLowerCase()===t.toLowerCase()))[0];if(!o){let o=t;"table"===this.tagInputType&&(o=this.el.querySelector(`#${t}`).col1),this.announce(this.generateTagAddedMessage(o)),this.tagsList=e.concat(i||t),this.tagLimitReached?this.tagAreaEl.focus():window.requestAnimationFrame((()=>this.tagsAndInputWrapperEl.scrollTop=this.tagsAndInputWrapperEl.scrollHeight))}}removeTag(t){let e=t;"table"===this.tagInputType&&(e=this.el.querySelector(`#${t}`).col1);const o=l.formatMessage({id:"tagInput.tagRemoved",defaultMessage:"{tag} removed"},{tag:e});if(this.announce(o),this.tagsList=this.filterCaseInsensitive(this.tagsList,t),"dropdown"===this.tagInputType){const e=h(this.options);this.includesCaseInsensitive(this.optionsList,t)&&!this.includesCaseInsensitive(e,t)&&this.removeOption(t)}}focusListItem(t){this.focusedListItem=t,this.inputEl.setAttribute("aria-activedescendant",this.focusedListItem.id),t.scrollIntoView({block:"nearest"})}focusTag(t){t.classList.contains("locked")?(this.focusedTag=null,this.tagAreaEl.setAttribute("aria-activedescendant","")):(this.focusedTag=t,this.tagAreaEl.setAttribute("aria-activedescendant",this.focusedTag.id),this.focusedTag.scrollIntoView({block:"nearest"})),window.requestAnimationFrame((()=>{g();const e=t.querySelector(".tag-text"),o=t.dataset.tag;o!==e.textContent&&e.textContent.includes("...")&&w("bottom",t,o)}))}focusCell(t){if(this.clearCellFocus(!1),t.row){const e=this.localRowEls[t.row],o=e.querySelectorAll("td")[t.column-1],i=o.querySelector(".cell-content-wrapper"),r=i.scrollWidth>i.clientWidth;e.classList.add("focused"),o.classList.add("focused"),o.scrollIntoView({block:"nearest"}),this.inputEl.setAttribute("aria-activedescendant",o.id),this.dismissTooltip(),r&&w("bottom",o,o.innerText)}}clearTagFocus(){this.tagAreaEl.setAttribute("aria-activedescendant",""),this.focusedTag=null}clearCellFocus(t=!0){this.inputEl.setAttribute("aria-activedescendant",""),t&&(this.tablePosition={row:0,column:1}),this.localRowEls.forEach((t=>{t.classList.remove("focused"),t.querySelectorAll("td").forEach((t=>{t.classList.remove("focused")}))}))}openDropdown(){this.openUp=m(this.el,this.dropdownEl.clientHeight,this.el.clientHeight,-2),this.isExpanded=!0}closeDropdown(){this.clearListItemFocus(),this.isExpanded=!1}clearListItemFocus(){this.focusedListItem=null,this.inputEl.setAttribute("aria-activedescendant",""),this.listItemEls.forEach((t=>{t.classList.remove("focused")}))}resetInput(){this.charCount=0,this.inputEl.value=""}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.liveRegionMessage=t}announceExistingOptions(){window.requestAnimationFrame((()=>{let t=0;"dropdown"===this.tagInputType?t=this.optionEls.length:"table"===this.tagInputType&&(t=this.filteredRows.length);const e=l.formatMessage({id:"tagInput.existingOptions",defaultMessage:"{num, plural, one {1 existing option.} other {# existing options.}}"},{num:t});this.announce(e)}))}generateCharacterLimitWarning(t,e){let o=u.getCharactersEntered(t,e);return t>=e&&(o+=` ${u.characterLimitReached}`),o}positionInput(){const t=this.tagEls[this.tagEls.length-1];if(this.inputEl.style.position="static",this.inputEl.style.width="100%",this.inputEl.classList.add("extended"),t){const e=this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right;e>=this.inputMinimumWidth&&(this.inputEl.style.position="absolute",this.inputEl.style.top=t.offsetTop.toString()+"px",this.inputEl.style.width=(e-8).toString()+"px",this.inputEl.classList.remove("extended"))}}handleTagMouseEnter(t){const e=t.target.querySelector(".tag-text").textContent,o=t.target.dataset.tag;e!==o&&e.includes("...")&&w("bottom",t.target,o)}listToCSV(t){return t.join(",")}includesCaseInsensitive(t,e){return t.map((t=>t.toLowerCase())).includes(e.toLowerCase())}filterCaseInsensitive(t,e){return t.filter((t=>t.toLowerCase()!==e.toLowerCase()))}sortCaseInsensitive(t){return t.sort(((t,e)=>(t=t.toLowerCase())>(e=e.toLowerCase())?1:t<e?-1:0))}renderTags(){let t=[],e=[];return this.tagsList.forEach(((o,r)=>{const s=`tag${r+1}`;let a="",n=!1;if("dropdown"===this.tagInputType)a=o;else if("table"===this.tagInputType){const t=this.el.querySelector(`#${o}`);a=t?t.col1:"",n=!!t&&t.locked}(n?t:e).push(i("li",{id:s,class:`tag highlight ${this.focusedTag&&this.focusedTag.id===s?"focused":""} ${n?"locked":""}`,"data-tag":o,role:"option",onMouseEnter:t=>this.handleTagMouseEnter(t),onMouseLeave:g},i("span",{class:"sr-only"},o),i("span",{class:"tag-text","aria-hidden":"true"},a),n?i("div",{class:"icon lock"}):i("button",{class:"icon remove-btn",tabIndex:-1,onClick:()=>this.handleRemoveButtonClick(o)})))})),[...t,...e]}renderDropdown(){return i("div",{class:`dropdown-wrapper ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,ref:t=>this.dropdownEl=t},i("div",{id:"help-text",class:"help-text"},this.renderHelpText()),i("ul",{class:"dropdown",id:"dropdown",role:"listbox","aria-multiselectable":"true","aria-expanded":!!this.isExpanded&&"true","aria-label":this.label,tabindex:-1},this.inputEl&&this.renderAddNewButton(),this.renderListItems(this.optionsList)))}renderListItems(t){return t=this.sortCaseInsensitive(t),this.inputEl&&this.inputEl.value&&(t=this.optionsList.filter((t=>t.toLowerCase().includes(this.inputEl.value.toLowerCase())))),t.map(((t,e)=>{const o=`option${e+1}`,r=this.focusedListItem&&this.focusedListItem.id===o,s=this.includesCaseInsensitive(this.tagsList,t);return i("li",{class:"option "+(r?"focused":""),role:"option",id:o,"data-option":t,"aria-selected":s?"true":"false","aria-disabled":s?"true":"false",onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t.target)},t)}))}renderAddNewButton(){const t=this.inputEl.value.match(/\S/),e=this.includesCaseInsensitive(this.optionsList,this.inputEl.value.trim());if(this.addNew&&t&&!e){const t="add-new-btn",e=this.focusedListItem&&this.focusedListItem.id===t;return i("li",{role:"option",class:"add-new-btn "+(e?"focused":""),id:t,"data-option":this.inputEl.value,onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t.target),tabIndex:e?0:-1},`Add "${this.inputEl.value.trim()}"`)}return""}renderHelpText(){let t="";return this.optionsList.length>0&&(t+=this.componentMessages.selectionHelpText),this.addNew&&(t+=" "+this.componentMessages.addNewHelpText),t}renderTagCounter(){if(this.maxTags)return i("div",{class:"lower-row"},i("div",{id:"max-tags"},`${this.componentMessages.tagsAdded}: ${this.tagsList.length}/${this.maxTags}`,this.tagLimitReached&&` - ${this.componentMessages.maxTagsReached}`))}renderTable(){return i("div",{class:"table-wrapper",onScroll:()=>this.dismissTooltip()},i("table",{id:"table",role:"grid",class:this.colWidths?"fixed-widths":"","aria-label":this.label,"aria-multiselectable":"true"},this.renderTableHeaders(),this.filteredRows.length?this.renderTableRows():i("div",{class:"no-results"},this.noResultsMessage)))}renderTableHeaders(){return i("tr",{class:"headers",role:"row"},h(this.colHeaders).map(((t,e)=>{let o="wrap";return this.colWrap&&h(this.colWrap)[e]&&(o=h(this.colWrap)[e]),i("th",{class:`header-cell ${o}`,role:"columnheader",width:this.colWidths?h(this.colWidths)[e]:""},t)})))}renderTableRows(){return this.filteredRows.map((t=>{const e=this.includesCaseInsensitive(this.tagsList,t.id);return i("tr",{id:t.id,class:`${t.locked?"locked":""} ${e?"selected":""}`,role:"row",onClick:()=>this.handleTableRowClick(t.id)},this.renderTableCells(t))}))}renderTableCells(t){const e=[t.col1,t.col2,t.col3,t.col4].filter((t=>!!t)),o=this.includesCaseInsensitive(this.tagsList,t.id);return e.map(((e,r)=>{const s=`${t.id}-col${r+1}`;let a="wrap";return this.colWrap&&h(this.colWrap)[r]&&(a=h(this.colWrap)[r]),i("td",{id:s,role:"gridcell","aria-describedby":`${s}-description`,"aria-selected":o.toString(),onMouseEnter:t=>this.handleCellMouseEnter(t),onMouseLeave:()=>this.dismissTooltip()},i("div",{class:`cell-content-wrapper ${a}`},e),i("div",{class:"description",id:`${s}-description`},t.locked?"locked":""))}))}render(){return i(r,{id:this.uid},i("div",{class:`wrapper label-${this.labelPosition} ${this.errorMessage?"invalid":""}`},i("div",{class:"label-wrapper"},i("label",{class:"label",htmlFor:`input${this.uid}`},this.label,this.requiredField&&i("span",{class:"required","aria-hidden":"true"},"*"))),i("div",{class:`field-wrapper ${this.focusedElement?"focused":""} ${this.errorMessage?"invalid":""}`,ref:t=>this.fieldWrapperEl=t},i("div",{class:"upper-row"},i("div",{class:"tags-and-input-wrapper "+(this.inModal?"in-modal":""),ref:t=>this.tagsAndInputWrapperEl=t},this.tagsList.length>0&&i("ul",{ref:t=>this.tagAreaEl=t,class:"tag-area",role:"listbox","aria-activedescendant":"","aria-orientation":"horizontal","aria-label":`${this.label} ${this.tagsList.length>0?this.componentMessages.tagAreaInstructions:""}`,tabindex:this.nonLockedTagsList.length>0?0:-1,"aria-describedby":"info max-tags",onFocus:()=>this.handleTagAreaFocus(),onBlur:t=>{this.clearTagFocus(),this.handleBlur(t,this.el)},onKeyDown:t=>this.handleTagAreaKeyDown(t)},this.renderTags()),i("input",{id:`input${this.uid}`,class:"input "+(this.tagLimitReached?"hidden":""),role:"combobox",ref:t=>this.inputEl=t,autocomplete:"off","aria-required":this.requiredField?"true":null,"aria-controls":this.tagInputType,"aria-describedby":"help-text"+(this.errorMessage?" error ":""),"aria-label":`${this.label} ${"dropdown"===this.tagInputType?u.getCharacterLimit(this.characterLimit):""}`,"aria-expanded":"dropdown"===this.tagInputType?this.isExpanded.toString():null,placeholder:this.placeholder,maxLength:"dropdown"===this.tagInputType?this.characterLimit:void 0,onInput:()=>this.handleInputChanged(this.inputEl.value),onBlur:t=>{this.handleBlur(t,this.el)},onFocus:()=>this.handleInputFocus(),onKeyDown:t=>this.handleInputKeyDown(t)})),"dropdown"===this.tagInputType&&i("div",{class:"character-count"},this.charCount,"/",this.characterLimit)),this.renderTagCounter(),"dropdown"===this.tagInputType&&this.renderDropdown()),this.info&&i("div",{id:"info",class:"info-text"},this.info),this.errorMessage&&i("div",{id:"error"},this.errorMessage),i("div",{class:"sr-only","aria-live":"assertive",ref:t=>this.liveRegionEl=t,"aria-atomic":"true"},this.liveRegionMessage),"table"===this.tagInputType&&this.renderTable()))}static get delegatesFocus(){return!0}get el(){return s(this)}static get watchers(){return{tagsList:["reflectSelectedTags"],errorMessage:["handleErrorMessageChange"]}}};b.style=':host{--wmcolor-taginput-altrow-background-table:var(--wmcolor-table-altrow-background);--wmcolor-taginput-border:var(--wmcolor-input-border);--wmcolor-taginput-charcount-background:var(--wmcolor-input-charcount-background);--wmcolor-taginput-header-background-table:var(--wmcolor-table-header-background);--wmcolor-taginput-help-text:var(--wmcolor-text);--wmcolor-taginput-icon:var(--wmcolor-icon-accent);--wmcolor-taginput-maxtags-background:var(--wmcolor-background-readonly);--wmcolor-taginput-maxtags-border:var(--wmcolor-input-border);--wmcolor-taginput-maxtags-text:var(--wmcolor-text);--wmcolor-taginput-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-taginput-option-background:var(--wmcolor-option-background);--wmcolor-taginput-option-border:var(--wmcolor-option-border);--wmcolor-taginput-option-text-selected:var(--wmcolor-option-text-disabled);--wmcolor-taginput-option-text:var(--wmcolor-interactive);--wmcolor-taginput-row-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-taginput-row-background-selected:var(--wmcolor-table-row-background-selected);--wmcolor-taginput-row-background-table:var(--wmcolor-table-row-background);--wmcolor-taginput-row-border-selected:var(--wmcolor-table-row-border-selected);--wmcolor-taginput-tag-background-focus:var(--wmcolor-palelilacgray-dark);--wmcolor-taginput-tag-background-highlight:var(--wmcolor-background-highlight);--wmcolor-taginput-tag-background-locked:var(--wmcolor-interactive-disabled);--wmcolor-taginput-tag-background:var(--wmcolor-palelilacgray);--wmcolor-taginput-tag-text-locked:var(--wmcolor-text-ondark);--wmcolor-taginput-tag-text:var(--wmcolor-text);--wmcolor-taginput-tagbutton-background-hover:var(--wmcolor-button-background-icononly-hover);--wmcolor-taginput-tagbutton-border:var(--wmcolor-button-border-icononly);--wmcolor-taginput-tagbutton-icon-hover:var(--wmcolor-button-icon-icononly-hover);--wmcolor-taginput-tagbutton-icon:var(--wmcolor-button-icon-icononly);font-family:inherit;width:100%;display:block;max-height:80vh}:host *{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}: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{width:100%;height:100%;max-height:inherit;min-height:inherit;position:relative}:host .field-wrapper{position:relative;width:100%;border:1px solid;border-color:var(--wmcolor-taginput-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px}:host .field-wrapper.focused{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);outline:none;border-color:var(--wmcolor-input-border-focus)}:host .field-wrapper.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:not(.label-left) .field-wrapper{-ms-flex-negative:0;flex-shrink:0}:host .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:var(--wmcolor-taginput-charcount-background);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .tags-and-input-wrapper{position:relative;width:100%;padding:8px 8px 8px 0;overflow:auto;max-height:200px}:host .tags-and-input-wrapper.in-modal{max-height:20vh}:host .upper-row{width:100%;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:justify;justify-content:space-between}:host .upper-row:before{-ms-flex-item-align:start;align-self:flex-start;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:"\\f349";color:var(--wmcolor-taginput-icon);padding:0.75rem 0.5rem 0.75rem 0.75rem;line-height:normal;font-size:1.12rem}:host .lower-row{width:100%;min-height:1.875rem}:host #max-tags{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:1.875rem;background-color:var(--wmcolor-taginput-maxtags-background);padding:0.5rem 1rem;color:var(--wmcolor-taginput-maxtags-text);font-size:0.875rem;border-top:1px solid var(--wmcolor-taginput-maxtags-border);border-radius:0 0 3px 3px}:host .tag-area{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:0;margin:0;gap:8px}:host .tag-area:focus{outline:none}:host .tag-area [role=option]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:1.75rem;list-style:none;color:var(--wmcolor-taginput-tag-text);background-color:var(--wmcolor-taginput-tag-background);padding:0.5rem 0.625rem;-webkit-transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);white-space:pre}:host .tag-area [role=option].highlight{-webkit-animation:fadeIn 1s;animation:fadeIn 1s}@-webkit-keyframes fadeIn{0%{background-color:var(--wmcolor-taginput-tag-background)}50%{background-color:var(--wmcolor-taginput-tag-background-highlight)}100%{background-color:var(--wmcolor-taginput-tag-background)}}@keyframes fadeIn{0%{background-color:var(--wmcolor-taginput-tag-background)}50%{background-color:var(--wmcolor-taginput-tag-background-highlight)}100%{background-color:var(--wmcolor-taginput-tag-background)}}:host .tag-area [role=option].focused{background-color:var(--wmcolor-taginput-tag-background-focus)}:host .tag-area [role=option].locked{background-color:var(--wmcolor-taginput-tag-background-locked);color:var(--wmcolor-taginput-tag-text-locked)}:host .tag-area [role=option] .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:1.25rem;width:1.25rem;padding:0;margin-left:0.5rem}:host .tag-area [role=option] .icon.remove-btn{border:1px solid var(--wmcolor-taginput-tagbutton-border);color:var(--wmcolor-taginput-tagbutton-icon);border-radius:50%;cursor:pointer;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1)}:host .tag-area [role=option] .icon.remove-btn:hover{color:var(--wmcolor-taginput-tagbutton-icon-hover);background-color:var(--wmcolor-taginput-tagbutton-background-hover)}:host .tag-area [role=option] .icon.remove-btn: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:"\\f156"}:host .tag-area [role=option] .icon.lock{color:var(--wmcolor-taginput-tag-text-locked)}:host .tag-area [role=option] .icon.lock: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:"\\f341"}:host .input{font-family:inherit;border:none;height:1.75rem;padding:0;margin:0;right:8px}:host .input.hidden{display:none}:host .input:focus{outline:none}:host .tag-area+.input.extended{-webkit-margin-before:8px;margin-block-start:8px}:host .dropdown-wrapper{margin:0;padding:0;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:calc(100% + 2px);right:0;z-index:100;width:100%;font-size:0.875rem}:host .dropdown-wrapper .dropdown{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;margin:0;padding:0}:host .dropdown-wrapper.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .dropdown-wrapper.upwards{top:unset;bottom:calc(100% + 2px);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .dropdown-wrapper li,:host .dropdown-wrapper div{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 1rem;background:var(--wmcolor-taginput-option-background);list-style:none;min-height:2.6875rem;white-space:pre-wrap;overflow-wrap:anywhere}:host .dropdown-wrapper li[role=option],:host .dropdown-wrapper li.add-new-btn,:host .dropdown-wrapper div[role=option],:host .dropdown-wrapper div.add-new-btn{cursor:pointer;color:var(--wmcolor-taginput-option-text);font-weight:bold;width:100%;border:none}:host .dropdown-wrapper li[role=option][aria-selected=true],:host .dropdown-wrapper li.add-new-btn[aria-selected=true],:host .dropdown-wrapper div[role=option][aria-selected=true],:host .dropdown-wrapper div.add-new-btn[aria-selected=true]{color:var(--wmcolor-taginput-option-text-selected);font-style:italic;font-weight:normal;cursor:unset}:host .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper li[role=option].focused,:host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper li.add-new-btn.focused,:host .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper div[role=option].focused,:host .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper div.add-new-btn.focused{outline:none;background:var(--wmcolor-taginput-option-background-hover)}:host .dropdown-wrapper li.help-text,:host .dropdown-wrapper div.help-text{color:var(--wmcolor-taginput-help-text);height:auto;min-height:2.6875rem;padding-top:0.25rem;padding-bottom:0.25rem;white-space:normal}:host .dropdown-wrapper li:not(:last-child),:host .dropdown-wrapper div:not(:last-child){border-bottom:2px solid var(--wmcolor-taginput-option-border)}:host .info-text{font-style:italic;margin-top:0.25rem}:host .table-wrapper{overflow:auto;margin-top:1.5rem}:host .table-wrapper #table{width:100%;border-spacing:0px}:host .table-wrapper #table.fixed-widths{table-layout:fixed}:host .table-wrapper #table .headers{height:2.5rem;background-color:var(--wmcolor-taginput-header-background-table)}:host .table-wrapper #table .headers th{text-align:left;font-size:0.75rem;font-weight:700;text-transform:uppercase;padding:0 1.5rem}:host .table-wrapper tr:nth-child(even){background-color:var(--wmcolor-taginput-altrow-background-table)}:host .table-wrapper tr.selected{background-color:var(--wmcolor-taginput-row-background-selected);-webkit-box-shadow:inset 0 0 0 1px var(--wmcolor-taginput-row-border-selected);box-shadow:inset 0 0 0 1px var(--wmcolor-taginput-row-border-selected);font-weight:500}:host .table-wrapper tr.focused:not(.locked),:host .table-wrapper tr:hover:not(.locked){background-color:var(--wmcolor-taginput-row-background-hover);-webkit-box-shadow:none;box-shadow:none}:host .table-wrapper tr.locked td{cursor:auto}:host .table-wrapper tr.locked td:first-child .cell-content-wrapper: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:"\\f33e";margin-right:0.5rem;color:var(--wmcolor-taginput-tag-text)}:host .table-wrapper td{height:3.75rem;vertical-align:middle;padding:0 1.5rem;cursor:pointer}:host .table-wrapper td.focused{-webkit-box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px var(--wmcolor-interactive-focus)}:host .table-wrapper td .cell-content-wrapper.trunc{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .table-wrapper td .description{display:none}:host .no-results{padding:1.25rem 1.5rem}: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}:host #error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem}';export{b as wm_tag_input}
@@ -1 +1 @@
1
- System.register(["./p-30bf24f8.system.js","./p-5e55eb56.system.js"],(function(t){"use strict";var o,e,i,r,n,l,s,p,a,g,h;return{setters:[function(t){o=t.r;e=t.h;i=t.H;r=t.g},function(t){n=t.i;l=t.h;s=t.o;p=t.p;a=t.q;g=t.r;h=t.s}],execute:function(){var c=':host{--wmcolor-toggletip-background:var(--wmcolor-background-dark);--wmcolor-toggletip-icon-background:var(--wmcolor-background-dark);--wmcolor-toggletip-icon-text:var(--wmcolor-text-ondark);--wmcolor-toggletip-text:var(--wmcolor-text-ondark);display:inline-block;position:relative;height:40px;width:40px}:host .button{display:-ms-flexbox;display:flex;background:none;border:none;padding:0;width:inherit;height:inherit;border-radius:50%;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;position:relative;cursor:pointer}:host .button: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:"\\f2fc";font-size:16px;color:var(--wmcolor-toggletip-icon-background);background:radial-gradient(var(--wmcolor-toggletip-icon-text) 40%, transparent 0%)}:host .button:focus{outline:none}:host .button:focus.user-is-tabbing{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}:host .button:focus.user-is-tabbing::-moz-focus-inner{border:0}:host .tooltip{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip:rect(0, 0, 0, 0);pointer-events:none;font-family:inherit;font-size:0.875rem;text-transform:none;font-weight:normal;background:var(--wmcolor-tooltip-background);color:var(--wmcolor-tooltip-text);padding:0.375rem;line-height:normal;z-index:30;white-space:nowrap}:host .tooltip.hover{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;white-space:nowrap}:host .toggletip{position:absolute;max-width:13.75rem;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5rem 0.75rem;border-radius:0.1875rem;background:var(--wmcolor-toggletip-background);color:var(--wmcolor-toggletip-text);font-size:14px;z-index:30}:host .toggletip.top:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.bottom:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-right-color:var(--wmcolor-toggletip-background);border-right-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-left-width:0px;top:calc(50% - 6px);left:-0.1875rem}:host .toggletip.left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-left-color:var(--wmcolor-toggletip-background);border-left-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-right-width:0px;top:calc(50% - 6px);right:-0.1875rem}:host .toggletip.bottom-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.bottom-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.top-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.top-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.hidden{-webkit-transform:scale(0, 0) !important;transform:scale(0, 0) !important;visibility:hidden}:host .toggletip.top,:host .tooltip.top{-webkit-transform:translate(-50%, 0%);transform:translate(-50%, 0%);bottom:40px;left:20px}:host .toggletip.bottom,:host .tooltip.bottom{-webkit-transform:translate(-50%, 0%);transform:translate(-50%, 0%);top:40px;left:20px}:host .toggletip.right,:host .tooltip.right{-webkit-transform:translate(100%, calc(-50% - 20px));transform:translate(100%, calc(-50% - 20px));right:0px}:host .toggletip.left,:host .tooltip.left{-webkit-transform:translate(-100%, calc(-50% - 20px));transform:translate(-100%, calc(-50% - 20px));left:0px}:host .toggletip.bottom-right,:host .tooltip.bottom-right{top:40px;left:0px}:host .toggletip.bottom-left,:host .tooltip.bottom-left{top:40px;right:0px}:host .toggletip.top-right,:host .tooltip.top-right{bottom:40px;left:0px}:host .toggletip.top-left,:host .tooltip.top-left{bottom:40px;right:0px}: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 d=t("wm_toggletip",function(){function t(t){o(this,t);this.tooltipMessage=n.formatMessage({id:"toggletip.moreInformation",defaultMessage:"More information"});this.label=undefined;this.tooltip=undefined;this.tooltipText=undefined;this.tooltipPosition="bottom-right";this.isOpen=false;this.isTabbing=false}Object.defineProperty(t.prototype,"tempTooltip",{get:function(){return this.tooltip||this.tooltipText},enumerable:false,configurable:true});t.prototype.componentWillLoad=function(){var t=["top","right","bottom","left","top-right","top-left","bottom-right","bottom-left"];if(!this.label){console.error("wm-toggletip must have a label property")}if(!this.tempTooltip){console.error("wm-toggletip must have a tooltip property")}if(!t.includes(this.tooltipPosition)){console.error('wm-toggletip: tooltip-position has an invalid value of "'.concat(this.tooltipPosition,'", make sure to use one of the following values: ').concat(t))}if(this.tooltipText){console.warn("wm-toggletip: tooltip-text has been deprecated as of v3.1.0. Please use tooltip instead.")}};t.prototype.handleKeydown=function(t){switch(t.key){case"Escape":t.preventDefault();if(this.isOpen){t.stopPropagation();this.close()}break;case"Tab":if(this.isOpen){this.close()}}};t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleClick=function(t){if(this.isOpen){if(t.target===this.el||this.el.contains(t.target)){this.announceToggletip()}else{this.close()}}};t.prototype.open=function(){l();this.setToggletipPosition(this.tooltipPosition,this.el,this.toggletipEl.clientHeight,this.toggletipEl.clientWidth);this.isOpen=true;this.announceToggletip()};t.prototype.close=function(){this.isOpen=false;l()};t.prototype.handleBlur=function(){l();this.liveRegionEl.innerHTML=""};t.prototype.announceToggletip=function(){var t=this;this.liveRegionEl.innerHTML="";setTimeout((function(){t.liveRegionEl.innerHTML=t.tempTooltip}),10)};t.prototype.setToggletipPosition=function(t,o,e,i){if(t.includes("bottom")&&s(o,e)){t=t.replace("bottom","top")}else if(t.includes("top")&&p(o,e)){t=t.replace("top","bottom")}if(t.includes("left")&&a(o,i)){t=t.replace("left","right")}else if(t.includes("right")&&g(o,i)){t=t.replace("right","left")}};t.prototype.render=function(){var t=this;return e(i,null,e("button",{class:"button ".concat(this.isTabbing?"user-is-tabbing":""),type:"button","aria-label":this.label,onClick:function(){return t.open()},onMouseEnter:function(){return h(t.tooltipPosition,t.el,t.tooltipMessage)},onMouseLeave:function(){return l()},onFocus:function(){return h(t.tooltipPosition,t.el,t.tooltipMessage)},onBlur:function(){return t.handleBlur()}}),e("div",{ref:function(o){return t.toggletipEl=o},class:"toggletip ".concat(this.isOpen?"":"hidden"," ").concat(this.tooltipPosition)},this.tempTooltip),e("div",{ref:function(o){return t.liveRegionEl=o},class:"live-region sr-only",role:"status","aria-live":"polite","aria-atomic":"true"}))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());d.style=c}}}));
1
+ System.register(["./p-30bf24f8.system.js","./p-32d973fa.system.js"],(function(t){"use strict";var o,e,i,r,n,l,s,p,a,g,h;return{setters:[function(t){o=t.r;e=t.h;i=t.H;r=t.g},function(t){n=t.i;l=t.h;s=t.o;p=t.p;a=t.q;g=t.r;h=t.s}],execute:function(){var c=':host{--wmcolor-toggletip-background:var(--wmcolor-background-dark);--wmcolor-toggletip-icon-background:var(--wmcolor-background-dark);--wmcolor-toggletip-icon-text:var(--wmcolor-text-ondark);--wmcolor-toggletip-text:var(--wmcolor-text-ondark);display:inline-block;position:relative;height:40px;width:40px}:host .button{display:-ms-flexbox;display:flex;background:none;border:none;padding:0;width:inherit;height:inherit;border-radius:50%;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;position:relative;cursor:pointer}:host .button: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:"\\f2fc";font-size:16px;color:var(--wmcolor-toggletip-icon-background);background:radial-gradient(var(--wmcolor-toggletip-icon-text) 40%, transparent 0%)}:host .button:focus{outline:none}:host .button:focus.user-is-tabbing{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}:host .button:focus.user-is-tabbing::-moz-focus-inner{border:0}:host .tooltip{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip:rect(0, 0, 0, 0);pointer-events:none;font-family:inherit;font-size:0.875rem;text-transform:none;font-weight:normal;background:var(--wmcolor-tooltip-background);color:var(--wmcolor-tooltip-text);padding:0.375rem;line-height:normal;z-index:30;white-space:nowrap}:host .tooltip.hover{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;white-space:nowrap}:host .toggletip{position:absolute;max-width:13.75rem;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5rem 0.75rem;border-radius:0.1875rem;background:var(--wmcolor-toggletip-background);color:var(--wmcolor-toggletip-text);font-size:14px;z-index:30}:host .toggletip.top:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.bottom:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-right-color:var(--wmcolor-toggletip-background);border-right-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-left-width:0px;top:calc(50% - 6px);left:-0.1875rem}:host .toggletip.left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-left-color:var(--wmcolor-toggletip-background);border-left-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-right-width:0px;top:calc(50% - 6px);right:-0.1875rem}:host .toggletip.bottom-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.bottom-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.top-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.top-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.hidden{-webkit-transform:scale(0, 0) !important;transform:scale(0, 0) !important;visibility:hidden}:host .toggletip.top,:host .tooltip.top{-webkit-transform:translate(-50%, 0%);transform:translate(-50%, 0%);bottom:40px;left:20px}:host .toggletip.bottom,:host .tooltip.bottom{-webkit-transform:translate(-50%, 0%);transform:translate(-50%, 0%);top:40px;left:20px}:host .toggletip.right,:host .tooltip.right{-webkit-transform:translate(100%, calc(-50% - 20px));transform:translate(100%, calc(-50% - 20px));right:0px}:host .toggletip.left,:host .tooltip.left{-webkit-transform:translate(-100%, calc(-50% - 20px));transform:translate(-100%, calc(-50% - 20px));left:0px}:host .toggletip.bottom-right,:host .tooltip.bottom-right{top:40px;left:0px}:host .toggletip.bottom-left,:host .tooltip.bottom-left{top:40px;right:0px}:host .toggletip.top-right,:host .tooltip.top-right{bottom:40px;left:0px}:host .toggletip.top-left,:host .tooltip.top-left{bottom:40px;right:0px}: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 d=t("wm_toggletip",function(){function t(t){o(this,t);this.tooltipMessage=n.formatMessage({id:"toggletip.moreInformation",defaultMessage:"More information"});this.label=undefined;this.tooltip=undefined;this.tooltipText=undefined;this.tooltipPosition="bottom-right";this.isOpen=false;this.isTabbing=false}Object.defineProperty(t.prototype,"tempTooltip",{get:function(){return this.tooltip||this.tooltipText},enumerable:false,configurable:true});t.prototype.componentWillLoad=function(){var t=["top","right","bottom","left","top-right","top-left","bottom-right","bottom-left"];if(!this.label){console.error("wm-toggletip must have a label property")}if(!this.tempTooltip){console.error("wm-toggletip must have a tooltip property")}if(!t.includes(this.tooltipPosition)){console.error('wm-toggletip: tooltip-position has an invalid value of "'.concat(this.tooltipPosition,'", make sure to use one of the following values: ').concat(t))}if(this.tooltipText){console.warn("wm-toggletip: tooltip-text has been deprecated as of v3.1.0. Please use tooltip instead.")}};t.prototype.handleKeydown=function(t){switch(t.key){case"Escape":t.preventDefault();if(this.isOpen){t.stopPropagation();this.close()}break;case"Tab":if(this.isOpen){this.close()}}};t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleClick=function(t){if(this.isOpen){if(t.target===this.el||this.el.contains(t.target)){this.announceToggletip()}else{this.close()}}};t.prototype.open=function(){l();this.setToggletipPosition(this.tooltipPosition,this.el,this.toggletipEl.clientHeight,this.toggletipEl.clientWidth);this.isOpen=true;this.announceToggletip()};t.prototype.close=function(){this.isOpen=false;l()};t.prototype.handleBlur=function(){l();this.liveRegionEl.innerHTML=""};t.prototype.announceToggletip=function(){var t=this;this.liveRegionEl.innerHTML="";setTimeout((function(){t.liveRegionEl.innerHTML=t.tempTooltip}),10)};t.prototype.setToggletipPosition=function(t,o,e,i){if(t.includes("bottom")&&s(o,e)){t=t.replace("bottom","top")}else if(t.includes("top")&&p(o,e)){t=t.replace("top","bottom")}if(t.includes("left")&&a(o,i)){t=t.replace("left","right")}else if(t.includes("right")&&g(o,i)){t=t.replace("right","left")}};t.prototype.render=function(){var t=this;return e(i,null,e("button",{class:"button ".concat(this.isTabbing?"user-is-tabbing":""),type:"button","aria-label":this.label,onClick:function(){return t.open()},onMouseEnter:function(){return h(t.tooltipPosition,t.el,t.tooltipMessage)},onMouseLeave:function(){return l()},onFocus:function(){return h(t.tooltipPosition,t.el,t.tooltipMessage)},onBlur:function(){return t.handleBlur()}}),e("div",{ref:function(o){return t.toggletipEl=o},class:"toggletip ".concat(this.isOpen?"":"hidden"," ").concat(this.tooltipPosition)},this.tempTooltip),e("div",{ref:function(o){return t.liveRegionEl=o},class:"live-region sr-only",role:"status","aria-live":"polite","aria-atomic":"true"}))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());d.style=c}}}));