wcs-core 4.1.0 → 4.2.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 (171) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +59 -90
  3. package/dist/cjs/accessibility-e99b032d.js +68 -0
  4. package/dist/cjs/accessibility-e99b032d.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/wcs-checkbox.cjs.entry.js +1 -0
  7. package/dist/cjs/wcs-checkbox.cjs.entry.js.map +1 -1
  8. package/dist/cjs/wcs-counter.cjs.entry.js +1 -0
  9. package/dist/cjs/wcs-counter.cjs.entry.js.map +1 -1
  10. package/dist/cjs/wcs-dropdown.cjs.entry.js +3 -5
  11. package/dist/cjs/wcs-dropdown.cjs.entry.js.map +1 -1
  12. package/dist/cjs/wcs-grid.cjs.entry.js +1 -1
  13. package/dist/cjs/wcs-grid.cjs.entry.js.map +1 -1
  14. package/dist/cjs/wcs-input.cjs.entry.js +1 -3
  15. package/dist/cjs/wcs-input.cjs.entry.js.map +1 -1
  16. package/dist/cjs/wcs-modal.cjs.entry.js +68 -6
  17. package/dist/cjs/wcs-modal.cjs.entry.js.map +1 -1
  18. package/dist/cjs/wcs-native-select.cjs.entry.js +19 -0
  19. package/dist/cjs/wcs-native-select.cjs.entry.js.map +1 -1
  20. package/dist/cjs/wcs-radio-group.cjs.entry.js +48 -4
  21. package/dist/cjs/wcs-radio-group.cjs.entry.js.map +1 -1
  22. package/dist/cjs/wcs-radio.cjs.entry.js +17 -4
  23. package/dist/cjs/wcs-radio.cjs.entry.js.map +1 -1
  24. package/dist/cjs/wcs-tab.cjs.entry.js +1 -1
  25. package/dist/cjs/wcs-tab.cjs.entry.js.map +1 -1
  26. package/dist/cjs/wcs-tabs.cjs.entry.js +37 -1
  27. package/dist/cjs/wcs-tabs.cjs.entry.js.map +1 -1
  28. package/dist/cjs/wcs-textarea.cjs.entry.js +3 -2
  29. package/dist/cjs/wcs-textarea.cjs.entry.js.map +1 -1
  30. package/dist/cjs/wcs.cjs.js +1 -1
  31. package/dist/collection/collection-manifest.json +2 -2
  32. package/dist/collection/components/checkbox/checkbox.js +1 -0
  33. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  34. package/dist/collection/components/counter/counter.js +1 -0
  35. package/dist/collection/components/counter/counter.js.map +1 -1
  36. package/dist/collection/components/dropdown/dropdown.js +1 -0
  37. package/dist/collection/components/dropdown/dropdown.js.map +1 -1
  38. package/dist/collection/components/grid/grid.js +1 -1
  39. package/dist/collection/components/grid/grid.js.map +1 -1
  40. package/dist/collection/components/input/input.js +2 -4
  41. package/dist/collection/components/input/input.js.map +1 -1
  42. package/dist/collection/components/modal/modal.js +71 -6
  43. package/dist/collection/components/modal/modal.js.map +1 -1
  44. package/dist/collection/components/native-select/{native-select.component.js → native-select.js} +58 -7
  45. package/dist/collection/components/native-select/native-select.js.map +1 -0
  46. package/dist/collection/components/radio/radio.css +13 -1
  47. package/dist/collection/components/radio/{radio.component.js → radio.js} +37 -4
  48. package/dist/collection/components/radio/radio.js.map +1 -0
  49. package/dist/collection/components/radio-group/radio-group.js +60 -4
  50. package/dist/collection/components/radio-group/radio-group.js.map +1 -1
  51. package/dist/collection/components/tab/tab.js +1 -1
  52. package/dist/collection/components/tab/tab.js.map +1 -1
  53. package/dist/collection/components/tabs/tabs.js +54 -1
  54. package/dist/collection/components/tabs/tabs.js.map +1 -1
  55. package/dist/collection/components/textarea/textarea.js +8 -4
  56. package/dist/collection/components/textarea/textarea.js.map +1 -1
  57. package/dist/collection/utils/accessibility.js +58 -0
  58. package/dist/collection/utils/accessibility.js.map +1 -1
  59. package/dist/esm/accessibility-ffa12842.js +65 -0
  60. package/dist/esm/accessibility-ffa12842.js.map +1 -0
  61. package/dist/esm/{helpers-1f7170dd.js → helpers-1d55b67f.js} +2 -2
  62. package/dist/esm/{helpers-1f7170dd.js.map → helpers-1d55b67f.js.map} +1 -1
  63. package/dist/esm/loader.js +1 -1
  64. package/dist/esm/wcs-button.entry.js +1 -1
  65. package/dist/esm/wcs-checkbox.entry.js +1 -0
  66. package/dist/esm/wcs-checkbox.entry.js.map +1 -1
  67. package/dist/esm/wcs-com-nav-category.entry.js +1 -1
  68. package/dist/esm/wcs-com-nav-submenu.entry.js +1 -1
  69. package/dist/esm/wcs-com-nav.entry.js +1 -1
  70. package/dist/esm/wcs-counter.entry.js +2 -1
  71. package/dist/esm/wcs-counter.entry.js.map +1 -1
  72. package/dist/esm/wcs-dropdown-item.entry.js +1 -1
  73. package/dist/esm/wcs-dropdown.entry.js +3 -5
  74. package/dist/esm/wcs-dropdown.entry.js.map +1 -1
  75. package/dist/esm/wcs-galactic-menu.entry.js +1 -1
  76. package/dist/esm/wcs-grid.entry.js +1 -1
  77. package/dist/esm/wcs-grid.entry.js.map +1 -1
  78. package/dist/esm/wcs-input.entry.js +2 -4
  79. package/dist/esm/wcs-input.entry.js.map +1 -1
  80. package/dist/esm/wcs-modal.entry.js +69 -7
  81. package/dist/esm/wcs-modal.entry.js.map +1 -1
  82. package/dist/esm/wcs-native-select.entry.js +19 -0
  83. package/dist/esm/wcs-native-select.entry.js.map +1 -1
  84. package/dist/esm/wcs-nav-item.entry.js +1 -1
  85. package/dist/esm/wcs-radio-group.entry.js +48 -4
  86. package/dist/esm/wcs-radio-group.entry.js.map +1 -1
  87. package/dist/esm/wcs-radio.entry.js +18 -5
  88. package/dist/esm/wcs-radio.entry.js.map +1 -1
  89. package/dist/esm/wcs-select_2.entry.js +1 -1
  90. package/dist/esm/wcs-tab.entry.js +1 -1
  91. package/dist/esm/wcs-tab.entry.js.map +1 -1
  92. package/dist/esm/wcs-tabs.entry.js +37 -1
  93. package/dist/esm/wcs-tabs.entry.js.map +1 -1
  94. package/dist/esm/wcs-textarea.entry.js +4 -3
  95. package/dist/esm/wcs-textarea.entry.js.map +1 -1
  96. package/dist/esm/wcs.js +1 -1
  97. package/dist/types/components/input/input.d.ts +1 -3
  98. package/dist/types/components/modal/modal.d.ts +25 -5
  99. package/dist/types/components/native-select/{native-select.component.d.ts → native-select.d.ts} +22 -5
  100. package/dist/types/components/radio/{radio.component.d.ts → radio.d.ts} +2 -0
  101. package/dist/types/components/radio-group/radio-group.d.ts +3 -0
  102. package/dist/types/components/tabs/tabs.d.ts +13 -0
  103. package/dist/types/components/textarea/textarea.d.ts +2 -2
  104. package/dist/types/components.d.ts +74 -24
  105. package/dist/types/utils/accessibility.d.ts +2 -0
  106. package/dist/wcs/p-0f8db386.js +2 -0
  107. package/dist/wcs/p-0f8db386.js.map +1 -0
  108. package/dist/wcs/{p-4b4d53e2.entry.js → p-1f8c73eb.entry.js} +2 -2
  109. package/dist/wcs/{p-554ca93c.entry.js → p-2185bf8b.entry.js} +2 -2
  110. package/dist/wcs/{p-22480bd8.entry.js → p-2f63d6c5.entry.js} +2 -2
  111. package/dist/wcs/p-2f63d6c5.entry.js.map +1 -0
  112. package/dist/wcs/p-39821dd2.entry.js +2 -0
  113. package/dist/wcs/p-39821dd2.entry.js.map +1 -0
  114. package/dist/wcs/{p-84afb8af.entry.js → p-3b1fc676.entry.js} +2 -2
  115. package/dist/wcs/{p-12ac2547.js → p-3dc6b507.js} +2 -2
  116. package/dist/wcs/p-4ffe4539.entry.js +2 -0
  117. package/dist/wcs/p-4ffe4539.entry.js.map +1 -0
  118. package/dist/wcs/p-61cab06f.entry.js +2 -0
  119. package/dist/wcs/p-61cab06f.entry.js.map +1 -0
  120. package/dist/wcs/{p-15058c29.entry.js → p-6de70331.entry.js} +2 -2
  121. package/dist/wcs/p-6de70331.entry.js.map +1 -0
  122. package/dist/wcs/{p-b6cd196d.entry.js → p-7269272f.entry.js} +2 -2
  123. package/dist/wcs/{p-966a241e.entry.js → p-7519a270.entry.js} +2 -2
  124. package/dist/wcs/{p-6b66ce85.entry.js → p-8c4ed883.entry.js} +2 -2
  125. package/dist/wcs/p-8c4ed883.entry.js.map +1 -0
  126. package/dist/wcs/p-8fed8b1c.entry.js +2 -0
  127. package/dist/wcs/p-8fed8b1c.entry.js.map +1 -0
  128. package/dist/wcs/{p-d2da0c9f.entry.js → p-ac106663.entry.js} +2 -2
  129. package/dist/wcs/{p-d2da0c9f.entry.js.map → p-ac106663.entry.js.map} +1 -1
  130. package/dist/wcs/{p-b229a91c.entry.js → p-cb90bc3a.entry.js} +2 -2
  131. package/dist/wcs/{p-f82e7a61.entry.js → p-e348058b.entry.js} +2 -2
  132. package/dist/wcs/{p-405140f9.entry.js → p-ec84d6fd.entry.js} +2 -2
  133. package/dist/wcs/{p-26c4c983.entry.js → p-ed3132be.entry.js} +2 -2
  134. package/dist/wcs/p-ed3132be.entry.js.map +1 -0
  135. package/dist/wcs/p-f06f48f3.entry.js +2 -0
  136. package/dist/wcs/{p-6acbf38a.entry.js.map → p-f06f48f3.entry.js.map} +1 -1
  137. package/dist/wcs/p-f20b9024.entry.js +2 -0
  138. package/dist/wcs/p-f20b9024.entry.js.map +1 -0
  139. package/dist/wcs/p-f489793d.entry.js +2 -0
  140. package/dist/wcs/p-f489793d.entry.js.map +1 -0
  141. package/dist/wcs/wcs.esm.js +1 -1
  142. package/dist/wcs/wcs.esm.js.map +1 -1
  143. package/package.json +3 -2
  144. package/dist/collection/components/native-select/native-select.component.js.map +0 -1
  145. package/dist/collection/components/radio/radio.component.js.map +0 -1
  146. package/dist/wcs/p-069555a1.entry.js +0 -2
  147. package/dist/wcs/p-069555a1.entry.js.map +0 -1
  148. package/dist/wcs/p-07b8cd36.entry.js +0 -2
  149. package/dist/wcs/p-07b8cd36.entry.js.map +0 -1
  150. package/dist/wcs/p-15058c29.entry.js.map +0 -1
  151. package/dist/wcs/p-22480bd8.entry.js.map +0 -1
  152. package/dist/wcs/p-26c4c983.entry.js.map +0 -1
  153. package/dist/wcs/p-64dd7356.entry.js +0 -2
  154. package/dist/wcs/p-64dd7356.entry.js.map +0 -1
  155. package/dist/wcs/p-6acbf38a.entry.js +0 -2
  156. package/dist/wcs/p-6b66ce85.entry.js.map +0 -1
  157. package/dist/wcs/p-732b2faa.entry.js +0 -2
  158. package/dist/wcs/p-732b2faa.entry.js.map +0 -1
  159. package/dist/wcs/p-94d95b99.entry.js +0 -2
  160. package/dist/wcs/p-94d95b99.entry.js.map +0 -1
  161. package/dist/wcs/p-b856f2f6.entry.js +0 -2
  162. package/dist/wcs/p-b856f2f6.entry.js.map +0 -1
  163. /package/dist/wcs/{p-4b4d53e2.entry.js.map → p-1f8c73eb.entry.js.map} +0 -0
  164. /package/dist/wcs/{p-554ca93c.entry.js.map → p-2185bf8b.entry.js.map} +0 -0
  165. /package/dist/wcs/{p-84afb8af.entry.js.map → p-3b1fc676.entry.js.map} +0 -0
  166. /package/dist/wcs/{p-12ac2547.js.map → p-3dc6b507.js.map} +0 -0
  167. /package/dist/wcs/{p-b6cd196d.entry.js.map → p-7269272f.entry.js.map} +0 -0
  168. /package/dist/wcs/{p-966a241e.entry.js.map → p-7519a270.entry.js.map} +0 -0
  169. /package/dist/wcs/{p-b229a91c.entry.js.map → p-cb90bc3a.entry.js.map} +0 -0
  170. /package/dist/wcs/{p-f82e7a61.entry.js.map → p-e348058b.entry.js.map} +0 -0
  171. /package/dist/wcs/{p-405140f9.entry.js.map → p-ec84d6fd.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as e,h as r,g as t}from"./p-a2df3a49.js";import{w as i}from"./p-12ac2547.js";import{M as o}from"./p-04ad2b73.js";const a=["s","m","l"];function n(e){return a.includes(e)}const c='@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}:host{display:inline-block;--wcs-button-color:var(--wcs-contrast, var(--wcs-white, white));--wcs-button-background-color:var(--wcs-base, var(--wcs-primary, #0088CE));--wcs-button-ripple-color:var(--wcs-contrast, var(--wcs-white, white));--wcs-button-border-radius:var(--wcs-border-radius);--wcs-button-border-color:var(--wcs-base)}.wcs-inner-button:focus-visible{outline:2px dashed var(--wcs-primary);outline-offset:4px;border-radius:var(--wcs-button-border-radius)}:host([mode=clear]){--wcs-button-border-color:transparent}:host([mode=clear]) .wcs-inner-button{box-shadow:none}:host([mode=clear]),:host([mode=stroked]){--wcs-button-color:var(--wcs-base);--wcs-button-background-color:transparent}:host([mode=clear]) .wcs-inner-button::before,:host([mode=clear]) .wcs-inner-button::after,:host([mode=stroked]) .wcs-inner-button::before,:host([mode=stroked]) .wcs-inner-button::after{--wcs-button-ripple-color:var(--wcs-base)}:host([size=l]){--wcs-button-padding:var(--wcs-padding-m) var(--wcs-padding);--wcs-button-min-height:var(--wcs-size-l);--wcs-button-min-width:var(--wcs-size-l);--wcs-button-font-size:1.0625rem}:host([size=m]){--wcs-button-padding:var(--wcs-padding-m) var(--wcs-padding);--wcs-button-min-height:var(--wcs-size-m);--wcs-button-min-width:var(--wcs-size-m);--wcs-button-font-size:1rem}:host([size=s]){--wcs-button-padding:var(--wcs-padding-s) var(--wcs-padding);--wcs-button-min-height:var(--wcs-size-s);--wcs-button-min-width:var(--wcs-size-s);--wcs-button-font-size:0.9375rem}:host([shape=round]){--wcs-button-border-radius:2rem}:host([shape=round]) ::slotted(wcs-mat-icon){margin:calc(-1 * var(--wcs-padding))}:host([shape=square]){--wcs-button-padding:0}:host([shape=square]) ::slotted(wcs-mat-icon){margin:calc(-1 * var(--wcs-padding))}:host([shape=normal]) .wcs-inner-button{min-width:var(--wcs-button-min-width, unset);min-height:var(--wcs-button-min-height, unset)}:host([mode=stroked]) .wcs-inner-button{box-shadow:inset 0 0 0 1px var(--wcs-button-border-color)}:host([loading]){position:relative}:host([loading]) .wcs-inner-button>*:not(wcs-spinner){visibility:hidden;opacity:0}:host([loading]) wcs-spinner{height:calc(var(--wcs-button-min-height) / 2);width:calc(var(--wcs-button-min-width) / 2);position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}:host([disabled]),:host([loading]){--wcs-button-color:var(--wcs-text-disabled);cursor:not-allowed}:host([disabled]) :host(not[loading]),:host([loading]) :host(not[loading]){--wcs-button-background-color:var(--wcs-light)}:host([disabled]) .wcs-inner-button,:host([loading]) .wcs-inner-button{--wcs-button-border-color:var(--wcs-light);opacity:1;cursor:default;pointer-events:none}:host([disabled]):host([mode=clear]),:host([disabled]):host([disabled]),:host([loading]):host([mode=clear]),:host([loading]):host([disabled]){--wcs-button-background-color:transparent}.wcs-inner-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;display:flex;align-items:center;justify-content:center;width:100%;font-family:var(--wcs-font-sans-serif);background-color:var(--wcs-button-background-color);color:var(--wcs-button-color);padding:var(--wcs-button-padding);border-radius:var(--wcs-button-border-radius);border:none;overflow:hidden;outline:0;text-transform:none;margin:0;cursor:pointer;font-weight:500;text-align:center;white-space:nowrap;vertical-align:middle;user-select:none;font-size:var(--wcs-button-font-size);line-height:1.5;min-height:var(--wcs-button-min-height);min-width:var(--wcs-button-min-width);transition:color 175ms ease-in-out, background-color 175ms ease-in-out, box-shadow 175ms cubic-bezier(0.4, 0, 0.2, 1)}.wcs-inner-button::before,.wcs-inner-button::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.wcs-inner-button::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.wcs-inner-button::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.wcs-inner-button.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.wcs-inner-button.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.wcs-inner-button.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.wcs-inner-button.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.wcs-inner-button.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.wcs-inner-button::before,.wcs-inner-button::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.wcs-inner-button.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.wcs-inner-button:hover::before,.wcs-inner-button.mdc-ripple-surface--hover::before{opacity:0.1;opacity:var(--mdc-ripple-hover-opacity, 0.1)}.wcs-inner-button.mdc-ripple-upgraded--background-focused::before,.wcs-inner-button:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.wcs-inner-button:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.wcs-inner-button:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.3;opacity:var(--mdc-ripple-press-opacity, 0.3)}.wcs-inner-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.3)}.wcs-inner-button::before,.wcs-inner-button::after{background-color:white;background-color:var(--mdc-ripple-color, white)}.wcs-inner-button::before,.wcs-inner-button::after{background-color:var(--wcs-button-ripple-color)}.wcs-inner-button:focus{box-shadow:0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12), 0 1px 3px 0 rgba(0, 0, 0, 0.2)}.wcs-inner-button:hover{box-shadow:0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2)}a{text-decoration:none;box-sizing:border-box}button::-moz-focus-inner,a::-moz-focus-inner{border:0}';const s=class{constructor(r){e(this,r);this.type="button";this.href=undefined;this.target=undefined;this.disabled=false;this.ripple=true;this.size="m";this.shape="normal";this.mode="plain";this.loading=false}onClick(e){if(this.disabled||this.loading){e.stopImmediatePropagation()}if(this.type!=="button"&&i(this.el)){const r=this.el.closest("form");if(r){e.preventDefault();const t=window.document.createElement("button");t.type=this.type;t.style.display="none";r.appendChild(t);t.click();t.remove()}}}componentWillLoad(){if(!n(this.size)){console.error(`Invalid size value for wcs-button : "${this.size}". Must be one of "${a.join(", ")}"`);this.size="m"}}componentDidLoad(){this.mdcRipple=new o(this.el.shadowRoot.querySelector(".wcs-inner-button"))}enabledRippleEffect(){this.mdcRipple.disabled=false}disabledRippleEffect(){this.mdcRipple.disabled=true}getTagName(){return this.href!==undefined?"a":"button"}onRippleChange(){if(this.ripple){this.enabledRippleEffect()}else{this.disabledRippleEffect()}}render(){const e=this.getTagName();const t=this.href!==undefined?{href:this.href,role:"button",target:this.target}:{type:this.type};return r(e,Object.assign({},t,{class:"wcs-inner-button",disabled:this.disabled||this.loading}),this.loading&&r("wcs-spinner",null),r("slot",null))}static get delegatesFocus(){return true}get el(){return t(this)}static get watchers(){return{ripple:["onRippleChange"]}}};s.style=c;export{s as wcs_button};
