@getflip/swirl-components 0.533.0 → 0.534.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 (156) hide show
  1. package/components.json +158 -1
  2. package/dist/cjs/index-D-n4TKMG.js +4 -4
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{media-query.service-B8u-DqoO.js → media-query.service-C1jMjjiy.js} +1 -1
  5. package/dist/cjs/swirl-action-list_2.cjs.entry.js +2 -2
  6. package/dist/cjs/swirl-app-layout.cjs.entry.js +2 -2
  7. package/dist/cjs/swirl-autocomplete.cjs.entry.js +1 -1
  8. package/dist/cjs/swirl-banner.cjs.entry.js +2 -2
  9. package/dist/cjs/swirl-button.cjs.entry.js +2 -2
  10. package/dist/cjs/swirl-carousel.cjs.entry.js +1 -1
  11. package/dist/cjs/swirl-components.cjs.js +1 -1
  12. package/dist/cjs/swirl-console-layout.cjs.entry.js +1 -1
  13. package/dist/cjs/swirl-date-input.cjs.entry.js +2 -2
  14. package/dist/cjs/swirl-date-picker_2.cjs.entry.js +1 -1
  15. package/dist/cjs/swirl-file-chip.cjs.entry.js +1 -1
  16. package/dist/cjs/swirl-file-viewer-audio_7.cjs.entry.js +1 -1
  17. package/dist/cjs/swirl-file-viewer_7.cjs.entry.js +1 -1
  18. package/dist/cjs/swirl-form-control.cjs.entry.js +1 -1
  19. package/dist/cjs/swirl-icon-check-small_3.cjs.entry.js +2 -2
  20. package/dist/cjs/swirl-icon-error_3.cjs.entry.js +2 -2
  21. package/dist/cjs/swirl-image-grid-item.cjs.entry.js +1 -1
  22. package/dist/cjs/swirl-inline-status.cjs.entry.js +2 -2
  23. package/dist/cjs/swirl-lightbox.cjs.entry.js +1 -1
  24. package/dist/cjs/swirl-menu-item.cjs.entry.js +1 -1
  25. package/dist/cjs/swirl-menu.cjs.entry.js +1 -1
  26. package/dist/cjs/swirl-modal.cjs.entry.js +1 -1
  27. package/dist/cjs/swirl-option-list.cjs.entry.js +1 -1
  28. package/dist/cjs/swirl-pagination.cjs.entry.js +1 -1
  29. package/dist/cjs/swirl-pdf-reader.cjs.entry.js +1 -1
  30. package/dist/cjs/swirl-popover_2.cjs.entry.js +1 -1
  31. package/dist/cjs/swirl-resource-list-file-item.cjs.entry.js +2 -2
  32. package/dist/cjs/swirl-resource-list-item.cjs.entry.js +2 -2
  33. package/dist/cjs/swirl-search.cjs.entry.js +2 -2
  34. package/dist/cjs/swirl-select.cjs.entry.js +1 -1
  35. package/dist/cjs/swirl-shell-layout.cjs.entry.js +1 -1
  36. package/dist/cjs/swirl-tab-bar.cjs.entry.js +1 -1
  37. package/dist/cjs/swirl-table-column.cjs.entry.js +1 -1
  38. package/dist/cjs/swirl-table-row.cjs.entry.js +1 -1
  39. package/dist/cjs/swirl-table.cjs.entry.js +2287 -2
  40. package/dist/cjs/swirl-tabs.cjs.entry.js +1 -1
  41. package/dist/cjs/swirl-text-input.cjs.entry.js +2 -2
  42. package/dist/cjs/swirl-time-input.cjs.entry.js +2 -2
  43. package/dist/cjs/swirl-toast.cjs.entry.js +2 -2
  44. package/dist/cjs/swirl-toolbar.cjs.entry.js +1 -1
  45. package/dist/cjs/swirl-tooltip.cjs.entry.js +1 -1
  46. package/dist/cjs/{utils-UfZG-xPD.js → utils-C4tLdXqU.js} +33 -0
  47. package/dist/collection/components/swirl-table/swirl-table-virtualizer.js +224 -0
  48. package/dist/collection/components/swirl-table/swirl-table.js +253 -2
  49. package/dist/collection/components/swirl-table/swirl-table.stories.js +190 -0
  50. package/dist/collection/utils.js +32 -0
  51. package/dist/components/media-query.service.js +1 -1
  52. package/dist/components/swirl-file-viewer-pdf2.js +1 -1
  53. package/dist/components/swirl-popover2.js +1 -1
  54. package/dist/components/swirl-tab-bar2.js +1 -1
  55. package/dist/components/swirl-table.js +1 -1
  56. package/dist/components/swirl-tabs.js +1 -1
  57. package/dist/components/swirl-tooltip2.js +1 -1
  58. package/dist/components/utils.js +1 -1
  59. package/dist/esm/index-Dz56lJ37.js +4 -4
  60. package/dist/esm/loader.js +1 -1
  61. package/dist/esm/{media-query.service-CCYT6DU8.js → media-query.service-Bbqqduao.js} +1 -1
  62. package/dist/esm/swirl-action-list_2.entry.js +2 -2
  63. package/dist/esm/swirl-app-layout.entry.js +2 -2
  64. package/dist/esm/swirl-autocomplete.entry.js +1 -1
  65. package/dist/esm/swirl-banner.entry.js +2 -2
  66. package/dist/esm/swirl-button.entry.js +2 -2
  67. package/dist/esm/swirl-carousel.entry.js +1 -1
  68. package/dist/esm/swirl-components.js +1 -1
  69. package/dist/esm/swirl-console-layout.entry.js +1 -1
  70. package/dist/esm/swirl-date-input.entry.js +2 -2
  71. package/dist/esm/swirl-date-picker_2.entry.js +1 -1
  72. package/dist/esm/swirl-file-chip.entry.js +1 -1
  73. package/dist/esm/swirl-file-viewer-audio_7.entry.js +1 -1
  74. package/dist/esm/swirl-file-viewer_7.entry.js +1 -1
  75. package/dist/esm/swirl-form-control.entry.js +1 -1
  76. package/dist/esm/swirl-icon-check-small_3.entry.js +2 -2
  77. package/dist/esm/swirl-icon-error_3.entry.js +2 -2
  78. package/dist/esm/swirl-image-grid-item.entry.js +1 -1
  79. package/dist/esm/swirl-inline-status.entry.js +2 -2
  80. package/dist/esm/swirl-lightbox.entry.js +1 -1
  81. package/dist/esm/swirl-menu-item.entry.js +1 -1
  82. package/dist/esm/swirl-menu.entry.js +1 -1
  83. package/dist/esm/swirl-modal.entry.js +1 -1
  84. package/dist/esm/swirl-option-list.entry.js +1 -1
  85. package/dist/esm/swirl-pagination.entry.js +1 -1
  86. package/dist/esm/swirl-pdf-reader.entry.js +1 -1
  87. package/dist/esm/swirl-popover_2.entry.js +1 -1
  88. package/dist/esm/swirl-resource-list-file-item.entry.js +2 -2
  89. package/dist/esm/swirl-resource-list-item.entry.js +2 -2
  90. package/dist/esm/swirl-search.entry.js +2 -2
  91. package/dist/esm/swirl-select.entry.js +1 -1
  92. package/dist/esm/swirl-shell-layout.entry.js +1 -1
  93. package/dist/esm/swirl-tab-bar.entry.js +1 -1
  94. package/dist/esm/swirl-table-column.entry.js +1 -1
  95. package/dist/esm/swirl-table-row.entry.js +1 -1
  96. package/dist/esm/swirl-table.entry.js +2288 -3
  97. package/dist/esm/swirl-tabs.entry.js +1 -1
  98. package/dist/esm/swirl-text-input.entry.js +2 -2
  99. package/dist/esm/swirl-time-input.entry.js +2 -2
  100. package/dist/esm/swirl-toast.entry.js +2 -2
  101. package/dist/esm/swirl-toolbar.entry.js +1 -1
  102. package/dist/esm/swirl-tooltip.entry.js +1 -1
  103. package/dist/esm/{utils-CCck-DTo.js → utils-D23VxAsw.js} +33 -1
  104. package/dist/swirl-components/p-0cb6bbde.entry.js +1 -0
  105. package/dist/swirl-components/{p-ea6bdee5.entry.js → p-20354a36.entry.js} +1 -1
  106. package/dist/swirl-components/{p-8d078f8a.entry.js → p-247ada6e.entry.js} +1 -1
  107. package/dist/swirl-components/{p-270be9f2.entry.js → p-29fed244.entry.js} +1 -1
  108. package/dist/swirl-components/{p-c924fc96.entry.js → p-437ac2fa.entry.js} +1 -1
  109. package/dist/swirl-components/{p-97deaddc.entry.js → p-48c1b8e4.entry.js} +1 -1
  110. package/dist/swirl-components/{p-40be5fde.entry.js → p-48c559a4.entry.js} +1 -1
  111. package/dist/swirl-components/p-4a1d3582.entry.js +1 -0
  112. package/dist/swirl-components/{p-ad4fd14f.entry.js → p-5c6fc0bc.entry.js} +1 -1
  113. package/dist/swirl-components/{p-73a8e8a0.entry.js → p-6242f9bb.entry.js} +1 -1
  114. package/dist/swirl-components/{p-0c0acfd3.entry.js → p-641bb5b1.entry.js} +1 -1
  115. package/dist/swirl-components/{p-993dae75.entry.js → p-6528e39b.entry.js} +1 -1
  116. package/dist/swirl-components/{p-b45902de.entry.js → p-6785b8a5.entry.js} +1 -1
  117. package/dist/swirl-components/{p-dcf08d9a.entry.js → p-692dd291.entry.js} +1 -1
  118. package/dist/swirl-components/{p-418a8b7b.entry.js → p-6e0825ae.entry.js} +1 -1
  119. package/dist/swirl-components/{p-22931b7b.entry.js → p-71e1f20d.entry.js} +1 -1
  120. package/dist/swirl-components/{p-f015fc2d.entry.js → p-78af0765.entry.js} +1 -1
  121. package/dist/swirl-components/{p-2ddf4a93.entry.js → p-7a9bb681.entry.js} +1 -1
  122. package/dist/swirl-components/{p-b36ee49f.entry.js → p-84cfb27a.entry.js} +1 -1
  123. package/dist/swirl-components/{p-c6bceca5.entry.js → p-91b316f9.entry.js} +1 -1
  124. package/dist/swirl-components/{p-da6fa0fa.entry.js → p-958aa736.entry.js} +1 -1
  125. package/dist/swirl-components/{p-fbdb4aff.entry.js → p-95d6d7ad.entry.js} +1 -1
  126. package/dist/swirl-components/{p-577174d9.entry.js → p-984c4d86.entry.js} +1 -1
  127. package/dist/swirl-components/{p-CCck-DTo.js → p-D23VxAsw.js} +1 -1
  128. package/dist/swirl-components/{p-Bfn7CHM9.js → p-_iAIu_AF.js} +1 -1
  129. package/dist/swirl-components/{p-d0275263.entry.js → p-a11ba0b5.entry.js} +1 -1
  130. package/dist/swirl-components/{p-1bf78baf.entry.js → p-ae978c57.entry.js} +1 -1
  131. package/dist/swirl-components/{p-95a403cf.entry.js → p-b08aa57d.entry.js} +1 -1
  132. package/dist/swirl-components/{p-26362ab2.entry.js → p-bb4c80bf.entry.js} +1 -1
  133. package/dist/swirl-components/{p-e63650e3.entry.js → p-c182f4c1.entry.js} +1 -1
  134. package/dist/swirl-components/{p-d763ce05.entry.js → p-c4dad69d.entry.js} +1 -1
  135. package/dist/swirl-components/{p-47b02bc4.entry.js → p-cf855c44.entry.js} +1 -1
  136. package/dist/swirl-components/{p-fbcc5141.entry.js → p-d26aa1e7.entry.js} +1 -1
  137. package/dist/swirl-components/{p-3340670b.entry.js → p-d298c94c.entry.js} +1 -1
  138. package/dist/swirl-components/{p-9ad61433.entry.js → p-d8924470.entry.js} +1 -1
  139. package/dist/swirl-components/{p-268ddaee.entry.js → p-dab890a1.entry.js} +2 -2
  140. package/dist/swirl-components/{p-3e6fb027.entry.js → p-de5a7b4a.entry.js} +1 -1
  141. package/dist/swirl-components/p-ea36e3ec.entry.js +1 -0
  142. package/dist/swirl-components/{p-96c9486a.entry.js → p-eb297822.entry.js} +1 -1
  143. package/dist/swirl-components/{p-bee027a0.entry.js → p-ec10ca71.entry.js} +1 -1
  144. package/dist/swirl-components/{p-94e6a907.entry.js → p-f6c37730.entry.js} +1 -1
  145. package/dist/swirl-components/{p-b581b1e6.entry.js → p-fd188df6.entry.js} +1 -1
  146. package/dist/swirl-components/swirl-components.esm.js +1 -1
  147. package/dist/types/components/swirl-table/swirl-table-virtualizer.d.ts +60 -0
  148. package/dist/types/components/swirl-table/swirl-table.d.ts +43 -0
  149. package/dist/types/components/swirl-table/swirl-table.stories.d.ts +2 -0
  150. package/dist/types/components.d.ts +57 -2
  151. package/dist/types/utils.d.ts +12 -0
  152. package/package.json +2 -1
  153. package/vscode-data.json +16 -0
  154. package/dist/swirl-components/p-0c0b46e1.entry.js +0 -1
  155. package/dist/swirl-components/p-2943bc69.entry.js +0 -1
  156. package/dist/swirl-components/p-5fa1c77c.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as s,c as t,h as i,a as e,d as o}from"./p-Dz56lJ37.js";import{c as a}from"./p-orsBiyT_.js";import{d as r}from"./p-CCck-DTo.js";const l=class{constructor(i){s(this,i),this.activeSlidesChange=t(this,"activeSlidesChange",7),this.nextSlideButtonLabel="Next slide",this.previousSlideButtonLabel="Previous slide",this.fade=!1,this.fadeColor="default",this.loopAround=!1,this.padding="16",this.spacing="16",this.activeSlides=[],this.carouselFadeColorMap={default:"var(--s-background-default)","on-surface-overlay":"var(--s-surface-overlay-default)"},this.updateActiveSlideReferences=r((()=>{const s=this.getActiveSlides();s.some(((s,t)=>this.activeSlides[t]!==s))&&(this.activeSlides=s,this.activeSlidesChange.emit(this.activeSlides))}),100),this.onPreviousSlideButtonClick=()=>{this.previousSlide()},this.onNextSlideButtonClick=()=>{this.nextSlide()},this.onSlotChange=()=>{this.activeSlides.length&&this.scrollToElement(this.activeSlides[0]),this.checkScrollStatus(),this.checkScrollPosition()},this.onScroll=()=>{this.updateActiveSlideReferences(),this.checkScrollPosition()}}onWindowResize(){this.checkScrollStatus(),this.checkScrollPosition()}componentDidLoad(){queueMicrotask((()=>{this.el.isConnected&&(this.checkScrollStatus(),this.checkScrollPosition())}))}async scrollToSlide(s){const t=this.getSlides().find((t=>t.id===s));Boolean(t)&&this.scrollToElement(t)}scrollToElement(s){this.slidesContainer&&s&&this.slidesContainer?.scroll({left:s.offsetLeft,behavior:"smooth"})}previousSlide(){const s=this.getSlides(),t=this.getActiveSlides();this.scrollToElement(t[0].previousElementSibling||(this.loopAround?s[s.length-1]:t[0]))}nextSlide(){const s=this.getSlides(),t=this.getActiveSlides(),i=!Boolean(t[t.length-1].nextElementSibling);this.scrollToElement(i&&this.loopAround?s[0]:t[0].nextElementSibling)}getSlides(){return Array.from(this.el.querySelectorAll("swirl-carousel-slide"))}getActiveSlides(){return this.getSlides().filter((s=>this.checkInView(s)))}checkScrollStatus(){this.isScrollable=this.slidesContainer.scrollWidth>this.slidesContainer.offsetWidth}checkScrollPosition(){const s=this.getSlides(),t=this.getActiveSlides(),i=t[0]===s[0],e=t[t.length-1]===s[s.length-1];i!==this.isAtStart&&(this.isAtStart=i),e!==this.isAtEnd&&(this.isAtEnd=e)}checkInView(s){let t=this.slidesContainer.scrollLeft,i=s.offsetLeft;return i>=t&&i+s.clientWidth<=t+this.slidesContainer.clientWidth}render(){this.el.style.setProperty("--swirl-carousel-spacing",`${this.spacing}px`),this.el.style.setProperty("--swirl-carousel-fade-color",this.carouselFadeColorMap[this.fadeColor]);const s={padding:Boolean(this.padding)?`var(--s-space-${this.padding})`:void 0,paddingBlockEnd:Boolean(this.paddingBlockEnd)?`var(--s-space-${this.paddingBlockEnd})`:void 0,paddingBlockStart:Boolean(this.paddingBlockStart)?`var(--s-space-${this.paddingBlockStart})`:void 0,paddingInlineEnd:Boolean(this.paddingInlineEnd)?`var(--s-space-${this.paddingInlineEnd})`:void 0,paddingInlineStart:Boolean(this.paddingInlineStart)?`var(--s-space-${this.paddingInlineStart})`:void 0,scrollPadding:Boolean(this.paddingInlineStart)?`var(--s-space-${this.paddingInlineStart})`:Boolean(this.padding)?`var(--s-space-${this.padding})`:void 0},t=a("carousel",{"carousel--fade":this.fade,"carousel--is-at-start":this.isAtStart,"carousel--is-at-end":this.isAtEnd});return i(e,{key:"840096feefd373763dd50a841d3774fb3d466b99","aria-label":this.label,"aria-roledescription":"carousel",role:"group"},i("div",{key:"535cf444029aa486567192b5cf8d72b52df569f4",class:t},this.isScrollable&&!this.isAtStart&&i("swirl-button",{key:"4608b5385dc0b8ee293213a9d849632f2c32e53b",class:"carousel__previous-slide-button",hideLabel:!0,icon:"<swirl-icon-arrow-back></swirl-icon-arrow-back>",label:this.previousSlideButtonLabel,onClick:this.onPreviousSlideButtonClick,pill:!0,variant:"translucent"}),this.isScrollable&&!this.isAtEnd&&i("swirl-button",{key:"e8d73e19115dcd30b0fc2b416183e72ff82bdc22",class:"carousel__next-slide-button",hideLabel:!0,icon:"<swirl-icon-arrow-forward></swirl-icon-arrow-forward>",label:this.nextSlideButtonLabel,onClick:this.onNextSlideButtonClick,pill:!0,variant:"translucent"}),i("div",{key:"64c2b7b2a9cfb305591e8bbe44bff581b5651564","aria-live":"polite",class:"carousel__slides",style:s,onScroll:this.onScroll,ref:s=>this.slidesContainer=s},i("slot",{key:"417793d107b7c1f49561138d00fcbaa4a3d87c45",onSlotchange:this.onSlotChange}))))}get el(){return o(this)}};l.style=':host{--swirl-carousel-spacing:var(--s-space-16);--swirl-carousel-fade-color:var(--s-background-default);position:relative;display:block;overflow:hidden;width:100%}:host(:hover) .carousel__previous-slide-button,:host(:hover) .carousel__next-slide-button{pointer-events:auto}:host *{box-sizing:border-box}.carousel{position:relative;overflow:hidden;width:100%}.carousel:before,.carousel:after{position:absolute;z-index:1;top:0;width:var(--s-space-32);height:100%;content:"";transition:opacity 0.2s;pointer-events:none;opacity:0}.carousel:before{left:0;background:linear-gradient( 90deg, var(--swirl-carousel-fade-color) 0%, transparent 100% )}.carousel:after{right:0;background:linear-gradient( 270deg, var(--swirl-carousel-fade-color) 0%, transparent 100% )}.carousel--fade:before,.carousel--fade:after{opacity:1}.carousel--is-at-start:before,.carousel--is-at-end:after{opacity:0}.carousel__slides{position:relative;display:flex;overflow-x:auto;overflow-y:hidden;width:100%;scrollbar-width:none;scroll-snap-type:x mandatory;scroll-behavior:smooth}.carousel__slides::-webkit-scrollbar{display:none}.carousel__slides ::slotted(*:not(:first-of-type)){margin-left:var(--swirl-carousel-spacing)}.carousel__slides ::slotted(*){flex-grow:0;flex-shrink:0;scroll-snap-align:start}.carousel__previous-slide-button,.carousel__next-slide-button{position:absolute;z-index:2;top:50%;transform:translateY(-50%) scale(0.72);pointer-events:none}.carousel__previous-slide-button{left:var(--s-space-4)}.carousel__next-slide-button{right:var(--s-space-4)}';export{l as swirl_carousel}