2
- //# sourceMappingURL=p-b229a91c.entry.js.map
1
+ import{r as e,h as r,g as t}from"./p-a2df3a49.js";import{w as i}from"./p-3dc6b507.js";import{M as o}from"./p-04ad2b73.js";const a=["s","m","l"];function n(e){return a.includes(e)}const c='@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}:host{display:inline-block;--wcs-button-color:var(--wcs-contrast, var(--wcs-white, white));--wcs-button-background-color:var(--wcs-base, var(--wcs-primary, #0088CE));--wcs-button-ripple-color:var(--wcs-contrast, var(--wcs-white, white));--wcs-button-border-radius:var(--wcs-border-radius);--wcs-button-border-color:var(--wcs-base)}.wcs-inner-button:focus-visible{outline:2px dashed var(--wcs-primary);outline-offset:4px;border-radius:var(--wcs-button-border-radius)}:host([mode=clear]){--wcs-button-border-color:transparent}:host([mode=clear]) .wcs-inner-button{box-shadow:none}:host([mode=clear]),:host([mode=stroked]){--wcs-button-color:var(--wcs-base);--wcs-button-background-color:transparent}:host([mode=clear]) .wcs-inner-button::before,:host([mode=clear]) .wcs-inner-button::after,:host([mode=stroked]) .wcs-inner-button::before,:host([mode=stroked]) .wcs-inner-button::after{--wcs-button-ripple-color:var(--wcs-base)}:host([size=l]){--wcs-button-padding:var(--wcs-padding-m) var(--wcs-padding);--wcs-button-min-height:var(--wcs-size-l);--wcs-button-min-width:var(--wcs-size-l);--wcs-button-font-size:1.0625rem}:host([size=m]){--wcs-button-padding:var(--wcs-padding-m) var(--wcs-padding);--wcs-button-min-height:var(--wcs-size-m);--wcs-button-min-width:var(--wcs-size-m);--wcs-button-font-size:1rem}:host([size=s]){--wcs-button-padding:var(--wcs-padding-s) var(--wcs-padding);--wcs-button-min-height:var(--wcs-size-s);--wcs-button-min-width:var(--wcs-size-s);--wcs-button-font-size:0.9375rem}:host([shape=round]){--wcs-button-border-radius:2rem}:host([shape=round]) ::slotted(wcs-mat-icon){margin:calc(-1 * var(--wcs-padding))}:host([shape=square]){--wcs-button-padding:0}:host([shape=square]) ::slotted(wcs-mat-icon){margin:calc(-1 * var(--wcs-padding))}:host([shape=normal]) .wcs-inner-button{min-width:var(--wcs-button-min-width, unset);min-height:var(--wcs-button-min-height, unset)}:host([mode=stroked]) .wcs-inner-button{box-shadow:inset 0 0 0 1px var(--wcs-button-border-color)}:host([loading]){position:relative}:host([loading]) .wcs-inner-button>*:not(wcs-spinner){visibility:hidden;opacity:0}:host([loading]) wcs-spinner{height:calc(var(--wcs-button-min-height) / 2);width:calc(var(--wcs-button-min-width) / 2);position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}:host([disabled]),:host([loading]){--wcs-button-color:var(--wcs-text-disabled);cursor:not-allowed}:host([disabled]) :host(not[loading]),:host([loading]) :host(not[loading]){--wcs-button-background-color:var(--wcs-light)}:host([disabled]) .wcs-inner-button,:host([loading]) .wcs-inner-button{--wcs-button-border-color:var(--wcs-light);opacity:1;cursor:default;pointer-events:none}:host([disabled]):host([mode=clear]),:host([disabled]):host([disabled]),:host([loading]):host([mode=clear]),:host([loading]):host([disabled]){--wcs-button-background-color:transparent}.wcs-inner-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;display:flex;align-items:center;justify-content:center;width:100%;font-family:var(--wcs-font-sans-serif);background-color:var(--wcs-button-background-color);color:var(--wcs-button-color);padding:var(--wcs-button-padding);border-radius:var(--wcs-button-border-radius);border:none;overflow:hidden;outline:0;text-transform:none;margin:0;cursor:pointer;font-weight:500;text-align:center;white-space:nowrap;vertical-align:middle;user-select:none;font-size:var(--wcs-button-font-size);line-height:1.5;min-height:var(--wcs-button-min-height);min-width:var(--wcs-button-min-width);transition:color 175ms ease-in-out, background-color 175ms ease-in-out, box-shadow 175ms cubic-bezier(0.4, 0, 0.2, 1)}.wcs-inner-button::before,.wcs-inner-button::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.wcs-inner-button::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.wcs-inner-button::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.wcs-inner-button.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.wcs-inner-button.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.wcs-inner-button.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.wcs-inner-button.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.wcs-inner-button.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.wcs-inner-button::before,.wcs-inner-button::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.wcs-inner-button.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.wcs-inner-button:hover::before,.wcs-inner-button.mdc-ripple-surface--hover::before{opacity:0.1;opacity:var(--mdc-ripple-hover-opacity, 0.1)}.wcs-inner-button.mdc-ripple-upgraded--background-focused::before,.wcs-inner-button:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.wcs-inner-button:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.wcs-inner-button:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.3;opacity:var(--mdc-ripple-press-opacity, 0.3)}.wcs-inner-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.3)}.wcs-inner-button::before,.wcs-inner-button::after{background-color:white;background-color:var(--mdc-ripple-color, white)}.wcs-inner-button::before,.wcs-inner-button::after{background-color:var(--wcs-button-ripple-color)}.wcs-inner-button:focus{box-shadow:0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12), 0 1px 3px 0 rgba(0, 0, 0, 0.2)}.wcs-inner-button:hover{box-shadow:0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2)}a{text-decoration:none;box-sizing:border-box}button::-moz-focus-inner,a::-moz-focus-inner{border:0}';const s=class{constructor(r){e(this,r);this.type="button";this.href=undefined;this.target=undefined;this.disabled=false;this.ripple=true;this.size="m";this.shape="normal";this.mode="plain";this.loading=false}onClick(e){if(this.disabled||this.loading){e.stopImmediatePropagation()}if(this.type!=="button"&&i(this.el)){const r=this.el.closest("form");if(r){e.preventDefault();const t=window.document.createElement("button");t.type=this.type;t.style.display="none";r.appendChild(t);t.click();t.remove()}}}componentWillLoad(){if(!n(this.size)){console.error(`Invalid size value for wcs-button : "${this.size}". Must be one of "${a.join(", ")}"`);this.size="m"}}componentDidLoad(){this.mdcRipple=new o(this.el.shadowRoot.querySelector(".wcs-inner-button"))}enabledRippleEffect(){this.mdcRipple.disabled=false}disabledRippleEffect(){this.mdcRipple.disabled=true}getTagName(){return this.href!==undefined?"a":"button"}onRippleChange(){if(this.ripple){this.enabledRippleEffect()}else{this.disabledRippleEffect()}}render(){const e=this.getTagName();const t=this.href!==undefined?{href:this.href,role:"button",target:this.target}:{type:this.type};return r(e,Object.assign({},t,{class:"wcs-inner-button",disabled:this.disabled||this.loading}),this.loading&&r("wcs-spinner",null),r("slot",null))}static get delegatesFocus(){return true}get el(){return t(this)}static get watchers(){return{ripple:["onRippleChange"]}}};s.style=c;export{s as wcs_button};
2
+ //# sourceMappingURL=p-cb90bc3a.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as o,H as s,g as i}from"./p-a2df3a49.js";import{i as a,a as n}from"./p-12ac2547.js";const r=':host{display:block;padding-bottom:var(--wcs-padding);}:host .label-container{display:block;padding-left:calc(9 * var(--wcs-base-margin));color:var(--wcs-gray)}:host ::slotted(a):after{font-family:icons;padding-left:var(--wcs-base-margin);font-size:0.6rem;content:"\\f107";line-height:1;box-sizing:border-box}:host ::slotted(a){display:block;cursor:pointer;text-decoration:none;font-size:16px;color:var(--wcs-gray);padding-left:calc(12 * var(--wcs-base-margin));padding-top:calc(1.5 * var(--wcs-base-margin));padding-bottom:calc(1.5 * var(--wcs-base-margin))}:host ::slotted(a:focus-visible){outline:2px dashed var(--wcs-primary);outline-offset:0.1rem;border-radius:2px}@supports not selector(::slotted(a:focus-visible)){:host ::slotted(a:focus-within){outline:2px dashed var(--wcs-primary);outline-offset:0.1rem;border-radius:2px}}@media screen and (min-width: 576px){:host{padding-bottom:unset}:host .item-container:not([data-open]){display:none}:host .label:after{font-family:icons;padding-left:var(--wcs-base-margin);font-size:0.6rem;content:"\\f107";line-height:1;box-sizing:border-box}:host .label-container{cursor:pointer;user-select:none;display:flex;align-items:center;padding-left:unset;color:var(--wcs-white)}:host .label-container:focus-visible{outline:2px dashed var(--wcs-white);outline-offset:0.1rem;border-radius:5px}@supports not selector(.label-container:focus-visible){:host .label-container:focus-within{outline:2px dashed var(--wcs-white);outline-offset:0.1rem;border-radius:5px}}:host .label-container[data-open]:after{position:absolute;left:calc(50% + var(--wcs-com-content-max-width) / 8 - 0.5625rem);z-index:2;display:block;width:1.125rem;height:1.125rem;content:"";background-color:var(--wcs-primary);transform:rotate(45deg)}:host .item-container[data-open]{position:absolute;left:calc(50% + var(--wcs-com-content-max-width) / 8);top:0;right:0;padding:50px 0 50px 50px;background-blend-mode:multiply;background-color:rgba(0, 0, 0, 0.15);box-sizing:border-box;height:100%;display:flex;flex-direction:column;align-items:start}:host .item-container[data-open] ::slotted(a:not(:first-child)){margin-top:24px}:host .item-container[data-open] ::slotted(a){display:unset;color:var(--wcs-white);padding-left:unset;padding-top:unset;padding-bottom:unset}:host .item-container[data-open] ::slotted(a:focus-visible){outline:2px dashed var(--wcs-white);outline-offset:0.1rem;border-radius:2px}@supports not selector(::slotted(a:focus-visible)){:host .item-container[data-open] ::slotted(a:focus-within){outline:2px dashed var(--wcs-white);outline-offset:0.1rem;border-radius:2px}}}';const l=class{constructor(o){t(this,o);this.wcsCategoryOpened=e(this,"wcsCategoryOpened",7);this.wcsCategoryItemClicked=e(this,"wcsCategoryItemClicked",7);this.label=undefined;this.categoryOpen=false}onWindowClickEvent(t){if(this.categoryOpen)this.categoryOpen=false}onSubmenuOpened(t){if(t.detail.categoryElement!==this.el){this.categoryOpen=false}}handleMenuKeyDown(t){if(a(t)||n(t)){this.categoryOpen=!this.categoryOpen}}handleCategoryItemsKeyDown(t){if(a(t)||n(t)){this.handleItemClick(t)}}async close(){this.categoryOpen=false}async open(){this.categoryOpen=true}onClick(t){t.stopPropagation();this.wcsCategoryOpened.emit({categoryElement:this.el})}handleItemClick(t){if(t.target.tagName==="A"){this.close();this.wcsCategoryItemClicked.emit(t)}}render(){return o(s,{onClick:t=>this.onClick(t)},o("div",{tabindex:screen.width<576?"-1":"0",class:"label-container","data-open":this.categoryOpen,onKeyDown:t=>this.handleMenuKeyDown(t),onClick:t=>this.categoryOpen=!this.categoryOpen},o("span",{class:"label"},this.label)),o("div",{class:"item-container",tabIndex:-1,"data-open":this.categoryOpen,onKeyDown:t=>this.handleCategoryItemsKeyDown(t),onClick:t=>this.handleItemClick(t)},o("slot",null)))}get el(){return i(this)}};l.style=r;export{l as wcs_com_nav_category};
2
- //# sourceMappingURL=p-f82e7a61.entry.js.map
1
+ import{r as t,c as e,h as o,H as s,g as i}from"./p-a2df3a49.js";import{i as a,a as n}from"./p-3dc6b507.js";const r=':host{display:block;padding-bottom:var(--wcs-padding);}:host .label-container{display:block;padding-left:calc(9 * var(--wcs-base-margin));color:var(--wcs-gray)}:host ::slotted(a):after{font-family:icons;padding-left:var(--wcs-base-margin);font-size:0.6rem;content:"\\f107";line-height:1;box-sizing:border-box}:host ::slotted(a){display:block;cursor:pointer;text-decoration:none;font-size:16px;color:var(--wcs-gray);padding-left:calc(12 * var(--wcs-base-margin));padding-top:calc(1.5 * var(--wcs-base-margin));padding-bottom:calc(1.5 * var(--wcs-base-margin))}:host ::slotted(a:focus-visible){outline:2px dashed var(--wcs-primary);outline-offset:0.1rem;border-radius:2px}@supports not selector(::slotted(a:focus-visible)){:host ::slotted(a:focus-within){outline:2px dashed var(--wcs-primary);outline-offset:0.1rem;border-radius:2px}}@media screen and (min-width: 576px){:host{padding-bottom:unset}:host .item-container:not([data-open]){display:none}:host .label:after{font-family:icons;padding-left:var(--wcs-base-margin);font-size:0.6rem;content:"\\f107";line-height:1;box-sizing:border-box}:host .label-container{cursor:pointer;user-select:none;display:flex;align-items:center;padding-left:unset;color:var(--wcs-white)}:host .label-container:focus-visible{outline:2px dashed var(--wcs-white);outline-offset:0.1rem;border-radius:5px}@supports not selector(.label-container:focus-visible){:host .label-container:focus-within{outline:2px dashed var(--wcs-white);outline-offset:0.1rem;border-radius:5px}}:host .label-container[data-open]:after{position:absolute;left:calc(50% + var(--wcs-com-content-max-width) / 8 - 0.5625rem);z-index:2;display:block;width:1.125rem;height:1.125rem;content:"";background-color:var(--wcs-primary);transform:rotate(45deg)}:host .item-container[data-open]{position:absolute;left:calc(50% + var(--wcs-com-content-max-width) / 8);top:0;right:0;padding:50px 0 50px 50px;background-blend-mode:multiply;background-color:rgba(0, 0, 0, 0.15);box-sizing:border-box;height:100%;display:flex;flex-direction:column;align-items:start}:host .item-container[data-open] ::slotted(a:not(:first-child)){margin-top:24px}:host .item-container[data-open] ::slotted(a){display:unset;color:var(--wcs-white);padding-left:unset;padding-top:unset;padding-bottom:unset}:host .item-container[data-open] ::slotted(a:focus-visible){outline:2px dashed var(--wcs-white);outline-offset:0.1rem;border-radius:2px}@supports not selector(::slotted(a:focus-visible)){:host .item-container[data-open] ::slotted(a:focus-within){outline:2px dashed var(--wcs-white);outline-offset:0.1rem;border-radius:2px}}}';const l=class{constructor(o){t(this,o);this.wcsCategoryOpened=e(this,"wcsCategoryOpened",7);this.wcsCategoryItemClicked=e(this,"wcsCategoryItemClicked",7);this.label=undefined;this.categoryOpen=false}onWindowClickEvent(t){if(this.categoryOpen)this.categoryOpen=false}onSubmenuOpened(t){if(t.detail.categoryElement!==this.el){this.categoryOpen=false}}handleMenuKeyDown(t){if(a(t)||n(t)){this.categoryOpen=!this.categoryOpen}}handleCategoryItemsKeyDown(t){if(a(t)||n(t)){this.handleItemClick(t)}}async close(){this.categoryOpen=false}async open(){this.categoryOpen=true}onClick(t){t.stopPropagation();this.wcsCategoryOpened.emit({categoryElement:this.el})}handleItemClick(t){if(t.target.tagName==="A"){this.close();this.wcsCategoryItemClicked.emit(t)}}render(){return o(s,{onClick:t=>this.onClick(t)},o("div",{tabindex:screen.width<576?"-1":"0",class:"label-container","data-open":this.categoryOpen,onKeyDown:t=>this.handleMenuKeyDown(t),onClick:t=>this.categoryOpen=!this.categoryOpen},o("span",{class:"label"},this.label)),o("div",{class:"item-container",tabIndex:-1,"data-open":this.categoryOpen,onKeyDown:t=>this.handleCategoryItemsKeyDown(t),onClick:t=>this.handleItemClick(t)},o("slot",null)))}get el(){return i(this)}};l.style=r;export{l as wcs_com_nav_category};
2
+ //# sourceMappingURL=p-e348058b.entry.js.map
@@ -1,4 +1,4 @@
1
- import{h as t,r,c as e,H as i,g as n}from"./p-a2df3a49.js";import{S as s}from"./p-d6c3e615.js";import{m as a,l as o,a as c,n as f,i as u,o as l,p as d,q as h,s as p,t as v,e as m,b as y,u as g,v as w}from"./p-12ac2547.js";import{w as b}from"./p-8181f8cd.js";import{c as x}from"./p-314d3097.js";import{M as O}from"./p-04ad2b73.js";
1
+ import{h as t,r,c as e,H as i,g as n}from"./p-a2df3a49.js";import{S as s}from"./p-d6c3e615.js";import{s as a,l as o,a as c,n as f,i as u,q as l,o as d,p as h,t as p,u as v,e as m,b as y,m as g,v as w}from"./p-3dc6b507.js";import{w as b}from"./p-8181f8cd.js";import{c as x}from"./p-314d3097.js";import{M as O}from"./p-04ad2b73.js";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -13,4 +13,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
15
  ***************************************************************************** */var S=function(){S=Object.assign||function t(r){for(var e,i=1,n=arguments.length;i<n;i++){e=arguments[i];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))r[s]=e[s]}return r};return S.apply(this,arguments)};function k(t,r){var e={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0)e[i]=t[i];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var n=0,i=Object.getOwnPropertySymbols(t);n<i.length;n++){if(r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n]))e[i[n]]=t[i[n]]}return e}function j(t){var r=typeof Symbol==="function"&&Symbol.iterator,e=r&&t[r],i=0;if(e)return e.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&i>=t.length)t=void 0;return{value:t&&t[i++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function z(t,r){var e=typeof Symbol==="function"&&t[Symbol.iterator];if(!e)return t;var i=e.call(t),n,s=[],a;try{while((r===void 0||r-- >0)&&!(n=i.next()).done)s.push(n.value)}catch(t){a={error:t}}finally{try{if(n&&!n.done&&(e=i["return"]))e.call(i)}finally{if(a)throw a.error}}return s}function E(t,r,e){if(e||arguments.length===2)for(var i=0,n=r.length,s;i<n;i++){if(s||!(i in r)){if(!s)s=Array.prototype.slice.call(r,0,i);s[i]=r[i]}}return t.concat(s||Array.prototype.slice.call(r))}var C;(function(t){t["Start"]="xstate.start";t["Stop"]="xstate.stop";t["Raise"]="xstate.raise";t["Send"]="xstate.send";t["Cancel"]="xstate.cancel";t["NullEvent"]="";t["Assign"]="xstate.assign";t["After"]="xstate.after";t["DoneState"]="done.state";t["DoneInvoke"]="done.invoke";t["Log"]="xstate.log";t["Init"]="xstate.init";t["Invoke"]="xstate.invoke";t["ErrorExecution"]="error.execution";t["ErrorCommunication"]="error.communication";t["ErrorPlatform"]="error.platform";t["ErrorCustom"]="xstate.error";t["Update"]="xstate.update";t["Pure"]="xstate.pure";t["Choose"]="xstate.choose"})(C||(C={}));var _;(function(t){t["Parent"]="#_parent";t["Internal"]="#_internal"})(_||(_={}));var T=C.Start;var L=C.Stop;var N=C.Raise;var A=C.Send;var I=C.Cancel;var M=C.NullEvent;var D=C.Assign;var P=C.Log;var V=C.Init;var B=C.Invoke;var $=C.ErrorPlatform;var F=C.ErrorCustom;var J=C.Update;var U=C.Choose;var W=C.Pure;var K=".";var R={};var q="xstate.guard";var H="";var G;function Q(t,r,e){if(e===void 0){e=K}var i=tt(t,e);var n=tt(r,e);if(bt(n)){if(bt(i)){return n===i}return false}if(bt(i)){return i in n}return Object.keys(i).every((function(t){if(!(t in n)){return false}return Q(i[t],n[t])}))}function X(t){try{return bt(t)||typeof t==="number"?"".concat(t):t.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}}function Y(t,r){try{if(gt(t)){return t}return t.toString().split(r)}catch(r){throw new Error("'".concat(t,"' is not a valid state path."))}}function Z(t){return typeof t==="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function tt(t,r){if(Z(t)){return t.value}if(gt(t)){return rt(t)}if(typeof t!=="string"){return t}var e=Y(t,r);return rt(e)}function rt(t){if(t.length===1){return t[0]}var r={};var e=r;for(var i=0;i<t.length-1;i++){if(i===t.length-2){e[t[i]]=t[i+1]}else{e[t[i]]={};e=e[t[i]]}}return r}function et(t,r){var e={};var i=Object.keys(t);for(var n=0;n<i.length;n++){var s=i[n];e[s]=r(t[s],s,t,n)}return e}function it(t,r,e){var i,n;var s={};try{for(var a=j(Object.keys(t)),o=a.next();!o.done;o=a.next()){var c=o.value;var f=t[c];if(!e(f)){continue}s[c]=r(f,c,t)}}catch(t){i={error:t}}finally{try{if(o&&!o.done&&(n=a.return))n.call(a)}finally{if(i)throw i.error}}return s}var nt=function(t){return function(r){var e,i;var n=r;try{for(var s=j(t),a=s.next();!a.done;a=s.next()){var o=a.value;n=n[o]}}catch(t){e={error:t}}finally{try{if(a&&!a.done&&(i=s.return))i.call(s)}finally{if(e)throw e.error}}return n}};function st(t,r){return function(e){var i,n;var s=e;try{for(var a=j(t),o=a.next();!o.done;o=a.next()){var c=o.value;s=s[r][c]}}catch(t){i={error:t}}finally{try{if(o&&!o.done&&(n=a.return))n.call(a)}finally{if(i)throw i.error}}return s}}function at(t){if(!t){return[[]]}if(bt(t)){return[[t]]}var r=ot(Object.keys(t).map((function(r){var e=t[r];if(typeof e!=="string"&&(!e||!Object.keys(e).length)){return[[r]]}return at(t[r]).map((function(t){return[r].concat(t)}))})));return r}function ot(t){var r;return(r=[]).concat.apply(r,E([],z(t),false))}function ct(t){if(gt(t)){return t}return[t]}function ft(t){if(t===undefined){return[]}return ct(t)}function ut(t,r,e){var i,n;if(wt(t)){return t(r,e.data)}var s={};try{for(var a=j(Object.keys(t)),o=a.next();!o.done;o=a.next()){var c=o.value;var f=t[c];if(wt(f)){s[c]=f(r,e.data)}else{s[c]=f}}}catch(t){i={error:t}}finally{try{if(o&&!o.done&&(n=a.return))n.call(a)}finally{if(i)throw i.error}}return s}function lt(t){return/^(done|error)\./.test(t)}function dt(t){if(t instanceof Promise){return true}if(t!==null&&(wt(t)||typeof t==="object")&&wt(t.then)){return true}return false}function ht(t){return t!==null&&typeof t==="object"&&"transition"in t&&typeof t.transition==="function"}function pt(t,r){var e,i;var n=z([[],[]],2),s=n[0],a=n[1];try{for(var o=j(t),c=o.next();!c.done;c=o.next()){var f=c.value;if(r(f)){s.push(f)}else{a.push(f)}}}catch(t){e={error:t}}finally{try{if(c&&!c.done&&(i=o.return))i.call(o)}finally{if(e)throw e.error}}return[s,a]}function vt(t,r){return et(t.states,(function(t,e){if(!t){return undefined}var i=(bt(r)?undefined:r[e])||(t?t.current:undefined);if(!i){return undefined}return{current:i,states:vt(t,i)}}))}function mt(t,r){return{current:r,states:vt(t,r)}}function yt(t,r,e,i){var n=t?e.reduce((function(t,e){var n,s;var a=e.assignment;var o={state:i,action:e,_event:r};var c={};if(wt(a)){c=a(t,r.data,o)}else{try{for(var f=j(Object.keys(a)),u=f.next();!u.done;u=f.next()){var l=u.value;var d=a[l];c[l]=wt(d)?d(t,r.data,o):d}}catch(t){n={error:t}}finally{try{if(u&&!u.done&&(s=f.return))s.call(f)}finally{if(n)throw n.error}}}return Object.assign({},t,c)}),t):t;return n}function gt(t){return Array.isArray(t)}function wt(t){return typeof t==="function"}function bt(t){return typeof t==="string"}function xt(t,r){if(!t){return undefined}if(bt(t)){return{type:q,name:t,predicate:r?r[t]:undefined}}if(wt(t)){return{type:q,name:t.name,predicate:t}}return t}function Ot(t){try{return"subscribe"in t&&wt(t.subscribe)}catch(t){return false}}var St=function(){return typeof Symbol==="function"&&Symbol.observable||"@@observable"}();G={},G[St]=function(){return this},G[Symbol.observable]=function(){return this},G;function kt(t){return!!t&&"__xstatenode"in t}function jt(t){return!!t&&typeof t.send==="function"}function zt(t,r){if(bt(t)||typeof t==="number"){return S({type:t},r)}return t}function Et(t,r){if(!bt(t)&&"$$type"in t&&t.$$type==="scxml"){return t}var e=zt(t);return S({name:e.type,data:e,$$type:"scxml",type:"external"},r)}function Ct(t,r){var e=ct(r).map((function(r){if(typeof r==="undefined"||typeof r==="string"||kt(r)){return{target:r,event:t}}return S(S({},r),{event:t})}));return e}function _t(t){if(t===undefined||t===H){return undefined}return ft(t)}function Tt(t,r,e,i,n){var s=t.options.guards;var a={state:n,cond:r,_event:i};if(r.type===q){return((s===null||s===void 0?void 0:s[r.name])||r.predicate)(e,i.data,a)}var o=s===null||s===void 0?void 0:s[r.type];if(!o){throw new Error("Guard '".concat(r.type,"' is not implemented on machine '").concat(t.id,"'."))}return o(e,i.data,a)}function Lt(t){if(typeof t==="string"){return{type:t}}return t}function Nt(t,r,e){var i=function(){};var n=typeof t==="object";var s=n?t:null;return{next:((n?t.next:t)||i).bind(s),error:((n?t.error:r)||i).bind(s),complete:((n?t.complete:e)||i).bind(s)}}function At(t,r){return"".concat(t,":invocation[").concat(r,"]")}function It(t){return(t.type===N||t.type===A&&t.to===_.Internal)&&typeof t.delay!=="number"}var Mt=Et({type:V});function Dt(t,r){return r?r[t]||undefined:undefined}function Pt(t,r){var e;if(bt(t)||typeof t==="number"){var i=Dt(t,r);if(wt(i)){e={type:t,exec:i}}else if(i){e=i}else{e={type:t,exec:undefined}}}else if(wt(t)){e={type:t.name||t.toString(),exec:t}}else{var i=Dt(t.type,r);if(wt(i)){e=S(S({},t),{exec:i})}else if(i){var n=i.type||t.type;e=S(S(S({},i),t),{type:n})}else{e=t}}return e}var Vt=function(t,r){if(!t){return[]}var e=gt(t)?t:[t];return e.map((function(t){return Pt(t,r)}))};function Bt(t){var r=Pt(t);return S(S({id:bt(t)?t:r.id},r),{type:r.type})}function $t(t,r){return{type:N,event:typeof t==="function"?t:zt(t),delay:r?r.delay:undefined,id:r===null||r===void 0?void 0:r.id}}function Ft(t,r,e,i){var n={_event:e};var s=Et(wt(t.event)?t.event(r,e.data,n):t.event);var a;if(bt(t.delay)){var o=i&&i[t.delay];a=wt(o)?o(r,e.data,n):o}else{a=wt(t.delay)?t.delay(r,e.data,n):t.delay}return S(S({},t),{type:N,_event:s,delay:a})}function Jt(t,r){return{to:r?r.to:undefined,type:A,event:wt(t)?t:zt(t),delay:r?r.delay:undefined,id:r&&r.id!==undefined?r.id:wt(t)?t.name:X(t)}}function Ut(t,r,e,i){var n={_event:e};var s=Et(wt(t.event)?t.event(r,e.data,n):t.event);var a;if(bt(t.delay)){var o=i&&i[t.delay];a=wt(o)?o(r,e.data,n):o}else{a=wt(t.delay)?t.delay(r,e.data,n):t.delay}var c=wt(t.to)?t.to(r,e.data,n):t.to;return S(S({},t),{to:c,_event:s,event:s.data,delay:a})}var Wt=function(t,r,e){return S(S({},t),{value:bt(t.expr)?t.expr:t.expr(r,e.data,{_event:e})})};var Kt=function(t){return{type:I,sendId:t}};function Rt(t){var r=Bt(t);return{type:C.Start,activity:r,exec:undefined}}function qt(t){var r=wt(t)?t:Bt(t);return{type:C.Stop,activity:r,exec:undefined}}function Ht(t,r,e){var i=wt(t.activity)?t.activity(r,e.data):t.activity;var n=typeof i==="string"?{id:i}:i;var s={type:C.Stop,activity:n};return s}function Gt(t,r){var e=r?"#".concat(r):"";return"".concat(C.After,"(").concat(t,")").concat(e)}function Qt(t,r){var e="".concat(C.DoneState,".").concat(t);var i={type:e,data:r};i.toString=function(){return e};return i}function Xt(t,r){var e="".concat(C.DoneInvoke,".").concat(t);var i={type:e,data:r};i.toString=function(){return e};return i}function Yt(t,r){var e="".concat(C.ErrorPlatform,".").concat(t);var i={type:e,data:r};i.toString=function(){return e};return i}var Zt=function(t){var r,e;var i=[];try{for(var n=j(t),s=n.next();!s.done;s=n.next()){var a=s.value;var o=0;while(o<a.actions.length){if(a.actions[o].type===D){i.push(a.actions[o]);a.actions.splice(o,1);continue}o++}}}catch(t){r={error:t}}finally{try{if(s&&!s.done&&(e=n.return))e.call(n)}finally{if(r)throw r.error}}return i};function tr(t,r,e,i,n,s,a){if(a===void 0){a=false}var o=a?[]:Zt(n);var c=o.length?yt(e,i,o,r):e;var f=a?[e]:undefined;var u=[];function l(n,o){var l;switch(o.type){case N:{var d=Ft(o,c,i,t.options.delays);if(s&&typeof d.delay==="number"){s(d,c,i)}return d}case A:var h=Ut(o,c,i,t.options.delays);if(s&&h.to!==_.Internal){if(n==="entry"){u.push(h)}else{s(h,c,i)}}return h;case P:{var p=Wt(o,c,i);s===null||s===void 0?void 0:s(p,c,i);return p}case U:{var v=o;var m=(l=v.conds.find((function(e){var n=xt(e.cond,t.options.guards);return!n||Tt(t,n,c,i,!s?r:undefined)})))===null||l===void 0?void 0:l.actions;if(!m){return[]}var y=z(tr(t,r,c,i,[{type:n,actions:Vt(ft(m),t.options.actions)}],s,a),2),g=y[0],w=y[1];c=w;f===null||f===void 0?void 0:f.push(c);return g}case W:{var m=o.get(c,i.data);if(!m){return[]}var b=z(tr(t,r,c,i,[{type:n,actions:Vt(ft(m),t.options.actions)}],s,a),2),x=b[0],O=b[1];c=O;f===null||f===void 0?void 0:f.push(c);return x}case L:{var p=Ht(o,c,i);s===null||s===void 0?void 0:s(p,e,i);return p}case D:{c=yt(c,i,[o],!s?r:undefined);f===null||f===void 0?void 0:f.push(c);break}default:var k=Pt(o,t.options.actions);var j=k.exec;if(s){s(k,c,i)}else if(j&&f){var C=f.length-1;var T=S(S({},k),{exec:function(t){var r=[];for(var e=1;e<arguments.length;e++){r[e-1]=arguments[e]}j.apply(void 0,E([f[C]],z(r),false))}});k=T}return k}}function d(t){var r,e;var n=[];try{for(var a=j(t.actions),o=a.next();!o.done;o=a.next()){var f=o.value;var d=l(t.type,f);if(d){n=n.concat(d)}}}catch(t){r={error:t}}finally{try{if(o&&!o.done&&(e=a.return))e.call(a)}finally{if(r)throw r.error}}u.forEach((function(t){s(t,c,i)}));u.length=0;return n}var h=ot(n.map(d));return[h,c]}var rr=function(t,r){var e=r(t);return e};function er(t){var r;return r={id:t,send:function(){return void 0},subscribe:function(){return{unsubscribe:function(){return void 0}}},getSnapshot:function(){return undefined},toJSON:function(){return{id:t}}},r[St]=function(){return this},r}function ir(t,r,e,i){var n;var s=Lt(t.src);var a=(n=r===null||r===void 0?void 0:r.options.services)===null||n===void 0?void 0:n[s.type];var o=t.data?ut(t.data,e,i):undefined;var c=a?nr(a,t.id,o):er(t.id);c.meta=t;return c}function nr(t,r,e){var i=er(r);i.deferred=true;if(kt(t)){var n=i.state=rr(undefined,(function(){return(e?t.withContext(e):t).initialState}));i.getSnapshot=function(){return n}}return i}function sr(t){try{return typeof t.send==="function"}catch(t){return false}}function ar(t){return sr(t)&&"id"in t}function or(t){var r;return S((r={subscribe:function(){return{unsubscribe:function(){return void 0}}},id:"anonymous",getSnapshot:function(){return undefined}},r[St]=function(){return this},r),t)}var cr=function(t){return t.type==="atomic"||t.type==="final"};function fr(t){return Object.keys(t.states).map((function(r){return t.states[r]}))}function ur(t){return fr(t).filter((function(t){return t.type!=="history"}))}function lr(t){var r=[t];if(cr(t)){return r}return r.concat(ot(ur(t).map(lr)))}function dr(t,r){var e,i,n,s,a,o,c,f;var u=new Set(t);var l=pr(u);var d=new Set(r);try{for(var h=j(d),p=h.next();!p.done;p=h.next()){var v=p.value;var m=v.parent;while(m&&!d.has(m)){d.add(m);m=m.parent}}}catch(t){e={error:t}}finally{try{if(p&&!p.done&&(i=h.return))i.call(h)}finally{if(e)throw e.error}}var y=pr(d);try{for(var g=j(d),w=g.next();!w.done;w=g.next()){var v=w.value;if(v.type==="compound"&&(!y.get(v)||!y.get(v).length)){if(l.get(v)){l.get(v).forEach((function(t){return d.add(t)}))}else{v.initialStateNodes.forEach((function(t){return d.add(t)}))}}else{if(v.type==="parallel"){try{for(var b=(a=void 0,j(ur(v))),x=b.next();!x.done;x=b.next()){var O=x.value;if(!d.has(O)){d.add(O);if(l.get(O)){l.get(O).forEach((function(t){return d.add(t)}))}else{O.initialStateNodes.forEach((function(t){return d.add(t)}))}}}}catch(t){a={error:t}}finally{try{if(x&&!x.done&&(o=b.return))o.call(b)}finally{if(a)throw a.error}}}}}}catch(t){n={error:t}}finally{try{if(w&&!w.done&&(s=g.return))s.call(g)}finally{if(n)throw n.error}}try{for(var S=j(d),k=S.next();!k.done;k=S.next()){var v=k.value;var m=v.parent;while(m&&!d.has(m)){d.add(m);m=m.parent}}}catch(t){c={error:t}}finally{try{if(k&&!k.done&&(f=S.return))f.call(S)}finally{if(c)throw c.error}}return d}function hr(t,r){var e=r.get(t);if(!e){return{}}if(t.type==="compound"){var i=e[0];if(i){if(cr(i)){return i.key}}else{return{}}}var n={};e.forEach((function(t){n[t.key]=hr(t,r)}));return n}function pr(t){var r,e;var i=new Map;try{for(var n=j(t),s=n.next();!s.done;s=n.next()){var a=s.value;if(!i.has(a)){i.set(a,[])}if(a.parent){if(!i.has(a.parent)){i.set(a.parent,[])}i.get(a.parent).push(a)}}}catch(t){r={error:t}}finally{try{if(s&&!s.done&&(e=n.return))e.call(n)}finally{if(r)throw r.error}}return i}function vr(t,r){var e=dr([t],r);return hr(t,pr(e))}function mr(t,r){if(Array.isArray(t)){return t.some((function(t){return t===r}))}if(t instanceof Set){return t.has(r)}return false}function yr(t){return E([],z(new Set(ot(E([],z(t.map((function(t){return t.ownEvents}))),false)))),false)}function gr(t,r){if(r.type==="compound"){return ur(r).some((function(r){return r.type==="final"&&mr(t,r)}))}if(r.type==="parallel"){return ur(r).every((function(r){return gr(t,r)}))}return false}function wr(t){if(t===void 0){t=[]}return t.reduce((function(t,r){if(r.meta!==undefined){t[r.id]=r.meta}return t}),{})}function br(t){return new Set(ot(t.map((function(t){return t.tags}))))}function xr(t,r){if(t===r){return true}if(t===undefined||r===undefined){return false}if(bt(t)||bt(r)){return t===r}var e=Object.keys(t);var i=Object.keys(r);return e.length===i.length&&e.every((function(e){return xr(t[e],r[e])}))}function Or(t){if(typeof t!=="object"||t===null){return false}return"value"in t&&"_event"in t}function Sr(t,r){var e=t.exec;var i=S(S({},t),{exec:e!==undefined?function(){return e(r.context,r.event,{action:t,state:r,_event:r._event})}:undefined});return i}var kr=function(){function t(t){var r=this;var e;this.actions=[];this.activities=R;this.meta={};this.events=[];this.value=t.value;this.context=t.context;this._event=t._event;this._sessionid=t._sessionid;this.event=this._event.data;this.historyValue=t.historyValue;this.history=t.history;this.actions=t.actions||[];this.activities=t.activities||R;this.meta=wr(t.configuration);this.events=t.events||[];this.matches=this.matches.bind(this);this.toStrings=this.toStrings.bind(this);this.configuration=t.configuration;this.transitions=t.transitions;this.children=t.children;this.done=!!t.done;this.tags=(e=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&e!==void 0?e:new Set;this.machine=t.machine;Object.defineProperty(this,"nextEvents",{get:function(){return yr(r.configuration)}})}t.from=function(r,e){if(r instanceof t){if(r.context!==e){return new t({value:r.value,context:e,_event:r._event,_sessionid:null,historyValue:r.historyValue,history:r.history,actions:[],activities:r.activities,meta:{},events:[],configuration:[],transitions:[],children:{}})}return r}var i=Mt;return new t({value:r,context:e,_event:i,_sessionid:null,historyValue:undefined,history:undefined,actions:[],activities:undefined,meta:undefined,events:[],configuration:[],transitions:[],children:{}})};t.create=function(r){return new t(r)};t.inert=function(r,e){if(r instanceof t){if(!r.actions.length){return r}var i=Mt;return new t({value:r.value,context:e,_event:i,_sessionid:null,historyValue:r.historyValue,history:r.history,activities:r.activities,configuration:r.configuration,transitions:[],children:{}})}return t.from(r,e)};t.prototype.toStrings=function(t,r){var e=this;if(t===void 0){t=this.value}if(r===void 0){r="."}if(bt(t)){return[t]}var i=Object.keys(t);return i.concat.apply(i,E([],z(i.map((function(i){return e.toStrings(t[i],r).map((function(t){return i+r+t}))}))),false))};t.prototype.toJSON=function(){var t=this;var r=t.tags;var e=k(t,["configuration","transitions","tags","machine"]);return S(S({},e),{tags:Array.from(r)})};t.prototype.matches=function(t){return Q(t,this.value)};t.prototype.hasTag=function(t){return this.tags.has(t)};t.prototype.can=function(t){var r;var e=(r=this.machine)===null||r===void 0?void 0:r.getTransitionData(this,t);return!!(e===null||e===void 0?void 0:e.transitions.length)&&e.transitions.some((function(t){return t.target!==undefined||t.actions.length}))};return t}();var jr={deferEvents:false};var zr=function(){function t(t){this.processingEvent=false;this.queue=[];this.initialized=false;this.options=S(S({},jr),t)}t.prototype.initialize=function(t){this.initialized=true;if(t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()};t.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0){throw new Error("Event queue should be empty when it is not processing events")}this.process(t);this.flushEvents()};t.prototype.clear=function(){this.queue=[]};t.prototype.flushEvents=function(){var t=this.queue.shift();while(t){this.process(t);t=this.queue.shift()}};t.prototype.process=function(t){this.processingEvent=true;try{t()}catch(t){this.clear();throw t}finally{this.processingEvent=false}};return t}();var Er=new Map;var Cr=0;var _r={bookId:function(){return"x:".concat(Cr++)},register:function(t,r){Er.set(t,r);return t},get:function(t){return Er.get(t)},free:function(t){Er.delete(t)}};function Tr(){if(typeof globalThis!=="undefined"){return globalThis}if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}}function Lr(){var t=Tr();if(t&&"__xstate__"in t){return t.__xstate__}return undefined}function Nr(t){if(!Tr()){return}var r=Lr();if(r){r.register(t)}}function Ar(t,r){if(r===void 0){r={}}var e=t.initialState;var i=new Set;var n=[];var s=false;var a=function(){if(s){return}s=true;while(n.length>0){var r=n.shift();e=t.transition(e,r,c);i.forEach((function(t){return t.next(e)}))}s=false};var o=or({id:r.id,send:function(t){n.push(t);a()},getSnapshot:function(){return e},subscribe:function(t,r,n){var s=Nt(t,r,n);i.add(s);s.next(e);return{unsubscribe:function(){i.delete(s)}}}});var c={parent:r.parent,self:o,id:r.id||"anonymous",observers:i};e=t.start?t.start(c):e;return o}var Ir={sync:false,autoForward:false};var Mr;(function(t){t[t["NotStarted"]=0]="NotStarted";t[t["Running"]=1]="Running";t[t["Stopped"]=2]="Stopped"})(Mr||(Mr={}));var Dr=function(){function t(r,e){if(e===void 0){e=t.defaultOptions}var i=this;this.machine=r;this.delayedEventsMap={};this.listeners=new Set;this.contextListeners=new Set;this.stopListeners=new Set;this.doneListeners=new Set;this.eventListeners=new Set;this.sendListeners=new Set;this.initialized=false;this.status=Mr.NotStarted;this.children=new Map;this.forwardTo=new Set;this._outgoingQueue=[];this.init=this.start;this.send=function(t,r){if(gt(t)){i.batch(t);return i.state}var e=Et(zt(t,r));if(i.status===Mr.Stopped){return i.state}if(i.status!==Mr.Running&&!i.options.deferEvents){throw new Error('Event "'.concat(e.name,'" was sent to uninitialized service "').concat(i.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(e.data)))}i.scheduler.schedule((function(){i.forward(e);var t=i._nextState(e);i.update(t,e)}));return i._state};this.sendTo=function(t,r,e){var n=i.parent&&(r===_.Parent||i.parent.id===r);var s=n?i.parent:bt(r)?r===_.Internal?i:i.children.get(r)||_r.get(r):jt(r)?r:undefined;if(!s){if(!n){throw new Error("Unable to send event to child '".concat(r,"' from service '").concat(i.id,"'."))}return}if("machine"in s){if(i.status!==Mr.Stopped||i.parent!==s||i.state.done){var a=S(S({},t),{name:t.name===F?"".concat(Yt(i.id)):t.name,origin:i.sessionId});if(!e&&i.machine.config.predictableActionArguments){i._outgoingQueue.push([s,a])}else{s.send(a)}}}else{if(!e&&i.machine.config.predictableActionArguments){i._outgoingQueue.push([s,t.data])}else{s.send(t.data)}}};this._exec=function(t,r,e,n){if(n===void 0){n=i.machine.options.actions}var s=t.exec||Dt(t.type,n);var a=wt(s)?s:s?s.exec:t.exec;if(a){try{return a(r,e.data,!i.machine.config.predictableActionArguments?{action:t,state:i.state,_event:e}:{action:t,_event:e})}catch(t){if(i.parent){i.parent.send({type:"xstate.error",data:t})}throw t}}switch(t.type){case N:{var o=t;i.defer(o);break}case A:var c=t;if(typeof c.delay==="number"){i.defer(c);return}else{if(c.to){i.sendTo(c._event,c.to,e===Mt)}else{i.send(c._event)}}break;case I:i.cancel(t.sendId);break;case T:{if(i.status!==Mr.Running){return}var f=t.activity;if(!i.machine.config.predictableActionArguments&&!i.state.activities[f.id||f.type]){break}if(f.type===C.Invoke){var u=Lt(f.src);var l=i.machine.options.services?i.machine.options.services[u.type]:undefined;var d=f.id,h=f.data;var p="autoForward"in f?f.autoForward:!!f.forward;if(!l){return}var v=h?ut(h,r,e):undefined;if(typeof l==="string"){return}var m=wt(l)?l(r,e.data,{data:v,src:u,meta:f.meta}):l;if(!m){return}var y=void 0;if(kt(m)){m=v?m.withContext(v):m;y={autoForward:p}}i.spawn(m,d,y)}else{i.spawnActivity(f)}break}case L:{i.stopChild(t.activity.id);break}case P:var g=t,w=g.label,b=g.value;if(w){i.logger(w,b)}else{i.logger(b)}break}};var n=S(S({},t.defaultOptions),e);var s=n.clock,a=n.logger,o=n.parent,c=n.id;var f=c!==undefined?c:r.id;this.id=f;this.logger=a;this.clock=s;this.parent=o;this.options=n;this.scheduler=new zr({deferEvents:this.options.deferEvents});this.sessionId=_r.bookId()}Object.defineProperty(t.prototype,"initialState",{get:function(){var t=this;if(this._initialState){return this._initialState}return rr(this,(function(){t._initialState=t.machine.initialState;return t._initialState}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:false,configurable:true});t.prototype.execute=function(t,r){var e,i;try{for(var n=j(t.actions),s=n.next();!s.done;s=n.next()){var a=s.value;this.exec(a,t,r)}}catch(t){e={error:t}}finally{try{if(s&&!s.done&&(i=n.return))i.call(n)}finally{if(e)throw e.error}}};t.prototype.update=function(t,r){var e,i,n,s,a,o,c,f;var u=this;t._sessionid=this.sessionId;this._state=t;if((!this.machine.config.predictableActionArguments||r===Mt)&&this.options.execute){this.execute(this.state)}else{var l=void 0;while(l=this._outgoingQueue.shift()){l[0].send(l[1])}}this.children.forEach((function(t){u.state.children[t.id]=t}));if(this.devTools){this.devTools.send(r.data,t)}if(t.event){try{for(var d=j(this.eventListeners),h=d.next();!h.done;h=d.next()){var p=h.value;p(t.event)}}catch(t){e={error:t}}finally{try{if(h&&!h.done&&(i=d.return))i.call(d)}finally{if(e)throw e.error}}}try{for(var v=j(this.listeners),m=v.next();!m.done;m=v.next()){var p=m.value;p(t,t.event)}}catch(t){n={error:t}}finally{try{if(m&&!m.done&&(s=v.return))s.call(v)}finally{if(n)throw n.error}}try{for(var y=j(this.contextListeners),g=y.next();!g.done;g=y.next()){var w=g.value;w(this.state.context,this.state.history?this.state.history.context:undefined)}}catch(t){a={error:t}}finally{try{if(g&&!g.done&&(o=y.return))o.call(y)}finally{if(a)throw a.error}}if(this.state.done){var b=t.configuration.find((function(t){return t.type==="final"&&t.parent===u.machine}));var x=b&&b.doneData?ut(b.doneData,t.context,r):undefined;this._doneEvent=Xt(this.id,x);try{for(var O=j(this.doneListeners),S=O.next();!S.done;S=O.next()){var p=S.value;p(this._doneEvent)}}catch(t){c={error:t}}finally{try{if(S&&!S.done&&(f=O.return))f.call(O)}finally{if(c)throw c.error}}this._stop();this._stopChildren();_r.free(this.sessionId)}};t.prototype.onTransition=function(t){this.listeners.add(t);if(this.status===Mr.Running){t(this.state,this.state.event)}return this};t.prototype.subscribe=function(t,r,e){var i=this;var n=Nt(t,r,e);this.listeners.add(n.next);if(this.status!==Mr.NotStarted){n.next(this.state)}var s=function(){i.doneListeners.delete(s);i.stopListeners.delete(s);n.complete()};if(this.status===Mr.Stopped){n.complete()}else{this.onDone(s);this.onStop(s)}return{unsubscribe:function(){i.listeners.delete(n.next);i.doneListeners.delete(s);i.stopListeners.delete(s)}}};t.prototype.onEvent=function(t){this.eventListeners.add(t);return this};t.prototype.onSend=function(t){this.sendListeners.add(t);return this};t.prototype.onChange=function(t){this.contextListeners.add(t);return this};t.prototype.onStop=function(t){this.stopListeners.add(t);return this};t.prototype.onDone=function(t){if(this.status===Mr.Stopped&&this._doneEvent){t(this._doneEvent)}else{this.doneListeners.add(t)}return this};t.prototype.off=function(t){this.listeners.delete(t);this.eventListeners.delete(t);this.sendListeners.delete(t);this.stopListeners.delete(t);this.doneListeners.delete(t);this.contextListeners.delete(t);return this};t.prototype.start=function(t){var r=this;if(this.status===Mr.Running){return this}this.machine._init();_r.register(this.sessionId,this);this.initialized=true;this.status=Mr.Running;var e=t===undefined?this.initialState:rr(this,(function(){return Or(t)?r.machine.resolveState(t):r.machine.resolveState(kr.from(t,r.machine.context))}));if(this.options.devTools){this.attachDev()}this.scheduler.initialize((function(){r.update(e,Mt)}));return this};t.prototype._stopChildren=function(){this.children.forEach((function(t){if(wt(t.stop)){t.stop()}}));this.children.clear()};t.prototype._stop=function(){var t,r,e,i,n,s,a,o,c,f;try{for(var u=j(this.listeners),l=u.next();!l.done;l=u.next()){var d=l.value;this.listeners.delete(d)}}catch(r){t={error:r}}finally{try{if(l&&!l.done&&(r=u.return))r.call(u)}finally{if(t)throw t.error}}try{for(var h=j(this.stopListeners),p=h.next();!p.done;p=h.next()){var d=p.value;d();this.stopListeners.delete(d)}}catch(t){e={error:t}}finally{try{if(p&&!p.done&&(i=h.return))i.call(h)}finally{if(e)throw e.error}}try{for(var v=j(this.contextListeners),m=v.next();!m.done;m=v.next()){var d=m.value;this.contextListeners.delete(d)}}catch(t){n={error:t}}finally{try{if(m&&!m.done&&(s=v.return))s.call(v)}finally{if(n)throw n.error}}try{for(var y=j(this.doneListeners),g=y.next();!g.done;g=y.next()){var d=g.value;this.doneListeners.delete(d)}}catch(t){a={error:t}}finally{try{if(g&&!g.done&&(o=y.return))o.call(y)}finally{if(a)throw a.error}}if(!this.initialized){return this}this.initialized=false;this.status=Mr.Stopped;this._initialState=undefined;try{for(var w=j(Object.keys(this.delayedEventsMap)),b=w.next();!b.done;b=w.next()){var x=b.value;this.clock.clearTimeout(this.delayedEventsMap[x])}}catch(t){c={error:t}}finally{try{if(b&&!b.done&&(f=w.return))f.call(w)}finally{if(c)throw c.error}}this.scheduler.clear();this.scheduler=new zr({deferEvents:this.options.deferEvents})};t.prototype.stop=function(){var t=this;var r=this.scheduler;this._stop();r.schedule((function(){var r=Et({type:"xstate.stop"});var e=rr(t,(function(){var e=ot(E([],z(t.state.configuration),false).sort((function(t,r){return r.order-t.order})).map((function(r){return Vt(r.onExit,t.machine.options.actions)})));var i=z(tr(t.machine,t.state,t.state.context,r,[{type:"exit",actions:e}],t.machine.config.predictableActionArguments?t._exec:undefined,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),n=i[0],s=i[1];var a=new kr({value:t.state.value,context:s,_event:r,_sessionid:t.sessionId,historyValue:undefined,history:t.state,actions:n.filter((function(t){return!It(t)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});a.changed=true;return a}));t.update(e,r);t._stopChildren();_r.free(t.sessionId)}));return this};t.prototype.batch=function(t){var r=this;if(this.status===Mr.NotStarted&&this.options.deferEvents);else if(this.status!==Mr.Running){throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(!t.length){return}var e=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var i,n;var s=r.state;var a=false;var o=[];var c=function(t){var i=Et(t);r.forward(i);s=rr(r,(function(){return r.machine.transition(s,i,undefined,e||undefined)}));o.push.apply(o,E([],z(r.machine.config.predictableActionArguments?s.actions:s.actions.map((function(t){return Sr(t,s)}))),false));a=a||!!s.changed};try{for(var f=j(t),u=f.next();!u.done;u=f.next()){var l=u.value;c(l)}}catch(t){i={error:t}}finally{try{if(u&&!u.done&&(n=f.return))n.call(f)}finally{if(i)throw i.error}}s.changed=a;s.actions=o;r.update(s,Et(t[t.length-1]))}))};t.prototype.sender=function(t){return this.send.bind(this,t)};t.prototype._nextState=function(t,r){var e=this;if(r===void 0){r=!!this.machine.config.predictableActionArguments&&this._exec}var i=Et(t);if(i.name.indexOf($)===0&&!this.state.nextEvents.some((function(t){return t.indexOf($)===0}))){throw i.data.data}var n=rr(this,(function(){return e.machine.transition(e.state,i,undefined,r||undefined)}));return n};t.prototype.nextState=function(t){return this._nextState(t,false)};t.prototype.forward=function(t){var r,e;try{for(var i=j(this.forwardTo),n=i.next();!n.done;n=i.next()){var s=n.value;var a=this.children.get(s);if(!a){throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."))}a.send(t)}}catch(t){r={error:t}}finally{try{if(n&&!n.done&&(e=i.return))e.call(i)}finally{if(r)throw r.error}}};t.prototype.defer=function(t){var r=this;var e=this.clock.setTimeout((function(){if("to"in t&&t.to){r.sendTo(t._event,t.to,true)}else{r.send(t._event)}}),t.delay);if(t.id){this.delayedEventsMap[t.id]=e}};t.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]);delete this.delayedEventsMap[t]};t.prototype.exec=function(t,r,e){if(e===void 0){e=this.machine.options.actions}this._exec(t,r.context,r._event,e)};t.prototype.removeChild=function(t){var r;this.children.delete(t);this.forwardTo.delete(t);(r=this.state)===null||r===void 0?true:delete r.children[t]};t.prototype.stopChild=function(t){var r=this.children.get(t);if(!r){return}this.removeChild(t);if(wt(r.stop)){r.stop()}};t.prototype.spawn=function(t,r,e){if(this.status!==Mr.Running){return nr(t,r)}if(dt(t)){return this.spawnPromise(Promise.resolve(t),r)}else if(wt(t)){return this.spawnCallback(t,r)}else if(ar(t)){return this.spawnActor(t,r)}else if(Ot(t)){return this.spawnObservable(t,r)}else if(kt(t)){return this.spawnMachine(t,S(S({},e),{id:r}))}else if(ht(t)){return this.spawnBehavior(t,r)}else{throw new Error('Unable to spawn entity "'.concat(r,'" of type "').concat(typeof t,'".'))}};t.prototype.spawnMachine=function(r,e){var i=this;if(e===void 0){e={}}var n=new t(r,S(S({},this.options),{parent:this,id:e.id||r.id}));var s=S(S({},Ir),e);if(s.sync){n.onTransition((function(t){i.send(J,{state:t,id:n.id})}))}var a=n;this.children.set(n.id,a);if(s.autoForward){this.forwardTo.add(n.id)}n.onDone((function(t){i.removeChild(n.id);i.send(Et(t,{origin:n.id}))})).start();return a};t.prototype.spawnBehavior=function(t,r){var e=Ar(t,{id:r,parent:this});this.children.set(r,e);return e};t.prototype.spawnPromise=function(t,r){var e;var i=this;var n=false;var s;t.then((function(t){if(!n){s=t;i.removeChild(r);i.send(Et(Xt(r,t),{origin:r}))}}),(function(t){if(!n){i.removeChild(r);var e=Yt(r,t);try{i.send(Et(e,{origin:r}))}catch(t){if(i.devTools){i.devTools.send(e,i.state)}if(i.machine.strict){i.stop()}}}}));var a=(e={id:r,send:function(){return void 0},subscribe:function(r,e,i){var n=Nt(r,e,i);var s=false;t.then((function(t){if(s){return}n.next(t);if(s){return}n.complete()}),(function(t){if(s){return}n.error(t)}));return{unsubscribe:function(){return s=true}}},stop:function(){n=true},toJSON:function(){return{id:r}},getSnapshot:function(){return s}},e[St]=function(){return this},e);this.children.set(r,a);return a};t.prototype.spawnCallback=function(t,r){var e;var i=this;var n=false;var s=new Set;var a=new Set;var o;var c=function(t){o=t;a.forEach((function(r){return r(t)}));if(n){return}i.send(Et(t,{origin:r}))};var f;try{f=t(c,(function(t){s.add(t)}))}catch(t){this.send(Yt(r,t))}if(dt(f)){return this.spawnPromise(f,r)}var u=(e={id:r,send:function(t){return s.forEach((function(r){return r(t)}))},subscribe:function(t){var r=Nt(t);a.add(r.next);return{unsubscribe:function(){a.delete(r.next)}}},stop:function(){n=true;if(wt(f)){f()}},toJSON:function(){return{id:r}},getSnapshot:function(){return o}},e[St]=function(){return this},e);this.children.set(r,u);return u};t.prototype.spawnObservable=function(t,r){var e;var i=this;var n;var s=t.subscribe((function(t){n=t;i.send(Et(t,{origin:r}))}),(function(t){i.removeChild(r);i.send(Et(Yt(r,t),{origin:r}))}),(function(){i.removeChild(r);i.send(Et(Xt(r),{origin:r}))}));var a=(e={id:r,send:function(){return void 0},subscribe:function(r,e,i){return t.subscribe(r,e,i)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return n},toJSON:function(){return{id:r}}},e[St]=function(){return this},e);this.children.set(r,a);return a};t.prototype.spawnActor=function(t,r){this.children.set(r,t);return t};t.prototype.spawnActivity=function(t){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:undefined;if(!r){return}var e=r(this.state.context,t);this.spawnEffect(t.id,e)};t.prototype.spawnEffect=function(t,r){var e;this.children.set(t,(e={id:t,send:function(){return void 0},subscribe:function(){return{unsubscribe:function(){return void 0}}},stop:r||undefined,getSnapshot:function(){return undefined},toJSON:function(){return{id:t}}},e[St]=function(){return this},e))};t.prototype.attachDev=function(){var t=Tr();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var r=typeof this.options.devTools==="object"?this.options.devTools:undefined;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(S(S({name:this.id,autoPause:true,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},r),{features:S({jump:false,skip:false},r?r.features:undefined)}),this.machine);this.devTools.init(this.state)}Nr(this)}};t.prototype.toJSON=function(){return{id:this.id}};t.prototype[St]=function(){return this};t.prototype.getSnapshot=function(){if(this.status===Mr.NotStarted){return this.initialState}return this._state};t.defaultOptions={execute:true,deferEvents:true,clock:{setTimeout:function(t,r){return setTimeout(t,r)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:false};t.interpret=Pr;return t}();function Pr(t,r){var e=new Dr(t,r);return e}function Vr(t){if(typeof t==="string"){var r={type:t};r.toString=function(){return t};return r}return t}function Br(t){return S(S({type:B},t),{toJSON:function(){var r=k(t,["onDone","onError"]);return S(S({},r),{type:B,src:Vr(t.src)})}})}var $r="";var Fr="#";var Jr="*";var Ur={};var Wr=function(t){return t[0]===Fr};var Kr=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}};var Rr=function(){function t(r,e,i,n){if(i===void 0){i="context"in r?r.context:undefined}var s=this;var a;this.config=r;this._context=i;this.order=-1;this.__xstatenode=true;this.__cache={events:undefined,relativeValue:new Map,initialStateValue:undefined,initialState:undefined,on:undefined,transitions:undefined,candidates:{},delayedTransitions:undefined};this.idMap={};this.tags=[];this.options=Object.assign(Kr(),e);this.parent=n===null||n===void 0?void 0:n.parent;this.key=this.config.key||(n===null||n===void 0?void 0:n.key)||this.config.id||"(machine)";this.machine=this.parent?this.parent.machine:this;this.path=this.parent?this.parent.path.concat(this.key):[];this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:K);this.id=this.config.id||E([this.machine.key],z(this.path),false).join(this.delimiter);this.version=this.parent?this.parent.version:this.config.version;this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic");this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{};this.description=this.config.description;this.initial=this.config.initial;this.states=this.config.states?et(this.config.states,(function(r,e){var i;var n=new t(r,{},undefined,{parent:s,key:e});Object.assign(s.idMap,S((i={},i[n.id]=n,i),n.idMap));return n})):Ur;var o=0;function c(t){var r,e;t.order=o++;try{for(var i=j(fr(t)),n=i.next();!n.done;n=i.next()){var s=n.value;c(s)}}catch(t){r={error:t}}finally{try{if(n&&!n.done&&(e=i.return))e.call(i)}finally{if(r)throw r.error}}}c(this);this.history=this.config.history===true?"shallow":this.config.history||false;this._transient=!!this.config.always||(!this.config.on?false:Array.isArray(this.config.on)?this.config.on.some((function(t){var r=t.event;return r===$r})):$r in this.config.on);this.strict=!!this.config.strict;this.onEntry=ft(this.config.entry||this.config.onEntry).map((function(t){return Pt(t)}));this.onExit=ft(this.config.exit||this.config.onExit).map((function(t){return Pt(t)}));this.meta=this.config.meta;this.doneData=this.type==="final"?this.config.data:undefined;this.invoke=ft(this.config.invoke).map((function(t,r){var e,i;if(kt(t)){var n=At(s.id,r);s.machine.options.services=S((e={},e[n]=t,e),s.machine.options.services);return Br({src:n,id:n})}else if(bt(t.src)){var n=t.id||At(s.id,r);return Br(S(S({},t),{id:n,src:t.src}))}else if(kt(t.src)||wt(t.src)){var n=t.id||At(s.id,r);s.machine.options.services=S((i={},i[n]=t.src,i),s.machine.options.services);return Br(S(S({id:n},t),{src:n}))}else{var a=t.src;return Br(S(S({id:At(s.id,r)},t),{src:a}))}}));this.activities=ft(this.config.activities).concat(this.invoke).map((function(t){return Bt(t)}));this.transition=this.transition.bind(this);this.tags=ft(this.config.tags)}t.prototype._init=function(){if(this.__cache.transitions){return}lr(this).forEach((function(t){return t.on}))};t.prototype.withConfig=function(r,e){var i=this.options,n=i.actions,s=i.activities,a=i.guards,o=i.services,c=i.delays;return new t(this.config,{actions:S(S({},n),r.actions),activities:S(S({},s),r.activities),guards:S(S({},a),r.guards),services:S(S({},o),r.services),delays:S(S({},c),r.delays)},e!==null&&e!==void 0?e:this.context)};t.prototype.withContext=function(r){return new t(this.config,this.options,r)};Object.defineProperty(t.prototype,"context",{get:function(){return wt(this._context)?this._context():this._context},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:et(this.states,(function(t){return t.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:false,configurable:true});t.prototype.toJSON=function(){return this.definition};Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on){return this.__cache.on}var t=this.transitions;return this.__cache.on=t.reduce((function(t,r){t[r.eventType]=t[r.eventType]||[];t[r.eventType].push(r);return t}),{})},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:false,configurable:true});t.prototype.getCandidates=function(t){if(this.__cache.candidates[t]){return this.__cache.candidates[t]}var r=t===$r;var e=this.transitions.filter((function(e){var i=e.eventType===t;return r?i:i||e.eventType===Jr}));this.__cache.candidates[t]=e;return e};t.prototype.getDelayedTransitions=function(){var t=this;var r=this.config.after;if(!r){return[]}var e=function(r,e){var i=wt(r)?"".concat(t.id,":delay[").concat(e,"]"):r;var n=Gt(i,t.id);t.onEntry.push(Jt(n,{delay:r}));t.onExit.push(Kt(n));return n};var i=gt(r)?r.map((function(t,r){var i=e(t.delay,r);return S(S({},t),{event:i})})):ot(Object.keys(r).map((function(t,i){var n=r[t];var s=bt(n)?{target:n}:n;var a=!isNaN(+t)?+t:t;var o=e(a,i);return ft(s).map((function(t){return S(S({},t),{event:o,delay:a})}))})));return i.map((function(r){var e=r.delay;return S(S({},t.formatTransition(r)),{delay:e})}))};t.prototype.getStateNodes=function(t){var r;var e=this;if(!t){return[]}var i=t instanceof kr?t.value:tt(t,this.delimiter);if(bt(i)){var n=this.getStateNode(i).initial;return n!==undefined?this.getStateNodes((r={},r[i]=n,r)):[this,this.states[i]]}var s=Object.keys(i);var a=[this];a.push.apply(a,E([],z(ot(s.map((function(t){return e.getStateNode(t).getStateNodes(i[t])})))),false));return a};t.prototype.handles=function(t){var r=X(t);return this.events.includes(r)};t.prototype.resolveState=function(t){var r=t instanceof kr?t:kr.create(t);var e=Array.from(dr([],this.getStateNodes(r.value)));return new kr(S(S({},r),{value:this.resolve(r.value),configuration:e,done:gr(e,this),tags:br(e),machine:this.machine}))};t.prototype.transitionLeafNode=function(t,r,e){var i=this.getStateNode(t);var n=i.next(r,e);if(!n||!n.transitions.length){return this.next(r,e)}return n};t.prototype.transitionCompoundNode=function(t,r,e){var i=Object.keys(t);var n=this.getStateNode(i[0]);var s=n._transition(t[i[0]],r,e);if(!s||!s.transitions.length){return this.next(r,e)}return s};t.prototype.transitionParallelNode=function(t,r,e){var i,n;var s={};try{for(var a=j(Object.keys(t)),o=a.next();!o.done;o=a.next()){var c=o.value;var f=t[c];if(!f){continue}var u=this.getStateNode(c);var l=u._transition(f,r,e);if(l){s[c]=l}}}catch(t){i={error:t}}finally{try{if(o&&!o.done&&(n=a.return))n.call(a)}finally{if(i)throw i.error}}var d=Object.keys(s).map((function(t){return s[t]}));var h=ot(d.map((function(t){return t.transitions})));var p=d.some((function(t){return t.transitions.length>0}));if(!p){return this.next(r,e)}var v=ot(Object.keys(s).map((function(t){return s[t].configuration})));return{transitions:h,exitSet:ot(d.map((function(t){return t.exitSet}))),configuration:v,source:r,actions:ot(Object.keys(s).map((function(t){return s[t].actions})))}};t.prototype._transition=function(t,r,e){if(bt(t)){return this.transitionLeafNode(t,r,e)}if(Object.keys(t).length===1){return this.transitionCompoundNode(t,r,e)}return this.transitionParallelNode(t,r,e)};t.prototype.getTransitionData=function(t,r){return this._transition(t.value,t,Et(r))};t.prototype.next=function(t,r){var e,i;var n=this;var s=r.name;var a=[];var o=[];var c;try{for(var f=j(this.getCandidates(s)),u=f.next();!u.done;u=f.next()){var l=u.value;var d=l.cond,h=l.in;var p=t.context;var v=h?bt(h)&&Wr(h)?t.matches(tt(this.getStateNodeById(h).path,this.delimiter)):Q(tt(h,this.delimiter),nt(this.path.slice(0,-2))(t.value)):true;var m=false;try{m=!d||Tt(this.machine,d,p,r,t)}catch(t){throw new Error("Unable to evaluate guard '".concat(d.name||d.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(t.message))}if(m&&v){if(l.target!==undefined){o=l.target}a.push.apply(a,E([],z(l.actions),false));c=l;break}}}catch(t){e={error:t}}finally{try{if(u&&!u.done&&(i=f.return))i.call(f)}finally{if(e)throw e.error}}if(!c){return undefined}if(!o.length){return{transitions:[c],exitSet:[],configuration:t.value?[this]:[],source:t,actions:a}}var y=ot(o.map((function(r){return n.getRelativeStateNodes(r,t.historyValue)})));var g=!!c.internal;return{transitions:[c],exitSet:g?[]:ot(o.map((function(t){return n.getPotentiallyReenteringNodes(t)}))),configuration:y,source:t,actions:a}};t.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order){return[this]}var r=[];var e=this;var i=t;while(e&&e!==i){r.push(e);e=e.parent}if(e!==i){return[]}r.push(i);return r};t.prototype.getActions=function(t,r,e,i,n,s,a){var o,c,f,u;var l=this;var d=s?dr([],this.getStateNodes(s.value)):[];var h=new Set;try{for(var p=j(Array.from(t).sort((function(t,r){return t.order-r.order}))),v=p.next();!v.done;v=p.next()){var m=v.value;if(!mr(d,m)||mr(e.exitSet,m)||m.parent&&h.has(m.parent)){h.add(m)}}}catch(t){o={error:t}}finally{try{if(v&&!v.done&&(c=p.return))c.call(p)}finally{if(o)throw o.error}}try{for(var y=j(d),g=y.next();!g.done;g=y.next()){var m=g.value;if(!mr(t,m)||mr(e.exitSet,m.parent)){e.exitSet.push(m)}}}catch(t){f={error:t}}finally{try{if(g&&!g.done&&(u=y.return))u.call(y)}finally{if(f)throw f.error}}e.exitSet.sort((function(t,r){return r.order-t.order}));var w=Array.from(h).sort((function(t,r){return t.order-r.order}));var b=new Set(e.exitSet);var x=ot(w.map((function(t){var r=[];if(t.type!=="final"){return r}var s=t.parent;if(!s.parent){return r}r.push(Qt(t.id,t.doneData),Qt(s.id,t.doneData?ut(t.doneData,i,n):undefined));var a=s.parent;if(a.type==="parallel"){if(ur(a).every((function(t){return gr(e.configuration,t)}))){r.push(Qt(a.id))}}return r})));var O=w.map((function(t){var r=t.onEntry;var e=t.activities.map((function(t){return Rt(t)}));return{type:"entry",actions:Vt(a?E(E([],z(r),false),z(e),false):E(E([],z(e),false),z(r),false),l.machine.options.actions)}})).concat({type:"state_done",actions:x.map((function(t){return $t(t)}))});var S=Array.from(b).map((function(t){return{type:"exit",actions:Vt(E(E([],z(t.onExit),false),z(t.activities.map((function(t){return qt(t)}))),false),l.machine.options.actions)}}));var k=S.concat({type:"transition",actions:Vt(e.actions,this.machine.options.actions)}).concat(O);if(r){var C=Vt(ot(E([],z(t),false).sort((function(t,r){return r.order-t.order})).map((function(t){return t.onExit}))),this.machine.options.actions).filter((function(t){return!It(t)}));return k.concat({type:"stop",actions:C})}return k};t.prototype.transition=function(t,r,e,i){if(t===void 0){t=this.initialState}var n=Et(r);var s;if(t instanceof kr){s=e===undefined?t:this.resolveState(kr.from(t,e))}else{var a=bt(t)?this.resolve(rt(this.getResolvedPath(t))):this.resolve(t);var o=e!==null&&e!==void 0?e:this.machine.context;s=this.resolveState(kr.from(a,o))}if(this.strict){if(!this.events.includes(n.name)&&!lt(n.name)){throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(n.name,"'"))}}var c=this._transition(s.value,s,n)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]};var f=dr([],this.getStateNodes(s.value));var u=c.configuration.length?dr(f,c.configuration):f;c.configuration=E([],z(u),false);return this.resolveTransition(c,s,s.context,i,n)};t.prototype.resolveRaisedTransition=function(t,r,e,i){var n;var s=t.actions;t=this.transition(t,r,undefined,i);t._event=e;t.event=e.data;(n=t.actions).unshift.apply(n,E([],z(s),false));return t};t.prototype.resolveTransition=function(t,r,e,i,n){var s,a,o,c;var f=this;if(n===void 0){n=Mt}var u=t.configuration;var l=!r||t.transitions.length>0;var d=l?t.configuration:r?r.configuration:[];var h=gr(d,this);var p=l?vr(this.machine,u):undefined;var v=r?r.historyValue?r.historyValue:t.source?this.machine.historyValue(r.value):undefined:undefined;var m=this.getActions(new Set(d),h,t,e,n,r,i);var y=r?S({},r.activities):{};try{for(var g=j(m),w=g.next();!w.done;w=g.next()){var b=w.value;try{for(var x=(o=void 0,j(b.actions)),O=x.next();!O.done;O=x.next()){var k=O.value;if(k.type===T){y[k.activity.id||k.activity.type]=k}else if(k.type===L){y[k.activity.id||k.activity.type]=false}}}catch(t){o={error:t}}finally{try{if(O&&!O.done&&(c=x.return))c.call(x)}finally{if(o)throw o.error}}}}catch(t){s={error:t}}finally{try{if(w&&!w.done&&(a=g.return))a.call(g)}finally{if(s)throw s.error}}var E=z(tr(this,r,e,n,m,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),C=E[0],_=E[1];var N=z(pt(C,It),2),A=N[0],I=N[1];var D=C.filter((function(t){var r;return t.type===T&&((r=t.activity)===null||r===void 0?void 0:r.type)===B}));var P=D.reduce((function(t,r){t[r.activity.id]=ir(r.activity,f.machine,_,n);return t}),r?S({},r.children):{});var V=new kr({value:p||r.value,context:_,_event:n,_sessionid:r?r._sessionid:null,historyValue:p?v?mt(v,p):undefined:r?r.historyValue:undefined,history:!p||t.source?r:undefined,actions:p?I:[],activities:p?y:r?r.activities:{},events:[],configuration:d,transitions:t.transitions,children:P,done:h,tags:br(d),machine:this});var $=e!==_;V.changed=n.name===J||$;var F=V.history;if(F){delete F.history}var U=!h&&(this._transient||u.some((function(t){return t._transient})));if(!l&&(!U||n.name===$r)){return V}var W=V;if(!h){if(U){W=this.resolveRaisedTransition(W,{type:M},n,i)}while(A.length){var K=A.shift();W=this.resolveRaisedTransition(W,K._event,n,i)}}var R=W.changed||(F?!!W.actions.length||$||typeof F.value!==typeof W.value||!xr(W.value,F.value):undefined);W.changed=R;W.history=F;return W};t.prototype.getStateNode=function(t){if(Wr(t)){return this.machine.getStateNodeById(t)}if(!this.states){throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."))}var r=this.states[t];if(!r){throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"))}return r};t.prototype.getStateNodeById=function(t){var r=Wr(t)?t.slice(Fr.length):t;if(r===this.id){return this}var e=this.machine.idMap[r];if(!e){throw new Error("Child state node '#".concat(r,"' does not exist on machine '").concat(this.id,"'"))}return e};t.prototype.getStateNodeByPath=function(t){if(typeof t==="string"&&Wr(t)){try{return this.getStateNodeById(t.slice(1))}catch(t){}}var r=Y(t,this.delimiter).slice();var e=this;while(r.length){var i=r.shift();if(!i.length){break}e=e.getStateNode(i)}return e};t.prototype.resolve=function(t){var r;var e=this;if(!t){return this.initialStateValue||Ur}switch(this.type){case"parallel":return et(this.initialStateValue,(function(r,i){return r?e.getStateNode(i).resolve(t[i]||r):Ur}));case"compound":if(bt(t)){var i=this.getStateNode(t);if(i.type==="parallel"||i.type==="compound"){return r={},r[t]=i.initialStateValue,r}return t}if(!Object.keys(t).length){return this.initialStateValue||{}}return et(t,(function(t,r){return t?e.getStateNode(r).resolve(t):Ur}));default:return t||Ur}};t.prototype.getResolvedPath=function(t){if(Wr(t)){var r=this.machine.idMap[t.slice(Fr.length)];if(!r){throw new Error("Unable to find state node '".concat(t,"'"))}return r.path}return Y(t,this.delimiter)};Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue){return this.__cache.initialStateValue}var r;if(this.type==="parallel"){r=it(this.states,(function(t){return t.initialStateValue||Ur}),(function(t){return!(t.type==="history")}))}else if(this.initial!==undefined){if(!this.states[this.initial]){throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"))}r=cr(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else{r={}}this.__cache.initialStateValue=r;return this.__cache.initialStateValue},enumerable:false,configurable:true});t.prototype.getInitialState=function(t,r){this._init();var e=this.getStateNodes(t);return this.resolveTransition({configuration:e,exitSet:[],transitions:[],source:undefined,actions:[]},undefined,r!==null&&r!==void 0?r:this.machine.context,undefined)};Object.defineProperty(t.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t){throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."))}return this.getInitialState(t)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"target",{get:function(){var t;if(this.type==="history"){var r=this.config;if(bt(r.target)){t=Wr(r.target)?rt(this.machine.getStateNodeById(r.target).path.slice(this.path.length-1)):r.target}else{t=r.target}}return t},enumerable:false,configurable:true});t.prototype.getRelativeStateNodes=function(t,r,e){if(e===void 0){e=true}return e?t.type==="history"?t.resolveHistory(r):t.initialStateNodes:[t]};Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var t=this;if(cr(this)){return[this]}if(this.type==="compound"&&!this.initial){return[this]}var r=at(this.initialStateValue);return ot(r.map((function(r){return t.getFromRelativePath(r)})))},enumerable:false,configurable:true});t.prototype.getFromRelativePath=function(t){if(!t.length){return[this]}var r=z(t),e=r[0],i=r.slice(1);if(!this.states){throw new Error("Cannot retrieve subPath '".concat(e,"' from node with no states"))}var n=this.getStateNode(e);if(n.type==="history"){return n.resolveHistory()}if(!this.states[e]){throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"))}return this.states[e].getFromRelativePath(i)};t.prototype.historyValue=function(t){if(!Object.keys(this.states).length){return undefined}return{current:t||this.initialStateValue,states:it(this.states,(function(r,e){if(!t){return r.historyValue()}var i=bt(t)?undefined:t[e];return r.historyValue(i||r.initialStateValue)}),(function(t){return!t.history}))}};t.prototype.resolveHistory=function(t){var r=this;if(this.type!=="history"){return[this]}var e=this.parent;if(!t){var i=this.target;return i?ot(at(i).map((function(t){return e.getFromRelativePath(t)}))):e.initialStateNodes}var n=st(e.path,"states")(t).current;if(bt(n)){return[e.getStateNode(n)]}return ot(at(n).map((function(t){return r.history==="deep"?e.getFromRelativePath(t):[e.states[t[0]]]})))};Object.defineProperty(t.prototype,"stateIds",{get:function(){var t=this;var r=ot(Object.keys(this.states).map((function(r){return t.states[r].stateIds})));return[this.id].concat(r)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"events",{get:function(){var t,r,e,i;if(this.__cache.events){return this.__cache.events}var n=this.states;var s=new Set(this.ownEvents);if(n){try{for(var a=j(Object.keys(n)),o=a.next();!o.done;o=a.next()){var c=o.value;var f=n[c];if(f.states){try{for(var u=(e=void 0,j(f.events)),l=u.next();!l.done;l=u.next()){var d=l.value;s.add("".concat(d))}}catch(t){e={error:t}}finally{try{if(l&&!l.done&&(i=u.return))i.call(u)}finally{if(e)throw e.error}}}}}catch(r){t={error:r}}finally{try{if(o&&!o.done&&(r=a.return))r.call(a)}finally{if(t)throw t.error}}}return this.__cache.events=Array.from(s)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter((function(t){return!(!t.target&&!t.actions.length&&t.internal)})).map((function(t){return t.eventType})));return Array.from(t)},enumerable:false,configurable:true});t.prototype.resolveTarget=function(t){var r=this;if(t===undefined){return undefined}return t.map((function(t){if(!bt(t)){return t}var e=t[0]===r.delimiter;if(e&&!r.parent){return r.getStateNodeByPath(t.slice(1))}var i=e?r.key+t:t;if(r.parent){try{var n=r.parent.getStateNodeByPath(i);return n}catch(t){throw new Error("Invalid transition definition for state node '".concat(r.id,"':\n").concat(t.message))}}else{return r.getStateNodeByPath(i)}}))};t.prototype.formatTransition=function(t){var r=this;var e=_t(t.target);var i="internal"in t?t.internal:e?e.some((function(t){return bt(t)&&t[0]===r.delimiter})):true;var n=this.machine.options.guards;var s=this.resolveTarget(e);var a=S(S({},t),{actions:Vt(ft(t.actions)),cond:xt(t.cond,n),target:s,source:this,internal:i,eventType:t.event,toJSON:function(){return S(S({},a),{target:a.target?a.target.map((function(t){return"#".concat(t.id)})):undefined,source:"#".concat(r.id)})}});return a};t.prototype.formatTransitions=function(){var t,r;var e=this;var i;if(!this.config.on){i=[]}else if(Array.isArray(this.config.on)){i=this.config.on}else{var n=this.config.on,s=Jr,a=n[s],o=a===void 0?[]:a,c=k(n,[typeof s==="symbol"?s:s+""]);i=ot(Object.keys(c).map((function(t){var r=Ct(t,c[t]);return r})).concat(Ct(Jr,o)))}var f=this.config.always?Ct("",this.config.always):[];var u=this.config.onDone?Ct(String(Qt(this.id)),this.config.onDone):[];var l=ot(this.invoke.map((function(t){var r=[];if(t.onDone){r.push.apply(r,E([],z(Ct(String(Xt(t.id)),t.onDone)),false))}if(t.onError){r.push.apply(r,E([],z(Ct(String(Yt(t.id)),t.onError)),false))}return r})));var d=this.after;var h=ot(E(E(E(E([],z(u),false),z(l),false),z(i),false),z(f),false).map((function(t){return ft(t).map((function(t){return e.formatTransition(t)}))})));try{for(var p=j(d),v=p.next();!v.done;v=p.next()){var m=v.value;h.push(m)}}catch(r){t={error:r}}finally{try{if(v&&!v.done&&(r=p.return))r.call(p)}finally{if(t)throw t.error}}return h};return t}();function qr(t,r,e){if(e===void 0){e=t.context}return new Rr(t,r,e)}const Hr=["m","l"];function Gr(t){return Hr.includes(t)}const Qr=({disabled:r,option:e,onRemove:i})=>{const n={};if(e.chipColor){n["color"]=e.chipColor}if(e.chipBackgroundColor){n["background-color"]=e.chipBackgroundColor}return t("label",{class:"wcs-select-chip",style:n,onClick:t=>t.stopImmediatePropagation()},t("div",null,e.displayText),r?null:t("div",{onClick:()=>i(e)},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"12",viewBox:"0 0 20 12",class:"chip"},t("path",{d:"M2,0 6,4 10,0 12,2 8,6 12,10 10,12 6,8 2,12 0,10 4,6 0,2 2,0",fill:e.chipColor,transform:"translate(8 0)"}))))};const Xr='@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}:host{--wcs-select-ligther-percentage:40;--wcs-select-border-radius:var(--wcs-border-radius);--wcs-select-background-color:var(--wcs-light);--wcs-select-placeholder-color:var(--wcs-text-medium);--wcs-select-value-color:var(--wcs-primary);--wcs-select-border-color:transparent;--wcs-select-overlay-max-height:360px;--wcs-select-option-height:var(--wcs-size-m);--wcs-select-border-width:1px;display:block;position:relative;outline:none;user-select:none;box-sizing:border-box}:host svg{flex-shrink:0}:host .arrow{fill:var(--wcs-select-value-color)}:host .chip{fill:var(--wcs-contrast);opacity:calc((100 - var(--wcs-select-ligther-percentage)) / 100)}:host .chip:hover{opacity:100}:host(.expanded){--wcs-select-border-color:var(--wcs-text-light)}:host(.expanded) .wcs-select-options{display:block}:host(:not(.expanded):focus) .wcs-select-control{border:var(--wcs-primary) solid 1px}:host(:not(.expanded):focus-visible) .wcs-select-control{outline:2px dashed var(--wcs-primary);outline-offset:4px;border-radius:var(--wcs-select-border-radius)}:host([disabled]){cursor:not-allowed}:host([disabled]) .wcs-select-control,:host([disabled]) label{cursor:default;pointer-events:none}:host([disabled]) label{color:var(--wcs-text-disabled)}:host([disabled]) .arrow{fill:var(--wcs-text-medium)}label{padding-left:calc(var(--wcs-padding) - var(--wcs-select-border-width));padding-right:calc(var(--wcs-padding) - var(--wcs-select-border-width));font-weight:500;cursor:pointer;color:var(--wcs-select-color);transition:color 125ms ease-in;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([size=m]){min-height:var(--wcs-size-m);--wcs-select-font-size:1rem}:host([size=m]) .wcs-select-control{min-height:var(--wcs-size-m)}:host([size=l]){min-height:var(--wcs-size-l);--wcs-select-font-size:1.0625rem}:host([size=l]) .wcs-select-control{min-height:var(--wcs-size-l)}:host([chips]) .wcs-select-control{flex-wrap:wrap}.wcs-select-control{box-sizing:border-box;--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;overflow:hidden;display:flex;align-items:center;padding-right:var(--wcs-text-padding);background-color:var(--wcs-select-background-color);border-radius:var(--wcs-select-border-radius);border:var(--wcs-select-border-color) solid var(--wcs-select-border-width);font-size:var(--wcs-select-font-size, 1rem);line-height:1.5;cursor:pointer}.wcs-select-control::before,.wcs-select-control::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.wcs-select-control::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.wcs-select-control::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.wcs-select-control.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.wcs-select-control.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.wcs-select-control.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.wcs-select-control.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.wcs-select-control.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.wcs-select-control::before,.wcs-select-control::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.wcs-select-control.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.wcs-select-control::before,.wcs-select-control::after{background-color:#999;background-color:var(--mdc-ripple-color, #999)}.wcs-select-control:hover::before,.wcs-select-control.mdc-ripple-surface--hover::before{opacity:0.1;opacity:var(--mdc-ripple-hover-opacity, 0.1)}.wcs-select-control.mdc-ripple-upgraded--background-focused::before,.wcs-select-control:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.wcs-select-control:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.wcs-select-control:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.3;opacity:var(--mdc-ripple-press-opacity, 0.3)}.wcs-select-control.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.3)}.wcs-select-placeholder{color:var(--wcs-select-placeholder-color);font-style:italic;font-weight:400}.wcs-select-value{color:var(--wcs-select-value-color);font-weight:var(--wcs-font-weight-form-value)}.wcs-select-value-container{margin-top:4px;margin-bottom:4px;margin-left:calc(var(--wcs-margin) / 2);max-width:calc(100% - (24px + var(--wcs-base-margin)));display:flex;flex-direction:row;gap:4px;align-items:center;flex-wrap:wrap}.wcs-select-chip{line-height:1.375;color:var(--wcs-contrast);background-color:var(--wcs-base);border-radius:0.75rem;display:flex;align-items:center;padding:calc((var(--wcs-padding) - 8px) / 2) var(--wcs-padding);overflow:initial}.wcs-select-options{display:none;position:absolute;z-index:999999999;border:solid var(--wcs-select-border-width) var(--wcs-select-border-color);border-radius:var(--wcs-select-border-radius);max-height:var(--wcs-select-overlay-max-height);overflow-y:auto;width:calc(100% - 2 * var(--wcs-select-border-width));background-color:var(--wcs-white);color:var(--wcs-text-medium)}';const Yr={key:"select",initial:"closed",states:{closed:{entry:["close"],on:{CLICK:"opened",OPEN:"opened",OPTION_SELECTED:{actions:["selectOption"]}}},opened:{entry:["open"],on:{CLICK:"closed",CLOSE:"closed",OPTION_SELECTED:{actions:["selectOption"]}}}}};const Zr=class{constructor(t){r(this,t);this.wcsChange=e(this,"wcsChange",7);this.wcsFocus=e(this,"wcsFocus",7);this.wcsBlur=e(this,"wcsBlur",7);this.selectId=`wcs-select-${te++}`;this.optionsId=a("OPTIONS");this.expanded=false;this.size="m";this.hasLoaded=false;this.displayText=undefined;this.focused=undefined;this.value=undefined;this.placeholder=undefined;this.disabled=false;this.multiple=false;this.chips=false;this.name=undefined;this.compareWith=(t,r)=>b(t,r);this.overlayDirection="bottom"}async open(){this.stateService.send("OPEN")}async close(){this.stateService.send("CLOSE")}onValueChangeHandler(t){this.updateSelectedValue(t);this.emitChange(this.value)}updateSelectedValue(t){if(!t){this.reset()}if(this.multiple){if(!Array.isArray(t)){t=[t]}this.values=[];this.options.forEach((r=>{const e=t?t.findIndex((t=>this.compareWith(r.value,t)))!==-1:false;if(e){this.values.push({value:r.value,displayText:r.innerText,chipColor:r.chipColor,chipBackgroundColor:r.chipBackgroundColor})}r.selected=e}));this.displayText=this.values.length!==0?this.values.map((t=>t.displayText)).join(", "):undefined}else{this.options.forEach((r=>{const e=this.compareWith(r.value,t);if(e){this.displayText=r.innerText}r.selected=e}))}}reset(){this.values=[];this.displayText=undefined;this.options.forEach((t=>{t.selected=false}))}componentDidLoad(){this.optionsEl=this.el.shadowRoot.querySelector(".wcs-select-options");this.controlEl=this.el.shadowRoot.querySelector(".wcs-select-control");const t=qr(Yr,this.initMachineOptions());this.stateService=Pr(t);if(this.multiple){this.values=[]}this.addRippleEffect();this.stateService.start();if(this.optionsEl.querySelector("slot")===null){this.replaceOptions_firefoxBefore63();this.listenDomUpdate_firefoxBefore63()}if(this.value!==undefined){this.updateSelectedValue(this.value)}this.popper=this.createPopperInstance();this.labelElement=o(this.el);if(this.labelElement){this.labelElement.id=this.selectId+"-lbl"}this.hasLoaded=true}createPopperInstance(){return x(this.controlEl,this.optionsEl,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,4]}}]})}emitChange(t){this.wcsChange.emit({value:t})}replaceOptions_firefoxBefore63(){Array.from(this.el.querySelectorAll("wcs-select-option")).forEach((t=>{if(t.parentNode===this.el){this.el.removeChild(t);this.optionsEl.appendChild(t)}}))}listenDomUpdate_firefoxBefore63(){const t=new MutationObserver((t=>{for(const r of t){if(r.type==="childList"){this.replaceOptions_firefoxBefore63()}}}));t.observe(this.el,{childList:true})}componentWillLoad(){if(!Gr(this.size)){console.error(`Invalid size value for wcs-select : "${this.size}". Must be one of "${Hr.join(", ")}"`);this.size="m"}}componentWillUpdate(){if(this.multiple){this.options.forEach((t=>t.multiple=true))}}get options(){var t;const r=(t=this.el)===null||t===void 0?void 0:t.querySelectorAll("wcs-select-option");if(r&&r.length!==0){return r}return[]}get notDisabledOptions(){var t;const r=(t=this.el)===null||t===void 0?void 0:t.querySelectorAll("wcs-select-option:not([disabled])");if(r&&r.length!==0){return r}return[]}initMachineOptions(){return{actions:{open:()=>{var t;if(!this.disabled){this.expanded=true;this.focused=false;if(this.notDisabledOptions.length>0){this.lastFocusedOptionElement=(t=this.lastSelectedOptionElement)!==null&&t!==void 0?t:this.notDisabledOptions[0];requestAnimationFrame((()=>{var t;(t=this.lastFocusedOptionElement)===null||t===void 0?void 0:t.focus()}))}}},close:(t,r)=>{var e,i;if(r.type==="CLOSE"){if((e=r.value)===null||e===void 0?void 0:e.shouldBlur){(i=this.el.closest("wcs-select"))===null||i===void 0?void 0:i.focus();this.focused=false}else{this.el.focus();this.focused=true}}this.expanded=false},selectOption:(t,r)=>{if(r.type==="OPTION_SELECTED"){this.handleClickEvent(r.value)}}},guards:{enabled:()=>!this.disabled}}}handleClickEvent(t){if(this.multiple){this.handleClickOnMultiple(t)}else{this.handleNormalClick(t)}}handleClickOnMultiple(t){const r=this.values.findIndex((r=>r.value===t.value));if(r===-1){const{value:r,displayText:e,chipColor:i,chipBackgroundColor:n}=t;this.values.push({value:r,displayText:e,chipColor:i,chipBackgroundColor:n});t.source.selected=true;this.lastSelectedOptionElement=t.source}else{t.source.selected=false;this.values.splice(r,1);if(this.lastSelectedOptionElement===t.source)this.lastSelectedOptionElement=null}this.updateValueWithValues()}updateValueWithValues(){this.value=this.values.map((t=>t.value));this.displayText=this.values.length!==0?this.values.map((t=>t.displayText)).join(", "):undefined}handleNormalClick(t){this.options.forEach((t=>{if(t.selected)t.selected=false}));t.source.selected=true;this.value=t.value;this.displayText=t.displayText;this.lastSelectedOptionElement=t.source;this.stateService.send("CLOSE")}disconnectedCallback(){var t;(t=this.stateService)===null||t===void 0?void 0:t.stop()}addRippleEffect(){const t=new O(this.controlEl);t.unbounded=false}get hasValue(){return this.displayText!==undefined}onMouseDown(t){const r=w(t.target)&&(t.offsetX>t.target.clientWidth||t.offsetY>t.target.clientHeight||t.offsetY<0);const e=t.composedPath().filter((t=>{const r=t;return r.nodeName==="svg"&&r.classList.contains("chip")})).length>0;if(!r&&!e){this.stateService.send("CLICK")}}onWindowClickEvent(t){const r=t.composedPath().filter((t=>t.nodeName==="WCS-SELECT"))[0];const e=r===this.el;if(this.expanded&&!e){this.stateService.send("CLOSE")}}onKeyDown(t){if(this.stateService.getSnapshot().matches("closed")){if(c(t)||t.altKey&&f(t)||u(t)){t.preventDefault();t.stopPropagation();this.stateService.send("OPEN");return}if(this.multiple){if(f(t)){this.stateService.send("OPEN")}}else{if(f(t)||l(t)){t.preventDefault();this.selectClosestOption("next")}if(d(t)||h(t)){t.preventDefault();this.selectClosestOption("previous")}else if(p(t)){t.preventDefault();this.selectLastOption()}else if(v(t)||m(t)){t.preventDefault();this.selectFirstOption()}}}else if(this.stateService.getSnapshot().matches("opened")){if(y(t)||t.altKey&&d(t)){this.stateService.send({type:"CLOSE",value:{shouldBlur:false}})}else if(g(t)||t.shiftKey&&g(t)){this.stateService.send({type:"CLOSE",value:{shouldBlur:true}})}else if(f(t)){t.preventDefault();this.focusClosestOption("next")}else if(d(t)){t.preventDefault();this.focusClosestOption("previous")}else if(v(t)||m(t)){t.preventDefault();this.focusFirstOption()}else if(p(t)){t.preventDefault();this.focusLastOption()}}}getClosestActiveOptionIndexForState(t,r){let e=Array.from(this.notDisabledOptions).indexOf(r==="focused"?this.lastFocusedOptionElement:this.lastSelectedOptionElement);if(t==="next"&&e<this.notDisabledOptions.length-1){e++}else if(t==="previous"&&e>0){e--}else{return"nothing"}return e}selectOption(t){this.lastSelectedOptionElement=this.notDisabledOptions[t];this.lastSelectedOptionElement.selected=true;this.sendOptionSelectedToStateMachine({source:this.lastSelectedOptionElement,value:this.value,displayText:this.lastSelectedOptionElement.innerText})}selectClosestOption(t){const r=this.getClosestActiveOptionIndexForState(t,"selected");if(r==="nothing")return;this.selectOption(r)}selectFirstOption(){if(this.notDisabledOptions.length<1){return}this.selectOption(0)}selectLastOption(){if(this.notDisabledOptions.length<1){return}this.selectOption(this.notDisabledOptions.length-1)}focusOption(t){var r;this.lastFocusedOptionElement=this.notDisabledOptions[t];(r=this.lastFocusedOptionElement)===null||r===void 0?void 0:r.focus();this.el.setAttribute("aria-activedescendant",this.lastFocusedOptionElement.id)}focusClosestOption(t){const r=this.getClosestActiveOptionIndexForState(t,"focused");if(r==="nothing")return;this.focusOption(r)}focusFirstOption(){this.focusOption(0)}focusLastOption(){this.focusOption(this.notDisabledOptions.length-1)}selectedOptionChanged(t){this.sendOptionSelectedToStateMachine(t.detail)}sendOptionSelectedToStateMachine(t){this.stateService.send({type:"OPTION_SELECTED",value:t})}onSlotchange(){this.updateSelectedValue(this.value)}removeChip(t){this.options.forEach((r=>{if(r.value===t.value){this.sendOptionSelectedToStateMachine(Object.assign(Object.assign({},t),{source:r}))}}))}componentDidRender(){var t;(t=this.popper)===null||t===void 0?void 0:t.update()}render(){const r=`${this.labelElement?this.labelElement.innerText:""} ${this.hasValue?this.displayText:""}`.trimEnd();return t(i,Object.assign({class:this.expanded?"expanded ":"",overlayDirection:this.overlayDirection},this.focusedAttributes(),{role:"combobox","aria-haspopup":"listbox","aria-disabled":this.disabled?"true":null,"aria-expanded":this.expanded?"true":"false","aria-controls":this.optionsId,"aria-owns":this.optionsId,"aria-multiselectable":this.multiple?"true":"false","aria-label":r}),t("div",{class:"wcs-select-control"},t("div",{class:"wcs-select-value-container"},this.hasValue?this.chips?this.values.map((r=>t(Qr,{disabled:this.disabled,option:r,onRemove:this.removeChip.bind(this)}))):t("label",{class:"wcs-select-value"},this.displayText):t("label",{class:"wcs-select-placeholder"},this.placeholder)),t(s,{up:this.expanded})),t("div",{class:"wcs-select-options",id:this.optionsId,role:"listbox"},t("slot",{name:"wcs-select-option",onSlotchange:this.onSlotchange.bind(this)})))}focusedAttributes(){return!this.disabled?{tabIndex:0}:{}}get el(){return n(this)}static get watchers(){return{value:["onValueChangeHandler"]}}};let te=0;Zr.style=Xr;const re='@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}wcs-select-option{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;overflow:hidden;display:flex;padding:0 var(--wcs-padding);height:var(--wcs-select-option-height);line-height:42px;cursor:pointer;user-select:none;font-weight:500;font-size:1rem;color:var(--wcs-black)}wcs-select-option::before,wcs-select-option::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}wcs-select-option::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}wcs-select-option::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}wcs-select-option.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}wcs-select-option.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}wcs-select-option.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}wcs-select-option.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}wcs-select-option.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}wcs-select-option::before,wcs-select-option::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}wcs-select-option.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}wcs-select-option::before,wcs-select-option::after{background-color:#999;background-color:var(--mdc-ripple-color, #999)}wcs-select-option:hover::before,wcs-select-option.mdc-ripple-surface--hover::before{opacity:0.1;opacity:var(--mdc-ripple-hover-opacity, 0.1)}wcs-select-option.mdc-ripple-upgraded--background-focused::before,wcs-select-option:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}wcs-select-option:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}wcs-select-option:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.3;opacity:var(--mdc-ripple-press-opacity, 0.3)}wcs-select-option.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.3)}wcs-select-option:hover{color:var(--wcs-primary);background-color:var(--wcs-light)}wcs-select-option:focus{outline:none}wcs-select-option[disabled]{cursor:not-allowed;pointer-events:none;color:var(--wcs-text-disabled)}wcs-select-option[selected]{color:var(--wcs-primary);background-color:var(--wcs-light)}wcs-select-option[multiple] wcs-checkbox{pointer-events:none;margin-right:10px}wcs-select-option[multiple]:hover wcs-checkbox{--wcs-checkbox-border-color:var(--wcs-primary)}';const ee=class{constructor(t){r(this,t);this.wcsSelectOptionClick=e(this,"wcsSelectOptionClick",7);this.selectOptionId=a(this.el.tagName);this.disabled=false;this.selected=false;this.value=undefined;this.chipColor=undefined;this.chipBackgroundColor=undefined;this.multiple=false}componentWillLoad(){if(this.value===undefined){this.value=this.el.innerText||""}}componentDidLoad(){this.mdcRipple=new O(this.el)}chooseOption(t){if(!this.disabled){t.stopPropagation();const r=this.el.innerText;this.wcsSelectOptionClick.emit({source:this.el,value:this.value,displayText:r})}}onMouseDown(t){this.chooseOption(t)}handleKeydown(t){if(c(t)||u(t)){this.chooseOption(t);t.preventDefault();t.stopPropagation()}}render(){return t(i,{id:this.selectOptionId,"aria-selected":this.selected?"true":"false",slot:"wcs-select-option",role:"option",tabindex:"-1"},this.multiple&&t("wcs-checkbox",{tabindex:"-1",checked:this.selected}),t("slot",null))}get el(){return n(this)}};ee.style=re;export{Zr as wcs_select,ee as wcs_select_option};
16
- //# sourceMappingURL=p-405140f9.entry.js.map
16
+ //# sourceMappingURL=p-ec84d6fd.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as s,a as i,h as e,H as a,g as r}from"./p-a2df3a49.js";import{j as h,k as n,r as o,l as d}from"./p-12ac2547.js";const c=":host{--wcs-textarea-icon-color:var(--wcs-text-medium);--wcs-internal-textarea-border-radius-left:var(--wcs-textarea-border-radius-left, var(--wcs-border-radius));--wcs-internal-textarea-border-radius-right:var(--wcs-textarea-border-radius-right, var(--wcs-border-radius));--wcs-internal-textarea-border-width:2px;--wcs-textarea-max-height:unset;display:flex;flex-direction:row;width:100%;border-radius:var(--wcs-internal-textarea-border-radius-left) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-left);background-color:var(--wcs-light);border:var(--wcs-internal-textarea-border-width) solid var(--wcs-light);background-clip:padding-box}:host ::placeholder{font-weight:400;font-style:italic}:host textarea{overflow:auto;flex:1;width:100%;box-sizing:border-box;min-height:var(--wcs-size-m);max-height:var(--wcs-textarea-max-height);background-color:transparent;font-family:var(--wcs-font-sans-serif);color:var(--wcs-primary);font-weight:var(--wcs-font-weight-form-value) !important;border:none;padding:calc(var(--wcs-padding) / 2 - var(--wcs-internal-textarea-border-width) / 2) calc(var(--wcs-padding) - var(--wcs-internal-textarea-border-width));font-size:1rem;line-height:1.5}:host textarea:focus{box-shadow:none;outline:0}:host wcs-mat-icon{position:relative;margin-top:7px;margin-left:8px;margin-right:-8px}:host([disabled]) textarea{color:var(--wcs-text-disabled);cursor:not-allowed}:host([state=error]){border-color:var(--wcs-red) !important}:host(:focus-within){border:dashed var(--wcs-internal-textarea-border-width) var(--wcs-primary)}:host(:focus-within) wcs-mat-icon{color:var(--wcs-primary)}";const l=class{constructor(i){t(this,i);this.wcsChange=s(this,"wcsChange",7);this.wcsInput=s(this,"wcsInput",7);this.wcsBlur=s(this,"wcsBlur",7);this.wcsFocus=s(this,"wcsFocus",7);this.inputId=`wcs-textarea-${u++}`;this.didBlurAfterEdit=false;this.inheritedAttributes={};this.onInput=t=>{if(this.nativeInput){this.value=this.nativeInput.value}this.wcsInput.emit(t)};this.onFocus=t=>{this.hasFocus=true;this.focusChange();if(this.fireFocusEvents){this.wcsFocus.emit(t)}};this.onBlur=t=>{this.hasFocus=false;this.focusChange();if(this.fireFocusEvents){this.wcsBlur.emit(t)}};this.onKeyDown=()=>{this.checkClearOnEdit()};this.fireFocusEvents=true;this.hasFocus=false;this.autocapitalize="none";this.autofocus=false;this.clearOnEdit=false;this.debounce=0;this.disabled=false;this.icon=undefined;this.inputmode=undefined;this.enterkeyhint=undefined;this.maxlength=undefined;this.minlength=undefined;this.name=this.inputId;this.placeholder=undefined;this.readonly=false;this.required=false;this.spellcheck=false;this.state="initial";this.cols=undefined;this.rows=undefined;this.wrap=undefined;this.autoGrow=false;this.value="";this.resize=undefined}debounceChanged(){this.wcsChange=h(this.wcsChange,this.debounce)}valueChanged(){const t=this.nativeInput;const s=this.getValue();if(t&&t.value!==s){t.value=s}this.runAutoGrow();this.wcsChange.emit({value:s})}connectedCallback(){this.debounceChanged();{document.dispatchEvent(new CustomEvent("wcsInputDidLoad",{detail:this.el}))}}disconnectedCallback(){{document.dispatchEvent(new CustomEvent("wcsInputDidUnload",{detail:this.el}))}}componentWillLoad(){this.inheritedAttributes=n(this.el,["title"])}componentDidLoad(){o((()=>this.runAutoGrow()))}runAutoGrow(){const t=this.nativeInput;if(t&&this.autoGrow){i((()=>{t.style.height="auto";t.style.height=t.scrollHeight+"px"}))}}async fitContent(){o((()=>this.runAutoGrow()))}async setFocus(){if(this.nativeInput){this.nativeInput.focus()}}async setBlur(){if(this.nativeInput){this.nativeInput.blur()}}getInputElement(){return Promise.resolve(this.nativeInput)}checkClearOnEdit(){if(!this.clearOnEdit){return}if(this.didBlurAfterEdit&&this.hasValue()){this.value=""}this.didBlurAfterEdit=false}focusChange(){if(this.clearOnEdit&&!this.hasFocus&&this.hasValue()){this.didBlurAfterEdit=true}}hasValue(){return this.getValue()!==""}getValue(){return this.value||""}render(){const t=this.getValue();const s=this.inputId+"-lbl";const i=d(this.el);if(i){i.id=s}const r=Object.assign({},this.resize&&{resize:this.resize});return e(a,{"aria-disabled":this.disabled?"true":null},this.icon?e("wcs-mat-icon",{icon:this.icon,size:"m"}):null,e("textarea",Object.assign({class:"native-textarea","aria-labelledby":i?s:null,ref:t=>this.nativeInput=t,autoCapitalize:this.autocapitalize,autoFocus:this.autofocus,enterKeyHint:this.enterkeyhint,inputMode:this.inputmode,disabled:this.disabled,maxLength:this.maxlength,minLength:this.minlength,name:this.name,placeholder:this.placeholder||"",readOnly:this.readonly,required:this.required,spellcheck:this.spellcheck,cols:this.cols,rows:this.rows,wrap:this.wrap,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,style:r},this.inheritedAttributes),t))}get el(){return r(this)}static get watchers(){return{debounce:["debounceChanged"],value:["valueChanged"]}}};let u=0;l.style=c;export{l as wcs_textarea};
2
- //# sourceMappingURL=p-26c4c983.entry.js.map
1
+ import{r as t,c as s,a as i,h as e,H as a,g as r}from"./p-a2df3a49.js";import{j as h,k as n,r as o,l as d}from"./p-3dc6b507.js";const c=":host{--wcs-textarea-icon-color:var(--wcs-text-medium);--wcs-internal-textarea-border-radius-left:var(--wcs-textarea-border-radius-left, var(--wcs-border-radius));--wcs-internal-textarea-border-radius-right:var(--wcs-textarea-border-radius-right, var(--wcs-border-radius));--wcs-internal-textarea-border-width:2px;--wcs-textarea-max-height:unset;display:flex;flex-direction:row;width:100%;border-radius:var(--wcs-internal-textarea-border-radius-left) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-left);background-color:var(--wcs-light);border:var(--wcs-internal-textarea-border-width) solid var(--wcs-light);background-clip:padding-box}:host ::placeholder{font-weight:400;font-style:italic}:host textarea{overflow:auto;flex:1;width:100%;box-sizing:border-box;min-height:var(--wcs-size-m);max-height:var(--wcs-textarea-max-height);background-color:transparent;font-family:var(--wcs-font-sans-serif);color:var(--wcs-primary);font-weight:var(--wcs-font-weight-form-value) !important;border:none;padding:calc(var(--wcs-padding) / 2 - var(--wcs-internal-textarea-border-width) / 2) calc(var(--wcs-padding) - var(--wcs-internal-textarea-border-width));font-size:1rem;line-height:1.5}:host textarea:focus{box-shadow:none;outline:0}:host wcs-mat-icon{position:relative;margin-top:7px;margin-left:8px;margin-right:-8px}:host([disabled]) textarea{color:var(--wcs-text-disabled);cursor:not-allowed}:host([state=error]){border-color:var(--wcs-red) !important}:host(:focus-within){border:dashed var(--wcs-internal-textarea-border-width) var(--wcs-primary)}:host(:focus-within) wcs-mat-icon{color:var(--wcs-primary)}";const l=class{constructor(i){t(this,i);this.wcsChange=s(this,"wcsChange",7);this.wcsInput=s(this,"wcsInput",7);this.wcsBlur=s(this,"wcsBlur",7);this.wcsFocus=s(this,"wcsFocus",7);this.inputId=`wcs-textarea-${u++}`;this.didBlurAfterEdit=false;this.inheritedAttributes={};this.onInput=t=>{if(this.nativeInput){this.value=this.nativeInput.value}this.wcsInput.emit(t)};this.onFocus=t=>{this.hasFocus=true;this.focusChange();if(this.fireFocusEvents){this.wcsFocus.emit(t)}};this.onBlur=t=>{this.hasFocus=false;this.focusChange();if(this.fireFocusEvents){this.wcsBlur.emit(t)}};this.onKeyDown=()=>{this.checkClearOnEdit()};this.fireFocusEvents=true;this.hasFocus=false;this.autocapitalize="none";this.autofocus=false;this.clearOnEdit=false;this.debounce=0;this.disabled=false;this.icon=undefined;this.inputmode=undefined;this.enterkeyhint=undefined;this.maxlength=undefined;this.minlength=undefined;this.name=this.inputId;this.placeholder=undefined;this.readonly=false;this.required=false;this.spellcheck=false;this.state="initial";this.cols=undefined;this.rows=undefined;this.wrap=undefined;this.autoGrow=false;this.value="";this.resize=undefined}debounceChanged(){this.wcsChange=h(this.wcsChange,this.debounce)}valueChanged(){const t=this.nativeInput;const s=this.getValue();if(t&&t.value!==s){t.value=s}this.runAutoGrow();this.wcsChange.emit({value:s})}connectedCallback(){this.debounceChanged();{document.dispatchEvent(new CustomEvent("wcsInputDidLoad",{detail:this.el}))}}disconnectedCallback(){{document.dispatchEvent(new CustomEvent("wcsInputDidUnload",{detail:this.el}))}}componentWillLoad(){this.inheritedAttributes=n(this.el,["title"])}componentDidLoad(){o((()=>this.runAutoGrow()))}runAutoGrow(){const t=this.nativeInput;if(t&&this.autoGrow){i((()=>{t.style.height="auto";t.style.height=t.scrollHeight+"px"}))}}async fitContent(){o((()=>this.runAutoGrow()))}async setFocus(){if(this.nativeInput){this.nativeInput.focus()}}async setBlur(){if(this.nativeInput){this.nativeInput.blur()}}getInputElement(){return Promise.resolve(this.nativeInput)}checkClearOnEdit(){if(!this.clearOnEdit){return}if(this.didBlurAfterEdit&&this.hasValue()){this.value=""}this.didBlurAfterEdit=false}focusChange(){if(this.clearOnEdit&&!this.hasFocus&&this.hasValue()){this.didBlurAfterEdit=true}}hasValue(){return this.getValue()!==""}getValue(){return this.value||""}render(){const t=this.getValue();const s=this.inputId+"-lbl";const i=d(this.el);if(i){i.id=s}const r=Object.assign({},this.resize&&{resize:this.resize});return e(a,{"aria-disabled":this.disabled?"true":null},this.icon?e("wcs-mat-icon",{icon:this.icon,size:"m"}):null,e("textarea",Object.assign({class:"native-textarea","aria-labelledby":i?s:null,ref:t=>this.nativeInput=t,autoCapitalize:this.autocapitalize,autoFocus:this.autofocus,enterKeyHint:this.enterkeyhint,inputMode:this.inputmode,disabled:this.disabled,maxLength:this.maxlength,minLength:this.minlength,name:this.name,placeholder:this.placeholder||"",readOnly:this.readonly,required:this.required,spellcheck:this.spellcheck,cols:this.cols,rows:this.rows,wrap:this.wrap,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,style:r},this.inheritedAttributes),t))}static get delegatesFocus(){return true}get el(){return r(this)}static get watchers(){return{debounce:["debounceChanged"],value:["valueChanged"]}}};let u=0;l.style=c;export{l as wcs_textarea};
2
+ //# sourceMappingURL=p-ed3132be.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["textareaCss","Textarea","this","inputId","textareaIds","didBlurAfterEdit","inheritedAttributes","onInput","ev","nativeInput","value","wcsInput","emit","onFocus","hasFocus","focusChange","fireFocusEvents","wcsFocus","onBlur","wcsBlur","onKeyDown","checkClearOnEdit","debounceChanged","wcsChange","debounceEvent","debounce","valueChanged","getValue","runAutoGrow","connectedCallback","document","dispatchEvent","CustomEvent","detail","el","disconnectedCallback","componentWillLoad","inheritAttributes","componentDidLoad","raf","autoGrow","readTask","style","height","scrollHeight","async","focus","blur","getInputElement","Promise","resolve","clearOnEdit","hasValue","render","labelId","label","findItemLabel","id","Object","assign","resize","h","Host","disabled","icon","size","class","ref","autoCapitalize","autocapitalize","autoFocus","autofocus","enterKeyHint","enterkeyhint","inputMode","inputmode","maxLength","maxlength","minLength","minlength","name","placeholder","readOnly","readonly","required","spellcheck","cols","rows","wrap"],"sources":["./src/components/textarea/textarea.scss?tag=wcs-textarea&encapsulation=shadow","./src/components/textarea/textarea.tsx"],"sourcesContent":["@import '../../style/focus-outline.scss';\n\n:host {\n --wcs-textarea-icon-color: var(--wcs-text-medium);\n --wcs-internal-textarea-border-radius-left: var(--wcs-textarea-border-radius-left, var(--wcs-border-radius));\n --wcs-internal-textarea-border-radius-right: var(--wcs-textarea-border-radius-right, var(--wcs-border-radius));\n --wcs-internal-textarea-border-width: 2px;\n --wcs-textarea-max-height: unset;\n display: flex;\n flex-direction: row;\n width: 100%;\n border-radius: var(--wcs-internal-textarea-border-radius-left) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-left);\n background-color: var(--wcs-light);\n border: var(--wcs-internal-textarea-border-width) solid var(--wcs-light);\n background-clip: padding-box;\n\n ::placeholder {\n font-weight: 400;\n font-style: italic;\n }\n\n textarea {\n overflow: auto;\n flex: 1;\n width: 100%;\n box-sizing: border-box;\n min-height: var(--wcs-size-m);\n max-height: var(--wcs-textarea-max-height);\n background-color: transparent;\n font-family: var(--wcs-font-sans-serif);\n color: var(--wcs-primary);\n font-weight: var(--wcs-font-weight-form-value) !important;\n border: none;\n // On divise --wcs-internal-input-border-width par deux car la valeur du padding est appliquée en haut et en bas\n padding: calc(calc(var(--wcs-padding) / 2) - calc(var(--wcs-internal-textarea-border-width) / 2)) calc(var(--wcs-padding) - var(--wcs-internal-textarea-border-width));\n font-size: 1rem;\n line-height: 1.5;\n }\n\n textarea:focus {\n box-shadow: none;\n outline: 0;\n }\n\n wcs-mat-icon {\n position: relative;\n margin-top: 7px;\n margin-left: 8px;\n margin-right: -8px;\n }\n}\n\n:host([disabled]) {\n textarea {\n color: var(--wcs-text-disabled);\n cursor: not-allowed;\n }\n}\n\n:host([state=error]) {\n border-color: var(--wcs-red) !important;\n}\n\n:host(:focus-within) {\n border: dashed var(--wcs-internal-textarea-border-width) var(--wcs-primary);\n\n wcs-mat-icon {\n color: var(--wcs-primary);\n }\n}\n","import {\n Component,\n ComponentInterface,\n Method,\n Prop,\n State,\n Watch,\n h,\n Host,\n EventEmitter,\n Element,\n Event,\n Build,\n readTask\n} from '@stencil/core';\nimport { debounceEvent, findItemLabel, inheritAttributes, raf } from '../../utils/helpers';\nimport { TextareaChangeEventDetail } from './textarea-interface';\n\n/**\n * Mainly inspired from Ionic Textarea Component\n *\n * @cssprop --wcs-textarea-max-height - Max height of the text area component\n *\n */\n@Component({\n tag: 'wcs-textarea',\n styleUrl: 'textarea.scss',\n shadow: {\n delegatesFocus: true\n },\n})\nexport class Textarea implements ComponentInterface {\n private nativeInput?: HTMLTextAreaElement;\n private inputId = `wcs-textarea-${textareaIds++}`;\n private didBlurAfterEdit = false;\n private inheritedAttributes: { [k: string]: any } = {};\n\n /**\n * This is required for a WebKit bug which requires us to\n * blur and focus an input to properly focus the input in\n * an item with delegatesFocus. It will no longer be needed\n * with iOS 14.\n *\n * @internal\n */\n @Prop() fireFocusEvents = true;\n\n @Element() private el!: HTMLElement;\n\n @State() private hasFocus = false;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalize = 'none';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types.\n */\n @Prop({mutable: true}) clearOnEdit = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `wcsChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.\n */\n @Prop() debounce = 0;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.wcsChange = debounceEvent(this.wcsChange, this.debounce);\n }\n\n /**\n * If `true`, the user cannot interact with the textarea.\n */\n @Prop() disabled = false;\n\n /**\n * Name of the material icon to add to the input\n */\n @Prop() icon: string;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\n /**\n * A hint to the browser for which enter key to display.\n * Possible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n * `\"previous\"`, `\"search\"`, and `\"send\"`.\n */\n @Prop() enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop() readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Specifies the state of the input. By default the input is in an initial state but you can set it to 'error' state if the data given by the user is not valid.\n */\n @Prop({reflect: true}) state: 'initial' | 'error' = 'initial';\n\n /**\n * The visible width of the text control, in average character widths. If it is specified, it must be a positive integer.\n */\n @Prop() cols?: number;\n\n /**\n * The number of visible text lines for the control.\n */\n @Prop() rows?: number;\n\n /**\n * Indicates how the control wraps text.\n */\n @Prop() wrap?: 'hard' | 'soft' | 'off';\n\n /**\n * If `true`, the element height will increase based on the value.\n */\n @Prop() autoGrow = false;\n\n /**\n * The value of the textarea.\n */\n @Prop({mutable: true}) value?: string | null = '';\n\n /**\n * Indicates how the textarea should be resizable.\n * Possible values 'both' | 'none' | 'vertical' | 'horizontal'\n */\n @Prop({reflect: true}) resize?: 'both' | 'none' | 'vertical' | 'horizontal';\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n if (nativeInput && nativeInput.value !== value) {\n nativeInput.value = value;\n }\n this.runAutoGrow();\n this.wcsChange.emit({value});\n }\n\n /**\n * Emitted when the input value has changed.\n */\n @Event() wcsChange!: EventEmitter<TextareaChangeEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() wcsInput!: EventEmitter<KeyboardEvent>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() wcsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() wcsFocus!: EventEmitter<FocusEvent>;\n\n connectedCallback() {\n this.debounceChanged();\n if (Build.isBrowser) {\n document.dispatchEvent(new CustomEvent('wcsInputDidLoad', {\n detail: this.el\n }));\n }\n }\n\n disconnectedCallback() {\n if (Build.isBrowser) {\n document.dispatchEvent(new CustomEvent('wcsInputDidUnload', {\n detail: this.el\n }));\n }\n }\n\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['title']);\n }\n\n componentDidLoad() {\n raf(() => this.runAutoGrow());\n }\n\n private runAutoGrow() {\n const nativeInput = this.nativeInput;\n if (nativeInput && this.autoGrow) {\n readTask(() => {\n nativeInput.style.height = 'auto';\n nativeInput.style.height = nativeInput.scrollHeight + 'px';\n });\n }\n }\n\n /**\n * This method make the textarea automatically adopt the size of the content without a scroll bar\n */\n @Method()\n async fitContent() {\n raf(() => this.runAutoGrow());\n }\n\n /**\n * @deprecated use the native focus method instead \n * Sets focus on the native `textarea` in `wcs-textarea`.\n */\n @Method()\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n }\n }\n\n /**\n * Sets blur on the native `textarea` in `wcs-textarea`. Use this method instead of the global\n * `textarea.blur()`.\n * @internal\n */\n @Method()\n async setBlur() {\n if (this.nativeInput) {\n this.nativeInput.blur();\n }\n }\n\n /**\n * Returns the native `<textarea>` element used under the hood.\n */\n @Method()\n getInputElement(): Promise<HTMLTextAreaElement> {\n // tslint:disable-next-line:no-non-null-assertion\n return Promise.resolve(this.nativeInput!);\n }\n\n /**\n * Check if we need to clear the text input if clearOnEdit is enabled\n */\n private checkClearOnEdit() {\n if (!this.clearOnEdit) {\n return;\n }\n\n // Did the input value change after it was blurred and edited?\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.value = '';\n }\n\n // Reset the flag\n this.didBlurAfterEdit = false;\n }\n\n private focusChange() {\n // If clearOnEdit is enabled and the input blurred but has a value, set a flag\n if (this.clearOnEdit && !this.hasFocus && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n }\n\n private hasValue(): boolean {\n return this.getValue() !== '';\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private onInput = (ev: Event) => {\n if (this.nativeInput) {\n this.value = this.nativeInput.value;\n }\n this.wcsInput.emit(ev as KeyboardEvent);\n }\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusChange();\n\n if (this.fireFocusEvents) {\n this.wcsFocus.emit(ev);\n }\n }\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n this.focusChange();\n\n if (this.fireFocusEvents) {\n this.wcsBlur.emit(ev);\n }\n }\n\n private onKeyDown = () => {\n this.checkClearOnEdit();\n }\n\n render() {\n const value = this.getValue();\n const labelId = this.inputId + '-lbl';\n const label = findItemLabel(this.el);\n if (label) {\n label.id = labelId;\n }\n const style = {\n ...(this.resize && {'resize': this.resize})\n }\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n >\n {this.icon ? (<wcs-mat-icon icon={this.icon} size=\"m\"></wcs-mat-icon>) : null}\n <textarea\n class=\"native-textarea\"\n aria-labelledby={label ? labelId : null}\n ref={el => this.nativeInput = el}\n autoCapitalize={this.autocapitalize}\n autoFocus={this.autofocus}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n disabled={this.disabled}\n maxLength={this.maxlength}\n minLength={this.minlength}\n name={this.name}\n placeholder={this.placeholder || ''}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n cols={this.cols}\n rows={this.rows}\n wrap={this.wrap}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onKeyDown={this.onKeyDown}\n style={style}\n {...this.inheritedAttributes}\n >\n {value}\n </textarea>\n </Host>\n );\n }\n}\n\nlet textareaIds = 0;\n"],"mappings":"gIAAA,MAAMA,EAAc,oqD,MC+BPC,EAAQ,M,qKAETC,KAAAC,QAAU,gBAAgBC,MAC1BF,KAAAG,iBAAmB,MACnBH,KAAAI,oBAA4C,GAsR5CJ,KAAAK,QAAWC,IACf,GAAIN,KAAKO,YAAa,CAClBP,KAAKQ,MAAQR,KAAKO,YAAYC,K,CAElCR,KAAKS,SAASC,KAAKJ,EAAoB,EAGnCN,KAAAW,QAAWL,IACfN,KAAKY,SAAW,KAChBZ,KAAKa,cAEL,GAAIb,KAAKc,gBAAiB,CACtBd,KAAKe,SAASL,KAAKJ,E,GAInBN,KAAAgB,OAAUV,IACdN,KAAKY,SAAW,MAChBZ,KAAKa,cAEL,GAAIb,KAAKc,gBAAiB,CACtBd,KAAKiB,QAAQP,KAAKJ,E,GAIlBN,KAAAkB,UAAY,KAChBlB,KAAKmB,kBAAkB,E,qBAtSD,K,cAIE,M,oBAKH,O,eAKL,M,iBAKiB,M,cAKlB,E,cAUA,M,qIAkCInB,KAAKC,Q,yCAUT,M,cAKA,M,gBAKE,M,WAK+B,U,0EAoBjC,M,WAK4B,G,sBA3FrCmB,kBACNpB,KAAKqB,UAAYC,EAActB,KAAKqB,UAAWrB,KAAKuB,S,CAsG9CC,eACN,MAAMjB,EAAcP,KAAKO,YACzB,MAAMC,EAAQR,KAAKyB,WACnB,GAAIlB,GAAeA,EAAYC,QAAUA,EAAO,CAC5CD,EAAYC,MAAQA,C,CAExBR,KAAK0B,cACL1B,KAAKqB,UAAUX,KAAK,CAACF,S,CAuBzBmB,oBACI3B,KAAKoB,kBACgB,CACjBQ,SAASC,cAAc,IAAIC,YAAY,kBAAmB,CACtDC,OAAQ/B,KAAKgC,K,EAKzBC,uBACyB,CACjBL,SAASC,cAAc,IAAIC,YAAY,oBAAqB,CACxDC,OAAQ/B,KAAKgC,K,EAKzBE,oBACIlC,KAAKI,oBAAsB+B,EAAkBnC,KAAKgC,GAAI,CAAC,S,CAG3DI,mBACIC,GAAI,IAAMrC,KAAK0B,e,CAGXA,cACJ,MAAMnB,EAAcP,KAAKO,YACzB,GAAIA,GAAeP,KAAKsC,SAAU,CAC9BC,GAAS,KACLhC,EAAYiC,MAAMC,OAAS,OAC3BlC,EAAYiC,MAAMC,OAASlC,EAAYmC,aAAe,IAAI,G,EAStEC,mBACIN,GAAI,IAAMrC,KAAK0B,e,CAQnBiB,iBACI,GAAI3C,KAAKO,YAAa,CAClBP,KAAKO,YAAYqC,O,EAUzBD,gBACI,GAAI3C,KAAKO,YAAa,CAClBP,KAAKO,YAAYsC,M,EAQzBC,kBAEI,OAAOC,QAAQC,QAAQhD,KAAKO,Y,CAMxBY,mBACJ,IAAKnB,KAAKiD,YAAa,CACnB,M,CAIJ,GAAIjD,KAAKG,kBAAoBH,KAAKkD,WAAY,CAE1ClD,KAAKQ,MAAQ,E,CAIjBR,KAAKG,iBAAmB,K,CAGpBU,cAEJ,GAAIb,KAAKiD,cAAgBjD,KAAKY,UAAYZ,KAAKkD,WAAY,CACvDlD,KAAKG,iBAAmB,I,EAIxB+C,WACJ,OAAOlD,KAAKyB,aAAe,E,CAGvBA,WACJ,OAAOzB,KAAKQ,OAAS,E,CAgCzB2C,SACI,MAAM3C,EAAQR,KAAKyB,WACnB,MAAM2B,EAAUpD,KAAKC,QAAU,OAC/B,MAAMoD,EAAQC,EAActD,KAAKgC,IACjC,GAAIqB,EAAO,CACPA,EAAME,GAAKH,C,CAEf,MAAMZ,EAAKgB,OAAAC,OAAA,GACHzD,KAAK0D,QAAU,CAACA,OAAU1D,KAAK0D,SAGvC,OACIC,EAACC,EAAI,iBACc5D,KAAK6D,SAAW,OAAS,MAEvC7D,KAAK8D,KAAQH,EAAA,gBAAcG,KAAM9D,KAAK8D,KAAMC,KAAK,MAAuB,KACzEJ,EAAA,WAAAH,OAAAC,OAAA,CACIO,MAAM,kBAAiB,kBACNX,EAAQD,EAAU,KACnCa,IAAKjC,GAAMhC,KAAKO,YAAcyB,EAC9BkC,eAAgBlE,KAAKmE,eACrBC,UAAWpE,KAAKqE,UAChBC,aAActE,KAAKuE,aACnBC,UAAWxE,KAAKyE,UAChBZ,SAAU7D,KAAK6D,SACfa,UAAW1E,KAAK2E,UAChBC,UAAW5E,KAAK6E,UAChBC,KAAM9E,KAAK8E,KACXC,YAAa/E,KAAK+E,aAAe,GACjCC,SAAUhF,KAAKiF,SACfC,SAAUlF,KAAKkF,SACfC,WAAYnF,KAAKmF,WACjBC,KAAMpF,KAAKoF,KACXC,KAAMrF,KAAKqF,KACXC,KAAMtF,KAAKsF,KACXjF,QAASL,KAAKK,QACdW,OAAQhB,KAAKgB,OACbL,QAASX,KAAKW,QACdO,UAAWlB,KAAKkB,UAChBsB,MAAOA,GACHxC,KAAKI,qBAEhBI,G,qJAOb,IAAIN,EAAc,E"}
@@ -0,0 +1,2 @@
1
+ import{r as e,c,h as r,H as s}from"./p-a2df3a49.js";const t=':host{--wcs-checkbox-border-color:var(--wcs-text-medium);--wcs-checkbox-text-color:var(--wcs-text-medium);display:flex}:host([disabled]){--wcs-checkbox-border-color:var(--wcs-light);--wcs-checkbox-text-color:var(--wcs-text-disabled)}:host([disabled]) .wcs-container{cursor:not-allowed}.wcs-checkmark{transition:background-color 225ms cubic-bezier(0.17, 0.84, 0.44, 1), color 225ms cubic-bezier(0.17, 0.84, 0.44, 1)}.wcs-container{position:relative;font-size:1rem;user-select:none;font-weight:500;display:flex}.wcs-container:not([aria-disabled]){cursor:pointer}:host([label-alignment=top]) .wcs-container{align-items:start}:host([label-alignment=center]) .wcs-container{align-items:center}:host([label-alignment=bottom]) .wcs-container{align-items:flex-end}.wcs-container input{position:absolute;opacity:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.wcs-container:hover:not([aria-disabled]),input:focus{--wcs-checkbox-border-color:var(--wcs-primary);--wcs-checkbox-text-color:var(--wcs-primary)}.wcs-container:has(input:focus-visible){outline:2px dashed var(--wcs-primary);outline-offset:4px;border-radius:calc(var(--wcs-border-radius) / 2)}@supports not selector(.wcs-container:has(input:focus-visible)){.wcs-container:focus-within{outline:2px dashed var(--wcs-primary);outline-offset:4px;border-radius:calc(var(--wcs-border-radius) / 2)}}.wcs-checkmark{flex:0 0 1.125rem;width:1.125rem;height:1.125rem;border:2px solid var(--wcs-checkbox-border-color);border-radius:3px}:host([indeterminate]) .wcs-checkmark{--wcs-checkbox-border-color:var(--wcs-primary);background:var(--wcs-primary)}.wcs-container:not([aria-disabled]) input:checked~.wcs-checkmark{background-color:var(--wcs-primary);--wcs-checkbox-border-color:var(--wcs-primary)}.wcs-container[aria-disabled] input:checked~.wcs-checkmark{background-color:var(--wcs-light);--wcs-checkbox-border-color:var(--wcs-light)}.wcs-checkmark:after{content:"";position:absolute;display:none}.wcs-container input:checked~.wcs-checkmark:after{display:flex}.wcs-container .wcs-checkmark:after{left:7px;width:5px;height:10px;border:solid var(--wcs-white, white);border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.wcs-container:not([aria-disabled]) input:checked~.text{--wcs-checkbox-text-color:var(--wcs-primary)}.text{color:var(--wcs-checkbox-text-color);margin-left:6px;font-weight:500;line-height:1.375}';const o=class{constructor(r){e(this,r);this.wcsChange=c(this,"wcsChange",7);this.checkboxId=`wcs-checkbox-${a++}`;this.name=this.checkboxId;this.indeterminate=false;this.checked=false;this.labelAlignment="center";this.disabled=false}handleChange(e){this.indeterminate=false;this.checked=!this.checked;this.wcsChange.emit({checked:this.checked})}render(){return r(s,null,r("label",{htmlFor:this.name,class:"wcs-container","aria-disabled":this.disabled},r("input",{onChange:e=>this.handleChange(e),checked:this.checked,class:"wcs-checkbox",type:"checkbox",name:this.name,disabled:this.disabled,id:this.name}),r("span",{class:"wcs-checkmark"}),r("span",{class:"text"},r("slot",null))))}static get delegatesFocus(){return true}};let a=0;o.style=t;export{o as wcs_checkbox};
2
+ //# sourceMappingURL=p-f06f48f3.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["checkboxCss","Checkbox","this","checkboxId","checkboxIds","handleChange","_event","indeterminate","checked","wcsChange","emit","render","h","Host","htmlFor","name","class","disabled","onChange","evt","type","id"],"sources":["./src/components/checkbox/checkbox.scss?tag=wcs-checkbox&encapsulation=shadow","./src/components/checkbox/checkbox.tsx"],"sourcesContent":["@import '../../style/focus-outline.scss';\n\n:host {\n --wcs-checkbox-border-color: var(--wcs-text-medium);\n --wcs-checkbox-text-color: var(--wcs-text-medium);\n display: flex;\n}\n\n:host([disabled]) {\n --wcs-checkbox-border-color: var(--wcs-light);\n --wcs-checkbox-text-color: var(--wcs-text-disabled);\n\n .wcs-container {\n cursor: not-allowed;\n }\n}\n\n.wcs-checkmark {\n transition: background-color 225ms cubic-bezier(.17, .84, .44, 1),\n color 225ms cubic-bezier(.17, .84, .44, 1);\n}\n\n/* Customize the label (the wcs-container) */\n.wcs-container {\n position: relative;\n font-size: 1rem;\n user-select: none;\n font-weight: 500;\n display: flex;\n}\n\n.wcs-container:not([aria-disabled]) {\n cursor: pointer;\n}\n\n/* Let the user choose the alignment of the checkbox with the label text */\n:host([label-alignment=\"top\"]){\n .wcs-container {\n align-items: start;\n }\n}\n\n:host([label-alignment=\"center\"]){\n .wcs-container {\n align-items: center;\n }\n}\n\n:host([label-alignment=\"bottom\"]){\n .wcs-container {\n align-items: flex-end;\n }\n}\n\n/* Hide the browser's default checkbox */\n.wcs-container input {\n position: absolute;\n opacity: 0;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n}\n\n.wcs-container:hover:not([aria-disabled]), input:focus {\n --wcs-checkbox-border-color: var(--wcs-primary);\n\n --wcs-checkbox-text-color: var(--wcs-primary);\n}\n\n.wcs-container:has(input:focus-visible) {\n @include focus-outline($border-radius: calc(var(--wcs-border-radius) / 2));\n}\n\n@supports not selector(.wcs-container:has(input:focus-visible)){\n .wcs-container:focus-within {\n @include focus-outline($border-radius: calc(var(--wcs-border-radius) /2));\n }\n}\n\n/* Create a custom checkbox */\n.wcs-checkmark {\n flex: 0 0 1.125rem;\n width: 1.125rem;\n height: 1.125rem;\n border: 2px solid var(--wcs-checkbox-border-color);\n border-radius: 3px;\n}\n\n:host([indeterminate]) {\n .wcs-checkmark {\n --wcs-checkbox-border-color: var(--wcs-primary);\n background: var(--wcs-primary);\n }\n}\n\n/* When the checkbox is checked, add a blue background */\n.wcs-container:not([aria-disabled]) input:checked~.wcs-checkmark {\n background-color: var(--wcs-primary);\n --wcs-checkbox-border-color: var(--wcs-primary);\n}\n.wcs-container[aria-disabled] input:checked~.wcs-checkmark {\n background-color: var(--wcs-light);\n --wcs-checkbox-border-color: var(--wcs-light);\n}\n\n/* Create the wcs-checkmark/indicator (hidden when not checked) */\n.wcs-checkmark:after {\n content: \"\";\n position: absolute;\n display: none;\n}\n\n/* Show the wcs-checkmark when checked */\n.wcs-container input:checked~.wcs-checkmark:after {\n display: flex;\n}\n\n\n\n/* Style the wcs-checkmark/indicator */\n.wcs-container .wcs-checkmark:after {\n left: 7px;\n width: 5px;\n height: 10px;\n border: solid var(--wcs-white, white);\n border-width: 0 3px 3px 0;\n -webkit-transform: rotate(45deg);\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.wcs-container:not([aria-disabled]) input:checked~.text {\n --wcs-checkbox-text-color: var(--wcs-primary);\n}\n\n.text {\n color: var(--wcs-checkbox-text-color);\n margin-left: 6px;\n font-weight: 500;\n line-height: 1.375;\n}\n","import { Component, Prop, Event, EventEmitter, ComponentInterface, h, Host } from '@stencil/core';\nimport { CheckboxChangeEventDetail, CheckboxLabelAlignment } from './checkbox-interface';\n\n@Component({\n tag: 'wcs-checkbox',\n styleUrl: 'checkbox.scss',\n shadow: true\n})\nexport class Checkbox implements ComponentInterface {\n private checkboxId = `wcs-checkbox-${checkboxIds++}`;\n @Prop() name = this.checkboxId;\n\n /**\n * If `true` the checkbox is in indeterminate state.\n */\n @Prop({ reflect: true, mutable: true }) indeterminate = false;\n\n /**\n * If `true`, the checkbox is selected.\n */\n @Prop({ reflect: true, mutable: true }) checked = false;\n\n /**\n * Specifie the alignment of the checkbox with the label content\n */\n @Prop({ mutable: true, reflect: true }) labelAlignment: CheckboxLabelAlignment = 'center';\n\n /**\n * Specify wether the checkbox is disabled or not.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Emitted when the checked property has changed.\n */\n @Event() wcsChange!: EventEmitter<CheckboxChangeEventDetail>;\n\n handleChange(_event: Event) {\n this.indeterminate = false;\n this.checked = !this.checked;\n this.wcsChange.emit({\n checked: this.checked\n });\n }\n\n render() {\n return (\n <Host>\n <label htmlFor={this.name} class=\"wcs-container\" aria-disabled={this.disabled}>\n <input onChange={(evt) => this.handleChange(evt)}\n checked={this.checked}\n class=\"wcs-checkbox\"\n type=\"checkbox\"\n name={this.name}\n disabled={this.disabled}\n id={this.name}>\n </input>\n <span class=\"wcs-checkmark\"></span>\n <span class=\"text\">\n <slot/>\n </span>\n </label>\n </Host>\n );\n }\n}\n\nlet checkboxIds = 0;\n"],"mappings":"yDAAA,MAAMA,EAAc,04E,MCQPC,EAAQ,M,8DACTC,KAAAC,WAAa,gBAAgBC,M,UACtBF,KAAKC,W,mBAKoC,M,aAKN,M,oBAK+B,S,cAKrD,K,CAO5BE,aAAaC,GACTJ,KAAKK,cAAgB,MACrBL,KAAKM,SAAWN,KAAKM,QACrBN,KAAKO,UAAUC,KAAK,CAChBF,QAASN,KAAKM,S,CAItBG,SACI,OACIC,EAACC,EAAI,KACDD,EAAA,SAAOE,QAASZ,KAAKa,KAAMC,MAAM,gBAAe,gBAAgBd,KAAKe,UACjEL,EAAA,SAAOM,SAAWC,GAAQjB,KAAKG,aAAac,GACrCX,QAASN,KAAKM,QACdQ,MAAM,eACNI,KAAK,WACLL,KAAMb,KAAKa,KACXE,SAAUf,KAAKe,SACfI,GAAInB,KAAKa,OAEhBH,EAAA,QAAMI,MAAM,kBACZJ,EAAA,QAAMI,MAAM,QACRJ,EAAA,e,GAQxB,IAAIR,EAAc,E"}
1
+ {"version":3,"names":["checkboxCss","Checkbox","this","checkboxId","checkboxIds","handleChange","_event","indeterminate","checked","wcsChange","emit","render","h","Host","htmlFor","name","class","disabled","onChange","evt","type","id"],"sources":["./src/components/checkbox/checkbox.scss?tag=wcs-checkbox&encapsulation=shadow","./src/components/checkbox/checkbox.tsx"],"sourcesContent":["@import '../../style/focus-outline.scss';\n\n:host {\n --wcs-checkbox-border-color: var(--wcs-text-medium);\n --wcs-checkbox-text-color: var(--wcs-text-medium);\n display: flex;\n}\n\n:host([disabled]) {\n --wcs-checkbox-border-color: var(--wcs-light);\n --wcs-checkbox-text-color: var(--wcs-text-disabled);\n\n .wcs-container {\n cursor: not-allowed;\n }\n}\n\n.wcs-checkmark {\n transition: background-color 225ms cubic-bezier(.17, .84, .44, 1),\n color 225ms cubic-bezier(.17, .84, .44, 1);\n}\n\n/* Customize the label (the wcs-container) */\n.wcs-container {\n position: relative;\n font-size: 1rem;\n user-select: none;\n font-weight: 500;\n display: flex;\n}\n\n.wcs-container:not([aria-disabled]) {\n cursor: pointer;\n}\n\n/* Let the user choose the alignment of the checkbox with the label text */\n:host([label-alignment=\"top\"]){\n .wcs-container {\n align-items: start;\n }\n}\n\n:host([label-alignment=\"center\"]){\n .wcs-container {\n align-items: center;\n }\n}\n\n:host([label-alignment=\"bottom\"]){\n .wcs-container {\n align-items: flex-end;\n }\n}\n\n/* Hide the browser's default checkbox */\n.wcs-container input {\n position: absolute;\n opacity: 0;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n}\n\n.wcs-container:hover:not([aria-disabled]), input:focus {\n --wcs-checkbox-border-color: var(--wcs-primary);\n\n --wcs-checkbox-text-color: var(--wcs-primary);\n}\n\n.wcs-container:has(input:focus-visible) {\n @include focus-outline($border-radius: calc(var(--wcs-border-radius) / 2));\n}\n\n@supports not selector(.wcs-container:has(input:focus-visible)){\n .wcs-container:focus-within {\n @include focus-outline($border-radius: calc(var(--wcs-border-radius) /2));\n }\n}\n\n/* Create a custom checkbox */\n.wcs-checkmark {\n flex: 0 0 1.125rem;\n width: 1.125rem;\n height: 1.125rem;\n border: 2px solid var(--wcs-checkbox-border-color);\n border-radius: 3px;\n}\n\n:host([indeterminate]) {\n .wcs-checkmark {\n --wcs-checkbox-border-color: var(--wcs-primary);\n background: var(--wcs-primary);\n }\n}\n\n/* When the checkbox is checked, add a blue background */\n.wcs-container:not([aria-disabled]) input:checked~.wcs-checkmark {\n background-color: var(--wcs-primary);\n --wcs-checkbox-border-color: var(--wcs-primary);\n}\n.wcs-container[aria-disabled] input:checked~.wcs-checkmark {\n background-color: var(--wcs-light);\n --wcs-checkbox-border-color: var(--wcs-light);\n}\n\n/* Create the wcs-checkmark/indicator (hidden when not checked) */\n.wcs-checkmark:after {\n content: \"\";\n position: absolute;\n display: none;\n}\n\n/* Show the wcs-checkmark when checked */\n.wcs-container input:checked~.wcs-checkmark:after {\n display: flex;\n}\n\n\n\n/* Style the wcs-checkmark/indicator */\n.wcs-container .wcs-checkmark:after {\n left: 7px;\n width: 5px;\n height: 10px;\n border: solid var(--wcs-white, white);\n border-width: 0 3px 3px 0;\n -webkit-transform: rotate(45deg);\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.wcs-container:not([aria-disabled]) input:checked~.text {\n --wcs-checkbox-text-color: var(--wcs-primary);\n}\n\n.text {\n color: var(--wcs-checkbox-text-color);\n margin-left: 6px;\n font-weight: 500;\n line-height: 1.375;\n}\n","import { Component, Prop, Event, EventEmitter, ComponentInterface, h, Host } from '@stencil/core';\nimport { CheckboxChangeEventDetail, CheckboxLabelAlignment } from './checkbox-interface';\n\n@Component({\n tag: 'wcs-checkbox',\n styleUrl: 'checkbox.scss',\n shadow: {\n delegatesFocus: true\n }\n})\nexport class Checkbox implements ComponentInterface {\n private checkboxId = `wcs-checkbox-${checkboxIds++}`;\n @Prop() name = this.checkboxId;\n\n /**\n * If `true` the checkbox is in indeterminate state.\n */\n @Prop({ reflect: true, mutable: true }) indeterminate = false;\n\n /**\n * If `true`, the checkbox is selected.\n */\n @Prop({ reflect: true, mutable: true }) checked = false;\n\n /**\n * Specifie the alignment of the checkbox with the label content\n */\n @Prop({ mutable: true, reflect: true }) labelAlignment: CheckboxLabelAlignment = 'center';\n\n /**\n * Specify wether the checkbox is disabled or not.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Emitted when the checked property has changed.\n */\n @Event() wcsChange!: EventEmitter<CheckboxChangeEventDetail>;\n\n handleChange(_event: Event) {\n this.indeterminate = false;\n this.checked = !this.checked;\n this.wcsChange.emit({\n checked: this.checked\n });\n }\n\n render() {\n return (\n <Host>\n <label htmlFor={this.name} class=\"wcs-container\" aria-disabled={this.disabled}>\n <input onChange={(evt) => this.handleChange(evt)}\n checked={this.checked}\n class=\"wcs-checkbox\"\n type=\"checkbox\"\n name={this.name}\n disabled={this.disabled}\n id={this.name}>\n </input>\n <span class=\"wcs-checkmark\"></span>\n <span class=\"text\">\n <slot/>\n </span>\n </label>\n </Host>\n );\n }\n}\n\nlet checkboxIds = 0;\n"],"mappings":"oDAAA,MAAMA,EAAc,04E,MCUPC,EAAQ,M,8DACTC,KAAAC,WAAa,gBAAgBC,M,UACtBF,KAAKC,W,mBAKoC,M,aAKN,M,oBAK+B,S,cAKrD,K,CAO5BE,aAAaC,GACTJ,KAAKK,cAAgB,MACrBL,KAAKM,SAAWN,KAAKM,QACrBN,KAAKO,UAAUC,KAAK,CAChBF,QAASN,KAAKM,S,CAItBG,SACI,OACIC,EAACC,EAAI,KACDD,EAAA,SAAOE,QAASZ,KAAKa,KAAMC,MAAM,gBAAe,gBAAgBd,KAAKe,UACjEL,EAAA,SAAOM,SAAWC,GAAQjB,KAAKG,aAAac,GACrCX,QAASN,KAAKM,QACdQ,MAAM,eACNI,KAAK,WACLL,KAAMb,KAAKa,KACXE,SAAUf,KAAKe,SACfI,GAAInB,KAAKa,OAEhBH,EAAA,QAAMI,MAAM,kBACZJ,EAAA,QAAMI,MAAM,QACRJ,EAAA,e,2CAQxB,IAAIR,EAAc,E"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as s,h as o,H as e,g as i}from"./p-a2df3a49.js";import{n as a,o as n,p as r,q as d}from"./p-3dc6b507.js";const l=":host{display:flex}:host([mode=radio]){flex-direction:column}:host([mode=radio]) ::slotted([slot=option]:first-child){margin-top:0}:host([mode=radio]) ::slotted([slot=option]:last-child){margin-bottom:0}:host([mode=radio]) ::slotted([slot=options]){margin-top:calc(var(--wcs-base-margin) / 2);margin-bottom:calc(var(--wcs-base-margin) / 2)}:host([mode=option]){display:inline-flex;flex-direction:row;padding:calc(var(--wcs-base-margin) / 4);background-color:#4d4f53;border-radius:0.6875rem}:host([mode=horizontal]){justify-content:space-between}";const h=class{constructor(o){t(this,o);this.wcsChange=s(this,"wcsChange",7);this.value=undefined;this.name=undefined;this.mode="radio"}onValueChangeHandler(t){this.updateOptionsState(t,true)}componentDidLoad(){if(this.value){this.updateOptionsState(this.value,true)}this.options.forEach((t=>t.mode=this.mode));this.optionsNotDisabled.forEach((t=>{if(t.checked){t.tabIndex=0}else{t.tabIndex=-1}}));if(this.optionsNotDisabled.length>0&&this.optionsNotDisabled.findIndex((t=>t.tabIndex===0))===-1)this.optionsNotDisabled[0].tabIndex=0}get options(){const t=this.el.querySelectorAll("wcs-radio");const s=this.el.querySelector("slot");return t.length!==0?t:s!==null?s.assignedElements():[]}get optionsNotDisabled(){return Array.from(this.options).filter((t=>!t.disabled))}selectedOptionChanged(t){this.updateOptionsState(t.detail.value,false);this.wcsChange.emit({value:t.detail.value})}handleKeyDown(t){if(a(t)||n(t)||r(t)||d(t)){t.preventDefault()}}async handleKeyUp(t){const s=this.optionsNotDisabled;const o=this.optionsNotDisabled.findIndex((t=>t.checked))>=0?this.optionsNotDisabled.findIndex((t=>t.checked)):0;if(a(t)||d(t)){s[o].checked=false;s[o].tabIndex=-1;const t=(o+1)%s.length;s[t].tabIndex=0;s[t].focus();s[t].checked=true}else if(n(t)||r(t)){s[o].checked=false;s[o].tabIndex=-1;const t=(o-1+s.length)%s.length;s[t].tabIndex=0;s[t].focus();s[t].checked=true}}updateOptionsState(t,s){for(const o of this.options){if(o.value!==t){o.removeAttribute("checked")}else{if(s){o.setAttribute("checked","")}}}}render(){return o(e,null,o("slot",{name:"option"}))}get el(){return i(this)}static get watchers(){return{value:["onValueChangeHandler"]}}};h.style=l;export{h as wcs_radio_group};
2
+ //# sourceMappingURL=p-f20b9024.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["radioGroupCss","RadioGroup","onValueChangeHandler","newValue","this","updateOptionsState","componentDidLoad","value","options","forEach","o","mode","optionsNotDisabled","option","checked","tabIndex","length","findIndex","opts","el","querySelectorAll","slot","querySelector","assignedElements","Array","from","filter","disabled","selectedOptionChanged","event","detail","wcsChange","emit","handleKeyDown","ev","isDownArrowKey","isUpArrowKey","isLeftArrowKey","isRightArrowKey","preventDefault","async","radiosNotDisabled","previousSelected","nextOptionIndex","focus","previousOptionIndex","markAsChecked","removeAttribute","setAttribute","render","h","Host","name"],"sources":["./src/components/radio-group/radio-group.scss?tag=wcs-radio-group&encapsulation=shadow","./src/components/radio-group/radio-group.tsx"],"sourcesContent":[":host {\n display: flex;\n}\n\n:host([mode=radio]) {\n flex-direction: column;\n\n ::slotted([slot=option]:first-child) {\n margin-top: 0;\n }\n\n ::slotted([slot=option]:last-child) {\n margin-bottom: 0;\n }\n\n ::slotted([slot=options]) {\n margin-top: calc(var(--wcs-base-margin) / 2);\n margin-bottom: calc(var(--wcs-base-margin) / 2);\n }\n}\n\n:host([mode=option]) {\n display: inline-flex;\n flex-direction: row;\n padding: calc(var(--wcs-base-margin) / 4);\n background-color: #4d4f53;\n border-radius: 0.6875rem;\n}\n\n:host([mode=horizontal]) {\n justify-content: space-between;\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n Watch\n} from '@stencil/core';\nimport { RadioGroupChangeEventDetail, RadioGroupMode } from './radio-group-interface';\nimport { RadioChosedEvent } from '../radio/radio-interface';\nimport { isDownArrowKey, isLeftArrowKey, isRightArrowKey, isUpArrowKey } from \"../../utils/helpers\";\n\n@Component({\n tag: 'wcs-radio-group',\n styleUrl: 'radio-group.scss',\n shadow: true\n})\nexport class RadioGroup implements ComponentInterface {\n @Prop() value: any | any[] | undefined | null;\n @Prop({reflect: true, mutable: false}) name;\n @Prop({reflect: true, mutable: false}) mode: RadioGroupMode = 'radio';\n @Element() private el!: HTMLWcsRadioGroupElement;\n\n /** Emitted when the value has changed. */\n @Event() wcsChange!: EventEmitter<RadioGroupChangeEventDetail>;\n\n @Watch('value')\n onValueChangeHandler(newValue: any) {\n this.updateOptionsState(newValue, true);\n }\n\n componentDidLoad() {\n if (this.value) {\n this.updateOptionsState(this.value, true);\n }\n\n // We set the radio group mode on all options\n this.options.forEach(o => o.mode = this.mode);\n\n this.optionsNotDisabled.forEach((option) => {\n if (option.checked) {\n option.tabIndex = 0;\n } else {\n option.tabIndex = -1\n }\n });\n\n // If no option is already checked we made the first non-disabled option focusable\n if (this.optionsNotDisabled.length > 0 && this.optionsNotDisabled.findIndex(o => o.tabIndex === 0) === -1) this.optionsNotDisabled[0].tabIndex = 0;\n }\n\n private get options(): HTMLWcsRadioElement[] {\n const opts = this.el.querySelectorAll('wcs-radio');\n const slot = this.el.querySelector('slot');\n return opts.length !== 0\n ? opts as unknown as HTMLWcsRadioElement[]\n : slot !== null\n ? slot.assignedElements() as HTMLWcsRadioElement[]\n : [];\n }\n\n private get optionsNotDisabled(): HTMLWcsRadioElement[] {\n return Array.from(this.options).filter(option => !option.disabled);\n }\n\n @Listen('wcsRadioClick')\n selectedOptionChanged(event: CustomEvent<RadioChosedEvent>) {\n this.updateOptionsState(event.detail.value, false);\n this.wcsChange.emit({\n value: event.detail.value\n })\n }\n\n @Listen('keydown')\n handleKeyDown(ev: KeyboardEvent) {\n if (isDownArrowKey(ev) || isUpArrowKey(ev) || isLeftArrowKey(ev) || isRightArrowKey(ev)) {\n ev.preventDefault();\n }\n }\n\n @Listen('keyup')\n async handleKeyUp(ev: KeyboardEvent) {\n const radiosNotDisabled = this.optionsNotDisabled;\n\n // Get the index of the currently checked radio\n const previousSelected = this.optionsNotDisabled.findIndex(o => o.checked) >= 0\n ? this.optionsNotDisabled.findIndex(o => o.checked)\n : 0;\n\n if (isDownArrowKey(ev) || isRightArrowKey(ev)) {\n // Let the previous wcs-radio not accessible via the tab key\n radiosNotDisabled[previousSelected].checked = false;\n radiosNotDisabled[previousSelected].tabIndex = -1;\n\n // Check the next wcs-radio from the previous selected and let accessible via tab key (tabIndex = 0)\n const nextOptionIndex = (previousSelected + 1) % radiosNotDisabled.length; // to return at the beginning on the list when we are on the last index\n radiosNotDisabled[nextOptionIndex].tabIndex = 0;\n radiosNotDisabled[nextOptionIndex].focus();\n radiosNotDisabled[nextOptionIndex].checked = true;\n } else if (isUpArrowKey(ev) || isLeftArrowKey(ev)) {\n // Let the previous wcs-radio not accessible via the tab key\n radiosNotDisabled[previousSelected].checked = false;\n radiosNotDisabled[previousSelected].tabIndex = -1;\n\n // Check the previous wcs-radio from the previous selected and let accessible via tab key (tabIndex = 0)\n const previousOptionIndex = (previousSelected - 1 + radiosNotDisabled.length) % radiosNotDisabled.length; // To return at the end of the list when we are on index=0\n radiosNotDisabled[previousOptionIndex].tabIndex = 0;\n radiosNotDisabled[previousOptionIndex].focus();\n radiosNotDisabled[previousOptionIndex].checked = true;\n }\n }\n\n private updateOptionsState(value: string, markAsChecked: boolean) {\n for (const option of this.options) {\n if (option.value !== value) {\n option.removeAttribute('checked');\n } else {\n if (markAsChecked) {\n option.setAttribute('checked', '');\n }\n }\n }\n }\n\n render() {\n return (\n <Host>\n <slot name=\"option\"/>\n </Host>\n );\n }\n\n}\n"],"mappings":"yHAAA,MAAMA,EAAgB,oiB,MCqBTC,EAAU,M,iHAG2C,O,CAO9DC,qBAAqBC,GACjBC,KAAKC,mBAAmBF,EAAU,K,CAGtCG,mBACI,GAAIF,KAAKG,MAAO,CACZH,KAAKC,mBAAmBD,KAAKG,MAAO,K,CAIxCH,KAAKI,QAAQC,SAAQC,GAAKA,EAAEC,KAAOP,KAAKO,OAExCP,KAAKQ,mBAAmBH,SAASI,IAC7B,GAAIA,EAAOC,QAAS,CAChBD,EAAOE,SAAW,C,KACf,CACHF,EAAOE,UAAY,C,KAK3B,GAAIX,KAAKQ,mBAAmBI,OAAS,GAAKZ,KAAKQ,mBAAmBK,WAAUP,GAAKA,EAAEK,WAAa,OAAQ,EAAGX,KAAKQ,mBAAmB,GAAGG,SAAW,C,CAGzIP,cACR,MAAMU,EAAOd,KAAKe,GAAGC,iBAAiB,aACtC,MAAMC,EAAOjB,KAAKe,GAAGG,cAAc,QACnC,OAAOJ,EAAKF,SAAW,EACjBE,EACAG,IAAS,KACLA,EAAKE,mBACL,E,CAGFX,yBACR,OAAOY,MAAMC,KAAKrB,KAAKI,SAASkB,QAAOb,IAAWA,EAAOc,U,CAI7DC,sBAAsBC,GAClBzB,KAAKC,mBAAmBwB,EAAMC,OAAOvB,MAAO,OAC5CH,KAAK2B,UAAUC,KAAK,CAChBzB,MAAOsB,EAAMC,OAAOvB,O,CAK5B0B,cAAcC,GACV,GAAIC,EAAeD,IAAOE,EAAaF,IAAOG,EAAeH,IAAOI,EAAgBJ,GAAK,CACrFA,EAAGK,gB,EAKXC,kBAAkBN,GACd,MAAMO,EAAoBrC,KAAKQ,mBAG/B,MAAM8B,EAAmBtC,KAAKQ,mBAAmBK,WAAUP,GAAKA,EAAEI,WAAY,EACxEV,KAAKQ,mBAAmBK,WAAUP,GAAKA,EAAEI,UACzC,EAEN,GAAIqB,EAAeD,IAAOI,EAAgBJ,GAAK,CAE3CO,EAAkBC,GAAkB5B,QAAU,MAC9C2B,EAAkBC,GAAkB3B,UAAY,EAGhD,MAAM4B,GAAmBD,EAAmB,GAAKD,EAAkBzB,OACnEyB,EAAkBE,GAAiB5B,SAAW,EAC9C0B,EAAkBE,GAAiBC,QACnCH,EAAkBE,GAAiB7B,QAAU,I,MAC1C,GAAIsB,EAAaF,IAAOG,EAAeH,GAAK,CAE/CO,EAAkBC,GAAkB5B,QAAU,MAC9C2B,EAAkBC,GAAkB3B,UAAY,EAGhD,MAAM8B,GAAuBH,EAAmB,EAAID,EAAkBzB,QAAUyB,EAAkBzB,OAClGyB,EAAkBI,GAAqB9B,SAAW,EAClD0B,EAAkBI,GAAqBD,QACvCH,EAAkBI,GAAqB/B,QAAU,I,EAIjDT,mBAAmBE,EAAeuC,GACtC,IAAK,MAAMjC,KAAUT,KAAKI,QAAS,CAC/B,GAAIK,EAAON,QAAUA,EAAO,CACxBM,EAAOkC,gBAAgB,U,KACpB,CACH,GAAID,EAAe,CACfjC,EAAOmC,aAAa,UAAW,G,IAM/CC,SACI,OACIC,EAACC,EAAI,KACDD,EAAA,QAAME,KAAK,W"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as s,h as e,H as a,g as i}from"./p-a2df3a49.js";const n=':host{--wcs-tabs-padding-bottom:16px}:host([align=start]) .wcs-tabs-headers{justify-content:start}:host([align=end]) .wcs-tabs-headers{justify-content:end}:host([align=center]) .wcs-tabs-headers{justify-content:center}.wcs-tabs-headers{padding-top:4px;overflow-x:auto;display:flex;position:relative}:host([gutter]) .wcs-tabs-headers{border-bottom:var(--wcs-tabs-headers-border-bottom)}.wcs-tab-header{padding:8px 24px 16px 0;display:flex;flex-shrink:0;align-items:center;justify-content:center;cursor:pointer;outline:none}.wcs-tab-header span{text-align:center;color:var(--wcs-text-disabled);font-size:1rem;font-weight:400}.wcs-tab-header:focus span,.wcs-tab-header:hover span{color:var(--wcs-primary)}.wcs-tab-header:focus-visible>span{outline:2px dashed var(--wcs-primary);outline-offset:4px;border-radius:0.1rem}.active span{font-weight:500;color:var(--wcs-primary);position:relative}.active span::after{position:absolute;bottom:calc(var(--wcs-tabs-padding-bottom) * -1);left:0;width:100%;height:0.3125rem;content:"";background-color:var(--wcs-primary);border-radius:3px}';const r=class{constructor(e){t(this,e);this.tabChange=s(this,"tabChange",7);this.tabsId=h++;this.align="start";this.selectedIndex=0;this.selectedKey=undefined;this.headersOnly=false;this.gutter=undefined;this.description=undefined;this.headers=[];this.currentActiveTabIndex=0}selectedIndexChanged(t){this.currentActiveTabIndex=t}selectedTabkeyChanged(t){this.updateCurrentActiveIndexByTabKey(t)}emitActiveTabChange(){this.tabChange.emit({tabName:this.headers[this.currentActiveTabIndex],tabIndex:this.currentActiveTabIndex,selectedKey:this.tabs[this.currentActiveTabIndex].itemKey})}updateCurrentActiveIndexByTabKey(t){for(let s=0;s<this.tabs.length;s++){const e=this.tabs[s];if(e.itemKey===t){this.currentActiveTabIndex=s}}}onTabLoaded(){this.refreshHeaders()}componentDidLoad(){this.putTabsInCorrectDivIfTheyAreNot();this.refreshHeaders();if(this.selectedIndex){this.currentActiveTabIndex=this.selectedIndex}if(this.selectedKey){this.updateCurrentActiveIndexByTabKey(this.selectedKey)}}putTabsInCorrectDivIfTheyAreNot(){const t=this.el.shadowRoot.querySelector(".wcs-tabs");if(t.querySelector("slot")===null){Array.from(this.el.querySelectorAll("wcs-tab")).filter((s=>s.parentNode!==t)).forEach((s=>{if(s.parentElement.isEqualNode(this.el)){this.el.removeChild(s);t.appendChild(s)}}))}}handleKeyDown(t,s){var e,a;const i=t.target;switch(t.key){case" ":case"Enter":{this.currentActiveTabIndex=s;this.emitActiveTabChange();t.preventDefault();break}case"ArrowLeft":{if((e=i.previousElementSibling)===null||e===void 0?void 0:e.classList.contains("wcs-tab-header")){i.previousElementSibling.focus();t.preventDefault()}break}case"ArrowRight":{if((a=i.nextElementSibling)===null||a===void 0?void 0:a.classList.contains("wcs-tab-header")){i.nextElementSibling.focus();t.preventDefault()}break}case"Home":{const s=this.el.shadowRoot.querySelector(".wcs-tab-header:first-child");if(s){s.focus();t.preventDefault()}break}case"End":{const s=this.el.shadowRoot.querySelector(".wcs-tab-header:last-child");if(s){s.focus();t.preventDefault()}break}}}refreshHeaders(){this.headers=[];this.tabs.forEach((t=>{this.headers.push(t.getAttribute("header"))}))}get tabs(){var t;const s=this.el.shadowRoot.querySelector(".wcs-tabs");const e=this.el.shadowRoot.querySelectorAll(".wcs-tabs > wcs-tab");return e.length!==0?e:(s===null||s===void 0?void 0:s.querySelector("slot"))?(t=s===null||s===void 0?void 0:s.querySelector("slot"))===null||t===void 0?void 0:t.assignedElements():[]}selectTabAndEmitChangeEvent(t){this.currentActiveTabIndex=t;this.emitActiveTabChange()}componentWillUpdate(){if(!this.headersOnly){this.updateTabVisibility()}else{this.hideAllTabsContent()}}updateTabVisibility(){this.tabs.forEach(((t,s)=>{if(s!==this.currentActiveTabIndex){t.setAttribute("style","display: none;")}else{t.setAttribute("style","display: block;")}}))}hideAllTabsContent(){this.tabs.forEach((t=>t.setAttribute("style","display: none;")))}render(){return e(a,null,e("div",{class:"wcs-tabs-headers",role:"tablist","aria-label":this.description},this.headers.map(((t,s)=>e("div",{class:"wcs-tab-header "+(this.currentActiveTabIndex===s?"active":""),onClick:()=>this.selectTabAndEmitChangeEvent(s),onKeyDown:t=>this.handleKeyDown(t,s),tabIndex:this.currentActiveTabIndex===s?0:-1,role:"tab",id:`tabs-id-${this.tabsId}-tab-id-${s}`,"aria-controls":`tabs-id-${this.tabsId}-tab-panel-${s}`,"aria-label":t,"aria-selected":this.currentActiveTabIndex===s?"true":"false"},e("span",null,t))))),e("div",{class:"wcs-tabs"},e("slot",{onSlotchange:()=>this.onTabsSlotChange(),name:"wcs-tab"})))}onTabsSlotChange(){let t=0;this.tabs.forEach((s=>{s.setAttribute("aria-label",this.headers.at(t));s.setAttribute("id",`tabs-id-${this.tabsId}-tab-panel-${t}`);t++}))}get el(){return i(this)}static get watchers(){return{selectedIndex:["selectedIndexChanged"],selectedKey:["selectedTabkeyChanged"]}}};let h=0;r.style=n;export{r as wcs_tabs};
2
+ //# sourceMappingURL=p-f489793d.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["tabsCss","Tabs","this","tabsId","selectedIndexChanged","newValue","currentActiveTabIndex","selectedTabkeyChanged","updateCurrentActiveIndexByTabKey","emitActiveTabChange","tabChange","emit","tabName","headers","tabIndex","selectedKey","tabs","itemKey","i","length","tab","onTabLoaded","refreshHeaders","componentDidLoad","putTabsInCorrectDivIfTheyAreNot","selectedIndex","tabDiv","el","shadowRoot","querySelector","Array","from","querySelectorAll","filter","node","parentNode","forEach","parentElement","isEqualNode","removeChild","appendChild","handleKeyDown","ev","target","key","preventDefault","_a","previousElementSibling","classList","contains","focus","_b","nextElementSibling","firstTab","lastTab","x","push","getAttribute","tabsEl","assignedElements","selectTabAndEmitChangeEvent","index","componentWillUpdate","headersOnly","updateTabVisibility","hideAllTabsContent","idx","setAttribute","render","h","Host","class","role","description","map","header","onClick","onKeyDown","evt","id","onSlotchange","onTabsSlotChange","name","tabId","at"],"sources":["./src/components/tabs/tabs.scss?tag=wcs-tabs&encapsulation=shadow","./src/components/tabs/tabs.tsx"],"sourcesContent":["@import '../../style/focus-outline.scss';\n\n:host {\n --wcs-tabs-padding-bottom: 16px;\n}\n\n:host([align=start]) .wcs-tabs-headers {\n justify-content: start;\n}\n\n:host([align=end]) .wcs-tabs-headers {\n justify-content: end;\n}\n\n:host([align=center]) .wcs-tabs-headers {\n justify-content: center;\n}\n\n.wcs-tabs-headers {\n padding-top: 4px;\n overflow-x: auto;\n display: flex;\n position: relative;\n}\n\n:host([gutter]) {\n .wcs-tabs-headers {\n border-bottom: var(--wcs-tabs-headers-border-bottom);\n }\n}\n\n.wcs-tab-header {\n padding: 8px 24px 16px 0;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n outline: none;\n\n span {\n text-align: center;\n color: var(--wcs-text-disabled);\n font-size: 1rem;\n font-weight: 400;\n }\n\n\n &:focus,\n &:hover {\n span {\n color: var(--wcs-primary);\n }\n }\n\n &:focus-visible > span {\n @include focus-outline;\n }\n}\n\n\n.active {\n span {\n font-weight: 500;\n color: var(--wcs-primary);\n position: relative;\n }\n\n span::after {\n position: absolute;\n bottom: calc(var(--wcs-tabs-padding-bottom) * -1);\n left: 0;\n width: 100%;\n height: 0.3125rem;\n content: \"\";\n background-color: var(--wcs-primary);\n border-radius: 3px;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n State,\n ComponentInterface,\n Event,\n EventEmitter,\n Watch,\n h,\n Host,\n Listen\n} from '@stencil/core';\n\nimport { WcsTabsAlignment, WcsTabChangeEvent } from './tabs-interface';\n\n/**\n * Tabs component to switch between tab content.\n * Use in conjuction with `wcs-tab`.\n *\n * @example\n * ```html\n * <wcs-tabs>\n * <wcs-tab header=\"One\">The content !</wcs-tab>\n * <wcs-tab header=\"Two\">More content !</wcs-tab>\n * </wcs-tabs>\n * ```\n */\n@Component({\n tag: 'wcs-tabs',\n styleUrl: 'tabs.scss',\n shadow: true,\n})\nexport class Tabs implements ComponentInterface {\n /**\n * Tab headers alignment.\n */\n @Prop({reflect: true}) align: WcsTabsAlignment = 'start';\n\n /**\n * Current selected tab index.\n * Starts at 0.\n */\n @Prop() selectedIndex: number = 0;\n\n @Prop() selectedKey: any;\n\n /**\n * Whether to skip rendering the tabpanel with the content of the selected tab. Use this prop if you plan to\n * separately render the tab content.\n */\n @Prop() headersOnly: boolean = false;\n /** Determines if tabs header should have a border at the bottom */\n @Prop() gutter: boolean;\n\n /**\n * Description is used to provide aria-label for the tabs container which has `role=\"tablist\"`.\n */\n @Prop() description: string;\n\n /**\n *\n * Emitted when the selected tab change.\n */\n @Event() tabChange!: EventEmitter<WcsTabChangeEvent>;\n\n @Element() private el!: HTMLWcsTabsElement;\n\n @State() private headers: string[] = [];\n\n @State() private currentActiveTabIndex = 0;\n\n private tabsId: number = tabsId++;\n\n @Watch('selectedIndex')\n selectedIndexChanged(newValue: number) {\n this.currentActiveTabIndex = newValue;\n }\n\n @Watch('selectedKey')\n selectedTabkeyChanged(newValue: any) {\n this.updateCurrentActiveIndexByTabKey(newValue);\n }\n\n private emitActiveTabChange() {\n this.tabChange.emit({\n tabName: this.headers[this.currentActiveTabIndex],\n tabIndex: this.currentActiveTabIndex,\n selectedKey: this.tabs[this.currentActiveTabIndex].itemKey\n });\n }\n\n private updateCurrentActiveIndexByTabKey(newValue: any) {\n for (let i = 0; i < this.tabs.length; i++) {\n const tab = this.tabs[i];\n if (tab.itemKey === newValue) {\n this.currentActiveTabIndex = i;\n }\n }\n }\n\n @Listen('tabLoaded')\n onTabLoaded() {\n this.refreshHeaders();\n }\n\n componentDidLoad() {\n this.putTabsInCorrectDivIfTheyAreNot();\n this.refreshHeaders();\n if (this.selectedIndex) {\n this.currentActiveTabIndex = this.selectedIndex;\n }\n if (this.selectedKey) {\n this.updateCurrentActiveIndexByTabKey(this.selectedKey);\n }\n }\n\n // XXX: Firefox < 63\n private putTabsInCorrectDivIfTheyAreNot() {\n const tabDiv = this.el.shadowRoot.querySelector('.wcs-tabs');\n if (tabDiv.querySelector('slot') === null) {\n Array.from(this.el.querySelectorAll('wcs-tab'))\n .filter(node => node.parentNode !== tabDiv)\n .forEach(tab => {\n if (tab.parentElement.isEqualNode(this.el)) {\n this.el.removeChild(tab);\n tabDiv.appendChild(tab);\n }\n });\n }\n }\n\n handleKeyDown(ev: KeyboardEvent, tabIndex: number) {\n const target = ev.target as HTMLDivElement;\n switch (ev.key) {\n case ' ':\n case 'Enter': {\n this.currentActiveTabIndex = tabIndex;\n this.emitActiveTabChange();\n ev.preventDefault();\n break;\n }\n case 'ArrowLeft': {\n if (target.previousElementSibling?.classList.contains('wcs-tab-header')) {\n (target.previousElementSibling as HTMLDivElement).focus();\n ev.preventDefault();\n }\n break;\n }\n case 'ArrowRight': {\n if (target.nextElementSibling?.classList.contains('wcs-tab-header')) {\n (target.nextElementSibling as HTMLDivElement).focus();\n ev.preventDefault();\n }\n break;\n }\n case 'Home': {\n const firstTab = this.el.shadowRoot.querySelector('.wcs-tab-header:first-child');\n if (firstTab) {\n (firstTab as HTMLDivElement).focus();\n ev.preventDefault();\n }\n break;\n }\n case 'End': {\n const lastTab = this.el.shadowRoot.querySelector('.wcs-tab-header:last-child');\n if (lastTab) {\n (lastTab as HTMLDivElement).focus();\n ev.preventDefault();\n }\n break;\n }\n }\n }\n\n private refreshHeaders() {\n this.headers = [];\n this.tabs\n .forEach(x => {\n this.headers.push(x.getAttribute('header'));\n });\n }\n\n private get tabs() {\n const tabsEl = this.el.shadowRoot.querySelector('.wcs-tabs');\n // FIXME: problem with this selector being too greedy in ff < 63\n const tabs = this.el.shadowRoot.querySelectorAll('.wcs-tabs > wcs-tab');\n\n return tabs.length !== 0\n ? tabs\n : tabsEl?.querySelector('slot')\n ? tabsEl?.querySelector('slot')?.assignedElements() as unknown as NodeListOf<HTMLWcsTabElement>\n : [];\n }\n\n private selectTabAndEmitChangeEvent(index: number) {\n this.currentActiveTabIndex = index;\n this.emitActiveTabChange()\n }\n\n componentWillUpdate() {\n if (!this.headersOnly) {\n this.updateTabVisibility();\n } else {\n this.hideAllTabsContent();\n }\n }\n\n private updateTabVisibility() {\n this.tabs.forEach((el: HTMLWcsTabElement, idx: number) => {\n if (idx !== this.currentActiveTabIndex) {\n el.setAttribute('style', 'display: none;');\n } else {\n el.setAttribute('style', 'display: block;');\n }\n });\n }\n\n private hideAllTabsContent() {\n this.tabs.forEach((el: HTMLWcsTabElement) => el.setAttribute('style', 'display: none;'));\n }\n\n render() {\n return (\n <Host>\n <div class=\"wcs-tabs-headers\" role=\"tablist\" aria-label={this.description}>\n {this.headers.map((header, idx) =>\n <div class={'wcs-tab-header ' + (this.currentActiveTabIndex === idx ? 'active' : '')}\n onClick={() => this.selectTabAndEmitChangeEvent(idx)}\n onKeyDown={evt => this.handleKeyDown(evt, idx)}\n tabIndex={this.currentActiveTabIndex === idx ? 0 : -1}\n role=\"tab\"\n id={`tabs-id-${this.tabsId}-tab-id-${idx}`}\n // aria-controls refers to ID of the tab panel related to the header\n aria-controls={`tabs-id-${this.tabsId}-tab-panel-${idx}`}\n aria-label={header}\n aria-selected={this.currentActiveTabIndex === idx ? 'true' : 'false'}\n >\n <span>{header}</span>\n </div>\n )}\n </div>\n <div class=\"wcs-tabs\">\n <slot onSlotchange={() => this.onTabsSlotChange()} name=\"wcs-tab\"/>\n </div>\n </Host>\n );\n }\n\n /**\n * Observe when a new tab panel is added to the slot to let's handle accessibility properties for tabs panel:\n * - id: to let header tab refers it proper panel\n * - aria-label: take the same name as it's referenced header name\n * \n * @private\n */\n private onTabsSlotChange() {\n let tabId = 0;\n this.tabs.forEach(tab => {\n tab.setAttribute(\"aria-label\", this.headers.at(tabId));\n // set an ID to set aria-controls on header tab \n // (https://www.w3.org/WAI/ARIA/apg/patterns/tabs/examples/tabs-automatic/#:~:text=Refers%20to%20the%20element)\n tab.setAttribute(\"id\", `tabs-id-${this.tabsId}-tab-panel-${tabId}`);\n tabId++;\n });\n }\n}\n\nlet tabsId = 0;\n"],"mappings":"gEAAA,MAAMA,EAAU,qjC,MCiCHC,EAAI,M,8DAuCLC,KAAAC,OAAiBA,I,WAnCwB,Q,mBAMjB,E,4CAQD,M,8DAiBM,G,2BAEI,C,CAKzCC,qBAAqBC,GACjBH,KAAKI,sBAAwBD,C,CAIjCE,sBAAsBF,GAClBH,KAAKM,iCAAiCH,E,CAGlCI,sBACJP,KAAKQ,UAAUC,KAAK,CAChBC,QAASV,KAAKW,QAAQX,KAAKI,uBAC3BQ,SAAUZ,KAAKI,sBACfS,YAAab,KAAKc,KAAKd,KAAKI,uBAAuBW,S,CAInDT,iCAAiCH,GACrC,IAAK,IAAIa,EAAI,EAAGA,EAAIhB,KAAKc,KAAKG,OAAQD,IAAK,CACvC,MAAME,EAAMlB,KAAKc,KAAKE,GACtB,GAAIE,EAAIH,UAAYZ,EAAU,CAC1BH,KAAKI,sBAAwBY,C,GAMzCG,cACInB,KAAKoB,gB,CAGTC,mBACIrB,KAAKsB,kCACLtB,KAAKoB,iBACL,GAAIpB,KAAKuB,cAAe,CACpBvB,KAAKI,sBAAwBJ,KAAKuB,a,CAEtC,GAAIvB,KAAKa,YAAa,CAClBb,KAAKM,iCAAiCN,KAAKa,Y,EAK3CS,kCACJ,MAAME,EAASxB,KAAKyB,GAAGC,WAAWC,cAAc,aAChD,GAAIH,EAAOG,cAAc,UAAY,KAAM,CACvCC,MAAMC,KAAK7B,KAAKyB,GAAGK,iBAAiB,YAC/BC,QAAOC,GAAQA,EAAKC,aAAeT,IACnCU,SAAQhB,IACL,GAAIA,EAAIiB,cAAcC,YAAYpC,KAAKyB,IAAK,CACxCzB,KAAKyB,GAAGY,YAAYnB,GACpBM,EAAOc,YAAYpB,E,MAMvCqB,cAAcC,EAAmB5B,G,QAC7B,MAAM6B,EAASD,EAAGC,OAClB,OAAQD,EAAGE,KACP,IAAK,IACL,IAAK,QAAS,CACV1C,KAAKI,sBAAwBQ,EAC7BZ,KAAKO,sBACLiC,EAAGG,iBACH,K,CAEJ,IAAK,YAAa,CACd,IAAIC,EAAAH,EAAOI,0BAAsB,MAAAD,SAAA,SAAAA,EAAEE,UAAUC,SAAS,kBAAmB,CACpEN,EAAOI,uBAA0CG,QAClDR,EAAGG,gB,CAEP,K,CAEJ,IAAK,aAAc,CACf,IAAIM,EAAAR,EAAOS,sBAAkB,MAAAD,SAAA,SAAAA,EAAEH,UAAUC,SAAS,kBAAmB,CAChEN,EAAOS,mBAAsCF,QAC9CR,EAAGG,gB,CAEP,K,CAEJ,IAAK,OAAQ,CACT,MAAMQ,EAAWnD,KAAKyB,GAAGC,WAAWC,cAAc,+BAClD,GAAIwB,EAAU,CACTA,EAA4BH,QAC7BR,EAAGG,gB,CAEP,K,CAEJ,IAAK,MAAO,CACR,MAAMS,EAAUpD,KAAKyB,GAAGC,WAAWC,cAAc,8BACjD,GAAIyB,EAAS,CACRA,EAA2BJ,QAC5BR,EAAGG,gB,CAEP,K,GAKJvB,iBACJpB,KAAKW,QAAU,GACfX,KAAKc,KACAoB,SAAQmB,IACLrD,KAAKW,QAAQ2C,KAAKD,EAAEE,aAAa,UAAU,G,CAI3CzC,W,MACR,MAAM0C,EAASxD,KAAKyB,GAAGC,WAAWC,cAAc,aAEhD,MAAMb,EAAOd,KAAKyB,GAAGC,WAAWI,iBAAiB,uBAEjD,OAAOhB,EAAKG,SAAW,EACjBH,GACA0C,IAAM,MAANA,SAAM,SAANA,EAAQ7B,cAAc,UAClBiB,EAAAY,IAAM,MAANA,SAAM,SAANA,EAAQ7B,cAAc,WAAO,MAAAiB,SAAA,SAAAA,EAAEa,mBAC/B,E,CAGNC,4BAA4BC,GAChC3D,KAAKI,sBAAwBuD,EAC7B3D,KAAKO,qB,CAGTqD,sBACI,IAAK5D,KAAK6D,YAAa,CACnB7D,KAAK8D,qB,KACF,CACH9D,KAAK+D,oB,EAILD,sBACJ9D,KAAKc,KAAKoB,SAAQ,CAACT,EAAuBuC,KACtC,GAAIA,IAAQhE,KAAKI,sBAAuB,CACpCqB,EAAGwC,aAAa,QAAS,iB,KACtB,CACHxC,EAAGwC,aAAa,QAAS,kB,KAK7BF,qBACJ/D,KAAKc,KAAKoB,SAAST,GAA0BA,EAAGwC,aAAa,QAAS,mB,CAG1EC,SACI,OACIC,EAACC,EAAI,KACDD,EAAA,OAAKE,MAAM,mBAAmBC,KAAK,UAAS,aAAatE,KAAKuE,aACzDvE,KAAKW,QAAQ6D,KAAI,CAACC,EAAQT,IACvBG,EAAA,OAAKE,MAAO,mBAAqBrE,KAAKI,wBAA0B4D,EAAM,SAAW,IAC5EU,QAAS,IAAM1E,KAAK0D,4BAA4BM,GAChDW,UAAWC,GAAO5E,KAAKuC,cAAcqC,EAAKZ,GAC1CpD,SAAUZ,KAAKI,wBAA0B4D,EAAM,GAAK,EACpDM,KAAK,MACLO,GAAI,WAAW7E,KAAKC,iBAAiB+D,IAAK,gBAE3B,WAAWhE,KAAKC,oBAAoB+D,IAAK,aAC5CS,EAAM,gBACHzE,KAAKI,wBAA0B4D,EAAM,OAAS,SAE9DG,EAAA,YAAOM,OAInBN,EAAA,OAAKE,MAAM,YACPF,EAAA,QAAMW,aAAc,IAAM9E,KAAK+E,mBAAoBC,KAAK,a,CAahED,mBACJ,IAAIE,EAAQ,EACZjF,KAAKc,KAAKoB,SAAQhB,IACdA,EAAI+C,aAAa,aAAcjE,KAAKW,QAAQuE,GAAGD,IAG/C/D,EAAI+C,aAAa,KAAM,WAAWjE,KAAKC,oBAAoBgF,KAC3DA,GAAO,G,sIAKnB,IAAIhF,EAAS,E"}
@@ -1,2 +1,2 @@
1
- import{p as e,b as n}from"./p-a2df3a49.js";export{s as setNonce}from"./p-a2df3a49.js";const o=()=>{const n=import.meta.url;const o={};if(n!==""){o.resourcesUrl=new URL(".",n).href}return e(o)};o().then((e=>n([["p-9ecdeaf9",[[1,"wcs-editable-field",{type:[1],label:[1],readonly:[4],value:[1032],validateFn:[16],formatFn:[16],errorMsg:[1,"error-msg"],size:[513],currentState:[32],isError:[32]},[[8,"click","onWindowClickEvent"]]]]],["p-d6b3f742",[[1,"wcs-horizontal-stepper",{currentStep:[1026,"current-step"],steps:[16],mode:[1],checkOnComplete:[4,"check-on-complete"],internalCurrentStep:[32],previous:[64],next:[64]}]]],["p-6b66ce85",[[1,"wcs-counter",{size:[513],label:[1],min:[1026],max:[1026],step:[1026],value:[1026],displayedValue:[32]}]]],["p-15058c29",[[1,"wcs-grid",{serverMode:[4,"server-mode"],data:[16],loading:[4],selectionConfig:[1,"selection-config"],selectedItems:[8,"selected-items"],wcsGridPaginationId:[1,"wcs-grid-pagination-id"],rowIdPath:[1,"row-id-path"],columns:[32],paginationEl:[32],rows:[32]},[[0,"wcsHiddenChange","onHiddenColumnChange"],[0,"wcsSortChange","sortChangeEventHandler"],[0,"wcsGridPaginationChange","paginationChangeEventHandler"],[8,"wcsGridPaginationChange","paginationChangeEventHandlerOutside"]]]]],["p-463667c9",[[1,"wcs-grid-pagination",{availablePageSizes:[16],currentPage:[2,"current-page"],pageSize:[2,"page-size"],itemsCount:[2,"items-count"],pageCount:[2,"page-count"]}]]],["p-94d95b99",[[4,"wcs-modal",{withoutBackdrop:[516,"without-backdrop"],show:[516],showCloseButton:[516,"show-close-button"],size:[1],hideActions:[516,"hide-actions"]},[[4,"keydown","onKeyDown"]]]]],["p-732b2faa",[[1,"wcs-dropdown",{noArrow:[4,"no-arrow"],mode:[1],shape:[1],disabled:[4],placement:[1],expanded:[32]},[[8,"click","onWindowClickEvent"],[0,"wcsDropdownItemClick","dropdownItemClick"],[0,"keydown","onKeyDown"]]]]],["p-966a241e",[[1,"wcs-galactic-menu",{text:[1],showPopoverMenu:[32]},[[8,"click","onWindowClickEvent"]]]]],["p-d2da0c9f",[[17,"wcs-input",{fireFocusEvents:[4,"fire-focus-events"],accept:[1],autocapitalize:[1],autocomplete:[1],autocorrect:[1],autofocus:[4],clearInput:[4,"clear-input"],clearOnEdit:[4,"clear-on-edit"],debounce:[2],prefixLabel:[1,"prefix-label"],suffixLabel:[1,"suffix-label"],disabled:[4],enterkeyhint:[1],size:[513],icon:[1],inputmode:[1],max:[1],maxlength:[2],min:[1],minlength:[2],multiple:[4],name:[1],pattern:[1],placeholder:[1],readonly:[4],required:[4],spellcheck:[4],state:[513],step:[1],type:[1],value:[1032],hasFocus:[32],passwordReveal:[32],setFocus:[64],setBlur:[64],getInputElement:[64]}]]],["p-26c4c983",[[1,"wcs-textarea",{fireFocusEvents:[4,"fire-focus-events"],autocapitalize:[1],autofocus:[4],clearOnEdit:[1028,"clear-on-edit"],debounce:[2],disabled:[4],icon:[1],inputmode:[1],enterkeyhint:[1],maxlength:[2],minlength:[2],name:[1],placeholder:[1],readonly:[4],required:[4],spellcheck:[4],state:[513],cols:[2],rows:[2],wrap:[1],autoGrow:[4,"auto-grow"],value:[1025],resize:[513],hasFocus:[32],fitContent:[64],setFocus:[64],setBlur:[64],getInputElement:[64]}]]],["p-b6160b7c",[[1,"wcs-accordion",{hideActionText:[516,"hide-action-text"],highlight:[516],groupContentWithHeader:[516,"group-content-with-header"]},[[0,"wcsOpenChange","wcsOpenChangeHandler"]]]]],["p-cdd172b4",[[1,"wcs-accordion-content"]]],["p-8d57835f",[[1,"wcs-accordion-header"]]],["p-810aff71",[[1,"wcs-accordion-panel",{open:[1540],hideActionText:[516,"hide-action-text"],highlight:[516],groupContentWithHeader:[516,"group-content-with-header"],close:[64]}]]],["p-fc3f5b53",[[1,"wcs-action-bar",{gutter:[4],hasTabs:[32]}]]],["p-31a8d23f",[[1,"wcs-app"]]],["p-02b95dbf",[[1,"wcs-badge",{shape:[1],color:[1]}]]],["p-d084dd61",[[1,"wcs-card",{mode:[1537]}]]],["p-7a3f70da",[[1,"wcs-card-body"]]],["p-84afb8af",[[1,"wcs-com-nav",{appName:[1,"app-name"],mobileMenuOpen:[32],currentActiveSizing:[32]},[[0,"wcsClickOnFinalAction","onClickOnFinalAction"],[0,"wcsCategoryItemClicked","onClickOnFinalActionCat"],[8,"keydown","exitMobileMenuOnKeyDown"]]]]],["p-f82e7a61",[[1,"wcs-com-nav-category",{label:[1],categoryOpen:[32],close:[64],open:[64]},[[8,"click","onWindowClickEvent"],[8,"wcsCategoryOpened","onSubmenuOpened"]]]]],["p-b6cd196d",[[1,"wcs-com-nav-submenu",{label:[1],panelTitle:[1,"panel-title"],panelDescription:[1,"panel-description"],menuOpen:[32],close:[64],open:[64]},[[8,"click","onWindowClickEvent"],[8,"wcsSubmenuOpened","onSubmenuOpened"],[8,"keydown","onEscapeKeyDown"],[0,"wcsCategoryItemClicked","wcsCategoryItemClickedHandler"]]]]],["p-17630eea",[[1,"wcs-divider"]]],["p-91b3e4b5",[[1,"wcs-dropdown-divider"]]],["p-269d244c",[[1,"wcs-dropdown-header"]]],["p-4b4d53e2",[[4,"wcs-dropdown-item",null,[[1,"mousedown","onMouseDown"],[0,"keydown","onKeyDown"]]]]],["p-d3f1cafe",[[1,"wcs-field"]]],["p-257b15b9",[[1,"wcs-field-content"]]],["p-cc03627c",[[1,"wcs-field-label"]]],["p-1e43122f",[[1,"wcs-footer"]]],["p-ee453b6e",[[1,"wcs-galactic",{text:[1],show:[32]}]]],["p-627bbb6a",[[1,"wcs-grid-column",{path:[1],name:[1],sort:[4],sortFn:[16],formatter:[16],sortOrder:[1025,"sort-order"],width:[1],customCells:[4,"custom-cells"],hidden:[4]}]]],["p-30d8f9c3",[[1,"wcs-grid-custom-cell",{columnId:[1,"column-id"],rowId:[8,"row-id"]}]]],["p-47d8ece5",[[1,"wcs-header"]]],["p-50dce764",[[1,"wcs-hint",{small:[1540]}]]],["p-c7494651",[[0,"wcs-icon",{icon:[1],size:[1]}]]],["p-54e29233",[[1,"wcs-label",{required:[516]}]]],["p-0ede0c37",[[1,"wcs-list-item",{activated:[1028]}]]],["p-ff9967eb",[[1,"wcs-list-item-properties"]]],["p-747a5962",[[1,"wcs-list-item-property"]]],["p-22480bd8",[[1,"wcs-native-select",{size:[513],expanded:[32],disabled:[32]}]]],["p-429bd9fb",[[1,"wcs-nav"]]],["p-554ca93c",[[4,"wcs-nav-item",{text:[513],href:[513]},[[0,"keydown","onKeyDown"]]]]],["p-d5a0e271",[[1,"wcs-progress-radial",{size:[2],showLabel:[4,"show-label"],value:[2]}]]],["p-069555a1",[[1,"wcs-radio-group",{value:[8],name:[520],mode:[513]},[[0,"wcsRadioClick","selectedOptionChanged"]]]]],["p-dfddec76",[[1,"wcs-skeleton-circle",{animation:[513],radius:[514]}]]],["p-292ca644",[[1,"wcs-skeleton-rectangle",{animation:[513],rounded:[516],height:[513],width:[513]}]]],["p-cfcacc44",[[1,"wcs-skeleton-text",{animation:[513],height:[1]}]]],["p-a5cd4c07",[[1,"wcs-switch",{name:[1],checked:[516],labelAlignment:[513,"label-alignment"],disabled:[4]}]]],["p-64dd7356",[[1,"wcs-tab",{header:[513],itemKey:[8,"item-key"]}]]],["p-07b8cd36",[[1,"wcs-tabs",{align:[513],selectedIndex:[2,"selected-index"],selectedKey:[8,"selected-key"],headersOnly:[4,"headers-only"],gutter:[4],headers:[32],currentActiveTabIndex:[32]},[[0,"tabLoaded","onTabLoaded"]]]]],["p-4a9f8e94",[[1,"wcs-tooltip",{for:[1],position:[513],interactive:[4],maxWidth:[8,"max-width"],delay:[2],duration:[2],trigger:[1],theme:[1],content:[1],appendTo:[1,"append-to"],hide:[64],show:[64],disable:[64],enable:[64]}]]],["p-9d798de4",[[1,"wcs-progress-bar",{small:[4],showLabel:[4,"show-label"],value:[2]}]]],["p-b856f2f6",[[1,"wcs-radio",{mode:[513],value:[1544],label:[1537],checked:[1540],disabled:[1028]},[[0,"keydown","onKeyDown"]]]]],["p-405140f9",[[4,"wcs-select-option",{disabled:[1540],selected:[1540],value:[8],chipColor:[1,"chip-color"],chipBackgroundColor:[1,"chip-background-color"],multiple:[1540]},[[1,"mousedown","onMouseDown"],[0,"keydown","handleKeydown"]]],[1,"wcs-select",{size:[513],value:[1032],placeholder:[1537],disabled:[1028],multiple:[516],chips:[516],name:[1],compareWith:[16],expanded:[32],hasLoaded:[32],displayText:[32],focused:[32],overlayDirection:[32],open:[64],close:[64]},[[1,"mousedown","onMouseDown"],[8,"click","onWindowClickEvent"],[0,"keydown","onKeyDown"],[0,"wcsSelectOptionClick","selectedOptionChanged"]]]]],["p-57560d7d",[[1,"wcs-error"],[1,"wcs-form-field",{isError:[1540,"is-error"],hasPrefix:[32],hasSuffix:[32],spiedElement:[32]}]]],["p-6acbf38a",[[1,"wcs-checkbox",{name:[1],indeterminate:[1540],checked:[1540],labelAlignment:[1537,"label-alignment"],disabled:[4]}]]],["p-b229a91c",[[17,"wcs-button",{type:[1025],href:[1],target:[1],disabled:[516],ripple:[4],size:[513],shape:[513],mode:[513],loading:[1028]},[[0,"click","onClick"]]]]],["p-e86c6cbb",[[1,"wcs-mat-icon",{icon:[1],size:[1],family:[1]}]]],["p-9910fedd",[[1,"wcs-spinner",{mode:[513]}]]]],e)));
1
+ import{p as e,b as n}from"./p-a2df3a49.js";export{s as setNonce}from"./p-a2df3a49.js";const o=()=>{const n=import.meta.url;const o={};if(n!==""){o.resourcesUrl=new URL(".",n).href}return e(o)};o().then((e=>n([["p-9ecdeaf9",[[1,"wcs-editable-field",{type:[1],label:[1],readonly:[4],value:[1032],validateFn:[16],formatFn:[16],errorMsg:[1,"error-msg"],size:[513],currentState:[32],isError:[32]},[[8,"click","onWindowClickEvent"]]]]],["p-d6b3f742",[[1,"wcs-horizontal-stepper",{currentStep:[1026,"current-step"],steps:[16],mode:[1],checkOnComplete:[4,"check-on-complete"],internalCurrentStep:[32],previous:[64],next:[64]}]]],["p-8c4ed883",[[17,"wcs-counter",{size:[513],label:[1],min:[1026],max:[1026],step:[1026],value:[1026],displayedValue:[32]}]]],["p-6de70331",[[1,"wcs-grid",{serverMode:[4,"server-mode"],data:[16],loading:[4],selectionConfig:[1,"selection-config"],selectedItems:[8,"selected-items"],wcsGridPaginationId:[1,"wcs-grid-pagination-id"],rowIdPath:[1,"row-id-path"],columns:[32],paginationEl:[32],rows:[32]},[[0,"wcsHiddenChange","onHiddenColumnChange"],[0,"wcsSortChange","sortChangeEventHandler"],[0,"wcsGridPaginationChange","paginationChangeEventHandler"],[8,"wcsGridPaginationChange","paginationChangeEventHandlerOutside"]]]]],["p-463667c9",[[1,"wcs-grid-pagination",{availablePageSizes:[16],currentPage:[2,"current-page"],pageSize:[2,"page-size"],itemsCount:[2,"items-count"],pageCount:[2,"page-count"]}]]],["p-39821dd2",[[4,"wcs-modal",{withoutBackdrop:[516,"without-backdrop"],show:[516],showCloseButton:[516,"show-close-button"],size:[1],hideActions:[516,"hide-actions"]},[[4,"keydown","onKeyDown"]]]]],["p-4ffe4539",[[17,"wcs-dropdown",{noArrow:[4,"no-arrow"],mode:[1],shape:[1],disabled:[4],placement:[1],expanded:[32]},[[8,"click","onWindowClickEvent"],[0,"wcsDropdownItemClick","dropdownItemClick"],[0,"keydown","onKeyDown"]]]]],["p-7519a270",[[1,"wcs-galactic-menu",{text:[1],showPopoverMenu:[32]},[[8,"click","onWindowClickEvent"]]]]],["p-ac106663",[[17,"wcs-input",{fireFocusEvents:[4,"fire-focus-events"],accept:[1],autocapitalize:[1],autocomplete:[1],autocorrect:[1],autofocus:[4],clearInput:[4,"clear-input"],clearOnEdit:[4,"clear-on-edit"],debounce:[2],prefixLabel:[1,"prefix-label"],suffixLabel:[1,"suffix-label"],disabled:[4],enterkeyhint:[1],size:[513],icon:[1],inputmode:[1],max:[1],maxlength:[2],min:[1],minlength:[2],multiple:[4],name:[1],pattern:[1],placeholder:[1],readonly:[4],required:[4],spellcheck:[4],state:[513],step:[1],type:[1],value:[1032],hasFocus:[32],passwordReveal:[32],setFocus:[64],setBlur:[64],getInputElement:[64]}]]],["p-ed3132be",[[17,"wcs-textarea",{fireFocusEvents:[4,"fire-focus-events"],autocapitalize:[1],autofocus:[4],clearOnEdit:[1028,"clear-on-edit"],debounce:[2],disabled:[4],icon:[1],inputmode:[1],enterkeyhint:[1],maxlength:[2],minlength:[2],name:[1],placeholder:[1],readonly:[4],required:[4],spellcheck:[4],state:[513],cols:[2],rows:[2],wrap:[1],autoGrow:[4,"auto-grow"],value:[1025],resize:[513],hasFocus:[32],fitContent:[64],setFocus:[64],setBlur:[64],getInputElement:[64]}]]],["p-b6160b7c",[[1,"wcs-accordion",{hideActionText:[516,"hide-action-text"],highlight:[516],groupContentWithHeader:[516,"group-content-with-header"]},[[0,"wcsOpenChange","wcsOpenChangeHandler"]]]]],["p-cdd172b4",[[1,"wcs-accordion-content"]]],["p-8d57835f",[[1,"wcs-accordion-header"]]],["p-810aff71",[[1,"wcs-accordion-panel",{open:[1540],hideActionText:[516,"hide-action-text"],highlight:[516],groupContentWithHeader:[516,"group-content-with-header"],close:[64]}]]],["p-fc3f5b53",[[1,"wcs-action-bar",{gutter:[4],hasTabs:[32]}]]],["p-31a8d23f",[[1,"wcs-app"]]],["p-02b95dbf",[[1,"wcs-badge",{shape:[1],color:[1]}]]],["p-d084dd61",[[1,"wcs-card",{mode:[1537]}]]],["p-7a3f70da",[[1,"wcs-card-body"]]],["p-3b1fc676",[[1,"wcs-com-nav",{appName:[1,"app-name"],mobileMenuOpen:[32],currentActiveSizing:[32]},[[0,"wcsClickOnFinalAction","onClickOnFinalAction"],[0,"wcsCategoryItemClicked","onClickOnFinalActionCat"],[8,"keydown","exitMobileMenuOnKeyDown"]]]]],["p-e348058b",[[1,"wcs-com-nav-category",{label:[1],categoryOpen:[32],close:[64],open:[64]},[[8,"click","onWindowClickEvent"],[8,"wcsCategoryOpened","onSubmenuOpened"]]]]],["p-7269272f",[[1,"wcs-com-nav-submenu",{label:[1],panelTitle:[1,"panel-title"],panelDescription:[1,"panel-description"],menuOpen:[32],close:[64],open:[64]},[[8,"click","onWindowClickEvent"],[8,"wcsSubmenuOpened","onSubmenuOpened"],[8,"keydown","onEscapeKeyDown"],[0,"wcsCategoryItemClicked","wcsCategoryItemClickedHandler"]]]]],["p-17630eea",[[1,"wcs-divider"]]],["p-91b3e4b5",[[1,"wcs-dropdown-divider"]]],["p-269d244c",[[1,"wcs-dropdown-header"]]],["p-1f8c73eb",[[4,"wcs-dropdown-item",null,[[1,"mousedown","onMouseDown"],[0,"keydown","onKeyDown"]]]]],["p-d3f1cafe",[[1,"wcs-field"]]],["p-257b15b9",[[1,"wcs-field-content"]]],["p-cc03627c",[[1,"wcs-field-label"]]],["p-1e43122f",[[1,"wcs-footer"]]],["p-ee453b6e",[[1,"wcs-galactic",{text:[1],show:[32]}]]],["p-627bbb6a",[[1,"wcs-grid-column",{path:[1],name:[1],sort:[4],sortFn:[16],formatter:[16],sortOrder:[1025,"sort-order"],width:[1],customCells:[4,"custom-cells"],hidden:[4]}]]],["p-30d8f9c3",[[1,"wcs-grid-custom-cell",{columnId:[1,"column-id"],rowId:[8,"row-id"]}]]],["p-47d8ece5",[[1,"wcs-header"]]],["p-50dce764",[[1,"wcs-hint",{small:[1540]}]]],["p-c7494651",[[0,"wcs-icon",{icon:[1],size:[1]}]]],["p-54e29233",[[1,"wcs-label",{required:[516]}]]],["p-0ede0c37",[[1,"wcs-list-item",{activated:[1028]}]]],["p-ff9967eb",[[1,"wcs-list-item-properties"]]],["p-747a5962",[[1,"wcs-list-item-property"]]],["p-2f63d6c5",[[1,"wcs-native-select",{size:[513],expanded:[32],disabled:[32],updateStyles:[64]}]]],["p-429bd9fb",[[1,"wcs-nav"]]],["p-2185bf8b",[[4,"wcs-nav-item",{text:[513],href:[513]},[[0,"keydown","onKeyDown"]]]]],["p-d5a0e271",[[1,"wcs-progress-radial",{size:[2],showLabel:[4,"show-label"],value:[2]}]]],["p-f20b9024",[[1,"wcs-radio-group",{value:[8],name:[520],mode:[513]},[[0,"wcsRadioClick","selectedOptionChanged"],[0,"keydown","handleKeyDown"],[0,"keyup","handleKeyUp"]]]]],["p-dfddec76",[[1,"wcs-skeleton-circle",{animation:[513],radius:[514]}]]],["p-292ca644",[[1,"wcs-skeleton-rectangle",{animation:[513],rounded:[516],height:[513],width:[513]}]]],["p-cfcacc44",[[1,"wcs-skeleton-text",{animation:[513],height:[1]}]]],["p-a5cd4c07",[[1,"wcs-switch",{name:[1],checked:[516],labelAlignment:[513,"label-alignment"],disabled:[4]}]]],["p-61cab06f",[[1,"wcs-tab",{header:[513],itemKey:[8,"item-key"]}]]],["p-f489793d",[[1,"wcs-tabs",{align:[513],selectedIndex:[2,"selected-index"],selectedKey:[8,"selected-key"],headersOnly:[4,"headers-only"],gutter:[4],description:[1],headers:[32],currentActiveTabIndex:[32]},[[0,"tabLoaded","onTabLoaded"]]]]],["p-4a9f8e94",[[1,"wcs-tooltip",{for:[1],position:[513],interactive:[4],maxWidth:[8,"max-width"],delay:[2],duration:[2],trigger:[1],theme:[1],content:[1],appendTo:[1,"append-to"],hide:[64],show:[64],disable:[64],enable:[64]}]]],["p-9d798de4",[[1,"wcs-progress-bar",{small:[4],showLabel:[4,"show-label"],value:[2]}]]],["p-8fed8b1c",[[17,"wcs-radio",{mode:[513],value:[1544],label:[1537],checked:[1540],disabled:[1028],name:[1]},[[0,"keydown","onKeyDown"]]]]],["p-ec84d6fd",[[4,"wcs-select-option",{disabled:[1540],selected:[1540],value:[8],chipColor:[1,"chip-color"],chipBackgroundColor:[1,"chip-background-color"],multiple:[1540]},[[1,"mousedown","onMouseDown"],[0,"keydown","handleKeydown"]]],[1,"wcs-select",{size:[513],value:[1032],placeholder:[1537],disabled:[1028],multiple:[516],chips:[516],name:[1],compareWith:[16],expanded:[32],hasLoaded:[32],displayText:[32],focused:[32],overlayDirection:[32],open:[64],close:[64]},[[1,"mousedown","onMouseDown"],[8,"click","onWindowClickEvent"],[0,"keydown","onKeyDown"],[0,"wcsSelectOptionClick","selectedOptionChanged"]]]]],["p-57560d7d",[[1,"wcs-error"],[1,"wcs-form-field",{isError:[1540,"is-error"],hasPrefix:[32],hasSuffix:[32],spiedElement:[32]}]]],["p-f06f48f3",[[17,"wcs-checkbox",{name:[1],indeterminate:[1540],checked:[1540],labelAlignment:[1537,"label-alignment"],disabled:[4]}]]],["p-cb90bc3a",[[17,"wcs-button",{type:[1025],href:[1],target:[1],disabled:[516],ripple:[4],size:[513],shape:[513],mode:[513],loading:[1028]},[[0,"click","onClick"]]]]],["p-e86c6cbb",[[1,"wcs-mat-icon",{icon:[1],size:[1],family:[1]}]]],["p-9910fedd",[[1,"wcs-spinner",{mode:[513]}]]]],e)));
2
2
  //# sourceMappingURL=wcs.esm.js.map