1
+ import{r as s,c as t,h as i,a as e,d as o}from"./p-Dz56lJ37.js";import{c as a}from"./p-orsBiyT_.js";import{d as r}from"./p-D23VxAsw.js";const l=class{constructor(i){s(this,i),this.activeSlidesChange=t(this,"activeSlidesChange",7),this.nextSlideButtonLabel="Next slide",this.previousSlideButtonLabel="Previous slide",this.fade=!1,this.fadeColor="default",this.loopAround=!1,this.padding="16",this.spacing="16",this.activeSlides=[],this.carouselFadeColorMap={default:"var(--s-background-default)","on-surface-overlay":"var(--s-surface-overlay-default)"},this.updateActiveSlideReferences=r((()=>{const s=this.getActiveSlides();s.some(((s,t)=>this.activeSlides[t]!==s))&&(this.activeSlides=s,this.activeSlidesChange.emit(this.activeSlides))}),100),this.onPreviousSlideButtonClick=()=>{this.previousSlide()},this.onNextSlideButtonClick=()=>{this.nextSlide()},this.onSlotChange=()=>{this.activeSlides.length&&this.scrollToElement(this.activeSlides[0]),this.checkScrollStatus(),this.checkScrollPosition()},this.onScroll=()=>{this.updateActiveSlideReferences(),this.checkScrollPosition()}}onWindowResize(){this.checkScrollStatus(),this.checkScrollPosition()}componentDidLoad(){queueMicrotask((()=>{this.el.isConnected&&(this.checkScrollStatus(),this.checkScrollPosition())}))}async scrollToSlide(s){const t=this.getSlides().find((t=>t.id===s));Boolean(t)&&this.scrollToElement(t)}scrollToElement(s){this.slidesContainer&&s&&this.slidesContainer?.scroll({left:s.offsetLeft,behavior:"smooth"})}previousSlide(){const s=this.getSlides(),t=this.getActiveSlides();this.scrollToElement(t[0].previousElementSibling||(this.loopAround?s[s.length-1]:t[0]))}nextSlide(){const s=this.getSlides(),t=this.getActiveSlides(),i=!Boolean(t[t.length-1].nextElementSibling);this.scrollToElement(i&&this.loopAround?s[0]:t[0].nextElementSibling)}getSlides(){return Array.from(this.el.querySelectorAll("swirl-carousel-slide"))}getActiveSlides(){return this.getSlides().filter((s=>this.checkInView(s)))}checkScrollStatus(){this.isScrollable=this.slidesContainer.scrollWidth>this.slidesContainer.offsetWidth}checkScrollPosition(){const s=this.getSlides(),t=this.getActiveSlides(),i=t[0]===s[0],e=t[t.length-1]===s[s.length-1];i!==this.isAtStart&&(this.isAtStart=i),e!==this.isAtEnd&&(this.isAtEnd=e)}checkInView(s){let t=this.slidesContainer.scrollLeft,i=s.offsetLeft;return i>=t&&i+s.clientWidth<=t+this.slidesContainer.clientWidth}render(){this.el.style.setProperty("--swirl-carousel-spacing",`${this.spacing}px`),this.el.style.setProperty("--swirl-carousel-fade-color",this.carouselFadeColorMap[this.fadeColor]);const s={padding:Boolean(this.padding)?`var(--s-space-${this.padding})`:void 0,paddingBlockEnd:Boolean(this.paddingBlockEnd)?`var(--s-space-${this.paddingBlockEnd})`:void 0,paddingBlockStart:Boolean(this.paddingBlockStart)?`var(--s-space-${this.paddingBlockStart})`:void 0,paddingInlineEnd:Boolean(this.paddingInlineEnd)?`var(--s-space-${this.paddingInlineEnd})`:void 0,paddingInlineStart:Boolean(this.paddingInlineStart)?`var(--s-space-${this.paddingInlineStart})`:void 0,scrollPadding:Boolean(this.paddingInlineStart)?`var(--s-space-${this.paddingInlineStart})`:Boolean(this.padding)?`var(--s-space-${this.padding})`:void 0},t=a("carousel",{"carousel--fade":this.fade,"carousel--is-at-start":this.isAtStart,"carousel--is-at-end":this.isAtEnd});return i(e,{key:"840096feefd373763dd50a841d3774fb3d466b99","aria-label":this.label,"aria-roledescription":"carousel",role:"group"},i("div",{key:"535cf444029aa486567192b5cf8d72b52df569f4",class:t},this.isScrollable&&!this.isAtStart&&i("swirl-button",{key:"4608b5385dc0b8ee293213a9d849632f2c32e53b",class:"carousel__previous-slide-button",hideLabel:!0,icon:"<swirl-icon-arrow-back></swirl-icon-arrow-back>",label:this.previousSlideButtonLabel,onClick:this.onPreviousSlideButtonClick,pill:!0,variant:"translucent"}),this.isScrollable&&!this.isAtEnd&&i("swirl-button",{key:"e8d73e19115dcd30b0fc2b416183e72ff82bdc22",class:"carousel__next-slide-button",hideLabel:!0,icon:"<swirl-icon-arrow-forward></swirl-icon-arrow-forward>",label:this.nextSlideButtonLabel,onClick:this.onNextSlideButtonClick,pill:!0,variant:"translucent"}),i("div",{key:"64c2b7b2a9cfb305591e8bbe44bff581b5651564","aria-live":"polite",class:"carousel__slides",style:s,onScroll:this.onScroll,ref:s=>this.slidesContainer=s},i("slot",{key:"417793d107b7c1f49561138d00fcbaa4a3d87c45",onSlotchange:this.onSlotChange}))))}get el(){return o(this)}};l.style=':host{--swirl-carousel-spacing:var(--s-space-16);--swirl-carousel-fade-color:var(--s-background-default);position:relative;display:block;overflow:hidden;width:100%}:host(:hover) .carousel__previous-slide-button,:host(:hover) .carousel__next-slide-button{pointer-events:auto}:host *{box-sizing:border-box}.carousel{position:relative;overflow:hidden;width:100%}.carousel:before,.carousel:after{position:absolute;z-index:1;top:0;width:var(--s-space-32);height:100%;content:"";transition:opacity 0.2s;pointer-events:none;opacity:0}.carousel:before{left:0;background:linear-gradient( 90deg, var(--swirl-carousel-fade-color) 0%, transparent 100% )}.carousel:after{right:0;background:linear-gradient( 270deg, var(--swirl-carousel-fade-color) 0%, transparent 100% )}.carousel--fade:before,.carousel--fade:after{opacity:1}.carousel--is-at-start:before,.carousel--is-at-end:after{opacity:0}.carousel__slides{position:relative;display:flex;overflow-x:auto;overflow-y:hidden;width:100%;scrollbar-width:none;scroll-snap-type:x mandatory;scroll-behavior:smooth}.carousel__slides::-webkit-scrollbar{display:none}.carousel__slides ::slotted(*:not(:first-of-type)){margin-left:var(--swirl-carousel-spacing)}.carousel__slides ::slotted(*){flex-grow:0;flex-shrink:0;scroll-snap-align:start}.carousel__previous-slide-button,.carousel__next-slide-button{position:absolute;z-index:2;top:50%;transform:translateY(-50%) scale(0.72);pointer-events:none}.carousel__previous-slide-button{left:var(--s-space-4)}.carousel__next-slide-button{right:var(--s-space-4)}';export{l as swirl_carousel}
@@ -1,4 +1,4 @@
1
- import{r as e,c as l,h as a,a as t,d as o}from"./p-Dz56lJ37.js";import{c as s}from"./p-orsBiyT_.js";import{r as i}from"./p-CCck-DTo.js";
1
+ import{r as e,c as l,h as a,a as t,d as o}from"./p-Dz56lJ37.js";import{c as s}from"./p-orsBiyT_.js";import{r as i}from"./p-D23VxAsw.js";
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
@@ -8,4 +8,4 @@ var r=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[hre
8
8
  * focus-trap 7.5.4
9
9
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
10
10
  */
11
- function T(e,l){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);l&&(t=t.filter((function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable}))),a.push.apply(a,t)}return a}function A(e){for(var l=1;l<arguments.length;l++){var a=null!=arguments[l]?arguments[l]:{};l%2?T(Object(a),!0).forEach((function(l){var t,o,s;t=e,s=a[l],(o=function(e){var l=function(e,l){if("object"!=typeof e||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var t=a.call(e,l);if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof l?l:String(l)}(o=l))in t?Object.defineProperty(t,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[o]=s})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):T(Object(a)).forEach((function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))}))}return e}var C=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},L=function(e){return C(e)&&!e.shiftKey},O=function(e){return C(e)&&e.shiftKey},j=function(e){return setTimeout(e,0)},I=function(e,l){var a=-1;return e.every((function(e,t){return!l(e)||(a=t,!1)})),a},D=function(e){for(var l=arguments.length,a=new Array(l>1?l-1:0),t=1;t<l;t++)a[t-1]=arguments[t];return"function"==typeof e?e.apply(void 0,a):e},F=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},R=[],P=function(e,l){var a,t=(null==l?void 0:l.document)||document,o=(null==l?void 0:l.trapStack)||R,s=A({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:L,isKeyBackward:O},l),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},r=function(e,l,a){return e&&void 0!==e[l]?e[l]:s[a||l]},n=function(e,l){var a="function"==typeof(null==l?void 0:l.composedPath)?l.composedPath():void 0;return i.containerGroups.findIndex((function(l){var t=l.container,o=l.tabbableNodes;return t.contains(e)||(null==a?void 0:a.includes(t))||o.find((function(l){return l===e}))}))},c=function(e){var l=s[e];if("function"==typeof l){for(var a=arguments.length,o=new Array(a>1?a-1:0),i=1;i<a;i++)o[i-1]=arguments[i];l=l.apply(void 0,o)}if(!0===l&&(l=void 0),!l){if(void 0===l||!1===l)return l;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var r=l;if("string"==typeof l&&!(r=t.querySelector(l)))throw new Error("`".concat(e,"` as selector refers to no known node"));return r},u=function(){var e=c("initialFocus");if(!1===e)return!1;if(void 0===e||!N(e,s.tabbableOptions))if(n(t.activeElement)>=0)e=t.activeElement;else{var l=i.tabbableGroups[0];e=l&&l.firstTabbableNode||c("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var l=function(e,l){var a;return a=(l=l||{}).getShadowRoot?y([e],l.includeContainer,{filter:_.bind(null,l),flatten:!1,getShadowRoot:l.getShadowRoot,shadowRootFilter:k}):f(e,l.includeContainer,_.bind(null,l)),x(a)}(e,s.tabbableOptions),a=function(e,l){return(l=l||{}).getShadowRoot?y([e],l.includeContainer,{filter:g.bind(null,l),flatten:!0,getShadowRoot:l.getShadowRoot}):f(e,l.includeContainer,g.bind(null,l))}(e,s.tabbableOptions),t=l.length>0?l[0]:void 0,o=l.length>0?l[l.length-1]:void 0,i=a.find((function(e){return S(e)})),r=a.slice().reverse().find((function(e){return S(e)})),n=!!l.find((function(e){return b(e)>0}));return{container:e,tabbableNodes:l,focusableNodes:a,posTabIndexesFound:n,firstTabbableNode:t,lastTabbableNode:o,firstDomTabbableNode:i,lastDomTabbableNode:r,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=l.indexOf(e);return o<0?t?a.slice(a.indexOf(e)+1).find((function(e){return S(e)})):a.slice(0,a.indexOf(e)).reverse().find((function(e){return S(e)})):l[o+(t?1:-1)]}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find((function(e){return e.posTabIndexesFound}))&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function e(l){var a=l.activeElement;if(a)return a.shadowRoot&&null!==a.shadowRoot.activeElement?e(a.shadowRoot):a},v=function e(l){!1!==l&&l!==h(document)&&(l&&l.focus?(l.focus({preventScroll:!!s.preventScroll}),i.mostRecentlyFocusedNode=l,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(l)&&l.select()):e(u()))},p=function(e){var l=c("setReturnFocus",e);return l||!1!==l&&e},w=function(e){var l=e.target,a=e.event,t=e.isBackward,o=void 0!==t&&t;l=l||F(a),d();var r=null;if(i.tabbableGroups.length>0){var u=n(l,a),h=u>=0?i.containerGroups[u]:void 0;if(u<0)r=o?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(o){var f=I(i.tabbableGroups,(function(e){return l===e.firstTabbableNode}));if(f<0&&(h.container===l||N(l,s.tabbableOptions)&&!S(l,s.tabbableOptions)&&!h.nextTabbableNode(l,!1))&&(f=u),f>=0){var y=i.tabbableGroups[0===f?i.tabbableGroups.length-1:f-1];r=b(l)>=0?y.lastTabbableNode:y.lastDomTabbableNode}else C(a)||(r=h.nextTabbableNode(l,!1))}else{var v=I(i.tabbableGroups,(function(e){return l===e.lastTabbableNode}));if(v<0&&(h.container===l||N(l,s.tabbableOptions)&&!S(l,s.tabbableOptions)&&!h.nextTabbableNode(l))&&(v=u),v>=0){var p=i.tabbableGroups[v===i.tabbableGroups.length-1?0:v+1];r=b(l)>=0?p.firstTabbableNode:p.firstDomTabbableNode}else C(a)||(r=h.nextTabbableNode(l))}}else r=c("fallbackFocus");return r},m=function(e){var l=F(e);n(l,e)>=0||(D(s.clickOutsideDeactivates,e)?a.deactivate({returnFocus:s.returnFocusOnDeactivate}):D(s.allowOutsideClick,e)||e.preventDefault())},E=function(e){var l=F(e),a=n(l,e)>=0;if(a||l instanceof Document)a&&(i.mostRecentlyFocusedNode=l);else{var t;e.stopImmediatePropagation();var o=!0;if(i.mostRecentlyFocusedNode)if(b(i.mostRecentlyFocusedNode)>0){var r=n(i.mostRecentlyFocusedNode),c=i.containerGroups[r].tabbableNodes;if(c.length>0){var d=c.findIndex((function(e){return e===i.mostRecentlyFocusedNode}));d>=0&&(s.isKeyForward(i.recentNavEvent)?d+1<c.length&&(t=c[d+1],o=!1):d-1>=0&&(t=c[d-1],o=!1))}}else i.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return b(e)>0}))}))||(o=!1);else o=!1;o&&(t=w({target:i.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(i.recentNavEvent)})),v(t||i.mostRecentlyFocusedNode||u())}i.recentNavEvent=void 0},T=function(e){if(("Escape"===(null==(l=e)?void 0:l.key)||"Esc"===(null==l?void 0:l.key)||27===(null==l?void 0:l.keyCode))&&!1!==D(s.escapeDeactivates,e))return e.preventDefault(),void a.deactivate();var l;(s.isKeyForward(e)||s.isKeyBackward(e))&&function(e){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i.recentNavEvent=e;var a=w({event:e,isBackward:l});a&&(C(e)&&e.preventDefault(),v(a))}(e,s.isKeyBackward(e))},P=function(e){var l=F(e);n(l,e)>=0||D(s.clickOutsideDeactivates,e)||D(s.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},z=function(){if(i.active)return function(e,l){if(e.length>0){var a=e[e.length-1];a!==l&&a.pause()}var t=e.indexOf(l);-1===t||e.splice(t,1),e.push(l)}(o,a),i.delayInitialFocusTimer=s.delayInitialFocus?j((function(){v(u())})):v(u()),t.addEventListener("focusin",E,!0),t.addEventListener("mousedown",m,{capture:!0,passive:!1}),t.addEventListener("touchstart",m,{capture:!0,passive:!1}),t.addEventListener("click",P,{capture:!0,passive:!1}),t.addEventListener("keydown",T,{capture:!0,passive:!1}),a},B=function(){if(i.active)return t.removeEventListener("focusin",E,!0),t.removeEventListener("mousedown",m,!0),t.removeEventListener("touchstart",m,!0),t.removeEventListener("click",P,!0),t.removeEventListener("keydown",T,!0),a},G="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===i.mostRecentlyFocusedNode}))}))&&v(u())})):void 0,M=function(){G&&(G.disconnect(),i.active&&!i.paused&&i.containers.map((function(e){G.observe(e,{subtree:!0,childList:!0})})))};return(a={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var l=r(e,"onActivate"),a=r(e,"onPostActivate"),o=r(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=t.activeElement,null==l||l();var s=function(){o&&d(),z(),M(),null==a||a()};return o?(o(i.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!i.active)return this;var l=A({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,B(),i.active=!1,i.paused=!1,M(),function(e,l){var a=e.indexOf(l);-1!==a&&e.splice(a,1),e.length>0&&e[e.length-1].unpause()}(o,a);var t=r(l,"onDeactivate"),n=r(l,"onPostDeactivate"),c=r(l,"checkCanReturnFocus"),u=r(l,"returnFocus","returnFocusOnDeactivate");null==t||t();var d=function(){j((function(){u&&v(p(i.nodeFocusedBeforeActivation)),null==n||n()}))};return u&&c?(c(p(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(e){if(i.paused||!i.active)return this;var l=r(e,"onPause"),a=r(e,"onPostPause");return i.paused=!0,null==l||l(),B(),M(),null==a||a(),this},unpause:function(e){if(!i.paused||!i.active)return this;var l=r(e,"onUnpause"),a=r(e,"onPostUnpause");return i.paused=!1,null==l||l(),d(),z(),M(),null==a||a(),this},updateContainerElements:function(e){var l=[].concat(e).filter(Boolean);return i.containers=l.map((function(e){return"string"==typeof e?t.querySelector(e):e})),i.active&&d(),M(),this}}).updateContainerElements(e),a};const z="SWIRL_SHELL_SECONDARY_NAVIGATION_COLLAPSE_STATE",B="SWIRL_SHELL_SECONDARY_NAVIGATION_VIEW_STATE",G="SWIRL_SHELL_NAVIGATION_COLLAPSE_STATE",M=class{constructor(a){e(this,a),this.historyBackClick=l(this,"historyBackClick",7),this.historyForwardClick=l(this,"historyForwardClick",7),this.skipLinkClick=l(this,"skipLinkClick",7),this.browserBackButtonLabel="Navigate back",this.browserForwardButtonLabel="Navigate forward",this.collapseNavigationButtonLabel="Collapse navigation",this.enableSecondaryNavGridLayout=!0,this.secondaryNavGridLayoutVariant="tiled",this.expandNavigationButtonLabel="Expand navigation",this.gridNavLayoutToggleLabel="Grid",this.hideMobileNavigationButtonLabel="Close navigation",this.listNavLayoutToggleLabel="List",this.navigationLabel="Main",this.secondaryNavCollapseLabel="Show less",this.secondaryNavExpandLabel="Show more",this.skipLinkLabel="Skip to main content",this.isDesktopViewport=!0,this.secondaryNavView="list",this.collectNavItems=()=>{this.mainNavItems=Array.from(this.el.querySelectorAll("swirl-shell-navigation-item[slot='nav'], [slot='nav'] swirl-shell-navigation-item")),this.secondaryNavItems=Array.from(this.el.querySelectorAll("swirl-shell-navigation-item[slot='secondary-nav'], [slot='secondary-nav'] swirl-shell-navigation-item")),this.toggleNavItemLabels(),this.setSecondaryNavItemsTiled()},this.toggleSecondaryNavView=e=>{e.stopPropagation(),this.secondaryNavView="grid"===this.secondaryNavView?"list":"grid",this.setSecondaryNavItemsTiled(),localStorage.setItem(B,String(this.secondaryNavView))},this.toggleSecondaryNavCollapse=e=>{e.stopPropagation(),this.secondaryNavCollapsed=!this.secondaryNavCollapsed,localStorage.setItem(z,String(this.secondaryNavCollapsed))},this.onNavigationToggleClick=()=>{this.navigationCollapsed=!this.navigationCollapsed},this.onNavigationClick=()=>{this.hideMobileNavigation()}}componentWillLoad(){console.warn('[Swirl] The "swirl-shell-layout" component is deprecated and will be removed in the next major release.'),this.isDesktopViewport=i(),this.collectNavItems();const e="true"===localStorage.getItem(G);this.navigationCollapsed=e,this.restoreSecondaryNavState()}componentDidLoad(){this.focusTrap=P(this.navElement,{allowOutsideClick:!0,tabbableOptions:{getShadowRoot:e=>e.shadowRoot}}),this.collectNavItems(),this.navMutationObserver=new MutationObserver((()=>{this.collectNavItems()})),this.navMutationObserver.observe(this.navElement,{childList:!0,subtree:!0})}componentDidRender(){this.focusTrap?.updateContainerElements(this.navElement)}disconnectedCallback(){this.focusTrap?.deactivate(),this.navMutationObserver?.disconnect()}onWindowKeyDown(e){"Escape"===e.key&&this.mobileNavigationActive&&this.hideMobileNavigation()}watchEnableSecondaryNavGridLayout(){this.restoreSecondaryNavState()}watchMobileNavigationState(){this.mobileNavigationActive?setTimeout((()=>{this.focusTrap.activate()}),200):this.focusTrap.deactivate()}watchNavigationCollapsed(){localStorage.setItem(G,String(this.navigationCollapsed)),this.toggleNavItemLabels(),this.setSecondaryNavItemsTiled()}onWindowResize(){this.isDesktopViewport!==i()&&(this.isDesktopViewport=i(),this.collectNavItems())}async showMobileNavigation(){this.mobileNavigationActive=!0,this.collectNavItems()}async hideMobileNavigation(){this.mobileNavigationActive=!1,this.toggleNavItemLabels()}toggleNavItemLabels(){[...this.secondaryNavItems,...this.mainNavItems].forEach((e=>{e.hideLabel=this.navigationCollapsed&&this.isDesktopViewport}))}setSecondaryNavItemsTiled(){this.secondaryNavItems.forEach((e=>{e.variant=this.enableSecondaryNavGridLayout&&("grid"===this.secondaryNavView||this.navigationCollapsed&&this.isDesktopViewport)?this.secondaryNavGridLayoutVariant:"default"}))}restoreSecondaryNavState(){if(this.enableSecondaryNavGridLayout){const e="true"===localStorage.getItem(z);this.secondaryNavCollapsed=e;const l=localStorage.getItem(B);this.secondaryNavView=l}}render(){const e=this.navigationCollapsed&&this.isDesktopViewport,l=Boolean(this.el.querySelector("[slot='secondary-nav']")),o=s("shell-layout",{"shell-layout--branded-header":this.brandedHeader,"shell-layout--secondary-nav-collapsed":this.secondaryNavCollapsed,"shell-layout--has-secondary-nav":l,"shell-layout--mobile-navigation-active":this.mobileNavigationActive,"shell-layout--navigation-collapsed":e});return a(t,{key:"de96ada7e3b6994b6d167905c3d4f46b1bffa310"},a("div",{key:"874ea28fdb92a81a5769f4b9ccf2f969b5d2e04a",class:o},a("header",{key:"a573269e5a124f99f328d42faaaa7c39c7ecdf6a",class:"shell-layout__header","data-tauri-drag-region":"true"},a("button",{key:"4e713b9b84e49ccb1a6e9b092385f4a6bee179db",class:"shell-layout__skip-link",onClick:this.skipLinkClick.emit,type:"button"},this.skipLinkLabel),a("div",{key:"94ad6914dcc642533f791f5e3ab20179eebeb2cb",class:"shell-layout__header-left"},a("swirl-tooltip",{key:"7384c7775eba3fb643eaa1be4d7e9a4c1168a909",content:this.navigationCollapsed?this.expandNavigationButtonLabel:this.collapseNavigationButtonLabel,delay:100,position:"right"},a("button",{key:"c5f7d89fa6329565a98bcfc6b247c68ace917fb1",class:"shell-layout__header-tool",onClick:this.onNavigationToggleClick,type:"button"},a(this.navigationCollapsed?"swirl-icon-dock-left-expand":"swirl-icon-dock-left-collapse",{size:20}),a("swirl-visually-hidden",{key:"6d7e01a66432ba25e8425df610b7962752881504"},this.navigationCollapsed?this.expandNavigationButtonLabel:this.collapseNavigationButtonLabel))),a("a",{key:"8ce53b9bd78a8001f57134176d9e98eca31ea3a8",class:"shell-layout__header-tool",onClick:this.historyBackClick.emit,href:"javascript:history.back()"},a("swirl-icon-arrow-back",{key:"170cfba8ae2b54fa159fc7ea09aeaf8cdbddee97",size:20}),a("swirl-visually-hidden",{key:"e5efad0cbaa63106605d30cbc6db26456281ca39"},this.browserBackButtonLabel)),a("a",{key:"3d91fe8214997753f4c0f1105628179210a7cb71",class:"shell-layout__header-tool",onClick:this.historyForwardClick.emit,href:"javascript:history.forward()"},a("swirl-icon-arrow-forward",{key:"f0b4997cd4213b7f73e6ad71c44348bb2559e62a",size:20}),a("swirl-visually-hidden",{key:"1f2b7ee684919715d7b06c7a71b3b8d922a6864f"},this.browserForwardButtonLabel)),a("slot",{key:"0ef707231138f88a100217b7ed91554498c0b203",name:"left-header-tools"})),a("div",{key:"3cbf9e6388aa4987e20b464d35a59f05a9eafe1c",class:"shell-layout__logo"},a("slot",{key:"4f44aeed00ca8ef679dbb0ed27e36a92d31abf07",name:"logo"})),a("div",{key:"ba28fb7cd9bb75fac3191789014f6862a9021994",class:"shell-layout__header-right"},a("slot",{key:"305cfb750e5adb56bf00de5bd596cbfc786a20db",name:"right-header-tools"}),a("slot",{key:"068e0c2ad1fa657613dd6c90ab9fa673efada09b",name:"avatar"}))),a("div",{key:"5c48fcca90e830f779cb4e90fab9b4010d7a266a",class:"shell-layout__mobile-nav-backdrop",onClick:this.onNavigationClick}),a("nav",{key:"a77e9e5d3f7db1eb5a4c0af961788c342cc6f1f9","aria-labelledby":"main-navigation-label",class:"shell-layout__nav",onClick:this.onNavigationClick,ref:e=>this.navElement=e},a("div",{key:"10b7221f2e08f3b6a799e20a8b832683e83ef280",class:"shell-layout__mobile-header"},a("slot",{key:"d093e9bc5dd3d791acde2390d5b3f14ad2963a17",name:"mobile-logo"}),a("div",{key:"9c27cdef0bdc2db253b1e9b799d75f908c2651ad",class:"shell-layout__mobile-header-tools"},a("slot",{key:"6c03625a7a9878c65992176a423827e54adbefb6",name:"mobile-header-tools"}),a("button",{key:"ee7c1f2c70cef9305767d04366423d780816afc2",class:"shell-layout__header-tool",type:"button"},a("swirl-icon-double-arrow-left",{key:"d847affc1dea24aa560ba45034e8bb84b1fb4251",size:20}),a("swirl-visually-hidden",{key:"d2e7b047629f502f9f826d133741ea5f4a06541d"},this.hideMobileNavigationButtonLabel)))),a("div",{key:"0f59ceabdf47f8e45c9e11836e57ea755db0384d",class:"shell-layout__nav-body"},a("swirl-visually-hidden",{key:"f2bce9497e8831734f50c484cd8b517d0f2f6e4c"},a("span",{key:"c45e263458def8240de6b3714a4b8b618575bad9",id:"main-navigation-label"},this.navigationLabel)),a("slot",{key:"b67777ad705796834db3e87bdb081b54a737728a",name:"nav",onSlotchange:this.collectNavItems}),a("div",{key:"cbb39859ec3f398cf08f6d2f61774c519a3d60bc",class:"shell-layout__secondary-nav"},a("swirl-separator",{key:"1eaa5e8a7beb123b59eb0f5b1d08e064e182a998",color:"strong",spacing:"16"}),this.enableSecondaryNavGridLayout&&a("swirl-box",{key:"c03e9804dc32460c679867e0b5aa58c14569f909",paddingBlockEnd:"16"},a("swirl-stack",{key:"ed6489c725487e7e509b3472661f4216f7bf0337",justify:e?"center":"space-between",orientation:"horizontal"},a("swirl-button",{key:"069fb3eb456811d0a9186e48dd0f8fe5d403ba03",hideLabel:e,icon:this.secondaryNavCollapsed?"<swirl-icon-expand-more></swirl-icon-expand-more>":"<swirl-icon-expand-less></swirl-icon-expand-less>",label:this.secondaryNavCollapsed?this.secondaryNavExpandLabel:this.secondaryNavCollapseLabel,onClick:this.toggleSecondaryNavCollapse,variant:"plain"}),!e&&!this.secondaryNavCollapsed&&a("swirl-button",{key:"c88ba436af1f6d7ed13ed6dd612be4467abb856f",icon:"grid"===this.secondaryNavView?"<swirl-icon-menu></swirl-icon-menu>":"<swirl-icon-hamburger-menu></swirl-icon-hamburger-menu>",iconPosition:"end",label:"grid"===this.secondaryNavView?this.gridNavLayoutToggleLabel:this.listNavLayoutToggleLabel,onClick:this.toggleSecondaryNavView,variant:"plain"}))),a("div",{key:"4b2a5eab2e5d4b117df8bbf29dbd7914f1144650",class:{[`shell-layout__secondary-nav-items--${this.secondaryNavGridLayoutVariant}`]:!0,"shell-layout__secondary-nav-items":!0,"shell-layout__secondary-nav-items--grid-view":this.enableSecondaryNavGridLayout&&"grid"===this.secondaryNavView}},a("slot",{key:"4bfdaf40935715cbc550d5fe3aa5973bfcf94748",name:"secondary-nav",onSlotchange:this.collectNavItems}))))),a("main",{key:"c5376e170b46d1103a75105307b87c2ef139d79e",class:"shell-layout__main",id:"main-content"},a("slot",{key:"240da7bdb7f9049b425e029747aaeb23d4d65be2"}))))}get el(){return o(this)}static get watchers(){return{enableSecondaryNavGridLayout:[{watchEnableSecondaryNavGridLayout:0}],mobileNavigationActive:[{watchMobileNavigationState:0}],navigationCollapsed:[{watchNavigationCollapsed:0}]}}};M.style='.sc-swirl-shell-layout-h{--swirl-shell-background:var(--s-surface-sunken-default);--swirl-shell-text-color:var(--s-text-default);--swirl-shell-header-height:3.25rem;--swirl-shell-collapsed-nav-width:4rem;--swirl-shell-extended-nav-width:18rem;display:flex;width:100%;height:100%}.sc-swirl-shell-layout-h *.sc-swirl-shell-layout{box-sizing:border-box}.shell-layout.sc-swirl-shell-layout{display:grid;overflow:hidden;width:100%;min-height:100%;background-color:var(--swirl-shell-background);transition:grid-template-columns 0.1s;grid-template-columns:0 1fr 0;grid-template-rows:1fr;grid-template-areas:"nav main"}@media (prefers-reduced-motion){.shell-layout.sc-swirl-shell-layout{transition:none}}@media (min-width: 992px){.shell-layout.sc-swirl-shell-layout{padding-right:var(--s-space-8);padding-bottom:var(--s-space-8);-moz-column-gap:var(--s-space-8);column-gap:var(--s-space-8);grid-template-columns:var(--swirl-shell-extended-nav-width) 1fr 0;grid-template-rows:var(--swirl-shell-header-height) 1fr;grid-template-areas:"header header header" "nav main sidebar"}}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout{border-bottom:none;color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout{color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-action-primary-hovered)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-action-primary-pressed)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout swirl-badge.sc-swirl-shell-layout{--swirl-badge-border-color:var(--s-action-primary-default)}@media (min-width: 992px){.shell-layout--navigation-collapsed.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{scrollbar-width:none}.shell-layout--navigation-collapsed.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout::-webkit-scrollbar{width:0;background:transparent;-webkit-appearance:none}}.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul>*,.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul>*{max-width:100%;max-height:3rem;flex-basis:100%}@media (min-width: 992px){.shell-layout--navigation-collapsed.sc-swirl-shell-layout{grid-template-columns:var(--swirl-shell-collapsed-nav-width) 1fr 0}}.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{transform:translate3d(0, 0, 0);box-shadow:var(--s-shadow-level-3)}@media (min-width: 992px){.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{transform:none;box-shadow:none}}.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{display:block}@media (min-width: 992px){.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{display:none}}.shell-layout--has-secondary-nav.sc-swirl-shell-layout .shell-layout__secondary-nav.sc-swirl-shell-layout{display:block}.shell-layout--secondary-nav-collapsed.sc-swirl-shell-layout .shell-layout__secondary-nav-items.sc-swirl-shell-layout{display:none}.shell-layout__header.sc-swirl-shell-layout{position:relative;display:none;width:calc(100% + var(--s-space-8));padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);justify-content:space-between;align-items:center;color:var(--swirl-shell-text-color);grid-area:header}@media (min-width: 992px){.shell-layout__header.sc-swirl-shell-layout{display:flex}}.shell-layout__skip-link.sc-swirl-shell-layout{position:absolute;z-index:9;top:0;left:0;padding:var(--s-space-4);border:none;color:var(--swirl-shell-text-color);background-color:var(--swirl-shell-background);font:inherit;cursor:pointer}.shell-layout__skip-link.sc-swirl-shell-layout:not(:focus):not(:active){position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%)}.shell-layout__header-left.sc-swirl-shell-layout{display:flex;padding-left:var(--s-space-2);flex-basis:8rem;flex-shrink:0;align-items:center;gap:var(--s-space-8)}.shell-layout__header-right.sc-swirl-shell-layout{display:flex;flex-basis:8rem;flex-shrink:0;justify-content:flex-end;align-items:center;gap:var(--s-space-8)}.shell-layout__logo.sc-swirl-shell-layout{display:flex;flex-grow:1;justify-content:center;align-items:center}.shell-layout__logo.sc-swirl-shell-layout-s>a{display:flex}.shell-layout__logo.sc-swirl-shell-layout-s>a img,.shell-layout__logo.sc-swirl-shell-layout-s>img{max-height:1.75rem}.shell-layout__header-tool.sc-swirl-shell-layout{position:relative;width:2.25rem;height:2.25rem;padding:var(--s-space-8);flex-shrink:0;border:none;border-radius:var(--s-border-radius-sm);color:var(--swirl-shell-text-color);background-color:var(--s-surface-sunken-default);font:inherit;cursor:pointer}.shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-state-hovered)}.shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-state-pressed)}.shell-layout__header-tool.sc-swirl-shell-layout:focus{outline:none}.shell-layout__header-tool.sc-swirl-shell-layout:focus-visible{box-shadow:0 0 0 0.125rem var(--s-focus-default)}.shell-layout__header-tool.sc-swirl-shell-layout swirl-badge.sc-swirl-shell-layout{--swirl-badge-border-color:var(--s-surface-sunken-default);position:absolute;top:var(--s-space-2);right:var(--s-space-2);padding-right:var(--s-space-2);transform:translate3d(0.1875rem, 0, 0)}.shell-layout__nav.sc-swirl-shell-layout{position:fixed;z-index:9;top:0;bottom:0;left:0;overflow-x:hidden;overflow-y:auto;width:100%;max-width:18.75rem;color:var(--swirl-shell-text-color);background-color:var(--s-surface-overlay-default);transition:transform 0.1s, box-shadow 0.1s, width 0.1s;transform:translate3d(-100%, 0, 0);grid-area:nav}@media (prefers-reduced-motion){.shell-layout__nav.sc-swirl-shell-layout{transition:none}}@media (min-width: 992px){.shell-layout__nav.sc-swirl-shell-layout{position:relative;max-width:none;padding-top:0;padding-right:var(--s-space-4);padding-bottom:var(--s-space-8);padding-left:var(--s-space-12);background-color:var(--swirl-shell-background);transform:none;box-shadow:none;inset:auto}}.shell-layout__mobile-header.sc-swirl-shell-layout{display:flex;min-height:3.5rem;margin-bottom:var(--s-space-8);padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);justify-content:space-between;align-items:center;border-bottom:0.0625rem solid var(--s-border-default)}.shell-layout__mobile-header.sc-swirl-shell-layout-s>img{max-height:1.75rem}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout{background-color:var(--s-surface-overlay-default)}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-state-hovered)}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-state-pressed)}@media (min-width: 992px){.shell-layout__mobile-header.sc-swirl-shell-layout{display:none}}.shell-layout__mobile-header-tools.sc-swirl-shell-layout{display:flex;justify-content:flex-end;align-items:center;gap:var(--s-space-8)}.shell-layout__nav-body.sc-swirl-shell-layout{padding:var(--s-space-8)}.shell-layout__nav-body.sc-swirl-shell-layout-s ul{margin:0;padding:0;list-style:none}.shell-layout__nav-body.sc-swirl-shell-layout-s li{display:flex}@media (min-width: 992px){.shell-layout__nav-body.sc-swirl-shell-layout{padding:0}}.shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{position:fixed;z-index:8;display:none;background-color:rgba(0, 0, 0, 0.25);animation:shell-layout-backdrop-fade-in 0.1s;inset:0}.shell-layout__secondary-nav.sc-swirl-shell-layout{display:none}.shell-layout__secondary-nav-items.sc-swirl-shell-layout-s>ul,.shell-layout__secondary-nav-items .sc-swirl-shell-layout-s>ul{display:flex;flex-direction:column;gap:var(--s-space-2)}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul{flex-wrap:wrap;flex-direction:row;gap:var(--s-space-16)}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul>*,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul>*{min-width:0;max-height:none}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.shell-layout__secondary-nav-items--app-icon.sc-swirl-shell-layout-s>ul,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.shell-layout__secondary-nav-items--app-icon .sc-swirl-shell-layout-s>ul{row-gap:var(--s-space-16);-moz-column-gap:0;column-gap:0}.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--tiled.sc-swirl-shell-layout-s>ul,.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--tiled .sc-swirl-shell-layout-s>ul{gap:var(--s-space-16)}.shell-layout__secondary-nav-items--tiled.sc-swirl-shell-layout-s>ul>*,.shell-layout__secondary-nav-items--tiled .sc-swirl-shell-layout-s>ul>*{flex-basis:calc(50% - var(--s-space-8))}.shell-layout__secondary-nav-items--app-icon.sc-swirl-shell-layout-s>ul>*,.shell-layout__secondary-nav-items--app-icon .sc-swirl-shell-layout-s>ul>*{flex-basis:calc(100% / 3)}.shell-layout__main.sc-swirl-shell-layout{overflow:hidden;background-color:var(--s-background-default);grid-area:main}@media (min-width: 992px){.shell-layout__main.sc-swirl-shell-layout{width:calc(100% + var(--s-space-8));border:0.0625rem solid var(--s-border-default);border-radius:var(--s-border-radius-sm)}}@keyframes shell-layout-backdrop-fade-in{from{opacity:0}to{opacity:1}}@keyframes shell-layout-no-overflow-after-transition{0%{overflow:initial}99%{overflow:initial}100%{overflow:hidden}}';export{M as swirl_shell_layout}
11
+ function T(e,l){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);l&&(t=t.filter((function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable}))),a.push.apply(a,t)}return a}function A(e){for(var l=1;l<arguments.length;l++){var a=null!=arguments[l]?arguments[l]:{};l%2?T(Object(a),!0).forEach((function(l){var t,o,s;t=e,s=a[l],(o=function(e){var l=function(e,l){if("object"!=typeof e||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var t=a.call(e,l);if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof l?l:String(l)}(o=l))in t?Object.defineProperty(t,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[o]=s})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):T(Object(a)).forEach((function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))}))}return e}var L=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},O=function(e){return L(e)&&!e.shiftKey},C=function(e){return L(e)&&e.shiftKey},j=function(e){return setTimeout(e,0)},I=function(e,l){var a=-1;return e.every((function(e,t){return!l(e)||(a=t,!1)})),a},D=function(e){for(var l=arguments.length,a=new Array(l>1?l-1:0),t=1;t<l;t++)a[t-1]=arguments[t];return"function"==typeof e?e.apply(void 0,a):e},F=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},R=[],P=function(e,l){var a,t=(null==l?void 0:l.document)||document,o=(null==l?void 0:l.trapStack)||R,s=A({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:O,isKeyBackward:C},l),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},r=function(e,l,a){return e&&void 0!==e[l]?e[l]:s[a||l]},n=function(e,l){var a="function"==typeof(null==l?void 0:l.composedPath)?l.composedPath():void 0;return i.containerGroups.findIndex((function(l){var t=l.container,o=l.tabbableNodes;return t.contains(e)||(null==a?void 0:a.includes(t))||o.find((function(l){return l===e}))}))},c=function(e){var l=s[e];if("function"==typeof l){for(var a=arguments.length,o=new Array(a>1?a-1:0),i=1;i<a;i++)o[i-1]=arguments[i];l=l.apply(void 0,o)}if(!0===l&&(l=void 0),!l){if(void 0===l||!1===l)return l;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var r=l;if("string"==typeof l&&!(r=t.querySelector(l)))throw new Error("`".concat(e,"` as selector refers to no known node"));return r},u=function(){var e=c("initialFocus");if(!1===e)return!1;if(void 0===e||!N(e,s.tabbableOptions))if(n(t.activeElement)>=0)e=t.activeElement;else{var l=i.tabbableGroups[0];e=l&&l.firstTabbableNode||c("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var l=function(e,l){var a;return a=(l=l||{}).getShadowRoot?y([e],l.includeContainer,{filter:_.bind(null,l),flatten:!1,getShadowRoot:l.getShadowRoot,shadowRootFilter:k}):f(e,l.includeContainer,_.bind(null,l)),x(a)}(e,s.tabbableOptions),a=function(e,l){return(l=l||{}).getShadowRoot?y([e],l.includeContainer,{filter:g.bind(null,l),flatten:!0,getShadowRoot:l.getShadowRoot}):f(e,l.includeContainer,g.bind(null,l))}(e,s.tabbableOptions),t=l.length>0?l[0]:void 0,o=l.length>0?l[l.length-1]:void 0,i=a.find((function(e){return S(e)})),r=a.slice().reverse().find((function(e){return S(e)})),n=!!l.find((function(e){return b(e)>0}));return{container:e,tabbableNodes:l,focusableNodes:a,posTabIndexesFound:n,firstTabbableNode:t,lastTabbableNode:o,firstDomTabbableNode:i,lastDomTabbableNode:r,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=l.indexOf(e);return o<0?t?a.slice(a.indexOf(e)+1).find((function(e){return S(e)})):a.slice(0,a.indexOf(e)).reverse().find((function(e){return S(e)})):l[o+(t?1:-1)]}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find((function(e){return e.posTabIndexesFound}))&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function e(l){var a=l.activeElement;if(a)return a.shadowRoot&&null!==a.shadowRoot.activeElement?e(a.shadowRoot):a},v=function e(l){!1!==l&&l!==h(document)&&(l&&l.focus?(l.focus({preventScroll:!!s.preventScroll}),i.mostRecentlyFocusedNode=l,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(l)&&l.select()):e(u()))},p=function(e){var l=c("setReturnFocus",e);return l||!1!==l&&e},w=function(e){var l=e.target,a=e.event,t=e.isBackward,o=void 0!==t&&t;l=l||F(a),d();var r=null;if(i.tabbableGroups.length>0){var u=n(l,a),h=u>=0?i.containerGroups[u]:void 0;if(u<0)r=o?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(o){var f=I(i.tabbableGroups,(function(e){return l===e.firstTabbableNode}));if(f<0&&(h.container===l||N(l,s.tabbableOptions)&&!S(l,s.tabbableOptions)&&!h.nextTabbableNode(l,!1))&&(f=u),f>=0){var y=i.tabbableGroups[0===f?i.tabbableGroups.length-1:f-1];r=b(l)>=0?y.lastTabbableNode:y.lastDomTabbableNode}else L(a)||(r=h.nextTabbableNode(l,!1))}else{var v=I(i.tabbableGroups,(function(e){return l===e.lastTabbableNode}));if(v<0&&(h.container===l||N(l,s.tabbableOptions)&&!S(l,s.tabbableOptions)&&!h.nextTabbableNode(l))&&(v=u),v>=0){var p=i.tabbableGroups[v===i.tabbableGroups.length-1?0:v+1];r=b(l)>=0?p.firstTabbableNode:p.firstDomTabbableNode}else L(a)||(r=h.nextTabbableNode(l))}}else r=c("fallbackFocus");return r},m=function(e){var l=F(e);n(l,e)>=0||(D(s.clickOutsideDeactivates,e)?a.deactivate({returnFocus:s.returnFocusOnDeactivate}):D(s.allowOutsideClick,e)||e.preventDefault())},E=function(e){var l=F(e),a=n(l,e)>=0;if(a||l instanceof Document)a&&(i.mostRecentlyFocusedNode=l);else{var t;e.stopImmediatePropagation();var o=!0;if(i.mostRecentlyFocusedNode)if(b(i.mostRecentlyFocusedNode)>0){var r=n(i.mostRecentlyFocusedNode),c=i.containerGroups[r].tabbableNodes;if(c.length>0){var d=c.findIndex((function(e){return e===i.mostRecentlyFocusedNode}));d>=0&&(s.isKeyForward(i.recentNavEvent)?d+1<c.length&&(t=c[d+1],o=!1):d-1>=0&&(t=c[d-1],o=!1))}}else i.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return b(e)>0}))}))||(o=!1);else o=!1;o&&(t=w({target:i.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(i.recentNavEvent)})),v(t||i.mostRecentlyFocusedNode||u())}i.recentNavEvent=void 0},T=function(e){if(("Escape"===(null==(l=e)?void 0:l.key)||"Esc"===(null==l?void 0:l.key)||27===(null==l?void 0:l.keyCode))&&!1!==D(s.escapeDeactivates,e))return e.preventDefault(),void a.deactivate();var l;(s.isKeyForward(e)||s.isKeyBackward(e))&&function(e){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i.recentNavEvent=e;var a=w({event:e,isBackward:l});a&&(L(e)&&e.preventDefault(),v(a))}(e,s.isKeyBackward(e))},P=function(e){var l=F(e);n(l,e)>=0||D(s.clickOutsideDeactivates,e)||D(s.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},z=function(){if(i.active)return function(e,l){if(e.length>0){var a=e[e.length-1];a!==l&&a.pause()}var t=e.indexOf(l);-1===t||e.splice(t,1),e.push(l)}(o,a),i.delayInitialFocusTimer=s.delayInitialFocus?j((function(){v(u())})):v(u()),t.addEventListener("focusin",E,!0),t.addEventListener("mousedown",m,{capture:!0,passive:!1}),t.addEventListener("touchstart",m,{capture:!0,passive:!1}),t.addEventListener("click",P,{capture:!0,passive:!1}),t.addEventListener("keydown",T,{capture:!0,passive:!1}),a},B=function(){if(i.active)return t.removeEventListener("focusin",E,!0),t.removeEventListener("mousedown",m,!0),t.removeEventListener("touchstart",m,!0),t.removeEventListener("click",P,!0),t.removeEventListener("keydown",T,!0),a},G="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===i.mostRecentlyFocusedNode}))}))&&v(u())})):void 0,M=function(){G&&(G.disconnect(),i.active&&!i.paused&&i.containers.map((function(e){G.observe(e,{subtree:!0,childList:!0})})))};return(a={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var l=r(e,"onActivate"),a=r(e,"onPostActivate"),o=r(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=t.activeElement,null==l||l();var s=function(){o&&d(),z(),M(),null==a||a()};return o?(o(i.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!i.active)return this;var l=A({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,B(),i.active=!1,i.paused=!1,M(),function(e,l){var a=e.indexOf(l);-1!==a&&e.splice(a,1),e.length>0&&e[e.length-1].unpause()}(o,a);var t=r(l,"onDeactivate"),n=r(l,"onPostDeactivate"),c=r(l,"checkCanReturnFocus"),u=r(l,"returnFocus","returnFocusOnDeactivate");null==t||t();var d=function(){j((function(){u&&v(p(i.nodeFocusedBeforeActivation)),null==n||n()}))};return u&&c?(c(p(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(e){if(i.paused||!i.active)return this;var l=r(e,"onPause"),a=r(e,"onPostPause");return i.paused=!0,null==l||l(),B(),M(),null==a||a(),this},unpause:function(e){if(!i.paused||!i.active)return this;var l=r(e,"onUnpause"),a=r(e,"onPostUnpause");return i.paused=!1,null==l||l(),d(),z(),M(),null==a||a(),this},updateContainerElements:function(e){var l=[].concat(e).filter(Boolean);return i.containers=l.map((function(e){return"string"==typeof e?t.querySelector(e):e})),i.active&&d(),M(),this}}).updateContainerElements(e),a};const z="SWIRL_SHELL_SECONDARY_NAVIGATION_COLLAPSE_STATE",B="SWIRL_SHELL_SECONDARY_NAVIGATION_VIEW_STATE",G="SWIRL_SHELL_NAVIGATION_COLLAPSE_STATE",M=class{constructor(a){e(this,a),this.historyBackClick=l(this,"historyBackClick",7),this.historyForwardClick=l(this,"historyForwardClick",7),this.skipLinkClick=l(this,"skipLinkClick",7),this.browserBackButtonLabel="Navigate back",this.browserForwardButtonLabel="Navigate forward",this.collapseNavigationButtonLabel="Collapse navigation",this.enableSecondaryNavGridLayout=!0,this.secondaryNavGridLayoutVariant="tiled",this.expandNavigationButtonLabel="Expand navigation",this.gridNavLayoutToggleLabel="Grid",this.hideMobileNavigationButtonLabel="Close navigation",this.listNavLayoutToggleLabel="List",this.navigationLabel="Main",this.secondaryNavCollapseLabel="Show less",this.secondaryNavExpandLabel="Show more",this.skipLinkLabel="Skip to main content",this.isDesktopViewport=!0,this.secondaryNavView="list",this.collectNavItems=()=>{this.mainNavItems=Array.from(this.el.querySelectorAll("swirl-shell-navigation-item[slot='nav'], [slot='nav'] swirl-shell-navigation-item")),this.secondaryNavItems=Array.from(this.el.querySelectorAll("swirl-shell-navigation-item[slot='secondary-nav'], [slot='secondary-nav'] swirl-shell-navigation-item")),this.toggleNavItemLabels(),this.setSecondaryNavItemsTiled()},this.toggleSecondaryNavView=e=>{e.stopPropagation(),this.secondaryNavView="grid"===this.secondaryNavView?"list":"grid",this.setSecondaryNavItemsTiled(),localStorage.setItem(B,String(this.secondaryNavView))},this.toggleSecondaryNavCollapse=e=>{e.stopPropagation(),this.secondaryNavCollapsed=!this.secondaryNavCollapsed,localStorage.setItem(z,String(this.secondaryNavCollapsed))},this.onNavigationToggleClick=()=>{this.navigationCollapsed=!this.navigationCollapsed},this.onNavigationClick=()=>{this.hideMobileNavigation()}}componentWillLoad(){console.warn('[Swirl] The "swirl-shell-layout" component is deprecated and will be removed in the next major release.'),this.isDesktopViewport=i(),this.collectNavItems();const e="true"===localStorage.getItem(G);this.navigationCollapsed=e,this.restoreSecondaryNavState()}componentDidLoad(){this.focusTrap=P(this.navElement,{allowOutsideClick:!0,tabbableOptions:{getShadowRoot:e=>e.shadowRoot}}),this.collectNavItems(),this.navMutationObserver=new MutationObserver((()=>{this.collectNavItems()})),this.navMutationObserver.observe(this.navElement,{childList:!0,subtree:!0})}componentDidRender(){this.focusTrap?.updateContainerElements(this.navElement)}disconnectedCallback(){this.focusTrap?.deactivate(),this.navMutationObserver?.disconnect()}onWindowKeyDown(e){"Escape"===e.key&&this.mobileNavigationActive&&this.hideMobileNavigation()}watchEnableSecondaryNavGridLayout(){this.restoreSecondaryNavState()}watchMobileNavigationState(){this.mobileNavigationActive?setTimeout((()=>{this.focusTrap.activate()}),200):this.focusTrap.deactivate()}watchNavigationCollapsed(){localStorage.setItem(G,String(this.navigationCollapsed)),this.toggleNavItemLabels(),this.setSecondaryNavItemsTiled()}onWindowResize(){this.isDesktopViewport!==i()&&(this.isDesktopViewport=i(),this.collectNavItems())}async showMobileNavigation(){this.mobileNavigationActive=!0,this.collectNavItems()}async hideMobileNavigation(){this.mobileNavigationActive=!1,this.toggleNavItemLabels()}toggleNavItemLabels(){[...this.secondaryNavItems,...this.mainNavItems].forEach((e=>{e.hideLabel=this.navigationCollapsed&&this.isDesktopViewport}))}setSecondaryNavItemsTiled(){this.secondaryNavItems.forEach((e=>{e.variant=this.enableSecondaryNavGridLayout&&("grid"===this.secondaryNavView||this.navigationCollapsed&&this.isDesktopViewport)?this.secondaryNavGridLayoutVariant:"default"}))}restoreSecondaryNavState(){if(this.enableSecondaryNavGridLayout){const e="true"===localStorage.getItem(z);this.secondaryNavCollapsed=e;const l=localStorage.getItem(B);this.secondaryNavView=l}}render(){const e=this.navigationCollapsed&&this.isDesktopViewport,l=Boolean(this.el.querySelector("[slot='secondary-nav']")),o=s("shell-layout",{"shell-layout--branded-header":this.brandedHeader,"shell-layout--secondary-nav-collapsed":this.secondaryNavCollapsed,"shell-layout--has-secondary-nav":l,"shell-layout--mobile-navigation-active":this.mobileNavigationActive,"shell-layout--navigation-collapsed":e});return a(t,{key:"de96ada7e3b6994b6d167905c3d4f46b1bffa310"},a("div",{key:"874ea28fdb92a81a5769f4b9ccf2f969b5d2e04a",class:o},a("header",{key:"a573269e5a124f99f328d42faaaa7c39c7ecdf6a",class:"shell-layout__header","data-tauri-drag-region":"true"},a("button",{key:"4e713b9b84e49ccb1a6e9b092385f4a6bee179db",class:"shell-layout__skip-link",onClick:this.skipLinkClick.emit,type:"button"},this.skipLinkLabel),a("div",{key:"94ad6914dcc642533f791f5e3ab20179eebeb2cb",class:"shell-layout__header-left"},a("swirl-tooltip",{key:"7384c7775eba3fb643eaa1be4d7e9a4c1168a909",content:this.navigationCollapsed?this.expandNavigationButtonLabel:this.collapseNavigationButtonLabel,delay:100,position:"right"},a("button",{key:"c5f7d89fa6329565a98bcfc6b247c68ace917fb1",class:"shell-layout__header-tool",onClick:this.onNavigationToggleClick,type:"button"},a(this.navigationCollapsed?"swirl-icon-dock-left-expand":"swirl-icon-dock-left-collapse",{size:20}),a("swirl-visually-hidden",{key:"6d7e01a66432ba25e8425df610b7962752881504"},this.navigationCollapsed?this.expandNavigationButtonLabel:this.collapseNavigationButtonLabel))),a("a",{key:"8ce53b9bd78a8001f57134176d9e98eca31ea3a8",class:"shell-layout__header-tool",onClick:this.historyBackClick.emit,href:"javascript:history.back()"},a("swirl-icon-arrow-back",{key:"170cfba8ae2b54fa159fc7ea09aeaf8cdbddee97",size:20}),a("swirl-visually-hidden",{key:"e5efad0cbaa63106605d30cbc6db26456281ca39"},this.browserBackButtonLabel)),a("a",{key:"3d91fe8214997753f4c0f1105628179210a7cb71",class:"shell-layout__header-tool",onClick:this.historyForwardClick.emit,href:"javascript:history.forward()"},a("swirl-icon-arrow-forward",{key:"f0b4997cd4213b7f73e6ad71c44348bb2559e62a",size:20}),a("swirl-visually-hidden",{key:"1f2b7ee684919715d7b06c7a71b3b8d922a6864f"},this.browserForwardButtonLabel)),a("slot",{key:"0ef707231138f88a100217b7ed91554498c0b203",name:"left-header-tools"})),a("div",{key:"3cbf9e6388aa4987e20b464d35a59f05a9eafe1c",class:"shell-layout__logo"},a("slot",{key:"4f44aeed00ca8ef679dbb0ed27e36a92d31abf07",name:"logo"})),a("div",{key:"ba28fb7cd9bb75fac3191789014f6862a9021994",class:"shell-layout__header-right"},a("slot",{key:"305cfb750e5adb56bf00de5bd596cbfc786a20db",name:"right-header-tools"}),a("slot",{key:"068e0c2ad1fa657613dd6c90ab9fa673efada09b",name:"avatar"}))),a("div",{key:"5c48fcca90e830f779cb4e90fab9b4010d7a266a",class:"shell-layout__mobile-nav-backdrop",onClick:this.onNavigationClick}),a("nav",{key:"a77e9e5d3f7db1eb5a4c0af961788c342cc6f1f9","aria-labelledby":"main-navigation-label",class:"shell-layout__nav",onClick:this.onNavigationClick,ref:e=>this.navElement=e},a("div",{key:"10b7221f2e08f3b6a799e20a8b832683e83ef280",class:"shell-layout__mobile-header"},a("slot",{key:"d093e9bc5dd3d791acde2390d5b3f14ad2963a17",name:"mobile-logo"}),a("div",{key:"9c27cdef0bdc2db253b1e9b799d75f908c2651ad",class:"shell-layout__mobile-header-tools"},a("slot",{key:"6c03625a7a9878c65992176a423827e54adbefb6",name:"mobile-header-tools"}),a("button",{key:"ee7c1f2c70cef9305767d04366423d780816afc2",class:"shell-layout__header-tool",type:"button"},a("swirl-icon-double-arrow-left",{key:"d847affc1dea24aa560ba45034e8bb84b1fb4251",size:20}),a("swirl-visually-hidden",{key:"d2e7b047629f502f9f826d133741ea5f4a06541d"},this.hideMobileNavigationButtonLabel)))),a("div",{key:"0f59ceabdf47f8e45c9e11836e57ea755db0384d",class:"shell-layout__nav-body"},a("swirl-visually-hidden",{key:"f2bce9497e8831734f50c484cd8b517d0f2f6e4c"},a("span",{key:"c45e263458def8240de6b3714a4b8b618575bad9",id:"main-navigation-label"},this.navigationLabel)),a("slot",{key:"b67777ad705796834db3e87bdb081b54a737728a",name:"nav",onSlotchange:this.collectNavItems}),a("div",{key:"cbb39859ec3f398cf08f6d2f61774c519a3d60bc",class:"shell-layout__secondary-nav"},a("swirl-separator",{key:"1eaa5e8a7beb123b59eb0f5b1d08e064e182a998",color:"strong",spacing:"16"}),this.enableSecondaryNavGridLayout&&a("swirl-box",{key:"c03e9804dc32460c679867e0b5aa58c14569f909",paddingBlockEnd:"16"},a("swirl-stack",{key:"ed6489c725487e7e509b3472661f4216f7bf0337",justify:e?"center":"space-between",orientation:"horizontal"},a("swirl-button",{key:"069fb3eb456811d0a9186e48dd0f8fe5d403ba03",hideLabel:e,icon:this.secondaryNavCollapsed?"<swirl-icon-expand-more></swirl-icon-expand-more>":"<swirl-icon-expand-less></swirl-icon-expand-less>",label:this.secondaryNavCollapsed?this.secondaryNavExpandLabel:this.secondaryNavCollapseLabel,onClick:this.toggleSecondaryNavCollapse,variant:"plain"}),!e&&!this.secondaryNavCollapsed&&a("swirl-button",{key:"c88ba436af1f6d7ed13ed6dd612be4467abb856f",icon:"grid"===this.secondaryNavView?"<swirl-icon-menu></swirl-icon-menu>":"<swirl-icon-hamburger-menu></swirl-icon-hamburger-menu>",iconPosition:"end",label:"grid"===this.secondaryNavView?this.gridNavLayoutToggleLabel:this.listNavLayoutToggleLabel,onClick:this.toggleSecondaryNavView,variant:"plain"}))),a("div",{key:"4b2a5eab2e5d4b117df8bbf29dbd7914f1144650",class:{[`shell-layout__secondary-nav-items--${this.secondaryNavGridLayoutVariant}`]:!0,"shell-layout__secondary-nav-items":!0,"shell-layout__secondary-nav-items--grid-view":this.enableSecondaryNavGridLayout&&"grid"===this.secondaryNavView}},a("slot",{key:"4bfdaf40935715cbc550d5fe3aa5973bfcf94748",name:"secondary-nav",onSlotchange:this.collectNavItems}))))),a("main",{key:"c5376e170b46d1103a75105307b87c2ef139d79e",class:"shell-layout__main",id:"main-content"},a("slot",{key:"240da7bdb7f9049b425e029747aaeb23d4d65be2"}))))}get el(){return o(this)}static get watchers(){return{enableSecondaryNavGridLayout:[{watchEnableSecondaryNavGridLayout:0}],mobileNavigationActive:[{watchMobileNavigationState:0}],navigationCollapsed:[{watchNavigationCollapsed:0}]}}};M.style='.sc-swirl-shell-layout-h{--swirl-shell-background:var(--s-surface-sunken-default);--swirl-shell-text-color:var(--s-text-default);--swirl-shell-header-height:3.25rem;--swirl-shell-collapsed-nav-width:4rem;--swirl-shell-extended-nav-width:18rem;display:flex;width:100%;height:100%}.sc-swirl-shell-layout-h *.sc-swirl-shell-layout{box-sizing:border-box}.shell-layout.sc-swirl-shell-layout{display:grid;overflow:hidden;width:100%;min-height:100%;background-color:var(--swirl-shell-background);transition:grid-template-columns 0.1s;grid-template-columns:0 1fr 0;grid-template-rows:1fr;grid-template-areas:"nav main"}@media (prefers-reduced-motion){.shell-layout.sc-swirl-shell-layout{transition:none}}@media (min-width: 992px){.shell-layout.sc-swirl-shell-layout{padding-right:var(--s-space-8);padding-bottom:var(--s-space-8);-moz-column-gap:var(--s-space-8);column-gap:var(--s-space-8);grid-template-columns:var(--swirl-shell-extended-nav-width) 1fr 0;grid-template-rows:var(--swirl-shell-header-height) 1fr;grid-template-areas:"header header header" "nav main sidebar"}}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout{border-bottom:none;color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout{color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-action-primary-hovered)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-action-primary-pressed)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout swirl-badge.sc-swirl-shell-layout{--swirl-badge-border-color:var(--s-action-primary-default)}@media (min-width: 992px){.shell-layout--navigation-collapsed.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{scrollbar-width:none}.shell-layout--navigation-collapsed.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout::-webkit-scrollbar{width:0;background:transparent;-webkit-appearance:none}}.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul>*,.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul>*{max-width:100%;max-height:3rem;flex-basis:100%}@media (min-width: 992px){.shell-layout--navigation-collapsed.sc-swirl-shell-layout{grid-template-columns:var(--swirl-shell-collapsed-nav-width) 1fr 0}}.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{transform:translate3d(0, 0, 0);box-shadow:var(--s-shadow-level-3)}@media (min-width: 992px){.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{transform:none;box-shadow:none}}.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{display:block}@media (min-width: 992px){.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{display:none}}.shell-layout--has-secondary-nav.sc-swirl-shell-layout .shell-layout__secondary-nav.sc-swirl-shell-layout{display:block}.shell-layout--secondary-nav-collapsed.sc-swirl-shell-layout .shell-layout__secondary-nav-items.sc-swirl-shell-layout{display:none}.shell-layout__header.sc-swirl-shell-layout{position:relative;display:none;width:calc(100% + var(--s-space-8));padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);justify-content:space-between;align-items:center;color:var(--swirl-shell-text-color);grid-area:header}@media (min-width: 992px){.shell-layout__header.sc-swirl-shell-layout{display:flex}}.shell-layout__skip-link.sc-swirl-shell-layout{position:absolute;z-index:9;top:0;left:0;padding:var(--s-space-4);border:none;color:var(--swirl-shell-text-color);background-color:var(--swirl-shell-background);font:inherit;cursor:pointer}.shell-layout__skip-link.sc-swirl-shell-layout:not(:focus):not(:active){position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%)}.shell-layout__header-left.sc-swirl-shell-layout{display:flex;padding-left:var(--s-space-2);flex-basis:8rem;flex-shrink:0;align-items:center;gap:var(--s-space-8)}.shell-layout__header-right.sc-swirl-shell-layout{display:flex;flex-basis:8rem;flex-shrink:0;justify-content:flex-end;align-items:center;gap:var(--s-space-8)}.shell-layout__logo.sc-swirl-shell-layout{display:flex;flex-grow:1;justify-content:center;align-items:center}.shell-layout__logo.sc-swirl-shell-layout-s>a{display:flex}.shell-layout__logo.sc-swirl-shell-layout-s>a img,.shell-layout__logo.sc-swirl-shell-layout-s>img{max-height:1.75rem}.shell-layout__header-tool.sc-swirl-shell-layout{position:relative;width:2.25rem;height:2.25rem;padding:var(--s-space-8);flex-shrink:0;border:none;border-radius:var(--s-border-radius-sm);color:var(--swirl-shell-text-color);background-color:var(--s-surface-sunken-default);font:inherit;cursor:pointer}.shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-state-hovered)}.shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-state-pressed)}.shell-layout__header-tool.sc-swirl-shell-layout:focus{outline:none}.shell-layout__header-tool.sc-swirl-shell-layout:focus-visible{box-shadow:0 0 0 0.125rem var(--s-focus-default)}.shell-layout__header-tool.sc-swirl-shell-layout swirl-badge.sc-swirl-shell-layout{--swirl-badge-border-color:var(--s-surface-sunken-default);position:absolute;top:var(--s-space-2);right:var(--s-space-2);padding-right:var(--s-space-2);transform:translate3d(0.1875rem, 0, 0)}.shell-layout__nav.sc-swirl-shell-layout{position:fixed;z-index:9;top:0;bottom:0;left:0;overflow-x:hidden;overflow-y:auto;width:100%;max-width:18.75rem;color:var(--swirl-shell-text-color);background-color:var(--s-surface-overlay-default);transition:transform 0.1s, box-shadow 0.1s, width 0.1s;transform:translate3d(-100%, 0, 0);grid-area:nav}@media (prefers-reduced-motion){.shell-layout__nav.sc-swirl-shell-layout{transition:none}}@media (min-width: 992px){.shell-layout__nav.sc-swirl-shell-layout{position:relative;max-width:none;padding-top:0;padding-right:var(--s-space-4);padding-bottom:var(--s-space-8);padding-left:var(--s-space-12);background-color:var(--swirl-shell-background);transform:none;box-shadow:none;inset:auto}}.shell-layout__mobile-header.sc-swirl-shell-layout{display:flex;min-height:3.5rem;margin-bottom:var(--s-space-8);padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);justify-content:space-between;align-items:center;border-bottom:0.0625rem solid var(--s-border-default)}.shell-layout__mobile-header.sc-swirl-shell-layout-s>img{max-height:1.75rem}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout{background-color:var(--s-surface-overlay-default)}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-state-hovered)}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-state-pressed)}@media (min-width: 992px){.shell-layout__mobile-header.sc-swirl-shell-layout{display:none}}.shell-layout__mobile-header-tools.sc-swirl-shell-layout{display:flex;justify-content:flex-end;align-items:center;gap:var(--s-space-8)}.shell-layout__nav-body.sc-swirl-shell-layout{padding:var(--s-space-8)}.shell-layout__nav-body.sc-swirl-shell-layout-s ul{margin:0;padding:0;list-style:none}.shell-layout__nav-body.sc-swirl-shell-layout-s li{display:flex}@media (min-width: 992px){.shell-layout__nav-body.sc-swirl-shell-layout{padding:0}}.shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{position:fixed;z-index:8;display:none;background-color:rgba(0, 0, 0, 0.25);animation:shell-layout-backdrop-fade-in 0.1s;inset:0}.shell-layout__secondary-nav.sc-swirl-shell-layout{display:none}.shell-layout__secondary-nav-items.sc-swirl-shell-layout-s>ul,.shell-layout__secondary-nav-items .sc-swirl-shell-layout-s>ul{display:flex;flex-direction:column;gap:var(--s-space-2)}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul{flex-wrap:wrap;flex-direction:row;gap:var(--s-space-16)}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul>*,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul>*{min-width:0;max-height:none}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.shell-layout__secondary-nav-items--app-icon.sc-swirl-shell-layout-s>ul,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.shell-layout__secondary-nav-items--app-icon .sc-swirl-shell-layout-s>ul{row-gap:var(--s-space-16);-moz-column-gap:0;column-gap:0}.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--tiled.sc-swirl-shell-layout-s>ul,.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--tiled .sc-swirl-shell-layout-s>ul{gap:var(--s-space-16)}.shell-layout__secondary-nav-items--tiled.sc-swirl-shell-layout-s>ul>*,.shell-layout__secondary-nav-items--tiled .sc-swirl-shell-layout-s>ul>*{flex-basis:calc(50% - var(--s-space-8))}.shell-layout__secondary-nav-items--app-icon.sc-swirl-shell-layout-s>ul>*,.shell-layout__secondary-nav-items--app-icon .sc-swirl-shell-layout-s>ul>*{flex-basis:calc(100% / 3)}.shell-layout__main.sc-swirl-shell-layout{overflow:hidden;background-color:var(--s-background-default);grid-area:main}@media (min-width: 992px){.shell-layout__main.sc-swirl-shell-layout{width:calc(100% + var(--s-space-8));border:0.0625rem solid var(--s-border-default);border-radius:var(--s-border-radius-sm)}}@keyframes shell-layout-backdrop-fade-in{from{opacity:0}to{opacity:1}}@keyframes shell-layout-no-overflow-after-transition{0%{overflow:initial}99%{overflow:initial}100%{overflow:hidden}}';export{M as swirl_shell_layout}
@@ -1 +1 @@
1
- import{r as e,c as t,h as r,a,d as i,F as o}from"./p-Dz56lJ37.js";import{s,t as c}from"./p-CCck-DTo.js";import{c as n}from"./p-orsBiyT_.js";const d=class{constructor(r){e(this,r),this.valueChange=t(this,"valueChange",3),this.disableDate=()=>!1,this.firstDayOfWeek=0,this.fixedAspectRatio=!0,this.fixedMaxWidth=!0,this.locale="en-US",this.onClick=e=>{e.stopPropagation(),e.preventDefault()},this.onSelectDate=e=>{this.valueChange.emit("string"==typeof e.detail?s(new Date(e.detail)):e.detail.map((e=>s(new Date(e)))))}}componentWillLoad(){if(!this.firstDayOfWeek){const e=new Intl.Locale(this.locale);this.firstDayOfWeek="getWeekInfo"in e?e.getWeekInfo().firstDay:e.weekInfo?.firstDay??0}}render(){const e=this.startDate instanceof Date?c(this.startDate):void 0,t=n({"date-picker--fixed-max-width":this.fixedMaxWidth,"date-picker--fixed-aspect-ratio":this.fixedAspectRatio});return r(a,{key:"4fa839728e8f1faf9de603fc039ab84050673982",onClick:this.onClick},r("wc-datepicker",{key:"5495717dd6176ba76e599be997b35194056bc707",class:t,elementClassName:"date-picker",disableDate:this.disableDate,firstDayOfWeek:this.firstDayOfWeek,labels:this.labels,locale:this.locale,onSelectDate:this.onSelectDate,range:this.range,startDate:e,value:this.value}))}get el(){return i(this)}};d.style=":host{display:block}:host *{box-sizing:border-box}.date-picker{padding:var(--s-space-8) var(--s-space-16);background-color:transparent;font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);letter-spacing:var(--s-letter-spacing-tighter)}@media (min-width: 768px){.date-picker--fixed-max-width .date-picker{max-width:17.5rem}}.date-picker__header{display:flex;margin-bottom:var(--s-space-8);align-items:center}.date-picker__current-month{display:flex;padding:var(--s-space-8);flex-grow:1;align-items:center;order:1;gap:var(--s-space-4)}.date-picker__next-month-button,.date-picker__previous-month-button{position:relative;display:inline-flex;width:2.5rem;height:2.5rem;margin:0;padding:0;flex-shrink:0;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-highlight);background-color:transparent;cursor:pointer}.date-picker__next-month-button:after,.date-picker__previous-month-button:after{position:absolute;background-color:currentColor;content:\"\";inset:0;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.date-picker__next-month-button:hover,.date-picker__previous-month-button:hover{background-color:var(--s-state-hovered)}.date-picker__next-month-button:active,.date-picker__previous-month-button:active{background-color:var(--s-state-pressed)}.date-picker__next-month-button:focus:not(:focus-visible),.date-picker__previous-month-button:focus:not(:focus-visible){outline:none}.date-picker__next-month-button:focus-visible,.date-picker__previous-month-button:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__next-month-button>svg,.date-picker__previous-month-button>svg{display:none}.date-picker__next-month-button{order:3}.date-picker__next-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__previous-month-button{order:2}.date-picker__previous-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__month-select,.date-picker__year-select{margin:0;padding:0;border:none;background-color:transparent;font:inherit;font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left;cursor:pointer}.date-picker__month-select:focus:not(:focus-visible),.date-picker__year-select:focus:not(:focus-visible){outline:none}.date-picker__month-select:focus-visible,.date-picker__year-select:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.date-picker__month-select,.date-picker__year-select{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.date-picker__month-select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.date-picker__year-select{max-width:4rem}.date-picker__calendar{display:block;width:100%}.date-picker__calendar tbody{display:block}.date-picker__calendar-header{display:block}.date-picker__weekday-row,.date-picker__calendar-row{display:flex}.date-picker__weekday-row{margin-bottom:var(--s-space-8)}.date-picker__weekday{display:inline-flex;min-width:2.25rem;min-height:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;color:var(--s-text-subdued);font-weight:var(--s-font-weight-regular)}.date-picker--fixed-aspect-ratio .date-picker__weekday{aspect-ratio:1}.date-picker__date{position:relative;z-index:1;display:inline-flex;min-width:2.25rem;min-height:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;font-weight:var(--s-font-weight-medium);cursor:pointer}.date-picker__date:before{position:absolute;z-index:-1;border-radius:50%;background-color:transparent;content:\"\";inset:0;aspect-ratio:1;width:-moz-fit-content;width:fit-content;margin:auto}.date-picker__date:hover:before{background-color:var(--s-state-hovered)}.date-picker--fixed-aspect-ratio .date-picker__date{aspect-ratio:1}.date-picker__date--current:before{background-color:var(--s-state-hovered)}.date-picker__date--current:focus:not(:focus-visible){outline:none}.date-picker__date--current:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__date--overflowing{color:var(--s-text-subdued)}.date-picker__date--selected{color:var(--s-text-on-action-primary)}.date-picker__date--selected:before{background-color:var(--s-action-primary-default)}.date-picker__date--selected:hover{color:var(--s-text-on-action-primary)}.date-picker__date--selected:hover:before{background-color:var(--s-action-primary-hovered)}.date-picker__date--selected>strong{font-weight:var(--s-font-weight-medium)}.date-picker__date--in-range:not(.date-picker__date--selected):after{position:absolute;border-radius:0px;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0px}.date-picker__date--start:not(.date-picker__date--end){color:var(--s-text-on-action-primary)}.date-picker__date--start:not(.date-picker__date--end):before{background-color:var(--s-action-primary-default)}.date-picker__date--start:not(.date-picker__date--end):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0 0.0625rem 50%}.date-picker__date--end:not(.date-picker__date--start){color:var(--s-text-on-action-primary)}.date-picker__date--end:not(.date-picker__date--start):before{background-color:var(--s-action-primary-default)}.date-picker__date--end:not(.date-picker__date--start):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 50% 0.0625rem 0}.date-picker__date--today:before{box-shadow:inset 0 0 0 var(--s-border-width-default) var(--s-border-highlight)}.date-picker__date--today>em{font-style:normal}.date-picker__date--disabled{color:var(--s-text-disabled);cursor:default;pointer-events:none}.date-picker__date--disabled:before{background-color:transparent}.date-picker__date--disabled:hover{color:var(--s-text-disabled)}.date-picker__date--disabled:hover:before{background-color:transparent}";const l=class{constructor(t){e(this,t),this.size=24}render(){const e=20===this.size?24:this.size,t={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},a=n("swirl-icon",`swirl-icon--size-${this.size}`),i=Boolean(this.label);return r("svg",{key:"e4c6e9c215874c006f1538a2c577f427b048cd88","aria-hidden":i?void 0:"true",class:a,fill:"none",height:this.size,part:"icon",role:i?"img":void 0,style:t,viewBox:`0 0 ${e} ${e}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},i&&r("title",{key:"38b3dd3ad8f70f1299df409afc2d9b704dd6219e"},this.label),16===this.size&&r(o,{key:"c1c96922bd99afc9cd2d008d7a254de80d7c4653"},r("path",{key:"a358803ed95b663ed0740fa47987924da2f4eec1",d:"M6 10.9999C5.53333 10.9999 5.13889 10.8388 4.81667 10.5166C4.49444 10.1944 4.33333 9.79992 4.33333 9.33325C4.33333 8.86658 4.49444 8.47214 4.81667 8.14992C5.13889 7.8277 5.53333 7.66658 6 7.66658C6.46667 7.66658 6.86111 7.8277 7.18333 8.14992C7.50556 8.47214 7.66667 8.86658 7.66667 9.33325C7.66667 9.79992 7.50556 10.1944 7.18333 10.5166C6.86111 10.8388 6.46667 10.9999 6 10.9999ZM3.33333 14.6666C2.96667 14.6666 2.65267 14.5361 2.39133 14.2753C2.13044 14.0139 2 13.6999 2 13.3333V3.99992C2 3.63325 2.13044 3.31947 2.39133 3.05859C2.65267 2.79725 2.96667 2.66659 3.33333 2.66659H4V1.99992C4 1.81103 4.06378 1.65259 4.19133 1.52459C4.31933 1.39703 4.47778 1.33325 4.66667 1.33325C4.85556 1.33325 5.014 1.39703 5.142 1.52459C5.26956 1.65259 5.33333 1.81103 5.33333 1.99992V2.66659H10.6667V1.99992C10.6667 1.81103 10.7307 1.65259 10.8587 1.52459C10.9862 1.39703 11.1444 1.33325 11.3333 1.33325C11.5222 1.33325 11.6804 1.39703 11.808 1.52459C11.936 1.65259 12 1.81103 12 1.99992V2.66659H12.6667C13.0333 2.66659 13.3473 2.79725 13.6087 3.05859C13.8696 3.31947 14 3.63325 14 3.99992V13.3333C14 13.6999 13.8696 14.0139 13.6087 14.2753C13.3473 14.5361 13.0333 14.6666 12.6667 14.6666H3.33333ZM3.33333 13.3333H12.6667V6.66658H3.33333V13.3333ZM3.33333 5.33325H12.6667V3.99992H3.33333V5.33325Z",fill:"currentColor"})),(20===this.size||24===this.size)&&r(o,{key:"5bd8fa0dad90c6dd9a659046179d52f6cad66335"},r("path",{key:"b98fdea0d2a701d160f9f78531495124110af141",d:"M9 16.5C8.3 16.5 7.70833 16.2583 7.225 15.775C6.74167 15.2917 6.5 14.7 6.5 14C6.5 13.3 6.74167 12.7083 7.225 12.225C7.70833 11.7417 8.3 11.5 9 11.5C9.7 11.5 10.2917 11.7417 10.775 12.225C11.2583 12.7083 11.5 13.3 11.5 14C11.5 14.7 11.2583 15.2917 10.775 15.775C10.2917 16.2583 9.7 16.5 9 16.5ZM5 22C4.45 22 3.979 21.8043 3.587 21.413C3.19567 21.021 3 20.55 3 20V6C3 5.45 3.19567 4.97933 3.587 4.588C3.979 4.196 4.45 4 5 4H6V3C6 2.71667 6.09567 2.479 6.287 2.287C6.479 2.09567 6.71667 2 7 2C7.28333 2 7.521 2.09567 7.713 2.287C7.90433 2.479 8 2.71667 8 3V4H16V3C16 2.71667 16.096 2.479 16.288 2.287C16.4793 2.09567 16.7167 2 17 2C17.2833 2 17.5207 2.09567 17.712 2.287C17.904 2.479 18 2.71667 18 3V4H19C19.55 4 20.021 4.196 20.413 4.588C20.8043 4.97933 21 5.45 21 6V20C21 20.55 20.8043 21.021 20.413 21.413C20.021 21.8043 19.55 22 19 22H5ZM5 20H19V10H5V20ZM5 8H19V6H5V8Z",fill:"currentColor"})),28===this.size&&r(o,{key:"9d8227377de297cc9903015fd37f4f6b93cd7446"},r("path",{key:"55ef004861b1908cfdc166d10961aa20196d8575",d:"M10.5 19.2499C9.68333 19.2499 8.99306 18.968 8.42917 18.4041C7.86528 17.8402 7.58333 17.1499 7.58333 16.3333C7.58333 15.5166 7.86528 14.8263 8.42917 14.2624C8.99306 13.6985 9.68333 13.4166 10.5 13.4166C11.3167 13.4166 12.0069 13.6985 12.5708 14.2624C13.1347 14.8263 13.4167 15.5166 13.4167 16.3333C13.4167 17.1499 13.1347 17.8402 12.5708 18.4041C12.0069 18.968 11.3167 19.2499 10.5 19.2499ZM5.83333 25.6666C5.19167 25.6666 4.64217 25.4383 4.18483 24.9818C3.72828 24.5244 3.5 23.9749 3.5 23.3333V6.99992C3.5 6.35825 3.72828 5.80914 4.18483 5.35259C4.64217 4.89525 5.19167 4.66659 5.83333 4.66659H7V3.49992C7 3.16936 7.11161 2.89209 7.33483 2.66809C7.55883 2.44486 7.83611 2.33325 8.16667 2.33325C8.49722 2.33325 8.7745 2.44486 8.9985 2.66809C9.22172 2.89209 9.33333 3.16936 9.33333 3.49992V4.66659H18.6667V3.49992C18.6667 3.16936 18.7787 2.89209 19.0027 2.66809C19.2259 2.44486 19.5028 2.33325 19.8333 2.33325C20.1639 2.33325 20.4408 2.44486 20.664 2.66809C20.888 2.89209 21 3.16936 21 3.49992V4.66659H22.1667C22.8083 4.66659 23.3578 4.89525 23.8152 5.35259C24.2717 5.80914 24.5 6.35825 24.5 6.99992V23.3333C24.5 23.9749 24.2717 24.5244 23.8152 24.9818C23.3578 25.4383 22.8083 25.6666 22.1667 25.6666H5.83333ZM5.83333 23.3333H22.1667V11.6666H5.83333V23.3333ZM5.83333 9.33325H22.1667V6.99992H5.83333V9.33325Z",fill:"currentColor"})))}};l.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}.icon-wrapper{display:inline-flex;justify-content:center;align-items:center;border-radius:var(--s-border-radius-full-round);background-color:var(--s-surface-raised-default)}.icon-wrapper--size-xs{width:16px;height:16px}.icon-wrapper--size-s{width:20px;height:20px}.icon-wrapper--size-m{width:24px;height:24px}.icon-wrapper--size-l{width:28px;height:28px}.icon-wrapper--size-xl{width:32px;height:32px}.icon-wrapper--size-2xl{width:40px;height:40px}.icon-wrapper--background-color-neutral{background-color:var(--s-surface-raised-default);color:var(--s-icon-default)}.icon-wrapper--background-color-banana{background-color:var(--s-decorative-banana-surface-subdued);color:var(--s-decorative-banana-text)}.icon-wrapper--background-color-blueberry{background-color:var(--s-decorative-blueberry-surface-subdued);color:var(--s-decorative-blueberry-text)}.icon-wrapper--background-color-chilli{background-color:var(--s-decorative-chilli-surface-subdued);color:var(--s-decorative-chilli-text)}.icon-wrapper--background-color-grape{background-color:var(--s-decorative-grape-surface-subdued);color:var(--s-decorative-grape-text)}.icon-wrapper--background-color-kiwi{background-color:var(--s-decorative-kiwi-surface-subdued);color:var(--s-decorative-kiwi-text)}.icon-wrapper--background-color-pumpkin{background-color:var(--s-decorative-pumpkin-surface-subdued);color:var(--s-decorative-pumpkin-text)}.icon-wrapper--background-color-radish{background-color:var(--s-decorative-radish-surface-subdued);color:var(--s-decorative-radish-text)}.icon-wrapper--background-color-default{background-color:var(--s-background-default);color:var(--s-icon-default)}";export{d as swirl_date_picker,l as swirl_icon_today}
1
+ import{r as e,c as t,h as r,a,d as i,F as o}from"./p-Dz56lJ37.js";import{s,t as c}from"./p-D23VxAsw.js";import{c as n}from"./p-orsBiyT_.js";const d=class{constructor(r){e(this,r),this.valueChange=t(this,"valueChange",3),this.disableDate=()=>!1,this.firstDayOfWeek=0,this.fixedAspectRatio=!0,this.fixedMaxWidth=!0,this.locale="en-US",this.onClick=e=>{e.stopPropagation(),e.preventDefault()},this.onSelectDate=e=>{this.valueChange.emit("string"==typeof e.detail?s(new Date(e.detail)):e.detail.map((e=>s(new Date(e)))))}}componentWillLoad(){if(!this.firstDayOfWeek){const e=new Intl.Locale(this.locale);this.firstDayOfWeek="getWeekInfo"in e?e.getWeekInfo().firstDay:e.weekInfo?.firstDay??0}}render(){const e=this.startDate instanceof Date?c(this.startDate):void 0,t=n({"date-picker--fixed-max-width":this.fixedMaxWidth,"date-picker--fixed-aspect-ratio":this.fixedAspectRatio});return r(a,{key:"4fa839728e8f1faf9de603fc039ab84050673982",onClick:this.onClick},r("wc-datepicker",{key:"5495717dd6176ba76e599be997b35194056bc707",class:t,elementClassName:"date-picker",disableDate:this.disableDate,firstDayOfWeek:this.firstDayOfWeek,labels:this.labels,locale:this.locale,onSelectDate:this.onSelectDate,range:this.range,startDate:e,value:this.value}))}get el(){return i(this)}};d.style=":host{display:block}:host *{box-sizing:border-box}.date-picker{padding:var(--s-space-8) var(--s-space-16);background-color:transparent;font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);letter-spacing:var(--s-letter-spacing-tighter)}@media (min-width: 768px){.date-picker--fixed-max-width .date-picker{max-width:17.5rem}}.date-picker__header{display:flex;margin-bottom:var(--s-space-8);align-items:center}.date-picker__current-month{display:flex;padding:var(--s-space-8);flex-grow:1;align-items:center;order:1;gap:var(--s-space-4)}.date-picker__next-month-button,.date-picker__previous-month-button{position:relative;display:inline-flex;width:2.5rem;height:2.5rem;margin:0;padding:0;flex-shrink:0;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-highlight);background-color:transparent;cursor:pointer}.date-picker__next-month-button:after,.date-picker__previous-month-button:after{position:absolute;background-color:currentColor;content:\"\";inset:0;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.date-picker__next-month-button:hover,.date-picker__previous-month-button:hover{background-color:var(--s-state-hovered)}.date-picker__next-month-button:active,.date-picker__previous-month-button:active{background-color:var(--s-state-pressed)}.date-picker__next-month-button:focus:not(:focus-visible),.date-picker__previous-month-button:focus:not(:focus-visible){outline:none}.date-picker__next-month-button:focus-visible,.date-picker__previous-month-button:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__next-month-button>svg,.date-picker__previous-month-button>svg{display:none}.date-picker__next-month-button{order:3}.date-picker__next-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__previous-month-button{order:2}.date-picker__previous-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__month-select,.date-picker__year-select{margin:0;padding:0;border:none;background-color:transparent;font:inherit;font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left;cursor:pointer}.date-picker__month-select:focus:not(:focus-visible),.date-picker__year-select:focus:not(:focus-visible){outline:none}.date-picker__month-select:focus-visible,.date-picker__year-select:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.date-picker__month-select,.date-picker__year-select{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.date-picker__month-select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.date-picker__year-select{max-width:4rem}.date-picker__calendar{display:block;width:100%}.date-picker__calendar tbody{display:block}.date-picker__calendar-header{display:block}.date-picker__weekday-row,.date-picker__calendar-row{display:flex}.date-picker__weekday-row{margin-bottom:var(--s-space-8)}.date-picker__weekday{display:inline-flex;min-width:2.25rem;min-height:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;color:var(--s-text-subdued);font-weight:var(--s-font-weight-regular)}.date-picker--fixed-aspect-ratio .date-picker__weekday{aspect-ratio:1}.date-picker__date{position:relative;z-index:1;display:inline-flex;min-width:2.25rem;min-height:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;font-weight:var(--s-font-weight-medium);cursor:pointer}.date-picker__date:before{position:absolute;z-index:-1;border-radius:50%;background-color:transparent;content:\"\";inset:0;aspect-ratio:1;width:-moz-fit-content;width:fit-content;margin:auto}.date-picker__date:hover:before{background-color:var(--s-state-hovered)}.date-picker--fixed-aspect-ratio .date-picker__date{aspect-ratio:1}.date-picker__date--current:before{background-color:var(--s-state-hovered)}.date-picker__date--current:focus:not(:focus-visible){outline:none}.date-picker__date--current:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__date--overflowing{color:var(--s-text-subdued)}.date-picker__date--selected{color:var(--s-text-on-action-primary)}.date-picker__date--selected:before{background-color:var(--s-action-primary-default)}.date-picker__date--selected:hover{color:var(--s-text-on-action-primary)}.date-picker__date--selected:hover:before{background-color:var(--s-action-primary-hovered)}.date-picker__date--selected>strong{font-weight:var(--s-font-weight-medium)}.date-picker__date--in-range:not(.date-picker__date--selected):after{position:absolute;border-radius:0px;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0px}.date-picker__date--start:not(.date-picker__date--end){color:var(--s-text-on-action-primary)}.date-picker__date--start:not(.date-picker__date--end):before{background-color:var(--s-action-primary-default)}.date-picker__date--start:not(.date-picker__date--end):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0 0.0625rem 50%}.date-picker__date--end:not(.date-picker__date--start){color:var(--s-text-on-action-primary)}.date-picker__date--end:not(.date-picker__date--start):before{background-color:var(--s-action-primary-default)}.date-picker__date--end:not(.date-picker__date--start):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 50% 0.0625rem 0}.date-picker__date--today:before{box-shadow:inset 0 0 0 var(--s-border-width-default) var(--s-border-highlight)}.date-picker__date--today>em{font-style:normal}.date-picker__date--disabled{color:var(--s-text-disabled);cursor:default;pointer-events:none}.date-picker__date--disabled:before{background-color:transparent}.date-picker__date--disabled:hover{color:var(--s-text-disabled)}.date-picker__date--disabled:hover:before{background-color:transparent}";const l=class{constructor(t){e(this,t),this.size=24}render(){const e=20===this.size?24:this.size,t={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},a=n("swirl-icon",`swirl-icon--size-${this.size}`),i=Boolean(this.label);return r("svg",{key:"e4c6e9c215874c006f1538a2c577f427b048cd88","aria-hidden":i?void 0:"true",class:a,fill:"none",height:this.size,part:"icon",role:i?"img":void 0,style:t,viewBox:`0 0 ${e} ${e}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},i&&r("title",{key:"38b3dd3ad8f70f1299df409afc2d9b704dd6219e"},this.label),16===this.size&&r(o,{key:"c1c96922bd99afc9cd2d008d7a254de80d7c4653"},r("path",{key:"a358803ed95b663ed0740fa47987924da2f4eec1",d:"M6 10.9999C5.53333 10.9999 5.13889 10.8388 4.81667 10.5166C4.49444 10.1944 4.33333 9.79992 4.33333 9.33325C4.33333 8.86658 4.49444 8.47214 4.81667 8.14992C5.13889 7.8277 5.53333 7.66658 6 7.66658C6.46667 7.66658 6.86111 7.8277 7.18333 8.14992C7.50556 8.47214 7.66667 8.86658 7.66667 9.33325C7.66667 9.79992 7.50556 10.1944 7.18333 10.5166C6.86111 10.8388 6.46667 10.9999 6 10.9999ZM3.33333 14.6666C2.96667 14.6666 2.65267 14.5361 2.39133 14.2753C2.13044 14.0139 2 13.6999 2 13.3333V3.99992C2 3.63325 2.13044 3.31947 2.39133 3.05859C2.65267 2.79725 2.96667 2.66659 3.33333 2.66659H4V1.99992C4 1.81103 4.06378 1.65259 4.19133 1.52459C4.31933 1.39703 4.47778 1.33325 4.66667 1.33325C4.85556 1.33325 5.014 1.39703 5.142 1.52459C5.26956 1.65259 5.33333 1.81103 5.33333 1.99992V2.66659H10.6667V1.99992C10.6667 1.81103 10.7307 1.65259 10.8587 1.52459C10.9862 1.39703 11.1444 1.33325 11.3333 1.33325C11.5222 1.33325 11.6804 1.39703 11.808 1.52459C11.936 1.65259 12 1.81103 12 1.99992V2.66659H12.6667C13.0333 2.66659 13.3473 2.79725 13.6087 3.05859C13.8696 3.31947 14 3.63325 14 3.99992V13.3333C14 13.6999 13.8696 14.0139 13.6087 14.2753C13.3473 14.5361 13.0333 14.6666 12.6667 14.6666H3.33333ZM3.33333 13.3333H12.6667V6.66658H3.33333V13.3333ZM3.33333 5.33325H12.6667V3.99992H3.33333V5.33325Z",fill:"currentColor"})),(20===this.size||24===this.size)&&r(o,{key:"5bd8fa0dad90c6dd9a659046179d52f6cad66335"},r("path",{key:"b98fdea0d2a701d160f9f78531495124110af141",d:"M9 16.5C8.3 16.5 7.70833 16.2583 7.225 15.775C6.74167 15.2917 6.5 14.7 6.5 14C6.5 13.3 6.74167 12.7083 7.225 12.225C7.70833 11.7417 8.3 11.5 9 11.5C9.7 11.5 10.2917 11.7417 10.775 12.225C11.2583 12.7083 11.5 13.3 11.5 14C11.5 14.7 11.2583 15.2917 10.775 15.775C10.2917 16.2583 9.7 16.5 9 16.5ZM5 22C4.45 22 3.979 21.8043 3.587 21.413C3.19567 21.021 3 20.55 3 20V6C3 5.45 3.19567 4.97933 3.587 4.588C3.979 4.196 4.45 4 5 4H6V3C6 2.71667 6.09567 2.479 6.287 2.287C6.479 2.09567 6.71667 2 7 2C7.28333 2 7.521 2.09567 7.713 2.287C7.90433 2.479 8 2.71667 8 3V4H16V3C16 2.71667 16.096 2.479 16.288 2.287C16.4793 2.09567 16.7167 2 17 2C17.2833 2 17.5207 2.09567 17.712 2.287C17.904 2.479 18 2.71667 18 3V4H19C19.55 4 20.021 4.196 20.413 4.588C20.8043 4.97933 21 5.45 21 6V20C21 20.55 20.8043 21.021 20.413 21.413C20.021 21.8043 19.55 22 19 22H5ZM5 20H19V10H5V20ZM5 8H19V6H5V8Z",fill:"currentColor"})),28===this.size&&r(o,{key:"9d8227377de297cc9903015fd37f4f6b93cd7446"},r("path",{key:"55ef004861b1908cfdc166d10961aa20196d8575",d:"M10.5 19.2499C9.68333 19.2499 8.99306 18.968 8.42917 18.4041C7.86528 17.8402 7.58333 17.1499 7.58333 16.3333C7.58333 15.5166 7.86528 14.8263 8.42917 14.2624C8.99306 13.6985 9.68333 13.4166 10.5 13.4166C11.3167 13.4166 12.0069 13.6985 12.5708 14.2624C13.1347 14.8263 13.4167 15.5166 13.4167 16.3333C13.4167 17.1499 13.1347 17.8402 12.5708 18.4041C12.0069 18.968 11.3167 19.2499 10.5 19.2499ZM5.83333 25.6666C5.19167 25.6666 4.64217 25.4383 4.18483 24.9818C3.72828 24.5244 3.5 23.9749 3.5 23.3333V6.99992C3.5 6.35825 3.72828 5.80914 4.18483 5.35259C4.64217 4.89525 5.19167 4.66659 5.83333 4.66659H7V3.49992C7 3.16936 7.11161 2.89209 7.33483 2.66809C7.55883 2.44486 7.83611 2.33325 8.16667 2.33325C8.49722 2.33325 8.7745 2.44486 8.9985 2.66809C9.22172 2.89209 9.33333 3.16936 9.33333 3.49992V4.66659H18.6667V3.49992C18.6667 3.16936 18.7787 2.89209 19.0027 2.66809C19.2259 2.44486 19.5028 2.33325 19.8333 2.33325C20.1639 2.33325 20.4408 2.44486 20.664 2.66809C20.888 2.89209 21 3.16936 21 3.49992V4.66659H22.1667C22.8083 4.66659 23.3578 4.89525 23.8152 5.35259C24.2717 5.80914 24.5 6.35825 24.5 6.99992V23.3333C24.5 23.9749 24.2717 24.5244 23.8152 24.9818C23.3578 25.4383 22.8083 25.6666 22.1667 25.6666H5.83333ZM5.83333 23.3333H22.1667V11.6666H5.83333V23.3333ZM5.83333 9.33325H22.1667V6.99992H5.83333V9.33325Z",fill:"currentColor"})))}};l.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}.icon-wrapper{display:inline-flex;justify-content:center;align-items:center;border-radius:var(--s-border-radius-full-round);background-color:var(--s-surface-raised-default)}.icon-wrapper--size-xs{width:16px;height:16px}.icon-wrapper--size-s{width:20px;height:20px}.icon-wrapper--size-m{width:24px;height:24px}.icon-wrapper--size-l{width:28px;height:28px}.icon-wrapper--size-xl{width:32px;height:32px}.icon-wrapper--size-2xl{width:40px;height:40px}.icon-wrapper--background-color-neutral{background-color:var(--s-surface-raised-default);color:var(--s-icon-default)}.icon-wrapper--background-color-banana{background-color:var(--s-decorative-banana-surface-subdued);color:var(--s-decorative-banana-text)}.icon-wrapper--background-color-blueberry{background-color:var(--s-decorative-blueberry-surface-subdued);color:var(--s-decorative-blueberry-text)}.icon-wrapper--background-color-chilli{background-color:var(--s-decorative-chilli-surface-subdued);color:var(--s-decorative-chilli-text)}.icon-wrapper--background-color-grape{background-color:var(--s-decorative-grape-surface-subdued);color:var(--s-decorative-grape-text)}.icon-wrapper--background-color-kiwi{background-color:var(--s-decorative-kiwi-surface-subdued);color:var(--s-decorative-kiwi-text)}.icon-wrapper--background-color-pumpkin{background-color:var(--s-decorative-pumpkin-surface-subdued);color:var(--s-decorative-pumpkin-text)}.icon-wrapper--background-color-radish{background-color:var(--s-decorative-radish-surface-subdued);color:var(--s-decorative-radish-text)}.icon-wrapper--background-color-default{background-color:var(--s-background-default);color:var(--s-icon-default)}";export{d as swirl_date_picker,l as swirl_icon_today}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,a as h,d as e}from"./p-Dz56lJ37.js";import{g as n,c as l}from"./p-orsBiyT_.js";import{S as o}from"./p-CMrz6687.js";import{d as r,u as a,i as u,q as c}from"./p-D23VxAsw.js";var d,f,b=n((f||(f=1,d=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},h=void 0,e=void 0,n=void 0,l=[];return function(){var r=function(t){return"function"==typeof t?t():t}(i),a=(new Date).getTime(),u=!h||a-h>r;h=a;for(var c=arguments.length,d=Array(c),f=0;f<c;f++)d[f]=arguments[f];if(u&&s.leading)return s.accumulate?Promise.resolve(t.call(this,[d])).then((function(t){return t[0]})):Promise.resolve(t.call.apply(t,[this].concat(d)));if(e?clearTimeout(n):e=function(){var t={};return t.promise=new Promise((function(i,s){t.resolve=i,t.reject=s})),t}(),l.push(d),n=setTimeout(o.bind(this),r),s.accumulate){var b=l.length-1;return e.promise.then((function(t){return t[b]}))}return e.promise};function o(){var i=e;clearTimeout(n),Promise.resolve(s.accumulate?t.call(this,l):t.apply(this,l[l.length-1])).then(i.resolve,i.reject),l=[],e=null}}),d));function v(t,i,s){let h,e=s.initialDeps??[],n=!0;function l(){const l=t();return l.length!==e.length||l.some(((t,i)=>e[i]!==t))?(e=l,h=i(...l),!(null==s?void 0:s.onChange)||n&&s.skipInitialOnChange||s.onChange(h),n=!1,h):h}return l.updateDeps=t=>{e=t},l}function w(t){if(void 0===t)throw new Error("Unexpected undefined");return t}const p=(t,i)=>Math.abs(t-i)<1.01,m=(t,i,s)=>{let h;return Object.assign((function(...e){t.clearTimeout(h),h=t.setTimeout((()=>i.apply(this,e)),s)}),{cancel:()=>{t.clearTimeout(h)}})};let g;const y=()=>{if(void 0!==g)return g;if("undefined"==typeof navigator)return g=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return g=!0;const t=navigator.maxTouchPoints;return g="MacIntel"===navigator.platform&&void 0!==t&&t>0};let x;const M={capture:!0,passive:!0};class k{constructor(t){this.host=t,this._touch=null,this.inMotion=()=>null!==this._touch&&"lateFling"!==this._touch.phase,this.dragging=()=>{var t;return"down"===(null==(t=this._touch)?void 0:t.phase)&&this._touch.moved},this.tail=()=>{var t;return"tail"===(null==(t=this._touch)?void 0:t.phase)?this._touch.moved?"fling":"tap":null},this.onScroll=({isScrolling:t,ownReadBack:i,moved:s,external:h})=>{var e,n,l;return t&&"tail"===(null==(e=this._touch)?void 0:e.phase)?this._openTail(this._touch.moved||!i,!1):"lateFling"===(null==(n=this._touch)?void 0:n.phase)&&(this.host.now()>this._touch.until?this._touch=null:h&&t&&s&&this._openTail(!0,!1)),!(i||!t||!s||"down"!==(null==(l=this._touch)?void 0:l.phase)||(this._touch.moved=!0,0))},this.touchStart=()=>{this.end(),this._touch={phase:"down",moved:!1}},this.touchEnd=()=>{var t;const i="down"===(null==(t=this._touch)?void 0:t.phase)&&this._touch.moved;this.end(),this._openTail(i,i)},this.end=()=>{var t;const i=this.host.getWindow();"tail"===(null==(t=this._touch)?void 0:t.phase)&&null!=i&&i.clearTimeout(this._touch.timerId),this._touch=null},this.listen=t=>{const i=()=>this.touchStart(),s=()=>this.touchEnd();return t.addEventListener("touchstart",i,M),t.addEventListener("touchend",s,M),t.addEventListener("touchcancel",s,M),()=>{t.removeEventListener("touchstart",i,M),t.removeEventListener("touchend",s,M),t.removeEventListener("touchcancel",s,M),this.end()}},this._openTail=(t,i)=>{const s=this.host.getWindow();if(null==s)return;this.end();const h={phase:"tail",moved:t,awaitingFling:i,timerId:s.setTimeout((()=>{this.host.tailStillMoving()?this._openTail(h.moved,h.awaitingFling):(this._touch=h.awaitingFling?{phase:"lateFling",until:this.host.now()+1e3}:null,this.host.onTailClosed())}),150)};this._touch=h}}get touch(){return this._touch}}const S=t=>{const{clientWidth:i,clientHeight:s}=t;return{width:i,height:s}},_=t=>{const i=new Set;return{schedule:s=>{const h=t.requestAnimationFrame((()=>{i.delete(h),s()}));i.add(h)},cancel:()=>{i.forEach((i=>t.cancelAnimationFrame(i))),i.clear()}}},C=t=>t,R=t=>{const i=t.overscan*Math.max(t.lanes??1,1),s=Math.max(t.startIndex-i,0),h=Math.min(t.endIndex+i,t.count-1)-s+1,e=new Array(h);for(let t=0;t<h;t++)e[t]=s+t;return e},A=(t,i)=>{const s=t.scrollElement;if(!s)return;const h=t.targetWindow;if(!h)return;const e=t=>{const{width:s,height:h}=t;i({width:Math.round(s),height:Math.round(h)})};if(e(S(s)),!h.ResizeObserver)return()=>{};const n=_(h),l=new h.ResizeObserver((()=>{const i=()=>{e(S(s))};t.options.useAnimationFrameWithResizeObserver?n.schedule(i):i()}));return l.observe(s,{box:"content-box"}),()=>{l.unobserve(s),n.cancel()}},I={passive:!0},z=(t,i)=>{const s=t.scrollElement;if(!s)return;const h=()=>{i({width:s.innerWidth,height:s.innerHeight})};return h(),s.addEventListener("resize",h,I),()=>{s.removeEventListener("resize",h)}},O="undefined"==typeof window||"onscrollend"in window,B=(t,i,s)=>{const h=t.scrollElement;if(!h)return;const e=t.targetWindow;if(!e)return;const n=t.options.useScrollendEvent&&O;let l=0;const o=n?null:m(e,(()=>i(s(h),!1)),t.options.isScrollingResetDelay),r=t=>()=>{l=s(h),null==o||o(),i(l,t)},a=r(!0),u=r(!1);return h.addEventListener("scroll",a,I),n&&h.addEventListener("scrollend",u,I),()=>{h.removeEventListener("scroll",a),n&&h.removeEventListener("scrollend",u),null==o||o.cancel()}},E=(t,i)=>B(t,i,(i=>{const{horizontal:s,isRtl:h}=t.options;return s?i.scrollLeft*(h?-1:1):i.scrollTop})),F=(t,i)=>B(t,i,(i=>t.options.horizontal?i.scrollX:i.scrollY)),D=(t,i,s)=>{if(s.options.useCachedMeasurements){const i=s.indexFromElement(t),h=s.options.getItemKey(i);return s.itemSizeCache.get(h)??s.options.estimateSize(i)}if(null==i?void 0:i.borderBoxSize){const t=i.borderBoxSize[0];if(t)return Math.round(t[s.options.horizontal?"inlineSize":"blockSize"])}if(!i){const i=s.indexFromElement(t),h=s.options.getItemKey(i),e=s.itemSizeCache.get(h);if(void 0!==e)return e}return t[s.options.horizontal?"offsetWidth":"offsetHeight"]},T=(t,{adjustments:i=0,behavior:s},h)=>{var e,n;null==(n=null==(e=h.scrollElement)?void 0:e.scrollTo)||n.call(e,{[h.options.horizontal?"left":"top"]:t+i,behavior:s})},W=T,q=T,L=(t,i)=>"smooth"===t?i?"smoothLanded":"smooth":"instant",j=t=>"smooth"===(null==t?void 0:t.phase)||"smoothLanded"===(null==t?void 0:t.phase);class P{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._iosGesture=new k({getWindow:()=>this.targetWindow,now:()=>this.now(),tailStillMoving:()=>{const t=this.scrollState;if("queued"!==(null==t?void 0:t.phase)||null!==this.pendingWrite)return!1;const i=this._readElementOffset();return!(null===i||null===this._lastElementOffset||Math.abs(i-this._lastElementOffset)<1||(this._lastElementOffset=i,t.samples=[...t.samples??[],{t:this.now(),offset:i}],0))},onTailClosed:()=>{const t=this.scrollState;"queued"===(null==t?void 0:t.phase)&&function(t){const i=t[t.length-1];if(void 0===i)return!1;let s=t.length-2;for(;s>=0&&i.t-t[s].t<40;)s--;if(s<0)return!1;const h=t[s];return Math.abs(i.offset-h.offset)/(i.t-h.t)>=.05}(t.samples??[])&&(this.scrollState=null),this._flushHoldIfReady(!0),this._writeAwaitingCommand(),this._retryClampedAdjustment()}}),this._lastElementOffset=null,this.pendingWrite=null,this._clampedAdjustment=null,this.elementsCache=new Map,this._resizeBatch=null,this.now=()=>{var t,i,s;return(null==(s=null==(i=null==(t=this.targetWindow)?void 0:t.performance)?void 0:i.now)?void 0:s.call(i))??Date.now()},this.observer=(()=>{let t=null,i=null,s=!1,h=!1;const e=new Set,n=()=>{if(t)return t;const h=this.targetWindow;if(!h||!h.ResizeObserver)return null;const e=i=_(h);return t=new h.ResizeObserver((t=>{const i=()=>{const i={sync:!1};this._resizeBatch=i;try{t.forEach(l)}finally{this._resizeBatch=null,i.notify&&(this.notify(i.sync),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment(),this.measureElement(null))}};if(this.options.useAnimationFrameWithResizeObserver)e.schedule(i);else{s=!0;try{i()}finally{s=!1}}}))},l=t=>{const i=t.target,s=this.indexFromElement(i);if(i.isConnected)this.isIndexInRange(s)&&this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(i,t,this));else{this.observer.unobserve(i);for(const[t,s]of this.elementsCache)if(s===i){this.elementsCache.delete(t);break}}};return{disconnect:()=>{var s;null==(s=n())||s.disconnect(),null==i||i.cancel(),e.clear(),h=!1,t=null,i=null},observe:l=>{const o=n();o&&(s?(e.add(l),h||(h=!0,null==i||i.schedule((()=>{h=!1,e.forEach((i=>{i.isConnected&&(null==t||t.observe(i,{box:"border-box"}))})),e.clear()})))):o.observe(l,{box:"border-box"}))},unobserve:t=>{var i;e.delete(t),null==(i=n())||i.unobserve(t)}}})(),this.range=null,this.setOptions=t=>{var i;const s={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:C,rangeExtractor:R,onChange:()=>{},measureElement:D,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const i in t){const h=t[i];void 0!==h&&(s[i]=h)}const h=this.options;let e=null,n=null,l=!1;if(void 0!==h&&h.enabled&&s.enabled&&"end"===s.anchorTo&&null!==this.scrollElement){const t=h.count,o=s.count,r=this.getMeasurements(),a=(null==(i=this._singleLaneMeasurements)?void 0:i.items)??r,u=t=>{return"object"==typeof(i=a[t])?i.key:i;var i},c=t>0?u(0):null,d=t>0?u(t-1):null;if(o!==t||t>0&&o>0&&(s.getItemKey(0)!==c||s.getItemKey(o-1)!==d)){l=!0;const i=t>0?this.getVirtualItemForOffset(this.getScrollOffset())??r[0]:null;i&&(e=[i.key,this.getScrollOffset()-i.start]);const a=!0===s.followOnAppend?"auto":s.followOnAppend||null;a&&o>0&&this.isAtEnd(h.scrollEndThreshold)&&(0===t||s.getItemKey(o-1)!==d)&&(o>t||function(t,i,s,h){if(0===i)return!1;const e=h(0),n=new Set;let l=0;for(;l<t;){const t=s(l);if(t===e)break;n.add(t),l++}const o=t-l;if(0===o||o>=i)return!1;for(let t=0;t<o;t++)if(h(t)!==s(l+t))return!1;for(let t=o;t<i;t++)if(n.has(h(t)))return!1;return!0}(t,o,u,s.getItemKey))&&(n=a)}}this.options=s,l&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=null;if(e&&null!==this.scrollOffset&&!this._awaitingCommandReadBack()){const[t,i]=e,s=this.getMeasurements(),{count:h,getItemKey:l}=this.options;let r=0;for(;r<h&&l(r)!==t;)r++;if(r<h){const t=s[r];if(t){const s=Math.max(0,t.start+i);n||s===this.scrollOffset||(o=s-this.scrollOffset,this.scrollOffset=s)}}}n?this.pendingScrollAnchor={kind:"follow",behavior:n}:null!==o&&(this._canWriteScroll()?this.pendingScrollAnchor={kind:"anchor",delta:o}:(this._holdOffset+=o,this._followOffsetTarget(o)))},this.notify=t=>{var i,s;null==(s=(i=this.options).onChange)||s.call(i,this,t)},this.maybeNotify=v((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(t=>{this.notify(t)}),{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{var t;this.unsubs.filter(Boolean).forEach((t=>t())),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,null==(t=this._momentumStop)||t.restore(),this._momentumStop=null,this.isScrolling=!1,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._clampedAdjustment=null,this.pendingWrite=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i)return void this.maybeNotify();this.scrollElement=i,this.targetWindow=this.scrollElement&&"ownerDocument"in this.scrollElement?this.scrollElement.ownerDocument.defaultView:(null==(t=this.scrollElement)?void 0:t.window)??null,this.elementsCache.forEach((t=>{this.observer.observe(t)})),this.unsubs.push(this.options.observeElementRect(this,(t=>{this.scrollRect=t,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,((t,i)=>{var s,h,e,n;const l=i?this._elementMaxScrollOffset():null,o=this._reportedOverscroll;this._reportedOverscroll=t<0||null!==l&&t>l+1;const r=t;this._lastElementOffset=r,t=this._toLayoutOffset(t);const a=this._classifyScrollEvent(t,i,l);if("spurious"===a)return;"readBack"===a?t=this.pendingWrite.target:"clampedReadBack"===a&&null!=(null==(s=this.scrollState)?void 0:s.index)&&t<this.getMaxScrollOffset()-1.5?this.scrollState.lastTargetOffset=t:function({kind:t,offset:i,command:s,target:h}){return!("spurious"===t||"readBack"===t||"clampedReadBack"===t||null==(null==s?void 0:s.index)||"queued"===s.phase||(e=s.phase,"smooth"===e||"smoothFinishing"===e)||p(i,s.lastTargetOffset)||p(i,h())||"clampedEcho"===t);var e}({kind:a,offset:t,command:this.scrollState,target:()=>this.getScrollStateTarget(this.scrollState)})&&(this.scrollState=null),this.pendingWrite=null,null!==this._clampedAdjustment&&Math.abs(t-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null);const u=this.getScrollOffset(),c=this.scrollDirection;this.scrollDirection=i?u===t?this.scrollDirection:u<t?"forward":"backward":null,this.scrollOffset=t,this.isScrolling=i;const d=this.scrollState;if("queued"===(null==d?void 0:d.phase)&&"external"===a&&i)if(o||this._reportedOverscroll)d.samples=[];else{const t=this.now();d.samples=[...(d.samples??[]).filter((i=>t-i.t<=200)),{t,offset:r}],(null!==c&&this.scrollDirection!==c||function(t){const i=t[t.length-1];if(void 0===i)return!1;let s=t.length-2;for(;s>=0&&i.t-t[s].t<40;)s--;if(s<0)return!1;const h=t[s];let e=s-1;for(;e>=0&&h.t-t[e].t<40;)e--;if(e<0)return!1;const n=t[e],l=(i.offset-h.offset)/(i.t-h.t),o=(h.offset-n.offset)/(h.t-n.t);return l*o>=0&&Math.abs(l)>=2*Math.abs(o)&&Math.abs(l)-Math.abs(o)>=.8}(d.samples))&&(this.scrollState=null)}this._iosGesture.onScroll({isScrolling:i,ownReadBack:"readBack"===a,moved:t!==u,external:"external"===a&&"smooth"!==(null==(h=this.scrollState)?void 0:h.phase)&&"smoothFinishing"!==(null==(e=this.scrollState)?void 0:e.phase)})&&"queued"===(null==(n=this.scrollState)?void 0:n.phase)&&(this.scrollState=null),this._flushHoldIfReady(!0),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()}))),"addEventListener"in this.scrollElement&&this.unsubs.push(this._iosGesture.listen(this.scrollElement)),this._scrollToOffset(this.getScrollOffset())}this._noteClampMax();const s=this.pendingScrollAnchor;this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled&&("anchor"===s.kind?this._canWriteScroll()?j(this.scrollState)&&!p(this.getScrollOffset()-s.delta,this.scrollState.lastTargetOffset)||(this._followOffsetTarget(s.delta),this._scrollToOffset(this.getScrollOffset())):(this._holdOffset+=s.delta,this._followOffsetTarget(s.delta),this.notify(!1)):this.scrollToEnd({behavior:s.behavior})),this._flushHoldIfReady(!1),this._retryClampedAdjustment()},this._classifyScrollEvent=(t,i,s)=>{var h;return function({offset:t,isScrolling:i,elementMax:s,holdOffset:h,scrollOffset:e,pendingWrite:n,clampedMaxAtWrite:l}){var o;return i&&null===n&&t===e?"spurious":null!==n&&Math.abs(t-n.target)<1.5?"readBack":null!==n&&!n.smooth&&null!==s&&n.target>s+h+.5&&Math.abs(t-(s+h))<1.5||null!==n&&!n.smooth&&(null==(o=n.lowMaxes)?void 0:o.some((i=>Math.abs(t-i)<1.5)))?"clampedReadBack":null!==l&&Math.abs(t-l)<1.5?"clampedEcho":"external"}({offset:t,isScrolling:i,elementMax:s,holdOffset:this._holdOffset,scrollOffset:this.scrollOffset,pendingWrite:this.pendingWrite,clampedMaxAtWrite:(null==(h=this._clampedAdjustment)?void 0:h.maxAtWrite)??null})},this._retryClampedAdjustment=()=>{if(null===this._clampedAdjustment||!this.scrollElement||!this.options.enabled||!this._canWriteScroll())return;const{target:t,maxAtWrite:i}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>i+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t))},this._writeAwaitingCommand=()=>{const t=this.scrollState;if(null===t||"queued"!==t.phase)return;const{behavior:i}=t;this.getMeasurements();const s=this.getScrollStateTarget(t);t.lastTargetOffset=s,this._clampedAdjustment=null,t.phase=L(i,null!=t.index&&p(s,this.getScrollOffset())),this._scrollToOffset(s,{behavior:i}),this.scheduleScrollReconcile()},this._readElementOffset=()=>{const t=this.scrollElement;if(null==t)return null;const{horizontal:i,isRtl:s}=this.options;return"number"==typeof t.scrollTop?i?t.scrollLeft*(s?-1:1):t.scrollTop:"number"==typeof t.scrollY?i?t.scrollX:t.scrollY:null},this._canWriteScroll=()=>!(y()&&this._iosGesture.inMotion()||this._reportedOverscroll),this._flushHoldIfReady=t=>{var i;if(0===this._holdOffset)return;if(!this.scrollElement||!this.options.enabled)return;if(!this._canWriteScroll())return;if("smooth"===(null==(i=this.scrollState)?void 0:i.phase))return;this._holdOffset=0,null!==this.scrollOffset&&this.scrollOffset<0&&(this.scrollOffset=0),this.notify(t);const s=this.getCommandWrittenOffset()??this.getScrollOffset();this._clampedAdjustment=this._clampedBy(s),this._scrollToOffset(s)},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=v((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap]),((t,i,s,h,e,n,l,o)=>(void 0!==this.prevLanes&&this.prevLanes!==n&&(this.lanesChangedFlag=!0),this.prevLanes=n,this.pendingMin=null,{count:t,paddingStart:i,scrollMargin:s,getItemKey:h,enabled:e,lanes:n,laneAssignmentMode:l,gap:o})),{key:!1}),this.isIndexInRange=t=>t>=0&&t<this.options.count,this.getMeasurements=v((()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion]),(({count:t,paddingStart:i,scrollMargin:s,getItemKey:h,enabled:e,lanes:n,laneAssignmentMode:l,gap:o})=>{var r;const a=this.itemSizeCache;if(!e)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const i of this.laneAssignments.keys())i>=t&&this.laneAssignments.delete(i);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((t=>{this.itemSizeCache.set(t.key,t.size)})));const u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),1===n){const e=2*t;let n=null==(r=this._singleLaneMeasurements)?void 0:r.flat;if(!n||n.length<e){const t=new Float64Array(e);n&&u>0&&t.set(n.subarray(0,2*u)),n=t}const l=0===u?new Array(t):this._singleLaneMeasurements.items.slice();let c;if(0===u)c=i+s;else{const t=u-1;c=n[2*t]+n[2*t+1]+o}for(let i=u;i<t;i++){const t=h(i);l[i]=t;const s=a.get(t),e="number"==typeof s?s:this.options.estimateSize(i);n[2*i]=c,n[2*i+1]=e,c+=e+o}this._singleLaneMeasurements={flat:n,items:l};const d=function(t,i){const s=t.length;return new Proxy(t,{get(t,h,e){if("string"==typeof h){const e=h.charCodeAt(0);if(e>=48&&e<=57){const e=+h;if(Number.isInteger(e)&&e>=0&&e<s){let s=t[e];if("object"!=typeof s){const h=i[2*e];s=t[e]={index:e,key:s,start:h,size:i[2*e+1],end:h+i[2*e+1],lane:0}}return s}}if("length"===h)return s}return Reflect.get(t,h,e)}})}(l,n);return this.measurementsCache=d,d}const c=this.measurementsCache.slice(0,u),d=new Array(n).fill(void 0),f=new Float64Array(n);let b=0;for(let t=0;t<u;t++){const i=c[t];i&&(void 0===d[i.lane]&&b++,d[i.lane]=t,f[i.lane]=i.end)}for(let e=u;e<t;e++){const t=h(e),r=this.laneAssignments.get(e);let u,v;const w="estimate"===l||a.has(t);if(void 0!==r&&this.options.lanes>1){u=r;const t=d[u],h=void 0!==t?c[t]:void 0;v=h?h.end+o:i+s}else if(b===n){let t=0,i=f[0],s=d[0];for(let h=1;h<n;h++){const e=f[h];(e<i||e===i&&d[h]<s)&&(t=h,i=e,s=d[h])}u=t,v=i+o,w&&this.laneAssignments.set(e,u)}else u=e%this.options.lanes,v=i+s,w&&this.laneAssignments.set(e,u);const p=a.get(t),m="number"==typeof p?p:this.options.estimateSize(e),g=v+m;c[e]={index:e,start:v,size:m,end:g,key:t,lane:u},void 0===d[u]&&b++,d[u]=e,f[u]=g}return this.measurementsCache=c,c}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=v((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes,this._getLayoutTotalSize()+this.options.scrollMargin]),((t,i,s,h,e)=>{if(0===t.length||0===i)return this.range=null,null;const n=Math.max(e-i,0);return this.range=function(t,i,s,h,e){const n=t.length-1;if(t.length<=h)return{startIndex:0,endIndex:n};if(1===h&&null!==e){const t=function(t,i,s){let h=0;for(;h<=i;){const e=(h+i)/2|0,n=t[2*e];if(n<s)h=e+1;else{if(!(n>s))return e;i=e-1}}return h>0?h-1:0}(e,n,s);let h=t;const l=s+i;for(;h<n&&e[2*h]+e[2*h+1]<l;)h++;return{startIndex:t,endIndex:h}}let l=V(0,n,(i=>t[i].start),s),o=l;if(1===h)for(;o<n&&t[o].end<s+i;)o++;else if(h>1){const e=Array(h).fill(0);for(;o<n&&e.some((t=>t<s+i));){const i=t[o];e[i.lane]=i.end,o++}const r=Array(h).fill(s+i);for(;l>=0&&r.some((t=>t>=s));){const i=t[l];r[i.lane]=i.start,l--}l=Math.max(0,l-l%h),o=Math.min(n,o+(h-1-o%h))}return{startIndex:l,endIndex:o}}(t,i,Math.min(s,n),h,1===h&&null!==this._singleLaneMeasurements?this._singleLaneMeasurements.flat:null),this.range}),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=v((()=>{let t=null,i=null;const s=this.calculateRange();return s&&(t=s.startIndex,i=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,i,this.options.lanes]}),((t,i,s,h,e,n)=>null===h||null===e?[]:t({startIndex:h,endIndex:e,overscan:i,count:s,lanes:n})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const i=this.options.indexAttribute,s=t.getAttribute(i);return s?parseInt(s,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var i;if(!j(this.scrollState))return!0;const s=this.scrollState.index??(null==(i=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:i.index);if(void 0!==s&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),h=Math.max(0,s-i),e=Math.min(this.options.count-1,s+i);return t>=h&&t<=e}return!0},this.measureElement=t=>{if(!t)return void this.elementsCache.forEach(((t,i)=>{t.isConnected||(this.observer.unobserve(t),this.elementsCache.delete(i))}));const i=this.indexFromElement(t);if(!this.isIndexInRange(i))return;const s=this.options.getItemKey(i),h=this.elementsCache.get(s);h!==t&&(h&&this.observer.unobserve(h),this.observer.observe(t),this.elementsCache.set(s,t)),t.isConnected&&(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(i)&&this.resizeItem(i,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,i)=>{var s,h,e;if(!this.isIndexInRange(t))return;let n,l,o;(null==(s=this._resizeBatch)?void 0:s.sync)&&this.getMeasurements();const r=null==(h=this._singleLaneMeasurements)?void 0:h.flat;if(1===this.options.lanes&&null!=r)o=this.options.getItemKey(t),l=r[2*t],n=r[2*t+1];else{const i=this.measurementsCache[t];if(!i)return;o=i.key,l=i.start,n=i.size}const a=this.itemSizeCache.get(o)??n,u=i-a;if(0!==u){const s="end"===this.options.anchorTo&&!j(this.scrollState)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,h=s?this._getLayoutTotalSize():0,r=this.getScrollOffset(),c=this.itemSizeCache.has(o)?l+a<=r&&"backward"!==this.scrollDirection:l<r,d=!j(this.scrollState)&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[t]??{index:t,key:o,start:l,size:n,end:l+n,lane:0},u,this):c);(null===this.pendingMin||t<this.pendingMin)&&(this.pendingMin=t),this.itemSizeCache.set(o,i),this.itemSizeCacheVersion++;let f=!1;if(this._awaitingCommandReadBack()||(s?f=this.applyScrollAdjustment(this._getLayoutTotalSize()-h):d&&(f=this.applyScrollAdjustment(u))),this._resizeBatch)return this._resizeBatch.notify=!0,void((e=this._resizeBatch).sync||(e.sync=f));this.notify(f),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment()}},this.getVirtualItems=v((()=>[this.getVirtualIndexes(),this.getMeasurements(),this._holdOffset]),((t,i,s)=>{const h=[];for(let e=0,n=t.length;e<n;e++){const n=i[t[e]];h.push(0===s?n:{...n,start:n.start-s,end:n.end-s})}return h}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{var i;const s=this.getMeasurements();if(0===s.length)return;const h=null==(i=this._singleLaneMeasurements)?void 0:i.flat,e=V(0,s.length-1,1===this.options.lanes&&null!=h?t=>h[2*t]:t=>w(s[t]).start,t);return w(s[e])},this._noteClampMax=()=>{if(!this._awaitingCommandReadBack())return;const t=this._elementMaxScrollOffset();if(null===t)return;const i=this.pendingWrite,s=Math.max(t,0)+this._holdOffset;if(s>=i.target)return;const h=i.lowMaxes??(i.lowMaxes=[]);h[h.length-1]!==s&&h.push(s)},this.getMaxScrollOffset=()=>(this._elementMaxScrollOffset()??0)+this._holdOffset,this._toLayoutOffset=t=>{var i;let s=t+this._holdOffset;return"anchor"===(null==(i=this.pendingScrollAnchor)?void 0:i.kind)&&(s+=this.pendingScrollAnchor.delta),s},this._elementMaxScrollOffset=()=>{const t=this.scrollElement;if(null===t)return null;if("scrollHeight"in t)return this.options.horizontal?t.scrollWidth-t.clientWidth:t.scrollHeight-t.clientHeight;if("document"in t){const i=t.document.documentElement;return this.options.horizontal?i.scrollWidth-t.innerWidth:i.scrollHeight-t.innerHeight}return null},this._momentumStop=null,this._stopMomentum=t=>{const i=this.scrollElement,s=this.targetWindow;if(null===i||null===s)return;const h="document"in i?i.document.scrollingElement:i;if(!(null==h?void 0:h.style))return;if(this._momentumStop)return void(this._momentumStop.done=t);const{style:e}=h,n=this.options.horizontal?"overflow-x":"overflow-y",l=e.getPropertyValue(n),o=e.getPropertyPriority(n),r=()=>this.options.horizontal?h.clientHeight:h.clientWidth,a=r();if(e.setProperty(n,"hidden","important"),r()!==a)return void e.setProperty(n,l,o);const u={restore:()=>"hidden"===e.getPropertyValue(n)&&"important"===e.getPropertyPriority(n)&&(e.setProperty(n,l,o),!0),done:t};this._momentumStop=u,s.requestAnimationFrame((()=>s.requestAnimationFrame((()=>{this._momentumStop===u&&(this._momentumStop=null,u.restore()&&u.done())}))))},this._clampedBy=t=>{const i=this._elementMaxScrollOffset();if(null===i)return null;const s=i+this._holdOffset;return t>s+.5?{target:t,maxAtWrite:s}:null},this.getVirtualDistanceFromEnd=()=>Math.max(this._getLayoutTotalSize()+this.options.scrollMargin-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,i,s=0)=>{if(!this.scrollElement)return 0;const h=this.getSize(),e=this.getScrollOffset();"auto"===i&&(i=t>=e+h?"end":"start"),"center"===i?t+=(s-h)/2:"end"===i&&(t-=h);const n=this.getMaxScrollOffset();return Math.max(Math.min(n,t),0)},this.getOffsetForIndex=(t,i="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),h=this.getScrollOffset(),e=this.measurementsCache[t];if(e){if("auto"===i)if(e.end>=h+s-this.options.scrollPaddingEnd)i="end";else{if(!(e.start<=h+this.options.scrollPaddingStart))return[h,i];i="start"}if("end"===i&&t===this.options.count-1){const t=this.getMaxScrollOffset();return[Math.max(Math.min(t-this.options.paddingEnd+this.options.scrollPaddingEnd,t),0),i]}return[this.getOffsetForAlignment("end"===i?e.end+this.options.scrollPaddingEnd:e.start-this.options.scrollPaddingStart,i,e.size),i]}},this.scrollToOffset=(t,{align:i="start",behavior:s="auto"}={})=>{this._startScroll({index:null,align:i},this.getOffsetForAlignment(t,i),s,"absolute")},this.scrollToIndex=(t,{align:i="auto",behavior:s="auto"}={})=>{t=Math.max(0,Math.min(t,this.options.count-1));const h=this.getOffsetForIndex(t,i);if(!h)return;const[e,n]=h;this._startScroll({index:t,align:n},e,s,"absolute")},this.scrollBy=(t,{behavior:i="auto"}={})=>{const s=this.getOffsetForAlignment((this.getCommandWrittenOffset()??this.getScrollOffset())+t,"start");this._startScroll({index:null,align:"start"},s,i,"relative")},this.scrollToEnd=({behavior:t="auto"}={})=>{this.options.count>0?this._startScroll({index:this.options.count-1,align:"end",toEnd:!0},Math.max(this.getMaxScrollOffset(),0),t,"absolute"):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.cancelScroll=()=>{null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null},this.getTotalSize=()=>Math.max(this._getLayoutTotalSize()-this._holdOffset,0),this._getLayoutTotalSize=()=>{var t,i;const s=this.getMeasurements();let h;if(0===s.length)h=this.options.paddingStart;else if(1===this.options.lanes){const e=s.length-1,n=null==(t=this._singleLaneMeasurements)?void 0:t.flat;h=null!=n?n[2*e]+n[2*e+1]:(null==(i=s[e])?void 0:i.end)??0}else{const t=Array(this.options.lanes).fill(null);let i=s.length-1;for(;i>=0&&t.some((t=>null===t));){const h=s[i];null===t[h.lane]&&(t[h.lane]=h.end),i--}h=Math.max(...t.filter((t=>null!==t)))}return Math.max(h-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(0===this.itemSizeCache.size)return t;const i=this.getMeasurements();for(const s of i)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:i,behavior:s}={})=>{const h={target:t+(i??0),smooth:"smooth"===s};return this.pendingWrite=h,this.options.scrollToFn(t-this._holdOffset,{behavior:s,adjustments:i},this),h},this.getCommandWrittenOffset=()=>null===this.scrollState||null===this.pendingWrite||this.pendingWrite.smooth?null:this.pendingWrite.target,this._awaitingCommandReadBack=()=>{const t=this.getCommandWrittenOffset();return!(y()&&this._iosGesture.dragging()||null===t||p(t,this.getScrollOffset()))},this._followOffsetTarget=t=>{null!==this.scrollState&&null==this.scrollState.index&&(this.scrollState.lastTargetOffset+=t)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}get scrollAdjustments(){return 0}applyScrollAdjustment(t,i){if(0===t)return!1;if(this._followOffsetTarget(t),this._canWriteScroll()){const s=this.getScrollOffset();this._clampedAdjustment=this._clampedBy(s+t);const h=this._scrollToOffset(s,{adjustments:t,behavior:i});return null!==this.scrollOffset&&(this.pendingWrite===h&&(this.scrollOffset+=t),this.scrollOffset<0&&(this.scrollOffset=0)),!0}return this._holdOffset+=t,null!==this.scrollOffset&&(this.scrollOffset+=t),!0}scheduleScrollReconcile(){this.targetWindow?null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame((()=>{this.rafId=null,this.reconcileScroll()}))):this.scrollState=null}getScrollStateTarget(t){const i=t.toEnd?[Math.max(this.getMaxScrollOffset(),0)]:null!=t.index?this.getOffsetForIndex(t.index,t.align):void 0;return i?i[0]:t.lastTargetOffset}reconcileScroll(){if(!this.scrollState)return;if(!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3)return void(this.scrollState=null);if("queued"===this.scrollState.phase)return void this.scheduleScrollReconcile();this.getMeasurements();const t=this.getScrollStateTarget(this.scrollState),i=null==this.scrollState.index?1:this.options.useAnimationFrameWithResizeObserver?3:2,s=t!==this.scrollState.lastTargetOffset;if(!s&&p(t,this.getScrollOffset())){if("smooth"===this.scrollState.phase?this.scrollState.phase="smoothLanded":"smoothFinishing"===this.scrollState.phase&&(this.scrollState.phase="instant"),this.scrollState.stableFrames++,this.scrollState.stableFrames>=i)return this.getScrollOffset()!==t&&this._scrollToOffset(t,{behavior:"auto"}),void(this.scrollState=null)}else if(this.scrollState.stableFrames=0,s){const i=this.getSize()||600,s=Math.abs(t-this.getScrollOffset()),h=j(this.scrollState)&&s>i;this.scrollState.lastTargetOffset=t,h?this.scrollState.phase="smooth":"smooth"===this.scrollState.phase?this.scrollState.phase="smoothFinishing":"smoothLanded"===this.scrollState.phase&&(this.scrollState.phase="instant"),this._scrollToOffset(t,{behavior:h?"smooth":"auto"})}this.scheduleScrollReconcile()}_startScroll(t,i,s,h){this.pendingScrollAnchor=null,this._clampedAdjustment=null;const e=this._iosGesture.tail();if("absolute"===h&&null!==e){if("fling"===e&&(!y()||(void 0!==x?x:x=y()&&"undefined"!=typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("overflow-anchor: auto"))))return this._stopMomentum((()=>{const t=this.scrollState;"queued"!==(null==t?void 0:t.phase)||"fling"!==this._iosGesture.tail()||this._reportedOverscroll||(this._iosGesture.end(),this._flushHoldIfReady(!0),this._writeAwaitingCommand())})),this.scrollState={...t,startedAt:this.now(),lastTargetOffset:i,stableFrames:0,phase:"queued",behavior:s,samples:[]},void this.scheduleScrollReconcile();this._iosGesture.end()}this.scrollState={...t,startedAt:this.now(),lastTargetOffset:i,stableFrames:0,behavior:s,phase:L(s,null!=t.index&&p(i,this.getScrollOffset()))},this._scrollToOffset(i,{behavior:s}),this.scheduleScrollReconcile()}}const V=(t,i,s,h)=>{for(;t<=i;){const e=(t+i)/2|0,n=s(e);if(n<h)t=e+1;else{if(!(n>h))return e;i=e-1}}return t>0?t-1:0};class K{constructor(t,i,s,h){this.bodyEl=t,this.scrollElement=i,this.config=s,this.onIndexesChange=h,this.measuredIndexes=new WeakMap,this.observedRows=new Set,this.resizeObserver=new ResizeObserver((t=>this.resizeRows(t.map((({borderBoxSize:t,target:i})=>({row:i,height:t[0].blockSize})))))),this.indexes=[],this.isResizingRows=!1,this.hasChangeWhileResizing=!1,this.bodyEl.style.overflowAnchor="none",this.scrollMargin=this.measureScrollMargin(),this.virtualizer=new P(this.options()),this.unmount=this.virtualizer._didMount(),this.virtualizer._willUpdate(),this.update()}setConfig(t){this.config=t,this.applyOptions()}sync(){this.updateScrollMargin(),this.observedRows.forEach((t=>{t.isConnected||(this.resizeObserver.unobserve(t),this.observedRows.delete(t))}));const t=this.getRenderedRows();t.forEach((t=>{this.observedRows.has(t)||(this.observedRows.add(t),this.resizeObserver.observe(t))})),this.resizeRows(t.filter((t=>this.measuredIndexes.get(t)!==N(t))).map((t=>({row:t,height:t.getBoundingClientRect().height})))),this.layout()}destroy(){this.unmount(),this.resizeObserver.disconnect(),this.observedRows.clear(),this.bodyEl.style.overflowAnchor="",this.bodyEl.style.paddingTop="",this.bodyEl.style.paddingBottom="",this.getRenderedRows().forEach((t=>t.style.marginTop=""))}applyOptions(){this.virtualizer.setOptions(this.options()),this.virtualizer._willUpdate(),this.update()}update(){if(this.updateScrollMargin())return;const t=this.virtualizer.getVirtualItems().map((({index:t})=>t));var i,s;(i=t).length===(s=this.indexes).length&&i.every(((t,i)=>t===s[i]))||(this.indexes=t,this.onIndexesChange(t)),this.layout()}updateScrollMargin(){const t=this.measureScrollMargin();return!(Math.abs(t-this.scrollMargin)<1||(this.scrollMargin=t,this.applyOptions(),0))}resizeRows(t){this.isResizingRows=!0;try{t.forEach((({row:t,height:i})=>{const s=N(t);t.isConnected&&!Number.isNaN(s)&&0!==i&&(this.measuredIndexes.set(t,s),this.virtualizer.resizeItem(s,i))}))}finally{this.isResizingRows=!1}this.hasChangeWhileResizing&&(this.hasChangeWhileResizing=!1,this.update())}handleChange(){this.isResizingRows?this.hasChangeWhileResizing=!0:this.update()}layout(){const t=new Map(this.virtualizer.getVirtualItems().map((t=>[t.index,t])));let i;this.getRenderedRows().forEach((s=>{const h=N(s),e=t.get(h);if(!e)return;s.index!==h+2&&(s.index=h+2);const n=e.start-this.scrollMargin;void 0===i?($(this.bodyEl,"paddingTop",n),$(s,"marginTop",0)):$(s,"marginTop",n-i),i=e.end-this.scrollMargin})),void 0===i&&$(this.bodyEl,"paddingTop",0),$(this.bodyEl,"paddingBottom",this.virtualizer.getTotalSize()-(i??0))}getRenderedRows(){return Array.from(this.bodyEl.querySelectorAll("swirl-table-row[data-index]"))}options(){const{estimatedRowHeight:t,keptIndexes:i,overscan:s,rowCount:h}=this.config,e=this.scrollElement instanceof Window;return{count:h,estimateSize:()=>t,getScrollElement:()=>this.scrollElement,initialOffset:()=>this.scrollElement instanceof Window?this.scrollElement.scrollY:this.scrollElement.scrollTop,overscan:s,scrollMargin:this.scrollMargin,rangeExtractor:t=>{return s=R(t),e=i.filter((t=>Number.isInteger(t)&&t>=0&&t<h)),[...new Set([...s,...e])].sort(((t,i)=>t-i));var s,e},observeElementRect:e?z:A,observeElementOffset:e?F:E,scrollToFn:e?W:q,onChange:()=>this.handleChange()}}measureScrollMargin(){const t=this.bodyEl.getBoundingClientRect().top;return this.scrollElement instanceof Window?t+this.scrollElement.scrollY:t-this.scrollElement.getBoundingClientRect().top+this.scrollElement.scrollTop}}function N(t){return Number(t.dataset.index)}function $(t,i,s){const h=s>0?`${s}px`:"";t.style[i]!==h&&(t.style[i]=h)}const H={end:"Dropped. Final position in table: {position} of {rowCount}.",initial:"Press space to move the row.",moved:"Current position in table: {position} of {rowCount}.",start:"Row grabbed. Current position in table: {position} of {rowCount}. Press up and down arrow keys to change position, Space to drop."},U=class{constructor(s){t(this,s),this.dropRow=i(this,"dropRow",7),this.virtualizationRowsChange=i(this,"virtualizationRowsChange",7),this.dragDropInstructions=H,this.emptyStateLabel="No results found.",this.virtualizationEstimatedRowHeight=56,this.virtualizationOverscan=10,this.virtualizationKeepRowsRendered=[],this.liveRegionText="",this.triggerRerender=r((async()=>{await this.updateLayout(),this.updateEmptyState()}),0,!0),this.updateLayout=b((async()=>{this.resetCellStyles(),this.resetColumnStyles(),this.resetEmptyRowStyles(),this.resetRowGroupStyles(),this.layoutEmptyRow(),this.layoutRowGroups(),this.layOutCellsAndColumns(),this.updateScrolledState()}),16,{leading:!0}),this.onScroll=()=>{this.updateScrolledState()},this.onFocus=t=>{if(this.trackFocusedRow(t.target),this.movingViaKeyboard){const t=this.el.querySelector(".table-row--moving");t&&this.focusDragHandleOfRow(t)}const i=!!t.target?.closest(this.dragDropHandle);""===this.liveRegionText&&i&&this.updateLiveRegionText("initial")},this.onBlur=t=>{const i=t.relatedTarget;this.el.contains(i)||this.trackFocusedRow(null);const s=!!i?.closest(this.dragDropHandle);this.el.contains(i)&&s||""!==this.liveRegionText&&this.updateLiveRegionText()},this.onKeyDown=t=>{if(!this.enableDragDrop)return;const i=t.target?.closest("swirl-table-row");t.target?.closest(this.dragDropHandle)&&("Space"===t.code?(t.preventDefault(),t.stopPropagation(),this.toggleKeyboardMove(i)):"ArrowUp"===t.code?(t.preventDefault(),t.stopPropagation(),this.moveRow(i,"up")):"ArrowDown"===t.code?(t.preventDefault(),t.stopPropagation(),this.moveRow(i,"down")):"Escape"===t.code&&(t.preventDefault(),t.stopPropagation(),this.cancelKeyboardMove()))}}async componentDidLoad(){this.setupIntersectionObserver(),this.setupMutationObservers(),this.updateVirtualizer(),queueMicrotask((()=>{this.setupDragDrop()}))}disconnectedCallback(){this.intersectionObserver?.disconnect(),this.columnMutationObserver?.disconnect(),this.rowMutationObserver?.disconnect(),this.sortable?.destroy(),this.destroyVirtualizer()}handleVirtualizationChange(){this.updateVirtualizer()}get virtualizerConfig(){if(this.enableVirtualization&&this.virtualizationRowCount)return{estimatedRowHeight:this.virtualizationEstimatedRowHeight,keptIndexes:void 0===this.focusedRowIndex?this.virtualizationKeepRowsRendered??[]:[...this.virtualizationKeepRowsRendered??[],this.focusedRowIndex],overscan:this.virtualizationOverscan,rowCount:this.virtualizationRowCount}}updateVirtualizer(){if(!this.bodyEl)return;const t=this.virtualizerConfig;if(!t){const t=Boolean(this.virtualizer);return this.destroyVirtualizer(),void(this.enableVirtualization&&t&&queueMicrotask((()=>this.virtualizationRowsChange.emit({indexes:[]}))))}if(this.virtualizer)return this.virtualizer.setConfig(t),void(this.virtualizer.scrollElement===window&&this.updateScrollParent());this.bodyEl.style.paddingBottom=t.rowCount*t.estimatedRowHeight+"px",this.virtualizer=new K(this.bodyEl,a(this.el),t,(t=>queueMicrotask((()=>this.virtualizationRowsChange.emit({indexes:t})))))}destroyVirtualizer(){this.virtualizer?.destroy(),this.virtualizer=void 0}handleEnableDragDropChange(){queueMicrotask((()=>{this.setupDragDrop()}))}setupIntersectionObserver(){this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange.bind(this),{threshold:0}),this.intersectionObserver.observe(this.container)}setupMutationObservers(){this.columnMutationObserver=new MutationObserver((t=>{t.some((t=>t.addedNodes.length||t.removedNodes.length))&&this.updateLayout()})),this.columnMutationObserver.observe(this.headerEl,{childList:!0,subtree:!0}),this.rowMutationObserver=new MutationObserver((t=>{const i=t.some((t=>t.addedNodes.length||t.removedNodes.length)),s=t.some((t=>"attributes"===t.type));i&&(this.updateEmptyState(),this.setupDragDrop()),(i||s)&&this.syncVirtualizedRows()})),this.startRowMutationObserver()}startRowMutationObserver(){this.rowMutationObserver?.observe(this.bodyEl,{attributeFilter:["data-index"],childList:!0,subtree:!0})}stopRowMutationObserver(){this.rowMutationObserver?.disconnect()}setupDragDrop(){if(this.sortable&&(this.sortable.destroy(),this.sortable=void 0),this.enableDragDrop){if(this.el.querySelector("swirl-table-row-group"))return void console.warn('[Swirl] Drag & drop is not yet supported for swirl-tables using the "swirl-table-row-group" component.');if(!this.dragDropHandle)return void console.warn('[Swirl] swirl-table required the "dragDropHandle" prop to be set when drag & drop is enabled.');const t=this.el.querySelector('[slot="rows"]');this.dragDropContainer="SWIRL-TABLE-ROW"!==t?.tagName?t??this.bodyEl:this.bodyEl,this.sortable=new o(this.dragDropContainer,{animation:100,direction:"vertical",handle:this.dragDropHandle,fallbackOnBody:!0,group:`swirl-table-${Math.random().toString().substring(2)}`,onStart:()=>{this.stopRowMutationObserver()},onEnd:t=>{t.stopPropagation();const{to:i,newIndex:s,oldIndex:h,item:e}=t;this.dropRow.emit({newIndex:s,oldIndex:h,item:e,itemId:e.id??e.querySelector(":scope > swirl-table-row").id,newNextSiblingItemId:s<i.children.length-1?i.children[s+1].id:void 0,newPrevSiblingItemId:s>0?i.children[s-1].id:void 0}),this.startRowMutationObserver()}})}}async onVisibilityChange(t){t.some((t=>t.isIntersecting))&&setTimeout((async()=>{this.updateScrollParent(),await this.updateLayout()}),100)}updateScrollParent(){this.virtualizer&&a(this.el)!==this.virtualizer.scrollElement&&(this.destroyVirtualizer(),this.updateVirtualizer())}async componentDidRender(){await this.updateLayout(),this.updateEmptyState()}async onWindowResize(){await this.updateLayout()}async rerender(){this.triggerRerender()}resetEmptyRowStyles(){const t=this.el.querySelector(".table__empty-row");Boolean(t)&&(t.style.width="")}resetRowGroupStyles(){Array.from(this.el.querySelectorAll("swirl-table-row-group")).forEach((t=>{const i=t.shadowRoot.querySelector(".table-row-group__header-row");Boolean(i)&&(t.shadowRoot.querySelector(".table-row-group__header-row").style.width="")}))}resetColumnStyles(){this.getColumns().forEach((t=>{t.classList.remove("table-column--has-shadow","table-column--is-sticky","table-column--is-sticky-right"),t.style.right="",t.style.left="",t.style.position="",t.style.zIndex=""}))}resetCellStyles(){this.getCells().forEach((t=>{t.classList.remove("table-cell--has-shadow","table-cell--is-sticky","table-cell--is-sticky-right"),t.style.flex="",t.style.left="",t.style.right="",t.style.position="",t.style.zIndex=""}))}updateScrolledState(){const t=u();if(void 0===this.container)return;const i=this.container.scrollWidth>this.container.clientWidth,s=this.container.scrollLeft>0,h=Math.ceil(this.container.clientWidth+this.container.scrollLeft)>=Math.floor(this.container.scrollWidth);i!==this.scrollable&&(i&&!t?this.container.classList.add("table__container--scrollable"):this.container.classList.remove("table__container--scrollable")),s!==this.scrolled&&(s&&!t?this.container.classList.add("table__container--scrolled"):this.container.classList.remove("table__container--scrolled")),h!==this.scrolledToEnd&&(h&&!t?this.container.classList.add("table__container--scrolled-to-end"):this.container.classList.remove("table__container--scrolled-to-end"))}getColumns(){return Array.from(this.el.querySelectorAll("swirl-table-column"))}getCells(){return Array.from(this.el.querySelectorAll("swirl-table-cell"))}layoutEmptyRow(){const t=this.el.querySelector(".table__empty-row");if(!Boolean(t))return;const i=`${this.el.querySelector(".table__container").scrollWidth}px`;t.style.width=i}layoutRowGroups(){const t=Array.from(this.el.querySelectorAll("swirl-table-row-group")),i=`${this.el.querySelector(".table__container")?.scrollWidth}px`;t.forEach((t=>{const s=t.shadowRoot.querySelector(".table-row-group__header-row");Boolean(s)&&(t.shadowRoot.querySelector(".table-row-group__header-row").style.width=i)}))}layOutCellsAndColumns(){const t=this.getColumns(),i=this.getCells();t.forEach(((s,h)=>{const e=this.getCellsForColumn(i,t,h),n=this.calculateColumnProperties(s,t,h);e.forEach((t=>this.applyCellStyles(t,s,n))),this.applyColumnStyles(s,n)}))}getCellsForColumn(t,i,s){return t.filter(((t,h)=>(s-h)%i.length==0))}calculateColumnProperties(t,i,s){return{leftOffsetForStickyColumn:t.sticky?this.getLeftOffsetForStickyColumn(i,s):0,columnWidth:`${t.getBoundingClientRect().width}px`,isLastColumnSticky:t.sticky&&i.length===s+1,hasShadowRight:t.sticky&&!this.hasStickyColumnsToRight(i,s)}}applyCellStyles(t,i,s){const{leftOffsetForStickyColumn:h,columnWidth:e,isLastColumnSticky:n,hasShadowRight:l}=s;t.style.flex=Boolean(e)?`0 0 ${e}`:"",u()||(i.sticky&&!n&&(t.classList.add("table-cell--is-sticky"),t.style.left=h+"px",l&&t.classList.add("table-cell--has-shadow-right")),n&&t.classList.add("table-cell--is-sticky-right","table-cell--has-shadow-left"))}applyColumnStyles(t,i){if(u())return;const{leftOffsetForStickyColumn:s,isLastColumnSticky:h,hasShadowRight:e}=i;t.sticky&&!h&&(t.classList.add("table-column--is-sticky"),t.style.left=s+"px",e&&t.classList.add("table-column--has-shadow-right")),h&&t.classList.add("table-column--is-sticky-right","table-column--has-shadow-left")}getLeftOffsetForStickyColumn(t,i){return t.slice(0,i).reduce(((t,i)=>{if(i.sticky)return t+i.getBoundingClientRect().width}),0)}hasStickyColumnsToRight(t,i){return t.slice(i+1,t.length-1).some((t=>t.sticky))}updateEmptyState(){if(this.enableVirtualization&&this.virtualizationRowCount)return void(this.empty=!1);const t=this.el.querySelector('[slot="rows"]');this.empty=!Boolean(t)||0===t.children.length}updateLiveRegionText(t,i={}){let s=t?this.dragDropInstructions[t]:"";for(const[t,h]of Object.entries(i??{}))s=s.replaceAll(`{${t}}`,String(h));s!==this.liveRegionText&&(this.liveRegionText=s)}toggleKeyboardMove(t){this.movingViaKeyboard?this.endKeyboardMove(t):this.startKeyboardMove(t)}startKeyboardMove(t){this.movingViaKeyboard=!0,this.positionBeforeKeyboardMove=Array.from(this.dragDropContainer.children).indexOf(t),t.classList.add("table-row--moving"),this.updateLiveRegionText("start",{position:Array.from(this.dragDropContainer.children).indexOf(t)+1,rowCount:this.dragDropContainer.children.length})}endKeyboardMove(t){this.movingViaKeyboard=!1,t.classList.remove("table-row--moving"),this.updateLiveRegionText("end",{position:Array.from(this.dragDropContainer.children).indexOf(t)+1,rowCount:this.dragDropContainer.children.length}),this.dropRow.emit({item:t,newIndex:Array.from(this.dragDropContainer.children).indexOf(t),oldIndex:this.positionBeforeKeyboardMove,itemId:t.id,newNextSiblingItemId:Array.from(this.dragDropContainer.children).indexOf(t)<this.dragDropContainer.children.length-1?this.dragDropContainer.children[Array.from(this.dragDropContainer.children).indexOf(t)+1].id:void 0,newPrevSiblingItemId:Array.from(this.dragDropContainer.children).indexOf(t)>0?this.dragDropContainer.children[Array.from(this.dragDropContainer.children).indexOf(t)-1].id:void 0}),this.positionBeforeKeyboardMove=void 0}cancelKeyboardMove(){if(!this.movingViaKeyboard)return;const t=this.el.querySelector(".table-row--moving");t&&(t.classList.remove("table-row--moving"),this.movingViaKeyboard=!1,void 0!==this.positionBeforeKeyboardMove&&this.dragDropContainer.insertBefore(t,this.dragDropContainer.children[this.positionBeforeKeyboardMove]))}moveRow(t,i){if(!this.movingViaKeyboard)return;let s;if("up"===i){const i=Array.from(this.dragDropContainer.children).indexOf(t);s=Math.max(0,i-1),this.dragDropContainer.insertBefore(t,this.dragDropContainer.children[s])}else{const i=Array.from(this.dragDropContainer.children).indexOf(t);s=Math.min(this.dragDropContainer.children.length-1,i+1),this.dragDropContainer.insertBefore(t,this.dragDropContainer.children[s+1])}this.updateLiveRegionText("moved",{position:s+1,rowCount:this.dragDropContainer.children.length}),this.focusDragHandleOfRow(t)}focusDragHandleOfRow(t){const i=c(t,this.dragDropHandle)?.[0];"BUTTON"===i.tagName?i.focus():i.querySelector("button")?.focus()}syncVirtualizedRows(){this.virtualizer&&(this.trackFocusedRow(this.el.querySelector("swirl-table-row[data-index]:focus-within")),this.virtualizer.sync())}trackFocusedRow(t){if(!this.enableVirtualization)return;const i=t?.closest("swirl-table-row[data-index]")?.dataset.index,s=void 0===i?void 0:Number(i);s!==this.focusedRowIndex&&(this.focusedRowIndex=s,this.updateVirtualizer())}render(){const t=Boolean(this.el.querySelector('[slot="empty"]')),i=l("table",{"table--show-empty-state":this.empty&&!this.loading,"table--keyboard-move":this.movingViaKeyboard});return s(h,{key:"5fd51d538c87dce53702fa483657035e251d3507"},s("div",{key:"7ec3b5830bcc7b0dfc5324f554b80b442b7bc290",class:i},this.enableDragDrop&&s("swirl-visually-hidden",{key:"2928eb420bb8cad6477917a1883aeeffda3260eb"},s("span",{key:"fc615afed57d8dbfbf636f9e8feb9c6ef76ae72b","aria-live":"assertive"},this.liveRegionText)),s("div",{key:"4b7d5b9c4691d1828d0c24fc635d8e7c5dc48cf4",class:"table__container",onFocusin:this.onFocus,onFocusout:this.onBlur,onKeyDown:this.onKeyDown,onScroll:this.onScroll,ref:t=>this.container=t,tabIndex:-1},s("div",{key:"9669435927eb4944290b4fdcb4083ef1473c000e","aria-describedby":Boolean(this.caption)?"caption":void 0,"aria-label":this.label,"aria-rowcount":this.enableVirtualization&&this.virtualizationRowCount?this.virtualizationRowCount+1:void 0,role:"table",class:"table__table"},this.caption&&s("swirl-visually-hidden",{key:"6806eedf8d1aa22b3ee8f51736032ead77a502cc"},s("div",{key:"bea8e3d31ba2e81461ff8e4d056ee3ea718707ea",id:"caption"},this.caption)),s("div",{key:"386fa4a8c2d31471a43580b62ad1003cfbcf224d",role:"rowgroup"},s("div",{key:"aebae228fab2eb7d4a688bb50ee069e7138001c1",class:"table__header","aria-rowindex":this.enableVirtualization?1:void 0,ref:t=>this.headerEl=t,role:"row"},s("slot",{key:"111dd938896772934ba589167ee254936c8bbe9d",name:"columns"}))),s("div",{key:"7a6b87e277bd50dfc8c5ff3e680aabe95384bb7f",class:"table__body",ref:t=>this.bodyEl=t},s("slot",{key:"a766d1ff38bf321fac0b3c52a686d57d2b4551ea",name:"rows"}),s("div",{key:"a26bec40f580546c85e3dd1007c913d53da4c18a",class:"table__empty-row",role:"row"},s("div",{key:"cd9793a4e353a88bfb04658354f247ddfd621e20","aria-colspan":this.getColumns().length,class:"table__empty-row-cell",role:"cell"},s("slot",{key:"3c79cf8327876b4be8e237e6d43c918d6f6dbda0",name:"empty"}),!t&&s("swirl-text",{key:"6f2d3365cd41f0242f8dc6720aed3c5bc1edf4fb",align:"center",size:"sm"},this.emptyStateLabel))))))))}get el(){return e(this)}static get watchers(){return{enableVirtualization:[{handleVirtualizationChange:0}],virtualizationRowCount:[{handleVirtualizationChange:0}],virtualizationEstimatedRowHeight:[{handleVirtualizationChange:0}],virtualizationOverscan:[{handleVirtualizationChange:0}],virtualizationKeepRowsRendered:[{handleVirtualizationChange:0}],enableDragDrop:[{handleEnableDragDropChange:0}]}}};U.style=".sc-swirl-table-h{--swirl-table-shadow-rgba:rgba(23, 23, 23, 0.2);position:relative;display:block}.sc-swirl-table-h *.sc-swirl-table{box-sizing:border-box}html.theme-dark.sc-swirl-table-h,html.theme-dark .sc-swirl-table-h{--swirl-table-shadow-rgba:rgba(0, 0, 0, 0.2)}.table--keyboard-move.sc-swirl-table:focus-within{--swirl-table-moving-row-border:var(--s-border-width-default) solid var(--s-border-highlight)}.table--show-empty-state.sc-swirl-table .table__empty-row.sc-swirl-table{display:flex}.table__container.sc-swirl-table{position:relative;overflow:auto;width:100%}.table__container--scrolled.sc-swirl-table{--swirl-table-sticky-right-shadow:4px 0 16px -4px var(--swirl-table-shadow-rgba), 2px 0 4px -2px var(--swirl-table-shadow-rgba)}.table__container--scrollable.sc-swirl-table:not(.table__container--scrolled-to-end){--swirl-table-sticky-left-shadow:0px 4px 16px 0px var(--swirl-table-shadow-rgba), 0px 1px 4px 0px var(--swirl-table-shadow-rgba)}.table__table.sc-swirl-table{width:-moz-max-content;width:max-content;min-width:max(20rem, 100%)}.table__header.sc-swirl-table-s>*,.table__header .sc-swirl-table-s>*{display:flex}.table__empty-row.sc-swirl-table{display:none}.table__empty-row-cell.sc-swirl-table{display:flex;overflow:auto;padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);flex-basis:0;flex-grow:1;flex-shrink:1;align-items:center;background-color:var(--s-surface-default)}.table__empty-row-cell.sc-swirl-table>*.sc-swirl-table{flex-grow:1}";export{U as swirl_table}
@@ -1 +1 @@
1
- import{r as i,h as t,a as e,d as s}from"./p-Dz56lJ37.js";import{q as a,k as o}from"./p-CCck-DTo.js";import{c as n}from"./p-orsBiyT_.js";import{D as c}from"./p-Bfn7CHM9.js";const l=class{constructor(t){i(this,t),this.onKeyDown=i=>{"ArrowDown"===i.code||"ArrowRight"===i.code?(i.preventDefault(),i.stopPropagation(),this.focusNextItem()):"ArrowUp"!==i.code&&"ArrowLeft"!==i.code||(i.preventDefault(),i.stopPropagation(),this.focusPreviousItem())},this.onFocusOut=i=>{if(this.isInsidePopover)return;const t=i.relatedTarget,e=i.target,s="SWIRL-ACTION-LIST-ITEM"===e?.tagName,a=null===t||!this.el.contains(t);!this.isInsidePopover&&a&&s&&this.container.setAttribute("tabindex","0")},this.onFocus=()=>{if(this.isInsidePopover)return;this.container.removeAttribute("tabindex");const i=this.getItems(),t=this.getActiveItemIndex();t>-1?i[t]?.focus():i[0]?.focus()}}componentDidLoad(){queueMicrotask((()=>{this.isInsidePopover=null!==this.el.closest("swirl-popover"),this.isInsidePopover||this.container.setAttribute("tabindex","0")})),this.setSectionSeparator()}getItems(){return a(this.el,'[role="menuitem"]')}focusNextItem(){const i=this.getItems();i[(this.getActiveItemIndex()+1)%i.length].focus()}focusPreviousItem(){const i=this.getItems(),t=this.getActiveItemIndex(),e=0===t?i.length-1:t-1;i[e]?.focus()}getActiveItemIndex(){const i=this.getItems(),t=o();return i.findIndex((i=>i===t||i===t?.querySelector('[role="menuitem"]')))}setSectionSeparator(){this.el&&Array.from(this.el.querySelectorAll("swirl-action-list-section")).filter((i=>i.isConnected)).forEach(((i,t)=>{0===t&&"SWIRL-ACTION-LIST-ITEM"!==i.previousElementSibling?.tagName&&(i.hasSeparator=!1)}))}render(){return t(e,{key:"b69904ae0892ff3583235cbf1256d7599cd8c3bb"},t("div",{key:"ef00e5cac280ebdd0e586ba0789df7c834a5175e","aria-orientation":"vertical",class:"action-list",onFocusout:this.isInsidePopover?void 0:this.onFocusOut,onFocus:this.isInsidePopover?void 0:this.onFocus,onKeyDown:this.onKeyDown,part:"action-list",ref:i=>this.container=i,role:"menu"},t("slot",{key:"4771ca68fcb87dc96d44b78d9f3715440e073bf8",onSlotchange:this.setSectionSeparator})))}get el(){return s(this)}};l.style=":host{display:block;width:100%}:host *{box-sizing:border-box}";const r=class{constructor(t){i(this,t),this.intent="default",this.size="m",this.truncateLabel=!0,this.mediaQueryUnsubscribe=()=>{},this.onClick=i=>{this.swirlAriaDisabled&&(i.preventDefault(),i.stopPropagation())}}componentDidLoad(){this.mediaQueryUnsubscribe=c.subscribe((i=>{this.forceIconProps(i)})),this.updateAriaDescribedByElements()}disconnectedCallback(){this.mediaQueryUnsubscribe()}updateAriaDescribedByElements(){if(!this.buttonEl)return;const i=this.el.getRootNode(),t=(this.swirlAriaDescribedby??"").split(/\s+/).filter(Boolean).map((t=>i.getElementById?.(t))).filter((i=>Boolean(i)));this.buttonEl.ariaDescribedByElements=t.length>0?t:null}forceIconProps(i){const t=this.iconEl?.children[0],e=this.suffixEl?.children[0];t?.setAttribute("size",i?"20":"24");const s=this.iconBadgeEl?.children[0];s?.setAttribute("size","xs"),s?.setAttribute("variant","dot"),"SWIRL-TAG"!==e?.tagName&&e?.setAttribute("size",i?"20":"24")}render(){const i=Boolean(this.badge),s=Boolean(this.iconBadge),a=Boolean(this.el.querySelector('[slot="suffix"]')),o=(Boolean(this.suffix)||a)&&!this.disabled&&!this.swirlAriaDisabled,c=n("action-list-item",`action-list-item--intent-${this.intent}`,`action-list-item--size-${this.size}`,{"action-list-item--aria-disabled":this.swirlAriaDisabled});return t(e,{key:"2125fa1f925e009717dce2d081073ef1c0daf3af"},t("button",{key:"70431b881121839eda2ee3b1c1e1735bad5c2dba","aria-describedby":this.swirlAriaDescribedby,"aria-disabled":this.swirlAriaDisabled?"true":void 0,"aria-expanded":this.swirlAriaExpanded,"aria-haspopup":this.swirlAriaHaspopup,class:c,disabled:this.disabled,onClick:this.onClick,part:"action-list-item",ref:i=>this.buttonEl=i,role:"menuitem",tabIndex:-1,type:"button"},t("slot",{key:"82b824c5a3eba3eca06624e0f39b99dc8b4e817b",name:"avatar"}),this.icon&&t("span",{key:"c39848c4fc802d7fa58283728f825312aca4fcdf",class:"action-list-item__icon",innerHTML:this.icon,ref:i=>this.iconEl=i},s&&t("span",{key:"484b34bbc3f458c19888ac1c87225a7b60f263a9",class:"action-list-item__icon-badge",innerHTML:this.iconBadge,ref:i=>this.iconBadgeEl=i})),t("span",{key:"2551812393270a09212a9a362bf2cc8c09464118",class:"action-list-item__label-container"},t("span",{key:"a4f58fdbec37c14f75ebb011293a9a25ec0ef583",class:"action-list-item__label",style:{whiteSpace:this.truncateLabel?"nowrap":"normal"}},this.label),this.description&&t("span",{key:"5e43fa6ad0690a941ace39c669d1caa2aaf56867",class:"action-list-item__description"},this.description)),i&&t("span",{key:"fc326052681d3a2f916c2766944d142d9250f7a3",class:"action-list-item__badge",innerHTML:this.badge}),o&&t("span",{key:"5b8d18b728798d044fb109dc1701439f0c5d1387",class:"action-list-item__suffix",innerHTML:a?void 0:this.suffix,ref:i=>this.suffixEl=i},t("slot",{key:"360bb09dc29294c10754030304ec80dea385990d",name:"suffix"}))))}get el(){return s(this)}static get watchers(){return{swirlAriaDescribedby:[{updateAriaDescribedByElements:0}]}}};r.style=":host{display:block}:host *{box-sizing:border-box}.action-list-item{display:inline-flex;position:relative;width:100%;min-width:15rem;margin:0;padding:var(--s-space-12) var(--s-space-16);justify-content:flex-start;align-items:center;border:none;border-radius:var(--s-border-radius-sm);color:var(--s-text-default);background-color:transparent;font:inherit;line-height:var(--s-line-height-base);text-align:left;cursor:pointer;gap:var(--s-space-12)}.action-list-item:hover:not(.action-list-item--aria-disabled){background-color:var(--s-state-hovered);--swirl-tag-background-default:var(--s-state-pressed)}.action-list-item:focus{outline:none}.action-list-item:focus-visible{background-color:var(--s-state-hovered);outline-color:var(--s-focus-default);outline-style:solid;outline-width:0.125rem;z-index:1}.action-list-item:active:not(.action-list-item--aria-disabled){background-color:var(--s-translucent-low-pressed)}.action-list-item:disabled,.action-list-item.action-list-item--aria-disabled{cursor:default}.action-list-item:disabled .action-list-item__label,.action-list-item:disabled .action-list-item__description,.action-list-item.action-list-item--aria-disabled .action-list-item__label,.action-list-item.action-list-item--aria-disabled .action-list-item__description{color:var(--s-text-disabled)}.action-list-item:disabled .action-list-item__icon,.action-list-item.action-list-item--aria-disabled .action-list-item__icon{color:var(--s-icon-disabled)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.action-list-item{padding:var(--s-space-8) var(--s-space-12);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);gap:var(--s-space-8)}}.action-list-item--size-l{padding:var(--s-space-16)}.action-list-item--intent-critical ::part(icon){color:var(--s-icon-critical)}.action-list-item--intent-critical:not(:disabled):not(.action-list-item--aria-disabled) .action-list-item__label{color:var(--s-text-critical)}.action-list-item--intent-critical:not(:disabled):not(.action-list-item--aria-disabled) .action-list-item__icon{color:var(--s-icon-critical)}.action-list-item__icon{display:inline-flex;position:relative;width:1.5rem;height:1.5rem;flex-shrink:0;color:var(--s-icon-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.action-list-item__icon{width:1.25rem;height:1.25rem}}.action-list-item__icon-badge{position:absolute;display:grid;bottom:0;right:0}.action-list-item__label-container{display:inline-flex;min-width:0;flex-grow:1;flex-shrink:1;align-items:flex-start;flex-direction:column}.action-list-item__label{overflow:hidden;max-width:100%;font-weight:var(--s-font-weight-medium);white-space:nowrap;text-overflow:ellipsis}.action-list-item__description{color:var(--s-text-subdued)}.action-list-item__badge{overflow:hidden;min-width:4rem;padding-left:var(--s-space-8);flex-shrink:3;color:var(--s-text-subdued);font-weight:var(--s-font-weight-medium);text-align:right;white-space:nowrap;text-overflow:ellipsis}.action-list-item__suffix{display:inline-flex;flex-shrink:0;color:var(--s-icon-default)}";export{l as swirl_action_list,r as swirl_action_list_item}
1
+ import{r as i,h as t,a as e,d as s}from"./p-Dz56lJ37.js";import{q as a,k as o}from"./p-D23VxAsw.js";import{c as n}from"./p-orsBiyT_.js";import{D as c}from"./p-_iAIu_AF.js";const l=class{constructor(t){i(this,t),this.onKeyDown=i=>{"ArrowDown"===i.code||"ArrowRight"===i.code?(i.preventDefault(),i.stopPropagation(),this.focusNextItem()):"ArrowUp"!==i.code&&"ArrowLeft"!==i.code||(i.preventDefault(),i.stopPropagation(),this.focusPreviousItem())},this.onFocusOut=i=>{if(this.isInsidePopover)return;const t=i.relatedTarget,e=i.target,s="SWIRL-ACTION-LIST-ITEM"===e?.tagName,a=null===t||!this.el.contains(t);!this.isInsidePopover&&a&&s&&this.container.setAttribute("tabindex","0")},this.onFocus=()=>{if(this.isInsidePopover)return;this.container.removeAttribute("tabindex");const i=this.getItems(),t=this.getActiveItemIndex();t>-1?i[t]?.focus():i[0]?.focus()}}componentDidLoad(){queueMicrotask((()=>{this.isInsidePopover=null!==this.el.closest("swirl-popover"),this.isInsidePopover||this.container.setAttribute("tabindex","0")})),this.setSectionSeparator()}getItems(){return a(this.el,'[role="menuitem"]')}focusNextItem(){const i=this.getItems();i[(this.getActiveItemIndex()+1)%i.length].focus()}focusPreviousItem(){const i=this.getItems(),t=this.getActiveItemIndex(),e=0===t?i.length-1:t-1;i[e]?.focus()}getActiveItemIndex(){const i=this.getItems(),t=o();return i.findIndex((i=>i===t||i===t?.querySelector('[role="menuitem"]')))}setSectionSeparator(){this.el&&Array.from(this.el.querySelectorAll("swirl-action-list-section")).filter((i=>i.isConnected)).forEach(((i,t)=>{0===t&&"SWIRL-ACTION-LIST-ITEM"!==i.previousElementSibling?.tagName&&(i.hasSeparator=!1)}))}render(){return t(e,{key:"b69904ae0892ff3583235cbf1256d7599cd8c3bb"},t("div",{key:"ef00e5cac280ebdd0e586ba0789df7c834a5175e","aria-orientation":"vertical",class:"action-list",onFocusout:this.isInsidePopover?void 0:this.onFocusOut,onFocus:this.isInsidePopover?void 0:this.onFocus,onKeyDown:this.onKeyDown,part:"action-list",ref:i=>this.container=i,role:"menu"},t("slot",{key:"4771ca68fcb87dc96d44b78d9f3715440e073bf8",onSlotchange:this.setSectionSeparator})))}get el(){return s(this)}};l.style=":host{display:block;width:100%}:host *{box-sizing:border-box}";const r=class{constructor(t){i(this,t),this.intent="default",this.size="m",this.truncateLabel=!0,this.mediaQueryUnsubscribe=()=>{},this.onClick=i=>{this.swirlAriaDisabled&&(i.preventDefault(),i.stopPropagation())}}componentDidLoad(){this.mediaQueryUnsubscribe=c.subscribe((i=>{this.forceIconProps(i)})),this.updateAriaDescribedByElements()}disconnectedCallback(){this.mediaQueryUnsubscribe()}updateAriaDescribedByElements(){if(!this.buttonEl)return;const i=this.el.getRootNode(),t=(this.swirlAriaDescribedby??"").split(/\s+/).filter(Boolean).map((t=>i.getElementById?.(t))).filter((i=>Boolean(i)));this.buttonEl.ariaDescribedByElements=t.length>0?t:null}forceIconProps(i){const t=this.iconEl?.children[0],e=this.suffixEl?.children[0];t?.setAttribute("size",i?"20":"24");const s=this.iconBadgeEl?.children[0];s?.setAttribute("size","xs"),s?.setAttribute("variant","dot"),"SWIRL-TAG"!==e?.tagName&&e?.setAttribute("size",i?"20":"24")}render(){const i=Boolean(this.badge),s=Boolean(this.iconBadge),a=Boolean(this.el.querySelector('[slot="suffix"]')),o=(Boolean(this.suffix)||a)&&!this.disabled&&!this.swirlAriaDisabled,c=n("action-list-item",`action-list-item--intent-${this.intent}`,`action-list-item--size-${this.size}`,{"action-list-item--aria-disabled":this.swirlAriaDisabled});return t(e,{key:"2125fa1f925e009717dce2d081073ef1c0daf3af"},t("button",{key:"70431b881121839eda2ee3b1c1e1735bad5c2dba","aria-describedby":this.swirlAriaDescribedby,"aria-disabled":this.swirlAriaDisabled?"true":void 0,"aria-expanded":this.swirlAriaExpanded,"aria-haspopup":this.swirlAriaHaspopup,class:c,disabled:this.disabled,onClick:this.onClick,part:"action-list-item",ref:i=>this.buttonEl=i,role:"menuitem",tabIndex:-1,type:"button"},t("slot",{key:"82b824c5a3eba3eca06624e0f39b99dc8b4e817b",name:"avatar"}),this.icon&&t("span",{key:"c39848c4fc802d7fa58283728f825312aca4fcdf",class:"action-list-item__icon",innerHTML:this.icon,ref:i=>this.iconEl=i},s&&t("span",{key:"484b34bbc3f458c19888ac1c87225a7b60f263a9",class:"action-list-item__icon-badge",innerHTML:this.iconBadge,ref:i=>this.iconBadgeEl=i})),t("span",{key:"2551812393270a09212a9a362bf2cc8c09464118",class:"action-list-item__label-container"},t("span",{key:"a4f58fdbec37c14f75ebb011293a9a25ec0ef583",class:"action-list-item__label",style:{whiteSpace:this.truncateLabel?"nowrap":"normal"}},this.label),this.description&&t("span",{key:"5e43fa6ad0690a941ace39c669d1caa2aaf56867",class:"action-list-item__description"},this.description)),i&&t("span",{key:"fc326052681d3a2f916c2766944d142d9250f7a3",class:"action-list-item__badge",innerHTML:this.badge}),o&&t("span",{key:"5b8d18b728798d044fb109dc1701439f0c5d1387",class:"action-list-item__suffix",innerHTML:a?void 0:this.suffix,ref:i=>this.suffixEl=i},t("slot",{key:"360bb09dc29294c10754030304ec80dea385990d",name:"suffix"}))))}get el(){return s(this)}static get watchers(){return{swirlAriaDescribedby:[{updateAriaDescribedByElements:0}]}}};r.style=":host{display:block}:host *{box-sizing:border-box}.action-list-item{display:inline-flex;position:relative;width:100%;min-width:15rem;margin:0;padding:var(--s-space-12) var(--s-space-16);justify-content:flex-start;align-items:center;border:none;border-radius:var(--s-border-radius-sm);color:var(--s-text-default);background-color:transparent;font:inherit;line-height:var(--s-line-height-base);text-align:left;cursor:pointer;gap:var(--s-space-12)}.action-list-item:hover:not(.action-list-item--aria-disabled){background-color:var(--s-state-hovered);--swirl-tag-background-default:var(--s-state-pressed)}.action-list-item:focus{outline:none}.action-list-item:focus-visible{background-color:var(--s-state-hovered);outline-color:var(--s-focus-default);outline-style:solid;outline-width:0.125rem;z-index:1}.action-list-item:active:not(.action-list-item--aria-disabled){background-color:var(--s-translucent-low-pressed)}.action-list-item:disabled,.action-list-item.action-list-item--aria-disabled{cursor:default}.action-list-item:disabled .action-list-item__label,.action-list-item:disabled .action-list-item__description,.action-list-item.action-list-item--aria-disabled .action-list-item__label,.action-list-item.action-list-item--aria-disabled .action-list-item__description{color:var(--s-text-disabled)}.action-list-item:disabled .action-list-item__icon,.action-list-item.action-list-item--aria-disabled .action-list-item__icon{color:var(--s-icon-disabled)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.action-list-item{padding:var(--s-space-8) var(--s-space-12);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);gap:var(--s-space-8)}}.action-list-item--size-l{padding:var(--s-space-16)}.action-list-item--intent-critical ::part(icon){color:var(--s-icon-critical)}.action-list-item--intent-critical:not(:disabled):not(.action-list-item--aria-disabled) .action-list-item__label{color:var(--s-text-critical)}.action-list-item--intent-critical:not(:disabled):not(.action-list-item--aria-disabled) .action-list-item__icon{color:var(--s-icon-critical)}.action-list-item__icon{display:inline-flex;position:relative;width:1.5rem;height:1.5rem;flex-shrink:0;color:var(--s-icon-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.action-list-item__icon{width:1.25rem;height:1.25rem}}.action-list-item__icon-badge{position:absolute;display:grid;bottom:0;right:0}.action-list-item__label-container{display:inline-flex;min-width:0;flex-grow:1;flex-shrink:1;align-items:flex-start;flex-direction:column}.action-list-item__label{overflow:hidden;max-width:100%;font-weight:var(--s-font-weight-medium);white-space:nowrap;text-overflow:ellipsis}.action-list-item__description{color:var(--s-text-subdued)}.action-list-item__badge{overflow:hidden;min-width:4rem;padding-left:var(--s-space-8);flex-shrink:3;color:var(--s-text-subdued);font-weight:var(--s-font-weight-medium);text-align:right;white-space:nowrap;text-overflow:ellipsis}.action-list-item__suffix{display:inline-flex;flex-shrink:0;color:var(--s-icon-default)}";export{l as swirl_action_list,r as swirl_action_list_item}
@@ -1 +1 @@
1
- import{r as e,c as a,h as i,a as t,d as s}from"./p-Dz56lJ37.js";import{c as d}from"./p-orsBiyT_.js";import{q as r,i as o}from"./p-CCck-DTo.js";import{d as n,e as l}from"./p-BkJDOYVb.js";const c=class{constructor(i){e(this,i),this.modalClose=a(this,"modalClose",3),this.modalOpen=a(this,"modalOpen",3),this.autoZoomLabel="Full width",this.closeButtonLabel="Close PDF viewer",this.downloadButtonEnabled=!0,this.downloadButtonLabel="Download PDF",this.fileTypeLabel="PDF Document",this.menuLabel="File menu",this.menuTriggerLabel="Open file menu",this.printButtonEnabled=!0,this.printButtonLabel="Print PDF",this.sideBySideButtonLabel="Toggle side by side view",this.thumbnailButtonLabel="Scroll to page",this.thumbnailsButtonLabel="Toggle thumbnails",this.thumbnailsLabel="Page thumbnails",this.zoomInButtonLabel="Zoom in",this.zoomOutButtonLabel="Zoom out",this.zoomSelectLabel="Select zoom",this.skipNativeDownload=!1,this.active=!1,this.closing=!1,this.opening=!1,this.downloading=!1,this.loadingThumbnails=!1,this.thumbnails=[],this.viewMode="single",this.visiblePages=[],this.desktopZoomSteps=[.5,.75,1,1.25,1.5,2,3,4],this.mobileZoomSteps=[.5,.75,1,1.25,1.5],this.onClose=()=>{this.closing=!1,this.active=!1,this.modalClose.emit()},this.toggleViewMode=()=>{this.viewMode="single"===this.viewMode?"side-by-side":"single"},this.toggleThumbnals=()=>{this.showThumbnails=!this.showThumbnails},this.onKeyDown=e=>{"Escape"===e.code&&(e.stopImmediatePropagation(),e.preventDefault(),this.close())},this.onActivate=async e=>{this.pdfViewer=e.detail,this.lockBodyScroll()},this.onVisiblePagesChange=async e=>{this.visiblePages=e.detail},this.onCloseButtonClick=()=>{this.close()},this.onPrintButtonClick=()=>{this.pdfViewer.print(),this.menu.close()},this.onDownloadButtonClick=async()=>{this.downloading=!0,await this.viewer.download(),this.downloading=!1,this.menu.close()},this.onZoomInButtonClick=()=>{const e=this.zoomSteps.indexOf(+this.zoom);this.zoom=-1===e?1:this.zoomSteps[Math.min(this.zoomSteps.length-1,e+1)]},this.onZoomOutButtonClick=()=>{const e=this.zoomSteps.indexOf(+this.zoom);this.zoom=-1===e?1:this.zoomSteps[Math.max(0,e-1)]},this.onZoomAutoButtonClick=()=>{this.zoom="auto"===this.zoom?1:"auto"},this.onZoomChange=e=>{const a=e.target.value;this.zoom="auto"===a?a:+a},this.onThumbnailClick=e=>()=>{const a=r(this.el,`[data-page-number="${e+1}"]`)?.[0];a?.scrollIntoView()}}componentWillLoad(){this.updateZoomSteps(),this.zoom=o()?"auto":1}componentDidLoad(){this.ensureOpening(),this.setDialogCustomProps()}disconnectedCallback(){this.unlockBodyScroll(),this.modalEl?.open&&this.modalEl.close()}ensureOpening(){this.opening&&!this.modalEl?.open&&this.open()}setDialogCustomProps(){this.modalEl.setAttribute("closedby","none")}onWindowResize(){Boolean(this.pdfViewer)&&(this.updateZoomSteps(),this.zoom=o()?"auto":1)}watchShowThumbnails(){this.showThumbnails&&(this.loadingThumbnails=!0,queueMicrotask((async()=>{await this.generateThumbnails(),this.loadingThumbnails=!1})))}async open(){this.opening=!0,this.modalEl&&(this.modalEl.showModal(),this.active=!0,this.modalOpen.emit())}async close(){this.closing||(this.closing=!0,this.unlockBodyScroll(),setTimeout((()=>{this.modalEl.close()}),150))}lockBodyScroll(){const e=this.pdfViewer?.shadowRoot.querySelector(".file-viewer-pdf__pages");Boolean(e)&&n(e)}unlockBodyScroll(){const e=this.pdfViewer?.shadowRoot.querySelector(".file-viewer-pdf__pages");Boolean(e)&&l(e)}async generateThumbnails(){this.thumbnails=await this.pdfViewer.getThumbnails()}updateZoomSteps(){this.zoomSteps=o()?this.mobileZoomSteps:this.desktopZoomSteps}render(){const e=Boolean(this.el.querySelector("[slot='menu-items']"))||this.printButtonEnabled||this.downloadButtonEnabled,a=d("pdf-reader",{"pdf-reader--closing":this.closing,"pdf-reader--hide-menu":!e,"pdf-reader--show-thumbnails":this.showThumbnails});return i(t,{key:"1006cf013e2d4ea0d4039759427ec9bf10676df9"},i("dialog",{key:"2f974b2edf927568ad017dcf6481c97630e8bb06","aria-label":this.label,class:a,id:"pdf-reader",onClose:this.onClose,onKeyDown:this.onKeyDown,ref:e=>this.modalEl=e},i("div",{key:"fc19608ff71abb538741726510122241e5ce89b5",class:"pdf-reader__body",role:"document"},i("header",{key:"448bd7fe2e2e740ff120537f644f4c571fdfe768",class:"pdf-reader__header"},i("span",{key:"7b375193185d974bbd30a887216c9aabf61dd9dd",class:"pdf-reader__header-left"},i("swirl-button",{key:"f739b6312de673b4a48446b1bec7b7c09fe3db09",class:"pdf-reader__close-button",hideLabel:!0,icon:"<swirl-icon-close></swirl-icon-close>",label:this.closeButtonLabel,onClick:this.onCloseButtonClick}),i("span",{key:"ff39941114f27cb130cd807821ea4188ba0a8666",class:"pdf-reader__label"},this.label)),i("span",{key:"b583e2e83aed3e24d7926e053cd9f60471731bde",class:"pdf-reader__header-center"},i("span",{key:"eec4c412e09fede06c80f51bf4a290342e552a19",class:"pdf-reader__zoom-button-container"},i("swirl-button",{key:"a6fb91dc2f92be2c43eedee74a1a0a2031626b43",class:"pdf-reader__zoom-button",disabled:this.zoom===this.zoomSteps[0],hideLabel:!0,icon:"<swirl-icon-remove></swirl-icon-remove>",label:this.zoomOutButtonLabel,onClick:this.onZoomOutButtonClick}),i("swirl-button",{key:"2b509952ebb7e116eba38ce6e3ce62febab2dd38",class:"pdf-reader__zoom-button",disabled:this.zoom===this.zoomSteps[this.zoomSteps.length-1],hideLabel:!0,icon:"<swirl-icon-add></swirl-icon-add>",label:this.zoomInButtonLabel,onClick:this.onZoomInButtonClick})),i("span",{key:"270d99e8eae2cc6d09fbf4bbd0ae327b09b03498",class:"pdf-reader__zoom-select-container"},i("select",{key:"e17b921b9fb21d98bc22b4fcc7595912e4273088","aria-label":this.zoomSelectLabel,class:"pdf-reader__zoom-select",name:"zoom-select",id:"zoom-select",onChange:this.onZoomChange},i("option",{key:"9d4ea4f0988c9356facf8c7290e3a9c26ed55bf0",selected:"auto"===this.zoom,value:"auto"},this.autoZoomLabel),this.zoomSteps.map((e=>i("option",{key:e,selected:this.zoom===e,value:e},100*e,"%")))),i("swirl-icon-expand-more",{key:"61cca8c066b33c91efbdbbfe1b07d369c628e104",class:"pdf-reader__zoom-select-icon"}))),i("span",{key:"c2c4ed52895ed70746c39cda257870f3517dab96",class:"pdf-reader__header-right"},i("swirl-popover-trigger",{key:"0610f7e7ccdc93eb6819a01804538a96b9fe9568",swirlPopover:this.menu},i("swirl-button",{key:"e9fce0f1e6d6b72322b937e06e43d8054c038b5e",class:"pdf-reader__menu-button",hideLabel:!0,icon:"<swirl-icon-more-vertikal></swirl-icon-more-vertikal>",label:this.menuTriggerLabel}))),i("span",{key:"8016dd44bdfb34e290c7d9c09945f96814e844a1",class:"pdf-reader__floating-tools"},i("button",{key:"07d29479f07234c3581dc28a267c121d760af369","aria-label":this.sideBySideButtonLabel,class:"pdf-reader__floating-tool-button",onClick:this.toggleViewMode,type:"button"},i("swirl-icon-menu-book",{key:"f6c20782d1ad10dddfcc35c54826f93feb8cae1d"})),i("button",{key:"592e6c80ad9fe25e44f3d13e485e9b91e863940c","aria-controls":"thumbnails","aria-expanded":String(Boolean(this.showThumbnails)),"aria-label":this.thumbnailsButtonLabel,class:"pdf-reader__floating-tool-button",onClick:this.toggleThumbnals,type:"button"},i("swirl-icon-file-copy",{key:"66ceb450e978b743e7ecd50485fb58a4f2a6ac95"})))),i("div",{key:"ef0bcbcd10e61367d3f10e4c0c54d3a680f5262b",class:"pdf-reader__content"},i("nav",{key:"3b439496d8d2c4d2e081c9214e0151f4c56311f2","aria-label":this.thumbnailsLabel,class:"pdf-reader__thumbnails",id:"thumbnails"},this.loadingThumbnails&&i("swirl-spinner",{key:"5451c141691c773666d77c356c76a7a19fcf36c9"}),!this.loadingThumbnails&&this.thumbnails.map(((e,a)=>{const t=d("pdf-reader__thumbnail",{"pdf-reader__thumbnail--active":this.visiblePages[0]===a+1});return i("button",{"aria-label":`${this.thumbnailButtonLabel} ${a+1}`,class:t,onClick:this.onThumbnailClick(a),type:"button"},i("img",{src:e.toDataURL("image/png"),alt:""}))}))),i("swirl-file-viewer",{key:"66535291146aa772a541f3940957bea9a7ae86ff",active:this.active,class:"pdf-reader__viewer",disablePrint:!this.printButtonEnabled,file:this.file,fileName:this.fileName,onActivate:this.onActivate,onVisiblePagesChange:this.onVisiblePagesChange,pdfWorkerSrc:this.pdfWorkerSrc,ref:e=>this.viewer=e,type:"application/pdf",viewMode:this.viewMode,zoom:this.zoom,skipNativeDownload:this.skipNativeDownload}),i("div",{key:"b6d626c05b68d7c313ae497d0de253999b83dcbe",class:"pdf-reader__mobile-zoom-controls"},i("button",{key:"95ba19b5f85655ba1347f8763e4bed773bc2c6fd","aria-label":this.autoZoomLabel,class:"pdf-reader__mobile-zoom-button",onClick:this.onZoomAutoButtonClick,type:"button"},i("auto"===this.zoom?"swirl-icon-fullscreen-exit":"swirl-icon-fullscreen",null)),i("button",{key:"adb71904d16624aecb16b7407cdcecff6da47f97","aria-label":this.zoomInButtonLabel,class:"pdf-reader__mobile-zoom-button",disabled:this.zoom===this.zoomSteps[this.zoomSteps.length-1],onClick:this.onZoomInButtonClick,type:"button"},i("swirl-icon-add",{key:"fdede4558ac8b817faa03ca1da91269b6191d3ff"})),i("button",{key:"26b37f80c2b95831009146c4a668ceb831a7337e","aria-label":this.zoomOutButtonLabel,class:"pdf-reader__mobile-zoom-button",disabled:this.zoom===this.zoomSteps[0],onClick:this.onZoomOutButtonClick,type:"button"},i("swirl-icon-remove",{key:"92c7b9028dbccf022c1d67ef71404cddaea1868e"}))))),i("swirl-popover",{key:"0ea60a378df42b172f325bb95227f2fdc144af3c",animation:"scale-in-y",disableScrollLock:!0,id:"menu",label:this.menuLabel,placement:"bottom-end",ref:e=>this.menu=e},i("swirl-stack",{key:"3aaa4d0b54e8fdc567cc78d10174d10e0ef5b4fe"},i("div",{key:"0f9c71cef2600350e9061bd49b3634e396fa476a",class:"pdf-reader__meta"},i("div",{key:"9eabab28117f2f896f5f3864d09444829fadd8de",class:"pdf-reader__file-icon"},i("svg",{key:"e83129465659b5d984f9d8a61497f74aa6337353",fill:"none",height:"36",viewBox:"0 0 24 36",width:"24"},i("path",{key:"bd5bd8d5cf62aa3a2fec396976b2074fa7300ad4",d:"M7.01755 21.6V15.192H8.39455C8.64655 15.192 8.86855 15.225 9.06055 15.291C9.25255 15.357 9.42655 15.474 9.58255 15.642C9.73855 15.81 9.84655 16.008 9.90655 16.236C9.96655 16.458 9.99655 16.761 9.99655 17.145C9.99655 17.433 9.97855 17.676 9.94255 17.874C9.91255 18.072 9.84355 18.258 9.73555 18.432C9.60955 18.642 9.44155 18.807 9.23155 18.927C9.02155 19.041 8.74555 19.098 8.40355 19.098H7.93555V21.6H7.01755ZM7.93555 16.056V18.234H8.37655C8.56255 18.234 8.70655 18.207 8.80855 18.153C8.91055 18.099 8.98555 18.024 9.03355 17.928C9.08155 17.838 9.10855 17.727 9.11455 17.595C9.12655 17.463 9.13255 17.316 9.13255 17.154C9.13255 17.004 9.12955 16.863 9.12355 16.731C9.11755 16.593 9.09055 16.473 9.04255 16.371C8.99455 16.269 8.92255 16.191 8.82655 16.137C8.73055 16.083 8.59255 16.056 8.41255 16.056H7.93555Z",fill:"white"}),i("path",{key:"1081f059bad7868b83faf26dba3b0ab6fecfca84",d:"M10.6826 21.6V15.192H12.0416C12.5696 15.192 12.9686 15.336 13.2386 15.624C13.5146 15.912 13.6526 16.32 13.6526 16.848V19.845C13.6526 20.445 13.5056 20.889 13.2116 21.177C12.9236 21.459 12.5066 21.6 11.9606 21.6H10.6826ZM11.6006 16.056V20.736H12.0236C12.2816 20.736 12.4646 20.673 12.5726 20.547C12.6806 20.415 12.7346 20.211 12.7346 19.935V16.848C12.7346 16.596 12.6836 16.401 12.5816 16.263C12.4796 16.125 12.2936 16.056 12.0236 16.056H11.6006Z",fill:"white"}),i("path",{key:"1eb59f58297b80c98e061242744f1c3e9e4c00a6",d:"M14.5146 21.6V15.192H17.2506V16.056H15.4326V18H17.0166V18.864H15.4326V21.6H14.5146Z",fill:"white"}),i("path",{key:"885999ec5b575d64a47e1538fadd37cb3f0cbbab",d:"M3.59961 9.00001C3.59961 8.0059 4.4055 7.20001 5.39961 7.20001H14.854C15.3314 7.20001 15.7893 7.38965 16.1268 7.72722L19.8724 11.4728C20.21 11.8104 20.3996 12.2682 20.3996 12.7456V27C20.3996 27.9941 19.5937 28.8 18.5996 28.8H5.39961C4.4055 28.8 3.59961 27.9941 3.59961 27V9.00001Z",fill:"#FF574D"}),i("path",{key:"a93aa4e0e10c1d0b7398d2ef04df8075f8b708ab",d:"M15.5996 7.36166V10.2C15.5996 11.1941 16.4055 12 17.3996 12H20.2379C20.3237 12.1884 20.3768 12.3913 20.3937 12.6H17.3996C16.0785 12.6 15.0067 11.5325 14.9996 10.213L14.9996 7.20587C15.2083 7.2228 15.4112 7.27593 15.5996 7.36166Z",fill:"white"}),i("path",{key:"985fc4b8aac8910c1c7b094af0edff8f279b9ac9",d:"M7.01755 21.6V15.192H8.39455C8.64655 15.192 8.86855 15.225 9.06055 15.291C9.25255 15.357 9.42655 15.474 9.58255 15.642C9.73855 15.81 9.84655 16.008 9.90655 16.236C9.96655 16.458 9.99655 16.761 9.99655 17.145C9.99655 17.433 9.97855 17.676 9.94255 17.874C9.91255 18.072 9.84355 18.258 9.73555 18.432C9.60955 18.642 9.44155 18.807 9.23155 18.927C9.02155 19.041 8.74555 19.098 8.40355 19.098H7.93555V21.6H7.01755ZM7.93555 16.056V18.234H8.37655C8.56255 18.234 8.70655 18.207 8.80855 18.153C8.91055 18.099 8.98555 18.024 9.03355 17.928C9.08155 17.838 9.10855 17.727 9.11455 17.595C9.12655 17.463 9.13255 17.316 9.13255 17.154C9.13255 17.004 9.12955 16.863 9.12355 16.731C9.11755 16.593 9.09055 16.473 9.04255 16.371C8.99455 16.269 8.92255 16.191 8.82655 16.137C8.73055 16.083 8.59255 16.056 8.41255 16.056H7.93555Z",fill:"white"}),i("path",{key:"1df79fede333427403e30c12a6ca79fba836514e",d:"M10.6826 21.6V15.192H12.0416C12.5696 15.192 12.9686 15.336 13.2386 15.624C13.5146 15.912 13.6526 16.32 13.6526 16.848V19.845C13.6526 20.445 13.5056 20.889 13.2116 21.177C12.9236 21.459 12.5066 21.6 11.9606 21.6H10.6826ZM11.6006 16.056V20.736H12.0236C12.2816 20.736 12.4646 20.673 12.5726 20.547C12.6806 20.415 12.7346 20.211 12.7346 19.935V16.848C12.7346 16.596 12.6836 16.401 12.5816 16.263C12.4796 16.125 12.2936 16.056 12.0236 16.056H11.6006Z",fill:"white"}),i("path",{key:"5a39a161e7c4412f92f467f2fd9ec690faff9413",d:"M14.5146 21.6V15.192H17.2506V16.056H15.4326V18H17.0166V18.864H15.4326V21.6H14.5146Z",fill:"white"}))),i("div",{key:"2f5f4334e77c4567dd520a7f09e8ea41f35f83cf",class:"pdf-reader__file-info"},i("swirl-text",{key:"8449679b098dfe447857007efb066d28c7f71353",truncate:!0,weight:"semibold"},this.label),i("swirl-text",{key:"00a9d2c1177e9e5fca45b8076f4be41b5eba866f",color:"subdued",size:"sm",truncate:!0},this.fileTypeLabel))),e&&i("swirl-separator",{key:"22fb40b7ab65544159fa8ee1f1946fcb303e058b"}),i("swirl-action-list",{key:"d401e8a70da461db822df8d59d58d8820d0f200f",class:"pdf-reader__menu"},this.printButtonEnabled&&i("swirl-action-list-item",{key:"eadc5dfe58b655f0ce24af9444c5f0b13eb9f7f6",class:"pdf-reader__print-button",icon:"<swirl-icon-print></swirl-icon-print>",label:this.printButtonLabel,onClick:this.onPrintButtonClick}),this.downloadButtonEnabled&&i("swirl-action-list-item",{key:"0bf20d0697871767e42b0955484a539c9fa9b6d8",class:"pdf-reader__download-button",disabled:this.downloading,icon:this.downloading?'<swirl-spinner size="xs"></swirl-spinner>':"<swirl-icon-download></swirl-icon-download>",label:this.downloadButtonLabel,onClick:this.onDownloadButtonClick}),i("slot",{key:"111b290104d56c2aec6d508fba63a104885ebfb7",name:"menu-items"}))))))}get el(){return s(this)}static get watchers(){return{showThumbnails:[{watchShowThumbnails:0}]}}};c.style=':host{--thumbnails-width:7rem;display:block}:host *{box-sizing:border-box}.pdf-reader{position:fixed;z-index:var(--s-z-40);background-color:var(--s-surface-neutral-subdued);inset:0;touch-action:pan-x pan-y;border:none;padding:0;width:100%;height:100%;max-width:none;max-height:none;overflow:visible}.pdf-reader::backdrop{display:none}.pdf-reader:not([open]){display:none}.pdf-reader:not(.pdf-reader--closing) .pdf-reader__body{animation:0.15s pdf-reader-fade-in}@media (prefers-reduced-motion){.pdf-reader:not(.pdf-reader--closing) .pdf-reader__body{animation:none}}.pdf-reader--closing{animation:0.15s pdf-reader-fade-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.pdf-reader--closing{animation:none}}.pdf-reader--show-thumbnails .pdf-reader__thumbnails{max-width:var(--thumbnails-width)}.pdf-reader--show-thumbnails .pdf-reader__floating-tools{left:calc(var(--s-space-16) + var(--thumbnails-width))}.pdf-reader--hide-menu .pdf-reader__menu{display:none}.pdf-reader__body{position:relative;width:100%;height:100%}.pdf-reader__header{display:flex;height:calc(4rem + env(safe-area-inset-top, 0));padding-top:env(safe-area-inset-top, 0);padding-right:var(--s-space-16);padding-left:var(--s-space-16);align-items:center;border-bottom:var(--s-border-width-default) solid var(--s-border-default);background-color:var(--s-background-default);gap:var(--s-space-8)}.pdf-reader__header-left,.pdf-reader__header-right{display:flex;flex-grow:1;align-items:center;gap:var(--s-space-8);min-width:0}@media (min-width: 768px){.pdf-reader__header-left,.pdf-reader__header-right{flex-basis:calc(100 / 3 * 1%);flex-grow:0}}.pdf-reader__header-right{justify-content:flex-end;flex-shrink:0}.pdf-reader__header-center{display:none;flex-grow:1;justify-content:center;align-items:center;gap:var(--s-space-16)}@media (min-width: 768px){.pdf-reader__header-center{display:flex}}.pdf-reader__label{overflow:hidden;flex-grow:1;font-weight:var(--s-font-weight-semibold);white-space:nowrap;text-overflow:ellipsis}.pdf-reader__zoom-button-container{display:flex;align-items:center;gap:var(--s-space-8)}.pdf-reader__zoom-button-container>*:not(:last-child){position:relative}.pdf-reader__zoom-button-container>*:not(:last-child):after{position:absolute;top:50%;right:calc(-1 * var(--s-space-4));width:var(--s-border-width-default);height:1.5rem;background-color:var(--s-border-default);content:"";transform:translate3d(50%, -50%, 0)}.pdf-reader__zoom-select-container{position:relative}.pdf-reader__zoom-select{display:inline-flex;height:2.5rem;padding-right:var(--s-space-12);padding-right:calc(var(--s-space-8) + 1.5rem + var(--s-space-12));padding-left:var(--s-space-12);justify-content:flex-start;align-items:center;border:var(--s-border-width-default) solid var(--s-border-default);border-radius:var(--s-border-radius-sm);color:var(--s-interactive-neutral-default);background-color:transparent;font:inherit;font-weight:var(--s-font-weight-medium);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pdf-reader__zoom-select:focus:not(:focus-visible){outline:none}.pdf-reader__zoom-select:focus-visible{outline-color:var(--s-focus-default)}.pdf-reader__zoom-select-icon{position:absolute;top:50%;right:var(--s-space-8);display:inline-flex;transform:translateY(-50%);pointer-events:none}.pdf-reader__content{display:flex;width:100%;height:calc(100% - 4rem)}.pdf-reader__thumbnails{display:flex;overflow-x:hidden;overflow-y:auto;max-width:0;height:100%;padding-top:var(--s-space-16);padding-bottom:var(--s-space-16);flex-basis:var(--thumbnails-width);flex-grow:0;flex-shrink:0;align-items:center;background-color:var(--s-background-default);flex-direction:column;transition:max-width 0.2s linear;box-shadow:inset calc(-1 * var(--s-border-width-default)) 0 0 0 var(--s-border-default);gap:var(--s-space-4)}.pdf-reader__thumbnail{width:5rem;margin:0;padding:0;border:var(--s-border-width-default) solid var(--s-border-default);background-color:transparent;cursor:pointer}.pdf-reader__thumbnail>img{display:inline-flex;width:100%}.pdf-reader__thumbnail--active{border-width:0.125rem;border-color:var(--s-border-highlight)}.pdf-reader__viewer{flex-grow:1}.pdf-reader__mobile-zoom-controls{position:absolute;z-index:1;right:var(--s-space-16);bottom:var(--s-space-32);display:flex;padding-bottom:var(--s-space-4);flex-direction:column;gap:var(--s-space-8)}@media (min-width: 768px){.pdf-reader__mobile-zoom-controls{display:none}}.pdf-reader__mobile-zoom-button{display:inline-flex;width:2.5rem;height:2.5rem;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-on-image);background-color:rgba(0, 0, 0, 0.6);cursor:pointer;transition:opacity 0.15s;pointer-events:auto}.pdf-reader__mobile-zoom-button:disabled{cursor:default}.pdf-reader__floating-tools{position:fixed;z-index:1;bottom:var(--s-space-16);left:var(--s-space-16);display:none;flex-direction:column;transition:left 0.2s linear;gap:var(--s-space-12)}@media (min-width: 768px){.pdf-reader__floating-tools{display:flex}}.pdf-reader__floating-tool-button{display:inline-flex;width:2.5rem;height:2.5rem;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-on-image);background-color:rgba(0, 0, 0, 0.6);cursor:pointer}.pdf-reader__meta{display:flex;padding-top:var(--s-space-4);padding-right:var(--s-space-16);padding-bottom:var(--s-space-4);padding-left:var(--s-space-8);align-items:center;gap:var(--s-space-12)}@media (min-width: 768px){.pdf-reader__meta{max-width:18rem}}.pdf-reader__file-icon{display:inline-flex;padding-left:var(--s-space-4);flex-shrink:0}.pdf-reader__file-info{display:flex;min-width:0;flex-grow:1;flex-direction:column}@keyframes pdf-reader-fade-in{from{opacity:0}to{opacity:1}}@keyframes pdf-reader-fade-out{from{opacity:1}to{opacity:0}}';export{c as swirl_pdf_reader}
1
+ import{r as e,c as a,h as i,a as t,d as s}from"./p-Dz56lJ37.js";import{c as d}from"./p-orsBiyT_.js";import{q as r,i as o}from"./p-D23VxAsw.js";import{d as n,e as l}from"./p-BkJDOYVb.js";const c=class{constructor(i){e(this,i),this.modalClose=a(this,"modalClose",3),this.modalOpen=a(this,"modalOpen",3),this.autoZoomLabel="Full width",this.closeButtonLabel="Close PDF viewer",this.downloadButtonEnabled=!0,this.downloadButtonLabel="Download PDF",this.fileTypeLabel="PDF Document",this.menuLabel="File menu",this.menuTriggerLabel="Open file menu",this.printButtonEnabled=!0,this.printButtonLabel="Print PDF",this.sideBySideButtonLabel="Toggle side by side view",this.thumbnailButtonLabel="Scroll to page",this.thumbnailsButtonLabel="Toggle thumbnails",this.thumbnailsLabel="Page thumbnails",this.zoomInButtonLabel="Zoom in",this.zoomOutButtonLabel="Zoom out",this.zoomSelectLabel="Select zoom",this.skipNativeDownload=!1,this.active=!1,this.closing=!1,this.opening=!1,this.downloading=!1,this.loadingThumbnails=!1,this.thumbnails=[],this.viewMode="single",this.visiblePages=[],this.desktopZoomSteps=[.5,.75,1,1.25,1.5,2,3,4],this.mobileZoomSteps=[.5,.75,1,1.25,1.5],this.onClose=()=>{this.closing=!1,this.active=!1,this.modalClose.emit()},this.toggleViewMode=()=>{this.viewMode="single"===this.viewMode?"side-by-side":"single"},this.toggleThumbnals=()=>{this.showThumbnails=!this.showThumbnails},this.onKeyDown=e=>{"Escape"===e.code&&(e.stopImmediatePropagation(),e.preventDefault(),this.close())},this.onActivate=async e=>{this.pdfViewer=e.detail,this.lockBodyScroll()},this.onVisiblePagesChange=async e=>{this.visiblePages=e.detail},this.onCloseButtonClick=()=>{this.close()},this.onPrintButtonClick=()=>{this.pdfViewer.print(),this.menu.close()},this.onDownloadButtonClick=async()=>{this.downloading=!0,await this.viewer.download(),this.downloading=!1,this.menu.close()},this.onZoomInButtonClick=()=>{const e=this.zoomSteps.indexOf(+this.zoom);this.zoom=-1===e?1:this.zoomSteps[Math.min(this.zoomSteps.length-1,e+1)]},this.onZoomOutButtonClick=()=>{const e=this.zoomSteps.indexOf(+this.zoom);this.zoom=-1===e?1:this.zoomSteps[Math.max(0,e-1)]},this.onZoomAutoButtonClick=()=>{this.zoom="auto"===this.zoom?1:"auto"},this.onZoomChange=e=>{const a=e.target.value;this.zoom="auto"===a?a:+a},this.onThumbnailClick=e=>()=>{const a=r(this.el,`[data-page-number="${e+1}"]`)?.[0];a?.scrollIntoView()}}componentWillLoad(){this.updateZoomSteps(),this.zoom=o()?"auto":1}componentDidLoad(){this.ensureOpening(),this.setDialogCustomProps()}disconnectedCallback(){this.unlockBodyScroll(),this.modalEl?.open&&this.modalEl.close()}ensureOpening(){this.opening&&!this.modalEl?.open&&this.open()}setDialogCustomProps(){this.modalEl.setAttribute("closedby","none")}onWindowResize(){Boolean(this.pdfViewer)&&(this.updateZoomSteps(),this.zoom=o()?"auto":1)}watchShowThumbnails(){this.showThumbnails&&(this.loadingThumbnails=!0,queueMicrotask((async()=>{await this.generateThumbnails(),this.loadingThumbnails=!1})))}async open(){this.opening=!0,this.modalEl&&(this.modalEl.showModal(),this.active=!0,this.modalOpen.emit())}async close(){this.closing||(this.closing=!0,this.unlockBodyScroll(),setTimeout((()=>{this.modalEl.close()}),150))}lockBodyScroll(){const e=this.pdfViewer?.shadowRoot.querySelector(".file-viewer-pdf__pages");Boolean(e)&&n(e)}unlockBodyScroll(){const e=this.pdfViewer?.shadowRoot.querySelector(".file-viewer-pdf__pages");Boolean(e)&&l(e)}async generateThumbnails(){this.thumbnails=await this.pdfViewer.getThumbnails()}updateZoomSteps(){this.zoomSteps=o()?this.mobileZoomSteps:this.desktopZoomSteps}render(){const e=Boolean(this.el.querySelector("[slot='menu-items']"))||this.printButtonEnabled||this.downloadButtonEnabled,a=d("pdf-reader",{"pdf-reader--closing":this.closing,"pdf-reader--hide-menu":!e,"pdf-reader--show-thumbnails":this.showThumbnails});return i(t,{key:"1006cf013e2d4ea0d4039759427ec9bf10676df9"},i("dialog",{key:"2f974b2edf927568ad017dcf6481c97630e8bb06","aria-label":this.label,class:a,id:"pdf-reader",onClose:this.onClose,onKeyDown:this.onKeyDown,ref:e=>this.modalEl=e},i("div",{key:"fc19608ff71abb538741726510122241e5ce89b5",class:"pdf-reader__body",role:"document"},i("header",{key:"448bd7fe2e2e740ff120537f644f4c571fdfe768",class:"pdf-reader__header"},i("span",{key:"7b375193185d974bbd30a887216c9aabf61dd9dd",class:"pdf-reader__header-left"},i("swirl-button",{key:"f739b6312de673b4a48446b1bec7b7c09fe3db09",class:"pdf-reader__close-button",hideLabel:!0,icon:"<swirl-icon-close></swirl-icon-close>",label:this.closeButtonLabel,onClick:this.onCloseButtonClick}),i("span",{key:"ff39941114f27cb130cd807821ea4188ba0a8666",class:"pdf-reader__label"},this.label)),i("span",{key:"b583e2e83aed3e24d7926e053cd9f60471731bde",class:"pdf-reader__header-center"},i("span",{key:"eec4c412e09fede06c80f51bf4a290342e552a19",class:"pdf-reader__zoom-button-container"},i("swirl-button",{key:"a6fb91dc2f92be2c43eedee74a1a0a2031626b43",class:"pdf-reader__zoom-button",disabled:this.zoom===this.zoomSteps[0],hideLabel:!0,icon:"<swirl-icon-remove></swirl-icon-remove>",label:this.zoomOutButtonLabel,onClick:this.onZoomOutButtonClick}),i("swirl-button",{key:"2b509952ebb7e116eba38ce6e3ce62febab2dd38",class:"pdf-reader__zoom-button",disabled:this.zoom===this.zoomSteps[this.zoomSteps.length-1],hideLabel:!0,icon:"<swirl-icon-add></swirl-icon-add>",label:this.zoomInButtonLabel,onClick:this.onZoomInButtonClick})),i("span",{key:"270d99e8eae2cc6d09fbf4bbd0ae327b09b03498",class:"pdf-reader__zoom-select-container"},i("select",{key:"e17b921b9fb21d98bc22b4fcc7595912e4273088","aria-label":this.zoomSelectLabel,class:"pdf-reader__zoom-select",name:"zoom-select",id:"zoom-select",onChange:this.onZoomChange},i("option",{key:"9d4ea4f0988c9356facf8c7290e3a9c26ed55bf0",selected:"auto"===this.zoom,value:"auto"},this.autoZoomLabel),this.zoomSteps.map((e=>i("option",{key:e,selected:this.zoom===e,value:e},100*e,"%")))),i("swirl-icon-expand-more",{key:"61cca8c066b33c91efbdbbfe1b07d369c628e104",class:"pdf-reader__zoom-select-icon"}))),i("span",{key:"c2c4ed52895ed70746c39cda257870f3517dab96",class:"pdf-reader__header-right"},i("swirl-popover-trigger",{key:"0610f7e7ccdc93eb6819a01804538a96b9fe9568",swirlPopover:this.menu},i("swirl-button",{key:"e9fce0f1e6d6b72322b937e06e43d8054c038b5e",class:"pdf-reader__menu-button",hideLabel:!0,icon:"<swirl-icon-more-vertikal></swirl-icon-more-vertikal>",label:this.menuTriggerLabel}))),i("span",{key:"8016dd44bdfb34e290c7d9c09945f96814e844a1",class:"pdf-reader__floating-tools"},i("button",{key:"07d29479f07234c3581dc28a267c121d760af369","aria-label":this.sideBySideButtonLabel,class:"pdf-reader__floating-tool-button",onClick:this.toggleViewMode,type:"button"},i("swirl-icon-menu-book",{key:"f6c20782d1ad10dddfcc35c54826f93feb8cae1d"})),i("button",{key:"592e6c80ad9fe25e44f3d13e485e9b91e863940c","aria-controls":"thumbnails","aria-expanded":String(Boolean(this.showThumbnails)),"aria-label":this.thumbnailsButtonLabel,class:"pdf-reader__floating-tool-button",onClick:this.toggleThumbnals,type:"button"},i("swirl-icon-file-copy",{key:"66ceb450e978b743e7ecd50485fb58a4f2a6ac95"})))),i("div",{key:"ef0bcbcd10e61367d3f10e4c0c54d3a680f5262b",class:"pdf-reader__content"},i("nav",{key:"3b439496d8d2c4d2e081c9214e0151f4c56311f2","aria-label":this.thumbnailsLabel,class:"pdf-reader__thumbnails",id:"thumbnails"},this.loadingThumbnails&&i("swirl-spinner",{key:"5451c141691c773666d77c356c76a7a19fcf36c9"}),!this.loadingThumbnails&&this.thumbnails.map(((e,a)=>{const t=d("pdf-reader__thumbnail",{"pdf-reader__thumbnail--active":this.visiblePages[0]===a+1});return i("button",{"aria-label":`${this.thumbnailButtonLabel} ${a+1}`,class:t,onClick:this.onThumbnailClick(a),type:"button"},i("img",{src:e.toDataURL("image/png"),alt:""}))}))),i("swirl-file-viewer",{key:"66535291146aa772a541f3940957bea9a7ae86ff",active:this.active,class:"pdf-reader__viewer",disablePrint:!this.printButtonEnabled,file:this.file,fileName:this.fileName,onActivate:this.onActivate,onVisiblePagesChange:this.onVisiblePagesChange,pdfWorkerSrc:this.pdfWorkerSrc,ref:e=>this.viewer=e,type:"application/pdf",viewMode:this.viewMode,zoom:this.zoom,skipNativeDownload:this.skipNativeDownload}),i("div",{key:"b6d626c05b68d7c313ae497d0de253999b83dcbe",class:"pdf-reader__mobile-zoom-controls"},i("button",{key:"95ba19b5f85655ba1347f8763e4bed773bc2c6fd","aria-label":this.autoZoomLabel,class:"pdf-reader__mobile-zoom-button",onClick:this.onZoomAutoButtonClick,type:"button"},i("auto"===this.zoom?"swirl-icon-fullscreen-exit":"swirl-icon-fullscreen",null)),i("button",{key:"adb71904d16624aecb16b7407cdcecff6da47f97","aria-label":this.zoomInButtonLabel,class:"pdf-reader__mobile-zoom-button",disabled:this.zoom===this.zoomSteps[this.zoomSteps.length-1],onClick:this.onZoomInButtonClick,type:"button"},i("swirl-icon-add",{key:"fdede4558ac8b817faa03ca1da91269b6191d3ff"})),i("button",{key:"26b37f80c2b95831009146c4a668ceb831a7337e","aria-label":this.zoomOutButtonLabel,class:"pdf-reader__mobile-zoom-button",disabled:this.zoom===this.zoomSteps[0],onClick:this.onZoomOutButtonClick,type:"button"},i("swirl-icon-remove",{key:"92c7b9028dbccf022c1d67ef71404cddaea1868e"}))))),i("swirl-popover",{key:"0ea60a378df42b172f325bb95227f2fdc144af3c",animation:"scale-in-y",disableScrollLock:!0,id:"menu",label:this.menuLabel,placement:"bottom-end",ref:e=>this.menu=e},i("swirl-stack",{key:"3aaa4d0b54e8fdc567cc78d10174d10e0ef5b4fe"},i("div",{key:"0f9c71cef2600350e9061bd49b3634e396fa476a",class:"pdf-reader__meta"},i("div",{key:"9eabab28117f2f896f5f3864d09444829fadd8de",class:"pdf-reader__file-icon"},i("svg",{key:"e83129465659b5d984f9d8a61497f74aa6337353",fill:"none",height:"36",viewBox:"0 0 24 36",width:"24"},i("path",{key:"bd5bd8d5cf62aa3a2fec396976b2074fa7300ad4",d:"M7.01755 21.6V15.192H8.39455C8.64655 15.192 8.86855 15.225 9.06055 15.291C9.25255 15.357 9.42655 15.474 9.58255 15.642C9.73855 15.81 9.84655 16.008 9.90655 16.236C9.96655 16.458 9.99655 16.761 9.99655 17.145C9.99655 17.433 9.97855 17.676 9.94255 17.874C9.91255 18.072 9.84355 18.258 9.73555 18.432C9.60955 18.642 9.44155 18.807 9.23155 18.927C9.02155 19.041 8.74555 19.098 8.40355 19.098H7.93555V21.6H7.01755ZM7.93555 16.056V18.234H8.37655C8.56255 18.234 8.70655 18.207 8.80855 18.153C8.91055 18.099 8.98555 18.024 9.03355 17.928C9.08155 17.838 9.10855 17.727 9.11455 17.595C9.12655 17.463 9.13255 17.316 9.13255 17.154C9.13255 17.004 9.12955 16.863 9.12355 16.731C9.11755 16.593 9.09055 16.473 9.04255 16.371C8.99455 16.269 8.92255 16.191 8.82655 16.137C8.73055 16.083 8.59255 16.056 8.41255 16.056H7.93555Z",fill:"white"}),i("path",{key:"1081f059bad7868b83faf26dba3b0ab6fecfca84",d:"M10.6826 21.6V15.192H12.0416C12.5696 15.192 12.9686 15.336 13.2386 15.624C13.5146 15.912 13.6526 16.32 13.6526 16.848V19.845C13.6526 20.445 13.5056 20.889 13.2116 21.177C12.9236 21.459 12.5066 21.6 11.9606 21.6H10.6826ZM11.6006 16.056V20.736H12.0236C12.2816 20.736 12.4646 20.673 12.5726 20.547C12.6806 20.415 12.7346 20.211 12.7346 19.935V16.848C12.7346 16.596 12.6836 16.401 12.5816 16.263C12.4796 16.125 12.2936 16.056 12.0236 16.056H11.6006Z",fill:"white"}),i("path",{key:"1eb59f58297b80c98e061242744f1c3e9e4c00a6",d:"M14.5146 21.6V15.192H17.2506V16.056H15.4326V18H17.0166V18.864H15.4326V21.6H14.5146Z",fill:"white"}),i("path",{key:"885999ec5b575d64a47e1538fadd37cb3f0cbbab",d:"M3.59961 9.00001C3.59961 8.0059 4.4055 7.20001 5.39961 7.20001H14.854C15.3314 7.20001 15.7893 7.38965 16.1268 7.72722L19.8724 11.4728C20.21 11.8104 20.3996 12.2682 20.3996 12.7456V27C20.3996 27.9941 19.5937 28.8 18.5996 28.8H5.39961C4.4055 28.8 3.59961 27.9941 3.59961 27V9.00001Z",fill:"#FF574D"}),i("path",{key:"a93aa4e0e10c1d0b7398d2ef04df8075f8b708ab",d:"M15.5996 7.36166V10.2C15.5996 11.1941 16.4055 12 17.3996 12H20.2379C20.3237 12.1884 20.3768 12.3913 20.3937 12.6H17.3996C16.0785 12.6 15.0067 11.5325 14.9996 10.213L14.9996 7.20587C15.2083 7.2228 15.4112 7.27593 15.5996 7.36166Z",fill:"white"}),i("path",{key:"985fc4b8aac8910c1c7b094af0edff8f279b9ac9",d:"M7.01755 21.6V15.192H8.39455C8.64655 15.192 8.86855 15.225 9.06055 15.291C9.25255 15.357 9.42655 15.474 9.58255 15.642C9.73855 15.81 9.84655 16.008 9.90655 16.236C9.96655 16.458 9.99655 16.761 9.99655 17.145C9.99655 17.433 9.97855 17.676 9.94255 17.874C9.91255 18.072 9.84355 18.258 9.73555 18.432C9.60955 18.642 9.44155 18.807 9.23155 18.927C9.02155 19.041 8.74555 19.098 8.40355 19.098H7.93555V21.6H7.01755ZM7.93555 16.056V18.234H8.37655C8.56255 18.234 8.70655 18.207 8.80855 18.153C8.91055 18.099 8.98555 18.024 9.03355 17.928C9.08155 17.838 9.10855 17.727 9.11455 17.595C9.12655 17.463 9.13255 17.316 9.13255 17.154C9.13255 17.004 9.12955 16.863 9.12355 16.731C9.11755 16.593 9.09055 16.473 9.04255 16.371C8.99455 16.269 8.92255 16.191 8.82655 16.137C8.73055 16.083 8.59255 16.056 8.41255 16.056H7.93555Z",fill:"white"}),i("path",{key:"1df79fede333427403e30c12a6ca79fba836514e",d:"M10.6826 21.6V15.192H12.0416C12.5696 15.192 12.9686 15.336 13.2386 15.624C13.5146 15.912 13.6526 16.32 13.6526 16.848V19.845C13.6526 20.445 13.5056 20.889 13.2116 21.177C12.9236 21.459 12.5066 21.6 11.9606 21.6H10.6826ZM11.6006 16.056V20.736H12.0236C12.2816 20.736 12.4646 20.673 12.5726 20.547C12.6806 20.415 12.7346 20.211 12.7346 19.935V16.848C12.7346 16.596 12.6836 16.401 12.5816 16.263C12.4796 16.125 12.2936 16.056 12.0236 16.056H11.6006Z",fill:"white"}),i("path",{key:"5a39a161e7c4412f92f467f2fd9ec690faff9413",d:"M14.5146 21.6V15.192H17.2506V16.056H15.4326V18H17.0166V18.864H15.4326V21.6H14.5146Z",fill:"white"}))),i("div",{key:"2f5f4334e77c4567dd520a7f09e8ea41f35f83cf",class:"pdf-reader__file-info"},i("swirl-text",{key:"8449679b098dfe447857007efb066d28c7f71353",truncate:!0,weight:"semibold"},this.label),i("swirl-text",{key:"00a9d2c1177e9e5fca45b8076f4be41b5eba866f",color:"subdued",size:"sm",truncate:!0},this.fileTypeLabel))),e&&i("swirl-separator",{key:"22fb40b7ab65544159fa8ee1f1946fcb303e058b"}),i("swirl-action-list",{key:"d401e8a70da461db822df8d59d58d8820d0f200f",class:"pdf-reader__menu"},this.printButtonEnabled&&i("swirl-action-list-item",{key:"eadc5dfe58b655f0ce24af9444c5f0b13eb9f7f6",class:"pdf-reader__print-button",icon:"<swirl-icon-print></swirl-icon-print>",label:this.printButtonLabel,onClick:this.onPrintButtonClick}),this.downloadButtonEnabled&&i("swirl-action-list-item",{key:"0bf20d0697871767e42b0955484a539c9fa9b6d8",class:"pdf-reader__download-button",disabled:this.downloading,icon:this.downloading?'<swirl-spinner size="xs"></swirl-spinner>':"<swirl-icon-download></swirl-icon-download>",label:this.downloadButtonLabel,onClick:this.onDownloadButtonClick}),i("slot",{key:"111b290104d56c2aec6d508fba63a104885ebfb7",name:"menu-items"}))))))}get el(){return s(this)}static get watchers(){return{showThumbnails:[{watchShowThumbnails:0}]}}};c.style=':host{--thumbnails-width:7rem;display:block}:host *{box-sizing:border-box}.pdf-reader{position:fixed;z-index:var(--s-z-40);background-color:var(--s-surface-neutral-subdued);inset:0;touch-action:pan-x pan-y;border:none;padding:0;width:100%;height:100%;max-width:none;max-height:none;overflow:visible}.pdf-reader::backdrop{display:none}.pdf-reader:not([open]){display:none}.pdf-reader:not(.pdf-reader--closing) .pdf-reader__body{animation:0.15s pdf-reader-fade-in}@media (prefers-reduced-motion){.pdf-reader:not(.pdf-reader--closing) .pdf-reader__body{animation:none}}.pdf-reader--closing{animation:0.15s pdf-reader-fade-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.pdf-reader--closing{animation:none}}.pdf-reader--show-thumbnails .pdf-reader__thumbnails{max-width:var(--thumbnails-width)}.pdf-reader--show-thumbnails .pdf-reader__floating-tools{left:calc(var(--s-space-16) + var(--thumbnails-width))}.pdf-reader--hide-menu .pdf-reader__menu{display:none}.pdf-reader__body{position:relative;width:100%;height:100%}.pdf-reader__header{display:flex;height:calc(4rem + env(safe-area-inset-top, 0));padding-top:env(safe-area-inset-top, 0);padding-right:var(--s-space-16);padding-left:var(--s-space-16);align-items:center;border-bottom:var(--s-border-width-default) solid var(--s-border-default);background-color:var(--s-background-default);gap:var(--s-space-8)}.pdf-reader__header-left,.pdf-reader__header-right{display:flex;flex-grow:1;align-items:center;gap:var(--s-space-8);min-width:0}@media (min-width: 768px){.pdf-reader__header-left,.pdf-reader__header-right{flex-basis:calc(100 / 3 * 1%);flex-grow:0}}.pdf-reader__header-right{justify-content:flex-end;flex-shrink:0}.pdf-reader__header-center{display:none;flex-grow:1;justify-content:center;align-items:center;gap:var(--s-space-16)}@media (min-width: 768px){.pdf-reader__header-center{display:flex}}.pdf-reader__label{overflow:hidden;flex-grow:1;font-weight:var(--s-font-weight-semibold);white-space:nowrap;text-overflow:ellipsis}.pdf-reader__zoom-button-container{display:flex;align-items:center;gap:var(--s-space-8)}.pdf-reader__zoom-button-container>*:not(:last-child){position:relative}.pdf-reader__zoom-button-container>*:not(:last-child):after{position:absolute;top:50%;right:calc(-1 * var(--s-space-4));width:var(--s-border-width-default);height:1.5rem;background-color:var(--s-border-default);content:"";transform:translate3d(50%, -50%, 0)}.pdf-reader__zoom-select-container{position:relative}.pdf-reader__zoom-select{display:inline-flex;height:2.5rem;padding-right:var(--s-space-12);padding-right:calc(var(--s-space-8) + 1.5rem + var(--s-space-12));padding-left:var(--s-space-12);justify-content:flex-start;align-items:center;border:var(--s-border-width-default) solid var(--s-border-default);border-radius:var(--s-border-radius-sm);color:var(--s-interactive-neutral-default);background-color:transparent;font:inherit;font-weight:var(--s-font-weight-medium);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pdf-reader__zoom-select:focus:not(:focus-visible){outline:none}.pdf-reader__zoom-select:focus-visible{outline-color:var(--s-focus-default)}.pdf-reader__zoom-select-icon{position:absolute;top:50%;right:var(--s-space-8);display:inline-flex;transform:translateY(-50%);pointer-events:none}.pdf-reader__content{display:flex;width:100%;height:calc(100% - 4rem)}.pdf-reader__thumbnails{display:flex;overflow-x:hidden;overflow-y:auto;max-width:0;height:100%;padding-top:var(--s-space-16);padding-bottom:var(--s-space-16);flex-basis:var(--thumbnails-width);flex-grow:0;flex-shrink:0;align-items:center;background-color:var(--s-background-default);flex-direction:column;transition:max-width 0.2s linear;box-shadow:inset calc(-1 * var(--s-border-width-default)) 0 0 0 var(--s-border-default);gap:var(--s-space-4)}.pdf-reader__thumbnail{width:5rem;margin:0;padding:0;border:var(--s-border-width-default) solid var(--s-border-default);background-color:transparent;cursor:pointer}.pdf-reader__thumbnail>img{display:inline-flex;width:100%}.pdf-reader__thumbnail--active{border-width:0.125rem;border-color:var(--s-border-highlight)}.pdf-reader__viewer{flex-grow:1}.pdf-reader__mobile-zoom-controls{position:absolute;z-index:1;right:var(--s-space-16);bottom:var(--s-space-32);display:flex;padding-bottom:var(--s-space-4);flex-direction:column;gap:var(--s-space-8)}@media (min-width: 768px){.pdf-reader__mobile-zoom-controls{display:none}}.pdf-reader__mobile-zoom-button{display:inline-flex;width:2.5rem;height:2.5rem;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-on-image);background-color:rgba(0, 0, 0, 0.6);cursor:pointer;transition:opacity 0.15s;pointer-events:auto}.pdf-reader__mobile-zoom-button:disabled{cursor:default}.pdf-reader__floating-tools{position:fixed;z-index:1;bottom:var(--s-space-16);left:var(--s-space-16);display:none;flex-direction:column;transition:left 0.2s linear;gap:var(--s-space-12)}@media (min-width: 768px){.pdf-reader__floating-tools{display:flex}}.pdf-reader__floating-tool-button{display:inline-flex;width:2.5rem;height:2.5rem;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-on-image);background-color:rgba(0, 0, 0, 0.6);cursor:pointer}.pdf-reader__meta{display:flex;padding-top:var(--s-space-4);padding-right:var(--s-space-16);padding-bottom:var(--s-space-4);padding-left:var(--s-space-8);align-items:center;gap:var(--s-space-12)}@media (min-width: 768px){.pdf-reader__meta{max-width:18rem}}.pdf-reader__file-icon{display:inline-flex;padding-left:var(--s-space-4);flex-shrink:0}.pdf-reader__file-info{display:flex;min-width:0;flex-grow:1;flex-direction:column}@keyframes pdf-reader-fade-in{from{opacity:0}to{opacity:1}}@keyframes pdf-reader-fade-out{from{opacity:1}to{opacity:0}}';export{c as swirl_pdf_reader}