@brightspot/ui 5.0.3-toggleable-fix.0 → 5.0.4-pre.20260624

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 (163) hide show
  1. package/dist/components/button-group/ButtonGroup.d.ts +14 -4
  2. package/dist/components/button-group/ButtonGroup.d.ts.map +1 -1
  3. package/dist/components/button-group/ButtonGroup.js +14 -4
  4. package/dist/components/button-group/ButtonGroup.js.map +1 -1
  5. package/dist/components/circular-progress/CircularProgress.js +2 -2
  6. package/dist/components/dropdown/DropdownItem.d.ts.map +1 -1
  7. package/dist/components/dropdown/DropdownItem.js +3 -4
  8. package/dist/components/dropdown/DropdownItem.js.map +1 -1
  9. package/dist/components/icon/Icon.d.ts.map +1 -1
  10. package/dist/components/icon/Icon.js +7 -4
  11. package/dist/components/icon/Icon.js.map +1 -1
  12. package/dist/components/linear-progress/LinearProgress.js +1 -1
  13. package/dist/components/tabs/Tab.js +1 -1
  14. package/dist/components/tabs/Tab.js.map +1 -1
  15. package/dist/components/upload/UploadItem.js +1 -1
  16. package/dist/components/upload/UploadItem.js.map +1 -1
  17. package/dist/components/widget/Widget.css +1 -1
  18. package/dist/components/widget/Widget.js +1 -1
  19. package/dist/custom-elements.json +2244 -2232
  20. package/dist/storybook/assets/{ActionBar.stories-CTrEOJBH.js → ActionBar.stories-cyX9vc6C.js} +1 -1
  21. package/dist/storybook/assets/{ActionItem.stories-Cm3zQeMa.js → ActionItem.stories-Bs-Kxp5J.js} +1 -1
  22. package/dist/storybook/assets/{Avatar.stories-DSltfj-_.js → Avatar.stories-B1Uee53f.js} +1 -1
  23. package/dist/storybook/assets/{AvatarGroup.stories-BjL-l4VH.js → AvatarGroup.stories-W2EtKQBu.js} +5 -5
  24. package/dist/storybook/assets/{Badge.stories-DLNO3rOl.js → Badge.stories-BotNIO18.js} +1 -1
  25. package/dist/storybook/assets/{Button-TUtCVpwY.js → Button-YTBnP55L.js} +1 -1
  26. package/dist/storybook/assets/{Button.stories-3HjoUoaq.js → Button.stories-B-X7_d_i.js} +1 -1
  27. package/dist/storybook/assets/{ButtonGroup.stories-GF1UFxbr.js → ButtonGroup.stories-BM-pxfK2.js} +48 -48
  28. package/dist/storybook/assets/{Celebrate.stories-KtFU9NEQ.js → Celebrate.stories-D9EJwzxo.js} +7 -7
  29. package/dist/storybook/assets/{Checkbox.stories-CDg2caKU.js → Checkbox.stories-f5VLVSw5.js} +1 -1
  30. package/dist/storybook/assets/{CircularProgress.stories-C0OdRoxU.js → CircularProgress.stories-BI9e372u.js} +1 -1
  31. package/dist/storybook/assets/{ClipboardMixin.stories-B6gIxMuH.js → ClipboardMixin.stories-CsyJDNxc.js} +2 -2
  32. package/dist/storybook/assets/{Color-6BZIO3FS-DDAuf4ms.js → Color-6BZIO3FS-ClVOLIJG.js} +1 -1
  33. package/dist/storybook/assets/{Colors.stories-tJVgPDrl.js → Colors.stories-hUYBvymM.js} +1 -1
  34. package/dist/storybook/assets/{CombinedEffects.stories-BwrWmInr.js → CombinedEffects.stories-DkokyKCS.js} +1 -1
  35. package/dist/storybook/assets/{ComponentStatesMixin-B9_GeVBN.js → ComponentStatesMixin-C4I_rtgt.js} +1 -1
  36. package/dist/storybook/assets/{ComponentStatesMixin.stories-BAn1JPCN.js → ComponentStatesMixin.stories-BeLCYevK.js} +3 -3
  37. package/dist/storybook/assets/{CopyToClipboard.stories-YgaScv3O.js → CopyToClipboard.stories-DN9oagz-.js} +1 -1
  38. package/dist/storybook/assets/{Debounce.stories-y-toLkyr.js → Debounce.stories-CtNQAJxO.js} +3 -3
  39. package/dist/storybook/assets/{DocsRenderer-LL677BLK-BUwAiHkt.js → DocsRenderer-LL677BLK-Bx1Fds2q.js} +3 -3
  40. package/dist/storybook/assets/{Dropdown.stories-DAVkpuM5.js → Dropdown.stories-B862-mco.js} +3 -3
  41. package/dist/storybook/assets/{EmptyState.stories-Buexv2C4.js → EmptyState.stories-Im3Vr4ZL.js} +15 -15
  42. package/dist/storybook/assets/{Events.stories-SjSVTFwA.js → Events.stories-B0tluV0t.js} +1 -1
  43. package/dist/storybook/assets/{Heading.stories-F7pp5AO4.js → Heading.stories-6CzGqAAc.js} +1 -1
  44. package/dist/storybook/assets/{HueRipple.stories-Dt-QniLc.js → HueRipple.stories-DaQiDn9K.js} +1 -1
  45. package/dist/storybook/assets/{Icon.stories-Cxknci9d.js → Icon.stories-CFkYO_7w.js} +7 -7
  46. package/dist/storybook/assets/{IconButton.stories-C7nbDmmd.js → IconButton.stories-DwBTqvTi.js} +1 -1
  47. package/dist/storybook/assets/{LinearProgress.stories-DgP2rsiS.js → LinearProgress.stories-Coxmgjmo.js} +1 -1
  48. package/dist/storybook/assets/{Pagination.stories-DbLKeykx.js → Pagination.stories-CYrKX5iI.js} +3 -3
  49. package/dist/storybook/assets/{Popover.stories-CbmWs7x-.js → Popover.stories-BkGiUOfu.js} +18 -18
  50. package/dist/storybook/assets/{ReadyMixin-BSMJuM5x.js → ReadyMixin-CP6tQ4FB.js} +1 -1
  51. package/dist/storybook/assets/{RovingTabindexMixin.stories-DPojZp67.js → RovingTabindexMixin.stories-CzkPw8Nl.js} +6 -6
  52. package/dist/storybook/assets/{Rtc.stories-BF7lM0fa.js → Rtc.stories-CVch488H.js} +1 -1
  53. package/dist/storybook/assets/{ScrollShadow.stories-DwVglPfj.js → ScrollShadow.stories-BGh-Irt7.js} +1 -1
  54. package/dist/storybook/assets/{Switch.stories-DjjlIvXU.js → Switch.stories-DPfP0QVK.js} +5 -5
  55. package/dist/storybook/assets/{Tab.stories-zUdDTEwX.js → Tab.stories-CBcuRcDB.js} +1 -1
  56. package/dist/storybook/assets/{Tabs.stories-yWCAVVnG.js → Tabs.stories-CDOBjYbs.js} +1 -1
  57. package/dist/storybook/assets/{Throttle.stories-BrcbOwZL.js → Throttle.stories-Bqyul0aW.js} +5 -5
  58. package/dist/storybook/assets/{Tooltip.stories-B4sykiPz.js → Tooltip.stories-B9dohX1h.js} +1 -1
  59. package/dist/storybook/assets/{Upload.stories-DHE43_Zz.js → Upload.stories-C7dq2Wdk.js} +1 -1
  60. package/dist/storybook/assets/{UploadItem.stories-jqjcXP_N.js → UploadItem.stories-35zsIKTv.js} +1 -1
  61. package/dist/storybook/assets/{Welcome.stories-C3rGMIU7.js → Welcome.stories-BuD3fpke.js} +1 -1
  62. package/dist/storybook/assets/{Widget.stories-D7rHrfAr.js → Widget.stories-D2UYzfyE.js} +12 -12
  63. package/dist/storybook/assets/{WithTooltip-65CFNBJE-CYrPgwaa.js → WithTooltip-65CFNBJE-DGiY8cz9.js} +1 -1
  64. package/dist/storybook/assets/{blocks-D8JszFZh.js → blocks-YjKl5E55.js} +5 -5
  65. package/dist/storybook/assets/{formatter-EIJCOSYU-CGZPdVNG.js → formatter-EIJCOSYU-XYAiuXAN.js} +1 -1
  66. package/dist/storybook/assets/if-defined-f_e-RnGa.js +1 -0
  67. package/dist/storybook/assets/{iframe-C3TUQi31.js → iframe-CufEXQ5F.js} +5 -5
  68. package/dist/storybook/assets/iframe-PeGbyIdX.css +1 -0
  69. package/dist/storybook/assets/{index-BZyp3DsT.js → index-DbEDIsEB.js} +1 -1
  70. package/dist/storybook/assets/{onFind-9HPhEfV5.js → onFind-C7Wi8jr6.js} +1 -1
  71. package/dist/storybook/assets/{onFind.stories-BvaTMiWN.js → onFind.stories-UpwJxFqR.js} +25 -25
  72. package/dist/storybook/assets/{onRemove.stories-BPSyS2GE.js → onRemove.stories-BMwQGBCl.js} +3 -3
  73. package/dist/storybook/assets/{onVisible.stories-1lKUeGbt.js → onVisible.stories-axSo0Zv3.js} +1 -1
  74. package/dist/storybook/assets/{style-map-ADugLljH.js → style-map-BkaK9546.js} +1 -1
  75. package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-CBLos5mJ.js → syntaxhighlighter-ED5Y7EFY-CDDZTVRn.js} +1 -1
  76. package/dist/storybook/iframe.html +2 -2
  77. package/dist/storybook/project.json +1 -1
  78. package/dist/tailwind-plugin-button-group.js +43 -44
  79. package/dist/tailwind-plugin-button-group.js.map +1 -1
  80. package/dist/tailwind-plugin-button-group.ts +43 -43
  81. package/dist/tailwind-plugin-button.js +22 -2
  82. package/dist/tailwind-plugin-button.js.map +1 -1
  83. package/dist/tailwind-plugin-button.ts +22 -2
  84. package/dist/tailwind-plugin-dropdown.js +6 -2
  85. package/dist/tailwind-plugin-dropdown.js.map +1 -1
  86. package/dist/tailwind-plugin-dropdown.ts +6 -2
  87. package/dist/tailwind-plugin-pagination.js +12 -8
  88. package/dist/tailwind-plugin-pagination.js.map +1 -1
  89. package/dist/tailwind-plugin-pagination.ts +12 -8
  90. package/dist/tailwind-plugin-upload.js +3 -2
  91. package/dist/tailwind-plugin-upload.js.map +1 -1
  92. package/dist/tailwind-plugin-upload.ts +3 -2
  93. package/dist/tailwind.config.d.ts +1 -4
  94. package/dist/tailwind.config.d.ts.map +1 -1
  95. package/dist/tailwind.config.js +74 -6
  96. package/dist/tailwind.config.js.map +1 -1
  97. package/dist/tailwind.config.ts +74 -6
  98. package/docs/components/ButtonGroup.md +15 -12
  99. package/package.json +5 -3
  100. package/src/legacy/tool-ui/src/AIInline.css +1 -1
  101. package/src/legacy/tool-ui/src/Admin.css +2 -2
  102. package/src/legacy/tool-ui/src/Base.css +1 -1
  103. package/src/legacy/tool-ui/src/BulkUpload.css +1 -1
  104. package/src/legacy/tool-ui/src/CIGCluster.css +1 -1
  105. package/src/legacy/tool-ui/src/Card.css +1 -1
  106. package/src/legacy/tool-ui/src/CodeMirror.css +4 -4
  107. package/src/legacy/tool-ui/src/ColorInputSpectrum.css +2 -2
  108. package/src/legacy/tool-ui/src/ComboInput.css +3 -3
  109. package/src/legacy/tool-ui/src/Compat.css +6 -4
  110. package/src/legacy/tool-ui/src/ContentEdit.css +12 -12
  111. package/src/legacy/tool-ui/src/ContentEditDrawer.css +6 -6
  112. package/src/legacy/tool-ui/src/ContentInputGroup.css +1 -1
  113. package/src/legacy/tool-ui/src/ContentReporting.css +2 -2
  114. package/src/legacy/tool-ui/src/ContentSelector.css +5 -5
  115. package/src/legacy/tool-ui/src/ContentSummary.css +1 -1
  116. package/src/legacy/tool-ui/src/ContentTemplatesWidget.css +1 -1
  117. package/src/legacy/tool-ui/src/ContentTools.css +1 -1
  118. package/src/legacy/tool-ui/src/Conversation.css +2 -2
  119. package/src/legacy/tool-ui/src/Crosslinker.css +3 -3
  120. package/src/legacy/tool-ui/src/DashboardWidget.css +1 -1
  121. package/src/legacy/tool-ui/src/Dialog.css +4 -2
  122. package/src/legacy/tool-ui/src/Diff.css +1 -1
  123. package/src/legacy/tool-ui/src/Dropdown.css +2 -2
  124. package/src/legacy/tool-ui/src/Enhancement.css +1 -1
  125. package/src/legacy/tool-ui/src/FileInput.css +2 -2
  126. package/src/legacy/tool-ui/src/FormFilter.css +3 -3
  127. package/src/legacy/tool-ui/src/FullscreenView.css +4 -4
  128. package/src/legacy/tool-ui/src/Guide.css +6 -6
  129. package/src/legacy/tool-ui/src/Hierarchy.css +4 -4
  130. package/src/legacy/tool-ui/src/ImageEditor.css +13 -13
  131. package/src/legacy/tool-ui/src/LinkCarousel.css +1 -1
  132. package/src/legacy/tool-ui/src/LiveBlog.css +2 -2
  133. package/src/legacy/tool-ui/src/LocationMap.css +1 -1
  134. package/src/legacy/tool-ui/src/MailPublishing.css +1 -1
  135. package/src/legacy/tool-ui/src/MenuView.css +4 -4
  136. package/src/legacy/tool-ui/src/Message.css +1 -1
  137. package/src/legacy/tool-ui/src/Page.css +35 -16
  138. package/src/legacy/tool-ui/src/Popup.css +8 -3
  139. package/src/legacy/tool-ui/src/ProseMirror.css +1 -1
  140. package/src/legacy/tool-ui/src/ProseMirrorContainer.css +1 -1
  141. package/src/legacy/tool-ui/src/ProseMirrorEnhancementMenu.css +2 -2
  142. package/src/legacy/tool-ui/src/ProseMirrorFindReplace.css +2 -2
  143. package/src/legacy/tool-ui/src/QueryField.css +1 -1
  144. package/src/legacy/tool-ui/src/RepeatableContentInputGroup.css +1 -1
  145. package/src/legacy/tool-ui/src/RepeatableContentSelector.css +1 -1
  146. package/src/legacy/tool-ui/src/RichText.css +1 -1
  147. package/src/legacy/tool-ui/src/SearchFields.css +3 -2
  148. package/src/legacy/tool-ui/src/SearchResult.css +3 -3
  149. package/src/legacy/tool-ui/src/SearchWidget.css +1 -1
  150. package/src/legacy/tool-ui/src/SearchWidgetAdvanced.css +1 -1
  151. package/src/legacy/tool-ui/src/StyleEmbeddedContent.css +3 -3
  152. package/src/legacy/tool-ui/src/TabBar.css +1 -1
  153. package/src/legacy/tool-ui/src/Table.css +1 -1
  154. package/src/legacy/tool-ui/src/Taxonomy.css +4 -4
  155. package/src/legacy/tool-ui/src/ThemeBundleEditor.css +1 -1
  156. package/src/legacy/tool-ui/src/TimedContent.css +2 -2
  157. package/src/legacy/tool-ui/src/ViewWatchers.css +1 -1
  158. package/src/legacy/tool-ui/src/Widget.css +1 -1
  159. package/src/legacy/tool-ui/src/Workflow.css +3 -3
  160. package/src/legacy/tool-ui/src/main/webapp/dist/v5.f60c05ef0c9b89aae888.css +5 -0
  161. package/dist/storybook/assets/if-defined-BkzXcv-a.js +0 -1
  162. package/dist/storybook/assets/iframe-D0roG0J-.css +0 -1
  163. package/src/legacy/tool-ui/src/main/webapp/dist/v5.d6cc2743243cadb90492.css +0 -5
@@ -1,4 +1,4 @@
1
- import{ah as v,ai as x,x as c,i as w}from"./iframe-C3TUQi31.js";import{t as E}from"./custom-element-UsVr97OX.js";import{o as T}from"./if-defined-BkzXcv-a.js";import{o as k}from"./style-map-ADugLljH.js";import{E as C,R as L}from"./ReadyMixin-BSMJuM5x.js";import"./preload-helper-PPVm8Dsz.js";const D={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:v},S=(o=D,i,l)=>{const{kind:t,metadata:e}=l;let s=globalThis.litPropertyMetadata.get(e);if(s===void 0&&globalThis.litPropertyMetadata.set(e,s=new Map),t==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(l.name,o),t==="accessor"){const{name:r}=l;return{set(n){const g=i.get.call(this);i.set.call(this,n),this.requestUpdate(r,g,o)},init(n){return n!==void 0&&this.C(r,void 0,o,n),n}}}if(t==="setter"){const{name:r}=l;return function(n){const g=this[r];i.call(this,n),this.requestUpdate(r,g,o)}}throw Error("Unsupported decorator location: "+t)};function p(o){return(i,l)=>typeof l=="object"?S(o,i,l):((t,e,s)=>{const r=e.hasOwnProperty(s);return e.constructor.createProperty(s,t),r?Object.getOwnPropertyDescriptor(e,s):void 0})(o,i,l)}var A=Object.defineProperty,a=(o,i,l,t)=>{for(var e=void 0,s=o.length-1,r;s>=0;s--)(r=o[s])&&(e=r(i,l,e)||e);return e&&A(i,l,e),e};const M={top:"btu-tooltip-top",bottom:"btu-tooltip-bottom",left:"btu-tooltip-left",right:"btu-tooltip-right"},_={sm:"btu-tooltip-offset-sm",md:"btu-tooltip-offset-md",lg:"btu-tooltip-offset-lg",xl:"btu-tooltip-offset-xl"},O=o=>{class i extends o{constructor(){super(...arguments),this.tooltip="",this.tooltipPosition="top",this.tooltipDelay=300,this.tooltipOffset=null,this.tooltipNoArrow=!1,this.tooltipTrigger="hover focus",this._tooltipEl=null,this._tooltipId=`btu-tooltip-${crypto.randomUUID()}`,this._anchorName=`--btu-trigger-${crypto.randomUUID()}`,this._showTimer=null,this._isVisible=!1,this._activeTriggers=new Set,this._onMouseEnter=this._handleMouseEnter.bind(this),this._onMouseLeave=this._handleMouseLeave.bind(this),this._onFocusIn=this._handleFocusIn.bind(this),this._onFocusOut=this._handleFocusOut.bind(this),this._onClick=this._handleClick.bind(this),this._onNativeToggle=this._handleNativeToggle.bind(this),this._onKeyDown=this._handleKeyDown.bind(this),this._onDocumentClick=null}connectedCallback(){super.connectedCallback(),this._bindTriggerListeners()}disconnectedCallback(){if(this._clearShowTimer(),this._removeDocumentClickListener(),this._unbindTriggerListeners(),this._tooltipEl){try{this._tooltipEl.hidePopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to hide tooltip during disconnect:",t)}this._tooltipEl.removeEventListener("toggle",this._onNativeToggle),this._tooltipEl.remove(),this._tooltipEl=null}this._removeAriaDescribedBy(),this.style.removeProperty("anchor-name"),this._isVisible=!1,super.disconnectedCallback()}updated(t){super.updated(t),t.has("tooltipTrigger")&&(this._unbindTriggerListeners(),this._bindTriggerListeners(),this._tooltipEl&&(this._isVisible&&this._hide(),this._tooltipEl.setAttribute("popover",this._getPopoverMode()))),(t.has("tooltip")||t.has("tooltipPosition")||t.has("tooltipDelay")||t.has("tooltipOffset")||t.has("tooltipNoArrow"))&&this._syncTooltipElement()}_getPopoverMode(){return"manual"}_syncTooltipElement(){if(!this.tooltip){this._tooltipEl&&(this._hide(),this._tooltipEl.removeEventListener("toggle",this._onNativeToggle),this._tooltipEl.remove(),this._tooltipEl=null,this._removeAriaDescribedBy(),this.style.removeProperty("anchor-name"),document.removeEventListener("keydown",this._onKeyDown));return}this.style.setProperty("anchor-name",this._anchorName),this._tooltipEl||(this._tooltipEl=this._createTooltipElement(),this.appendChild(this._tooltipEl),this._appendAriaDescribedBy(),document.addEventListener("keydown",this._onKeyDown)),this._tooltipEl.textContent=this.tooltip,this._tooltipEl.className=this._buildTooltipClasses()}_createTooltipElement(){const t=document.createElement("div");return t.id=this._tooltipId,t.className=this._buildTooltipClasses(),t.setAttribute("role","tooltip"),t.setAttribute("data-tooltip-internal",""),t.setAttribute("popover",this._getPopoverMode()),t.style.setProperty("position-anchor",this._anchorName),t.textContent=this.tooltip,t.addEventListener("toggle",this._onNativeToggle),t}_buildTooltipClasses(){const t=["btu-tooltip",M[this.tooltipPosition]];return this.tooltipOffset&&_[this.tooltipOffset]&&t.push(_[this.tooltipOffset]),this.tooltipNoArrow&&t.push("btu-tooltip-no-arrow"),t.join(" ")}_hasTrigger(t){return this._activeTriggers.has(t)}_bindTriggerListeners(){const t=new Set(["hover","focus","click"]);this._activeTriggers=new Set(this.tooltipTrigger.trim().split(/\s+/));for(const e of this._activeTriggers)t.has(e)||console.warn(`[btu-tooltip] Unrecognized tooltip-trigger value: "${e}". Valid values: hover, focus, click.`);this._hasTrigger("hover")&&(this.addEventListener("mouseenter",this._onMouseEnter),this.addEventListener("mouseleave",this._onMouseLeave)),this._hasTrigger("focus")&&(this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut)),this._hasTrigger("click")&&this.addEventListener("click",this._onClick)}_unbindTriggerListeners(){this.removeEventListener("mouseenter",this._onMouseEnter),this.removeEventListener("mouseleave",this._onMouseLeave),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut),this.removeEventListener("click",this._onClick),document.removeEventListener("keydown",this._onKeyDown)}_show(){if(!(this._isVisible||!this._tooltipEl)){try{this._tooltipEl.showPopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to show tooltip:",t)}this._hasTrigger("click")&&setTimeout(()=>{this._removeDocumentClickListener(),this._onDocumentClick=t=>{const e=t.composedPath();!e.includes(this)&&(!this._tooltipEl||!e.includes(this._tooltipEl))&&this._hide()},document.addEventListener("click",this._onDocumentClick)},0)}}_hide(){if(this._clearShowTimer(),this._removeDocumentClickListener(),!(!this._isVisible||!this._tooltipEl))try{this._tooltipEl.hidePopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to hide tooltip:",t)}}_removeDocumentClickListener(){this._onDocumentClick&&(document.removeEventListener("click",this._onDocumentClick),this._onDocumentClick=null)}_handleNativeToggle(t){const{newState:e}=t;this._isVisible=e==="open";const s=this._isVisible?"btu-tooltip-show":"btu-tooltip-hide",r=new CustomEvent(s,{bubbles:!0,composed:!0});this.dispatchEvent(r)}_handleKeyDown(t){t.key==="Escape"&&(this._clearShowTimer(),this._hide())}_clearShowTimer(){this._showTimer!==null&&(clearTimeout(this._showTimer),this._showTimer=null)}_handleMouseEnter(){this._clearShowTimer(),this._showTimer=setTimeout(()=>{this._show()},this.tooltipDelay)}_handleMouseLeave(){this._clearShowTimer(),this._hide()}_handleFocusIn(){this._clearShowTimer(),this._show()}_handleFocusOut(){this._clearShowTimer(),this._hide()}_handleClick(){this._clearShowTimer(),this._isVisible?this._hide():this._show()}_appendAriaDescribedBy(){const t=this.getAttribute("aria-describedby");t?t.includes(this._tooltipId)||this.setAttribute("aria-describedby",`${t} ${this._tooltipId}`):this.setAttribute("aria-describedby",this._tooltipId)}_removeAriaDescribedBy(){const t=this.getAttribute("aria-describedby");if(!t)return;const e=t.split(/\s+/).filter(s=>s!==this._tooltipId).join(" ").trim();e?this.setAttribute("aria-describedby",e):this.removeAttribute("aria-describedby")}}return a([p({attribute:"tooltip"})],i.prototype,"tooltip"),a([p({attribute:"tooltip-position"})],i.prototype,"tooltipPosition"),a([p({attribute:"tooltip-delay",type:Number})],i.prototype,"tooltipDelay"),a([p({attribute:"tooltip-offset"})],i.prototype,"tooltipOffset"),a([p({attribute:"tooltip-no-arrow",type:Boolean})],i.prototype,"tooltipNoArrow"),a([p({attribute:"tooltip-trigger"})],i.prototype,"tooltipTrigger"),i};var P=Object.defineProperty,$=Object.getOwnPropertyDescriptor,y=(o,i,l,t)=>{for(var e=t>1?void 0:t?$(i,l):i,s=o.length-1,r;s>=0;s--)(r=o[s])&&(e=(t?r(i,l,e):r(e))||e);return t&&e&&P(i,l,e),e};let b=class extends O(C(L(w))){constructor(){super(...arguments),this.label="Hover me",this.initialClasses=[]}connectedCallback(){super.connectedCallback(),this.className&&(this.initialClasses=this.className.split(" ").filter(o=>o.trim()))}createRenderRoot(){return this}willUpdate(){const o=[...this.initialClasses,"tooltip-demo"];this.className=o.filter(Boolean).join(" ")}render(){return c`${this.label}`}};y([p({type:String})],b.prototype,"label",2);b=y([E("tooltip-demo")],b);const f=`
1
+ import{ah as v,ai as x,x as c,i as w}from"./iframe-CufEXQ5F.js";import{t as E}from"./custom-element-UsVr97OX.js";import{o as T}from"./if-defined-f_e-RnGa.js";import{o as k}from"./style-map-BkaK9546.js";import{E as C,R as L}from"./ReadyMixin-CP6tQ4FB.js";import"./preload-helper-PPVm8Dsz.js";const D={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:v},S=(o=D,i,l)=>{const{kind:t,metadata:e}=l;let s=globalThis.litPropertyMetadata.get(e);if(s===void 0&&globalThis.litPropertyMetadata.set(e,s=new Map),t==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(l.name,o),t==="accessor"){const{name:r}=l;return{set(n){const g=i.get.call(this);i.set.call(this,n),this.requestUpdate(r,g,o)},init(n){return n!==void 0&&this.C(r,void 0,o,n),n}}}if(t==="setter"){const{name:r}=l;return function(n){const g=this[r];i.call(this,n),this.requestUpdate(r,g,o)}}throw Error("Unsupported decorator location: "+t)};function p(o){return(i,l)=>typeof l=="object"?S(o,i,l):((t,e,s)=>{const r=e.hasOwnProperty(s);return e.constructor.createProperty(s,t),r?Object.getOwnPropertyDescriptor(e,s):void 0})(o,i,l)}var A=Object.defineProperty,a=(o,i,l,t)=>{for(var e=void 0,s=o.length-1,r;s>=0;s--)(r=o[s])&&(e=r(i,l,e)||e);return e&&A(i,l,e),e};const M={top:"btu-tooltip-top",bottom:"btu-tooltip-bottom",left:"btu-tooltip-left",right:"btu-tooltip-right"},_={sm:"btu-tooltip-offset-sm",md:"btu-tooltip-offset-md",lg:"btu-tooltip-offset-lg",xl:"btu-tooltip-offset-xl"},O=o=>{class i extends o{constructor(){super(...arguments),this.tooltip="",this.tooltipPosition="top",this.tooltipDelay=300,this.tooltipOffset=null,this.tooltipNoArrow=!1,this.tooltipTrigger="hover focus",this._tooltipEl=null,this._tooltipId=`btu-tooltip-${crypto.randomUUID()}`,this._anchorName=`--btu-trigger-${crypto.randomUUID()}`,this._showTimer=null,this._isVisible=!1,this._activeTriggers=new Set,this._onMouseEnter=this._handleMouseEnter.bind(this),this._onMouseLeave=this._handleMouseLeave.bind(this),this._onFocusIn=this._handleFocusIn.bind(this),this._onFocusOut=this._handleFocusOut.bind(this),this._onClick=this._handleClick.bind(this),this._onNativeToggle=this._handleNativeToggle.bind(this),this._onKeyDown=this._handleKeyDown.bind(this),this._onDocumentClick=null}connectedCallback(){super.connectedCallback(),this._bindTriggerListeners()}disconnectedCallback(){if(this._clearShowTimer(),this._removeDocumentClickListener(),this._unbindTriggerListeners(),this._tooltipEl){try{this._tooltipEl.hidePopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to hide tooltip during disconnect:",t)}this._tooltipEl.removeEventListener("toggle",this._onNativeToggle),this._tooltipEl.remove(),this._tooltipEl=null}this._removeAriaDescribedBy(),this.style.removeProperty("anchor-name"),this._isVisible=!1,super.disconnectedCallback()}updated(t){super.updated(t),t.has("tooltipTrigger")&&(this._unbindTriggerListeners(),this._bindTriggerListeners(),this._tooltipEl&&(this._isVisible&&this._hide(),this._tooltipEl.setAttribute("popover",this._getPopoverMode()))),(t.has("tooltip")||t.has("tooltipPosition")||t.has("tooltipDelay")||t.has("tooltipOffset")||t.has("tooltipNoArrow"))&&this._syncTooltipElement()}_getPopoverMode(){return"manual"}_syncTooltipElement(){if(!this.tooltip){this._tooltipEl&&(this._hide(),this._tooltipEl.removeEventListener("toggle",this._onNativeToggle),this._tooltipEl.remove(),this._tooltipEl=null,this._removeAriaDescribedBy(),this.style.removeProperty("anchor-name"),document.removeEventListener("keydown",this._onKeyDown));return}this.style.setProperty("anchor-name",this._anchorName),this._tooltipEl||(this._tooltipEl=this._createTooltipElement(),this.appendChild(this._tooltipEl),this._appendAriaDescribedBy(),document.addEventListener("keydown",this._onKeyDown)),this._tooltipEl.textContent=this.tooltip,this._tooltipEl.className=this._buildTooltipClasses()}_createTooltipElement(){const t=document.createElement("div");return t.id=this._tooltipId,t.className=this._buildTooltipClasses(),t.setAttribute("role","tooltip"),t.setAttribute("data-tooltip-internal",""),t.setAttribute("popover",this._getPopoverMode()),t.style.setProperty("position-anchor",this._anchorName),t.textContent=this.tooltip,t.addEventListener("toggle",this._onNativeToggle),t}_buildTooltipClasses(){const t=["btu-tooltip",M[this.tooltipPosition]];return this.tooltipOffset&&_[this.tooltipOffset]&&t.push(_[this.tooltipOffset]),this.tooltipNoArrow&&t.push("btu-tooltip-no-arrow"),t.join(" ")}_hasTrigger(t){return this._activeTriggers.has(t)}_bindTriggerListeners(){const t=new Set(["hover","focus","click"]);this._activeTriggers=new Set(this.tooltipTrigger.trim().split(/\s+/));for(const e of this._activeTriggers)t.has(e)||console.warn(`[btu-tooltip] Unrecognized tooltip-trigger value: "${e}". Valid values: hover, focus, click.`);this._hasTrigger("hover")&&(this.addEventListener("mouseenter",this._onMouseEnter),this.addEventListener("mouseleave",this._onMouseLeave)),this._hasTrigger("focus")&&(this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut)),this._hasTrigger("click")&&this.addEventListener("click",this._onClick)}_unbindTriggerListeners(){this.removeEventListener("mouseenter",this._onMouseEnter),this.removeEventListener("mouseleave",this._onMouseLeave),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut),this.removeEventListener("click",this._onClick),document.removeEventListener("keydown",this._onKeyDown)}_show(){if(!(this._isVisible||!this._tooltipEl)){try{this._tooltipEl.showPopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to show tooltip:",t)}this._hasTrigger("click")&&setTimeout(()=>{this._removeDocumentClickListener(),this._onDocumentClick=t=>{const e=t.composedPath();!e.includes(this)&&(!this._tooltipEl||!e.includes(this._tooltipEl))&&this._hide()},document.addEventListener("click",this._onDocumentClick)},0)}}_hide(){if(this._clearShowTimer(),this._removeDocumentClickListener(),!(!this._isVisible||!this._tooltipEl))try{this._tooltipEl.hidePopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to hide tooltip:",t)}}_removeDocumentClickListener(){this._onDocumentClick&&(document.removeEventListener("click",this._onDocumentClick),this._onDocumentClick=null)}_handleNativeToggle(t){const{newState:e}=t;this._isVisible=e==="open";const s=this._isVisible?"btu-tooltip-show":"btu-tooltip-hide",r=new CustomEvent(s,{bubbles:!0,composed:!0});this.dispatchEvent(r)}_handleKeyDown(t){t.key==="Escape"&&(this._clearShowTimer(),this._hide())}_clearShowTimer(){this._showTimer!==null&&(clearTimeout(this._showTimer),this._showTimer=null)}_handleMouseEnter(){this._clearShowTimer(),this._showTimer=setTimeout(()=>{this._show()},this.tooltipDelay)}_handleMouseLeave(){this._clearShowTimer(),this._hide()}_handleFocusIn(){this._clearShowTimer(),this._show()}_handleFocusOut(){this._clearShowTimer(),this._hide()}_handleClick(){this._clearShowTimer(),this._isVisible?this._hide():this._show()}_appendAriaDescribedBy(){const t=this.getAttribute("aria-describedby");t?t.includes(this._tooltipId)||this.setAttribute("aria-describedby",`${t} ${this._tooltipId}`):this.setAttribute("aria-describedby",this._tooltipId)}_removeAriaDescribedBy(){const t=this.getAttribute("aria-describedby");if(!t)return;const e=t.split(/\s+/).filter(s=>s!==this._tooltipId).join(" ").trim();e?this.setAttribute("aria-describedby",e):this.removeAttribute("aria-describedby")}}return a([p({attribute:"tooltip"})],i.prototype,"tooltip"),a([p({attribute:"tooltip-position"})],i.prototype,"tooltipPosition"),a([p({attribute:"tooltip-delay",type:Number})],i.prototype,"tooltipDelay"),a([p({attribute:"tooltip-offset"})],i.prototype,"tooltipOffset"),a([p({attribute:"tooltip-no-arrow",type:Boolean})],i.prototype,"tooltipNoArrow"),a([p({attribute:"tooltip-trigger"})],i.prototype,"tooltipTrigger"),i};var P=Object.defineProperty,$=Object.getOwnPropertyDescriptor,y=(o,i,l,t)=>{for(var e=t>1?void 0:t?$(i,l):i,s=o.length-1,r;s>=0;s--)(r=o[s])&&(e=(t?r(i,l,e):r(e))||e);return t&&e&&P(i,l,e),e};let b=class extends O(C(L(w))){constructor(){super(...arguments),this.label="Hover me",this.initialClasses=[]}connectedCallback(){super.connectedCallback(),this.className&&(this.initialClasses=this.className.split(" ").filter(o=>o.trim()))}createRenderRoot(){return this}willUpdate(){const o=[...this.initialClasses,"tooltip-demo"];this.className=o.filter(Boolean).join(" ")}render(){return c`${this.label}`}};y([p({type:String})],b.prototype,"label",2);b=y([E("tooltip-demo")],b);const f=`
2
2
  .tooltip-demo {
3
3
  display: inline-flex;
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{g as C,x as S}from"./iframe-C3TUQi31.js";import{o as E}from"./if-defined-BkzXcv-a.js";import{o as x}from"./style-map-ADugLljH.js";import"./preload-helper-PPVm8Dsz.js";const{events:B,args:U,argTypes:c}=C("btu-upload"),F=e=>{const o={};return e.dropzoneBg&&(o["--upload-dropzone-bg"]=e.dropzoneBg),e.dropzoneBorderColor&&(o["--upload-dropzone-border-color"]=e.dropzoneBorderColor),e.dropzoneBorderRadius&&(o["--upload-dropzone-border-radius"]=e.dropzoneBorderRadius),e.dropzoneHoverBg&&(o["--upload-dropzone-hover-bg"]=e.dropzoneHoverBg),e.dropzoneHoverBorderColor&&(o["--upload-dropzone-hover-border-color"]=e.dropzoneHoverBorderColor),e.dropzoneFocusRingColor&&(o["--upload-dropzone-focus-ring-color"]=e.dropzoneFocusRingColor),e.itemBg&&(o["--upload-item-bg"]=e.itemBg),e.itemBorderColor&&(o["--upload-item-border-color"]=e.itemBorderColor),e.itemActiveBorderColor&&(o["--upload-item-active-border-color"]=e.itemActiveBorderColor),e.itemCompleteBorderColor&&(o["--upload-item-complete-border-color"]=e.itemCompleteBorderColor),e.itemErrorBg&&(o["--upload-item-error-bg"]=e.itemErrorBg),e.itemErrorBorderColor&&(o["--upload-item-error-border-color"]=e.itemErrorBorderColor),o},T={title:"Components/Upload",component:"btu-upload",tags:["autodocs"],parameters:{docs:{subtitle:"btu-upload",description:{component:`
1
+ import{g as C,x as S}from"./iframe-CufEXQ5F.js";import{o as E}from"./if-defined-f_e-RnGa.js";import{o as x}from"./style-map-BkaK9546.js";import"./preload-helper-PPVm8Dsz.js";const{events:B,args:U,argTypes:c}=C("btu-upload"),F=e=>{const o={};return e.dropzoneBg&&(o["--upload-dropzone-bg"]=e.dropzoneBg),e.dropzoneBorderColor&&(o["--upload-dropzone-border-color"]=e.dropzoneBorderColor),e.dropzoneBorderRadius&&(o["--upload-dropzone-border-radius"]=e.dropzoneBorderRadius),e.dropzoneHoverBg&&(o["--upload-dropzone-hover-bg"]=e.dropzoneHoverBg),e.dropzoneHoverBorderColor&&(o["--upload-dropzone-hover-border-color"]=e.dropzoneHoverBorderColor),e.dropzoneFocusRingColor&&(o["--upload-dropzone-focus-ring-color"]=e.dropzoneFocusRingColor),e.itemBg&&(o["--upload-item-bg"]=e.itemBg),e.itemBorderColor&&(o["--upload-item-border-color"]=e.itemBorderColor),e.itemActiveBorderColor&&(o["--upload-item-active-border-color"]=e.itemActiveBorderColor),e.itemCompleteBorderColor&&(o["--upload-item-complete-border-color"]=e.itemCompleteBorderColor),e.itemErrorBg&&(o["--upload-item-error-bg"]=e.itemErrorBg),e.itemErrorBorderColor&&(o["--upload-item-error-border-color"]=e.itemErrorBorderColor),o},T={title:"Components/Upload",component:"btu-upload",tags:["autodocs"],parameters:{docs:{subtitle:"btu-upload",description:{component:`
2
2
  A file upload component with drop zone and file list.
3
3
 
4
4
  The component is **presentation + file-selection only**. It handles file browsing
@@ -1,4 +1,4 @@
1
- import{g as y,x as c}from"./iframe-C3TUQi31.js";import"./preload-helper-PPVm8Dsz.js";const{events:b,args:f,argTypes:h}=y("btu-upload-item"),e=r=>{const l=`upload-item-${crypto.randomUUID().slice(0,8)}`;return setTimeout(()=>{const m=document.getElementById(l)?.querySelector("btu-upload-item");if(!m)return;const u=new File([""],r.name,{type:r.mimeType??""});Object.defineProperty(u,"size",{value:r.size??0});const p=r.status??"uploading",d={id:crypto.randomUUID().slice(0,8),file:u,symbol:r.symbol},g=p==="pending"?{...d,status:"pending",progress:0}:p==="complete"?{...d,status:"complete",progress:100}:p==="error"?{...d,status:"error",progress:r.progress??0,errorMessage:r.errorMessage??""}:{...d,status:"uploading",progress:r.progress??0};m._configure(g)},50),c`<div id="${l}" style="max-width: 480px;"><btu-upload-item></btu-upload-item></div>`},k={title:"Components/Upload/Upload Item",component:"btu-upload-item",tags:["autodocs"],parameters:{docs:{subtitle:"Individual file row rendered inside btu-upload",description:{component:`
1
+ import{g as y,x as c}from"./iframe-CufEXQ5F.js";import"./preload-helper-PPVm8Dsz.js";const{events:b,args:f,argTypes:h}=y("btu-upload-item"),e=r=>{const l=`upload-item-${crypto.randomUUID().slice(0,8)}`;return setTimeout(()=>{const m=document.getElementById(l)?.querySelector("btu-upload-item");if(!m)return;const u=new File([""],r.name,{type:r.mimeType??""});Object.defineProperty(u,"size",{value:r.size??0});const p=r.status??"uploading",d={id:crypto.randomUUID().slice(0,8),file:u,symbol:r.symbol},g=p==="pending"?{...d,status:"pending",progress:0}:p==="complete"?{...d,status:"complete",progress:100}:p==="error"?{...d,status:"error",progress:r.progress??0,errorMessage:r.errorMessage??""}:{...d,status:"uploading",progress:r.progress??0};m._configure(g)},50),c`<div id="${l}" style="max-width: 480px;"><btu-upload-item></btu-upload-item></div>`},k={title:"Components/Upload/Upload Item",component:"btu-upload-item",tags:["autodocs"],parameters:{docs:{subtitle:"Individual file row rendered inside btu-upload",description:{component:`
2
2
  \`btu-upload-item\` renders a single file's state inside a \`btu-upload\` file list. It is an **internal sub-component** — consumers should not create, query, or modify items directly. All interaction goes through \`btu-upload\` methods (\`setFileProgress\`, \`setFileStatus\`, \`setFileSymbol\`, \`removeFile\`).
3
3
 
4
4
  These stories exist for design documentation and visual QA of each status state in isolation. In practice, items are always created, configured, and destroyed by their parent \`btu-upload\`.
@@ -1,4 +1,4 @@
1
- import{S as U}from"./blocks-D8JszFZh.js";import{e as X,f as _,E as B,r as j,x as A}from"./iframe-C3TUQi31.js";import"./preload-helper-PPVm8Dsz.js";const C=()=>new J;class J{}const w=new WeakMap,k=X(class extends _{render(e){return B}update(e,[o]){const t=o!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=o,this.ht=e.options?.host,this.rt(this.ct=e.element)),B}rt(e){if(this.isConnected||(e=void 0),typeof this.G=="function"){const o=this.ht??globalThis;let t=w.get(o);t===void 0&&(t=new WeakMap,w.set(o,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return typeof this.G=="function"?w.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),ee={title:"Welcome",tags:["autodocs","!dev"],parameters:{layout:"fullscreen",controls:{disable:!0},actions:{disable:!0},options:{showPanel:!1},docs:{page:()=>j.createElement("div",{className:"welcome-docs"},j.createElement(U))}}},$=[[13,52,158],[19,183,158],[99,43,176],[95,233,208],[240,67,62],[83,36,148]],d=(e,o)=>e+Math.random()*(o-e),M=e=>e[Math.floor(Math.random()*e.length)];function I(e,o){if(matchMedia("(prefers-reduced-motion: reduce)").matches)return;const t=e.getContext("2d"),l=Array.from({length:3},()=>({x:0,y:0,rgb:M($),opacity:0,radius:d(250,350)}));let h=null;function O(){const s=5*devicePixelRatio,n=Object.assign(document.createElement("canvas"),{width:s,height:s}),r=n.getContext("2d");r.fillStyle="#000",r.arc(s/2,s/2,1.6*devicePixelRatio,0,Math.PI*2),r.fill(),h=t.createPattern(n,"repeat")}function R(){const{width:s,height:n}=e.getBoundingClientRect();e.width=s*devicePixelRatio,e.height=n*devicePixelRatio,t.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0),O()}R(),addEventListener("resize",R);const a=o?l[0]:null;a&&(a.rgb=M($),a.radius=300),(function s(){if(!e.isConnected)return;const n=e.width/devicePixelRatio,r=e.height/devicePixelRatio;t.clearRect(0,0,n,r),a&&o&&(o.active?(a.x+=(o.tx-a.x)*.06,a.y+=(o.ty-a.y)*.06,a.opacity+=(.35-a.opacity)*.08):a.opacity+=(0-a.opacity)*.04);for(const i of l){if(i.opacity<=0)continue;const[u,p,b]=i.rgb,c=t.createRadialGradient(i.x,i.y,0,i.x,i.y,i.radius);c.addColorStop(0,`rgba(${u},${p},${b},${i.opacity})`),c.addColorStop(1,`rgba(${u},${p},${b},0)`),t.fillStyle=c,t.fillRect(i.x-i.radius,i.y-i.radius,i.radius*2,i.radius*2)}h&&(t.globalCompositeOperation="destination-in",t.fillStyle=h,t.fillRect(0,0,n,r),t.globalCompositeOperation="source-over"),requestAnimationFrame(s)})();function S(s){if(!e.isConnected)return;const{width:n,height:r}=e.getBoundingClientRect(),i=300,u=m=>m<2?{x:d(.15*n,.85*n),y:m===0?-i:r+i}:{x:m===2?-i:n+i,y:d(.15*r,.85*r)},p=Math.floor(Math.random()*4),b=(p+(Math.random()<.5?2:[1,3][Math.floor(Math.random()*2)]))%4,c=u(p),z=u(b),y=z.x-c.x,x=z.y-c.y,E=Math.hypot(y,x)||1,Y=Math.min(n,r)*d(.15,.35),D=d(1.2,2.2);s.rgb=M($),s.radius=d(250,350);let P=null;const F=d(6e3,7500);(function m(G){if(!e.isConnected)return;P??=G;const f=Math.min((G-P)/F,1),L=.5-.5*Math.cos(f*Math.PI),T=Math.sin(f*D*Math.PI)*Y;s.x=c.x+y*L+-x/E*T,s.y=c.y+x*L+y/E*T,s.opacity=.35*Math.min(f/.2,1)*Math.min((1-f)/.2,1),f<1?requestAnimationFrame(m):s.opacity=0})(performance.now())}(o?l.slice(1):l).forEach((s,n)=>setTimeout(()=>{S(s),setInterval(()=>e.isConnected&&S(s),7500)},1e3+n*2500))}const q="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;",N=C(),W=C(),H=C(),v={active:!1,tx:0,ty:0},g={render:()=>(queueMicrotask(()=>{const e=N.value;e&&!e.dataset.init&&(e.dataset.init="1",I(e));const o=W.value;o&&!o.dataset.init&&(o.dataset.init="1",I(o,v));const t=H.value;t&&!t.dataset.init&&(t.dataset.init="1",t.addEventListener("mousemove",l=>{const h=t.getBoundingClientRect();v.tx=l.clientX-h.left,v.ty=l.clientY-h.top,v.active=!0}),t.addEventListener("mouseleave",()=>{v.active=!1}))}),A`
1
+ import{S as U}from"./blocks-YjKl5E55.js";import{e as X,f as _,E as B,r as j,x as A}from"./iframe-CufEXQ5F.js";import"./preload-helper-PPVm8Dsz.js";const C=()=>new J;class J{}const w=new WeakMap,k=X(class extends _{render(e){return B}update(e,[o]){const t=o!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=o,this.ht=e.options?.host,this.rt(this.ct=e.element)),B}rt(e){if(this.isConnected||(e=void 0),typeof this.G=="function"){const o=this.ht??globalThis;let t=w.get(o);t===void 0&&(t=new WeakMap,w.set(o,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return typeof this.G=="function"?w.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),ee={title:"Welcome",tags:["autodocs","!dev"],parameters:{layout:"fullscreen",controls:{disable:!0},actions:{disable:!0},options:{showPanel:!1},docs:{page:()=>j.createElement("div",{className:"welcome-docs"},j.createElement(U))}}},$=[[13,52,158],[19,183,158],[99,43,176],[95,233,208],[240,67,62],[83,36,148]],d=(e,o)=>e+Math.random()*(o-e),M=e=>e[Math.floor(Math.random()*e.length)];function I(e,o){if(matchMedia("(prefers-reduced-motion: reduce)").matches)return;const t=e.getContext("2d"),l=Array.from({length:3},()=>({x:0,y:0,rgb:M($),opacity:0,radius:d(250,350)}));let h=null;function O(){const s=5*devicePixelRatio,n=Object.assign(document.createElement("canvas"),{width:s,height:s}),r=n.getContext("2d");r.fillStyle="#000",r.arc(s/2,s/2,1.6*devicePixelRatio,0,Math.PI*2),r.fill(),h=t.createPattern(n,"repeat")}function R(){const{width:s,height:n}=e.getBoundingClientRect();e.width=s*devicePixelRatio,e.height=n*devicePixelRatio,t.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0),O()}R(),addEventListener("resize",R);const a=o?l[0]:null;a&&(a.rgb=M($),a.radius=300),(function s(){if(!e.isConnected)return;const n=e.width/devicePixelRatio,r=e.height/devicePixelRatio;t.clearRect(0,0,n,r),a&&o&&(o.active?(a.x+=(o.tx-a.x)*.06,a.y+=(o.ty-a.y)*.06,a.opacity+=(.35-a.opacity)*.08):a.opacity+=(0-a.opacity)*.04);for(const i of l){if(i.opacity<=0)continue;const[u,p,b]=i.rgb,c=t.createRadialGradient(i.x,i.y,0,i.x,i.y,i.radius);c.addColorStop(0,`rgba(${u},${p},${b},${i.opacity})`),c.addColorStop(1,`rgba(${u},${p},${b},0)`),t.fillStyle=c,t.fillRect(i.x-i.radius,i.y-i.radius,i.radius*2,i.radius*2)}h&&(t.globalCompositeOperation="destination-in",t.fillStyle=h,t.fillRect(0,0,n,r),t.globalCompositeOperation="source-over"),requestAnimationFrame(s)})();function S(s){if(!e.isConnected)return;const{width:n,height:r}=e.getBoundingClientRect(),i=300,u=m=>m<2?{x:d(.15*n,.85*n),y:m===0?-i:r+i}:{x:m===2?-i:n+i,y:d(.15*r,.85*r)},p=Math.floor(Math.random()*4),b=(p+(Math.random()<.5?2:[1,3][Math.floor(Math.random()*2)]))%4,c=u(p),z=u(b),y=z.x-c.x,x=z.y-c.y,E=Math.hypot(y,x)||1,Y=Math.min(n,r)*d(.15,.35),D=d(1.2,2.2);s.rgb=M($),s.radius=d(250,350);let P=null;const F=d(6e3,7500);(function m(G){if(!e.isConnected)return;P??=G;const f=Math.min((G-P)/F,1),L=.5-.5*Math.cos(f*Math.PI),T=Math.sin(f*D*Math.PI)*Y;s.x=c.x+y*L+-x/E*T,s.y=c.y+x*L+y/E*T,s.opacity=.35*Math.min(f/.2,1)*Math.min((1-f)/.2,1),f<1?requestAnimationFrame(m):s.opacity=0})(performance.now())}(o?l.slice(1):l).forEach((s,n)=>setTimeout(()=>{S(s),setInterval(()=>e.isConnected&&S(s),7500)},1e3+n*2500))}const q="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;",N=C(),W=C(),H=C(),v={active:!1,tx:0,ty:0},g={render:()=>(queueMicrotask(()=>{const e=N.value;e&&!e.dataset.init&&(e.dataset.init="1",I(e));const o=W.value;o&&!o.dataset.init&&(o.dataset.init="1",I(o,v));const t=H.value;t&&!t.dataset.init&&(t.dataset.init="1",t.addEventListener("mousemove",l=>{const h=t.getBoundingClientRect();v.tx=l.clientX-h.left,v.ty=l.clientY-h.top,v.active=!0}),t.addEventListener("mouseleave",()=>{v.active=!1}))}),A`
2
2
  <div
3
3
  ${k(H)}
4
4
  style="
@@ -1,4 +1,4 @@
1
- import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-ADugLljH.js";import"./preload-helper-PPVm8Dsz.js";const{events:y,args:w,argTypes:a}=h("btu-widget"),$={title:"Components/Widget",component:"btu-widget",tags:["autodocs"],parameters:{docs:{subtitle:"btu-widget",description:{component:`
1
+ import{g as h,x as l}from"./iframe-CufEXQ5F.js";import{o as m}from"./style-map-BkaK9546.js";import"./preload-helper-PPVm8Dsz.js";const{events:y,args:w,argTypes:a}=h("btu-widget"),$={title:"Components/Widget",component:"btu-widget",tags:["autodocs"],parameters:{docs:{subtitle:"btu-widget",description:{component:`
2
2
  <h3>When to use:</h3>
3
3
  <ul>
4
4
  <li>To display content in a structured widget layout</li>
@@ -21,7 +21,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
21
21
  style=${m(t)}
22
22
  >
23
23
  <button
24
- class="btu-button-text-hidden btu-button-fill-none btu-button-gray btu-button-xs btu-button"
24
+ class="btu-button btu-button-text-hidden btu-button-fill-none btu-button-gray btu-button-xs"
25
25
  slot="controls"
26
26
  >
27
27
  <btu-icon symbol="ellipsis"></btu-icon>
@@ -36,8 +36,8 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
36
36
  ?fullscreenable=${e.fullscreenable}
37
37
  >
38
38
  <div class="action-bar flex justify-between" slot="footer">
39
- <button class="btu-button-error btu-button">Delete</button>
40
- <button class="btu-button-success btu-button">Save</button>
39
+ <button class="btu-button btu-button-error">Delete</button>
40
+ <button class="btu-button btu-button-success">Save</button>
41
41
  </div>
42
42
  <div>Body content with heading and an action bar in the footer.</div>
43
43
  </btu-widget>
@@ -49,7 +49,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
49
49
  ?fullscreenable=${e.fullscreenable}
50
50
  style="--widget-background: oklch(var(--btu-theme-purple-100)); --widget-border: 1px solid oklch(var(--btu-theme-purple-800)); --header-background: oklch(var(--btu-theme-purple-300));"
51
51
  >
52
- <button class="btu-button-purple btu-button" slot="controls">Action</button>
52
+ <button class="btu-button btu-button-purple" slot="controls">Action</button>
53
53
  <div>
54
54
  <p>Customized!</p>
55
55
  </div>
@@ -72,7 +72,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
72
72
  `,parameters:{docs:{description:{story:"Widget that starts in a collapsed state."}}}},b={render:e=>{const t=["pencil","gear","trash","star","heart","bell"];let p=0;const g=n=>{const o=document.createElement("btu-icon");o.setAttribute("symbol",t[p%t.length]),o.setAttribute("slot","controls"),p++,n.appendChild(o);const r=document.createElement("p");r.textContent="This paragraph was added dynamically and automatically redistributed to the body!",r.style.color="#16a34a",r.style.fontWeight="600",n.appendChild(r);const s=document.createElement("button");s.className="btu-button btu-button-purple",s.textContent="Button",s.setAttribute("slot","footer"),n.appendChild(s)};return l`
73
73
  <div style="display: flex; flex-direction: column; gap: 1rem;">
74
74
  <button
75
- class="btu-button-primary btu-button"
75
+ class="btu-button btu-button-primary"
76
76
  @click="${n=>{const o=n.target.parentElement?.querySelector("btu-widget");o&&g(o)}}"
77
77
  >
78
78
  Add Dynamic Content
@@ -83,7 +83,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
83
83
  ?collapsed=${e.collapsed}
84
84
  ?fullscreenable=${e.fullscreenable}
85
85
  >
86
- <button class="btu-button-primary btu-button" slot="controls">Initial Button</button>
86
+ <button class="btu-button btu-button-primary" slot="controls">Initial Button</button>
87
87
  <div style="padding: 1rem;">
88
88
  <p>Click the "Add Dynamic Content" button above to demonstrate:</p>
89
89
  <ul>
@@ -108,8 +108,8 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
108
108
  ?fullscreenable=\${args.fullscreenable}
109
109
  >
110
110
  <div class="action-bar flex justify-between" slot="footer">
111
- <button class="btu-button-error btu-button">Delete</button>
112
- <button class="btu-button-success btu-button">Save</button>
111
+ <button class="btu-button btu-button-error">Delete</button>
112
+ <button class="btu-button btu-button-success">Save</button>
113
113
  </div>
114
114
  <div>Body content with heading and an action bar in the footer.</div>
115
115
  </btu-widget>
@@ -130,7 +130,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
130
130
  ?fullscreenable=\${args.fullscreenable}
131
131
  style="--widget-background: oklch(var(--btu-theme-purple-100)); --widget-border: 1px solid oklch(var(--btu-theme-purple-800)); --header-background: oklch(var(--btu-theme-purple-300));"
132
132
  >
133
- <button class="btu-button-purple btu-button" slot="controls">Action</button>
133
+ <button class="btu-button btu-button-purple" slot="controls">Action</button>
134
134
  <div>
135
135
  <p>Customized!</p>
136
136
  </div>
@@ -195,7 +195,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
195
195
  return html\`
196
196
  <div style="display: flex; flex-direction: column; gap: 1rem;">
197
197
  <button
198
- class="btu-button-primary btu-button"
198
+ class="btu-button btu-button-primary"
199
199
  @click="\${(e: Event) => {
200
200
  const widget = (e.target as HTMLElement).parentElement?.querySelector('btu-widget');
201
201
  if (widget) addContent(widget);
@@ -209,7 +209,7 @@ import{g as h,x as l}from"./iframe-C3TUQi31.js";import{o as m}from"./style-map-A
209
209
  ?collapsed=\${args.collapsed}
210
210
  ?fullscreenable=\${args.fullscreenable}
211
211
  >
212
- <button class="btu-button-primary btu-button" slot="controls">Initial Button</button>
212
+ <button class="btu-button btu-button-primary" slot="controls">Initial Button</button>
213
213
  <div style="padding: 1rem;">
214
214
  <p>Click the "Add Dynamic Content" button above to demonstrate:</p>
215
215
  <ul>
@@ -1,4 +1,4 @@
1
- import{R as Bt,_ as Pt,d as Mt}from"./blocks-D8JszFZh.js";import{R as U,S as Re,r as y,a1 as pe,M as We,T as _t,a3 as te,_ as ft}from"./iframe-C3TUQi31.js";import"./preload-helper-PPVm8Dsz.js";var Ht=ft({"../../node_modules/react-fast-compare/index.js"(e,t){var r=typeof Element<"u",o=typeof Map=="function",n=typeof Set=="function",s=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function l(u,a){if(u===a)return!0;if(u&&a&&typeof u=="object"&&typeof a=="object"){if(u.constructor!==a.constructor)return!1;var i,f,p;if(Array.isArray(u)){if(i=u.length,i!=a.length)return!1;for(f=i;f--!==0;)if(!l(u[f],a[f]))return!1;return!0}var c;if(o&&u instanceof Map&&a instanceof Map){if(u.size!==a.size)return!1;for(c=u.entries();!(f=c.next()).done;)if(!a.has(f.value[0]))return!1;for(c=u.entries();!(f=c.next()).done;)if(!l(f.value[1],a.get(f.value[0])))return!1;return!0}if(n&&u instanceof Set&&a instanceof Set){if(u.size!==a.size)return!1;for(c=u.entries();!(f=c.next()).done;)if(!a.has(f.value[0]))return!1;return!0}if(s&&ArrayBuffer.isView(u)&&ArrayBuffer.isView(a)){if(i=u.length,i!=a.length)return!1;for(f=i;f--!==0;)if(u[f]!==a[f])return!1;return!0}if(u.constructor===RegExp)return u.source===a.source&&u.flags===a.flags;if(u.valueOf!==Object.prototype.valueOf&&typeof u.valueOf=="function"&&typeof a.valueOf=="function")return u.valueOf()===a.valueOf();if(u.toString!==Object.prototype.toString&&typeof u.toString=="function"&&typeof a.toString=="function")return u.toString()===a.toString();if(p=Object.keys(u),i=p.length,i!==Object.keys(a).length)return!1;for(f=i;f--!==0;)if(!Object.prototype.hasOwnProperty.call(a,p[f]))return!1;if(r&&u instanceof Element)return!1;for(f=i;f--!==0;)if(!((p[f]==="_owner"||p[f]==="__v"||p[f]==="__o")&&u.$$typeof)&&!l(u[p[f]],a[p[f]]))return!1;return!0}return u!==u&&a!==a}t.exports=function(u,a){try{return l(u,a)}catch(i){if((i.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw i}}}}),Nt=ft({"../../node_modules/warning/warning.js"(e,t){var r=function(){};t.exports=r}}),Vt=We(_t(),1);const{deprecate:lt}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{global:qt}=__STORYBOOK_MODULE_GLOBAL__;y.createContext();y.createContext();var Ke=function(e){return e.reduce(function(t,r){var o=r[0],n=r[1];return t[o]=n,t},{})},Je=typeof window<"u"&&window.document&&window.document.createElement?y.useLayoutEffect:y.useEffect,j="top",H="bottom",N="right",B="left",$e="auto",ye=[j,H,N,B],ie="start",ge="end",Ut="clippingParents",ct="viewport",ce="popper",zt="reference",Qe=ye.reduce(function(e,t){return e.concat([t+"-"+ie,t+"-"+ge])},[]),pt=[].concat(ye,[$e]).reduce(function(e,t){return e.concat([t,t+"-"+ie,t+"-"+ge])},[]),It="beforeRead",Yt="read",Xt="afterRead",Ft="beforeMain",Gt="main",Kt="afterMain",Jt="beforeWrite",Qt="write",Zt="afterWrite",er=[It,Yt,Xt,Ft,Gt,Kt,Jt,Qt,Zt];function I(e){return e?(e.nodeName||"").toLowerCase():null}function P(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ne(e){var t=P(e).Element;return e instanceof t||e instanceof Element}function _(e){var t=P(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function je(e){if(typeof ShadowRoot>"u")return!1;var t=P(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function tr(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},s=t.elements[r];!_(s)||!I(s)||(Object.assign(s.style,o),Object.keys(n).forEach(function(l){var u=n[l];u===!1?s.removeAttribute(l):s.setAttribute(l,u===!0?"":u)}))})}function rr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],s=t.attributes[o]||{},l=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),u=l.reduce(function(a,i){return a[i]="",a},{});!_(n)||!I(n)||(Object.assign(n.style,u),Object.keys(s).forEach(function(a){n.removeAttribute(a)}))})}}var dt={name:"applyStyles",enabled:!0,phase:"write",fn:tr,effect:rr,requires:["computeStyles"]};function z(e){return e.split("-")[0]}var re=Math.max,Te=Math.min,ae=Math.round;function ke(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function vt(){return!/^((?!chrome|android).)*safari/i.test(ke())}function se(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,s=1;t&&_(e)&&(n=e.offsetWidth>0&&ae(o.width)/e.offsetWidth||1,s=e.offsetHeight>0&&ae(o.height)/e.offsetHeight||1);var l=ne(e)?P(e):window,u=l.visualViewport,a=!vt()&&r,i=(o.left+(a&&u?u.offsetLeft:0))/n,f=(o.top+(a&&u?u.offsetTop:0))/s,p=o.width/n,c=o.height/s;return{width:p,height:c,top:f,right:i+p,bottom:f+c,left:i,x:i,y:f}}function Be(e){var t=se(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function mt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&je(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function F(e){return P(e).getComputedStyle(e)}function nr(e){return["table","td","th"].indexOf(I(e))>=0}function K(e){return((ne(e)?e.ownerDocument:e.document)||window.document).documentElement}function Le(e){return I(e)==="html"?e:e.assignedSlot||e.parentNode||(je(e)?e.host:null)||K(e)}function Ze(e){return!_(e)||F(e).position==="fixed"?null:e.offsetParent}function or(e){var t=/firefox/i.test(ke()),r=/Trident/i.test(ke());if(r&&_(e)){var o=F(e);if(o.position==="fixed")return null}var n=Le(e);for(je(n)&&(n=n.host);_(n)&&["html","body"].indexOf(I(n))<0;){var s=F(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function be(e){for(var t=P(e),r=Ze(e);r&&nr(r)&&F(r).position==="static";)r=Ze(r);return r&&(I(r)==="html"||I(r)==="body"&&F(r).position==="static")?t:r||or(e)||t}function Pe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function de(e,t,r){return re(e,Te(t,r))}function ir(e,t,r){var o=de(e,t,r);return o>r?r:o}function gt(){return{top:0,right:0,bottom:0,left:0}}function ht(e){return Object.assign({},gt(),e)}function yt(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var ar=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,ht(typeof e!="number"?e:yt(e,ye))};function sr(e){var t,r=e.state,o=e.name,n=e.options,s=r.elements.arrow,l=r.modifiersData.popperOffsets,u=z(r.placement),a=Pe(u),i=[B,N].indexOf(u)>=0,f=i?"height":"width";if(!(!s||!l)){var p=ar(n.padding,r),c=Be(s),v=a==="y"?j:B,g=a==="y"?H:N,d=r.rects.reference[f]+r.rects.reference[a]-l[a]-r.rects.popper[f],x=l[a]-r.rects.reference[a],O=be(s),L=O?a==="y"?O.clientHeight||0:O.clientWidth||0:0,A=d/2-x/2,m=p[v],b=L-c[f]-p[g],E=L/2-c[f]/2+A,T=de(m,E,b),S=a;r.modifiersData[o]=(t={},t[S]=T,t.centerOffset=T-E,t)}}function ur(e){var t=e.state,r=e.options,o=r.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||mt(t.elements.popper,n)&&(t.elements.arrow=n))}var fr={name:"arrow",enabled:!0,phase:"main",fn:sr,effect:ur,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ue(e){return e.split("-")[1]}var lr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function cr(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:ae(r*n)/n||0,y:ae(o*n)/n||0}}function et(e){var t,r=e.popper,o=e.popperRect,n=e.placement,s=e.variation,l=e.offsets,u=e.position,a=e.gpuAcceleration,i=e.adaptive,f=e.roundOffsets,p=e.isFixed,c=l.x,v=c===void 0?0:c,g=l.y,d=g===void 0?0:g,x=typeof f=="function"?f({x:v,y:d}):{x:v,y:d};v=x.x,d=x.y;var O=l.hasOwnProperty("x"),L=l.hasOwnProperty("y"),A=B,m=j,b=window;if(i){var E=be(r),T="clientHeight",S="clientWidth";if(E===P(r)&&(E=K(r),F(E).position!=="static"&&u==="absolute"&&(T="scrollHeight",S="scrollWidth")),E=E,n===j||(n===B||n===N)&&s===ge){m=H;var w=p&&E===b&&b.visualViewport?b.visualViewport.height:E[T];d-=w-o.height,d*=a?1:-1}if(n===B||(n===j||n===H)&&s===ge){A=N;var R=p&&E===b&&b.visualViewport?b.visualViewport.width:E[S];v-=R-o.width,v*=a?1:-1}}var k=Object.assign({position:u},i&&lr),$=f===!0?cr({x:v,y:d},P(r)):{x:v,y:d};if(v=$.x,d=$.y,a){var W;return Object.assign({},k,(W={},W[m]=L?"0":"",W[A]=O?"0":"",W.transform=(b.devicePixelRatio||1)<=1?"translate("+v+"px, "+d+"px)":"translate3d("+v+"px, "+d+"px, 0)",W))}return Object.assign({},k,(t={},t[m]=L?d+"px":"",t[A]=O?v+"px":"",t.transform="",t))}function pr(e){var t=e.state,r=e.options,o=r.gpuAcceleration,n=o===void 0?!0:o,s=r.adaptive,l=s===void 0?!0:s,u=r.roundOffsets,a=u===void 0?!0:u,i={placement:z(t.placement),variation:ue(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,et(Object.assign({},i,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,et(Object.assign({},i,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var bt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:pr,data:{}},Ee={passive:!0};function dr(e){var t=e.state,r=e.instance,o=e.options,n=o.scroll,s=n===void 0?!0:n,l=o.resize,u=l===void 0?!0:l,a=P(t.elements.popper),i=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&i.forEach(function(f){f.addEventListener("scroll",r.update,Ee)}),u&&a.addEventListener("resize",r.update,Ee),function(){s&&i.forEach(function(f){f.removeEventListener("scroll",r.update,Ee)}),u&&a.removeEventListener("resize",r.update,Ee)}}var wt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:dr,data:{}},vr={left:"right",right:"left",bottom:"top",top:"bottom"};function Se(e){return e.replace(/left|right|bottom|top/g,function(t){return vr[t]})}var mr={start:"end",end:"start"};function tt(e){return e.replace(/start|end/g,function(t){return mr[t]})}function Me(e){var t=P(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function _e(e){return se(K(e)).left+Me(e).scrollLeft}function gr(e,t){var r=P(e),o=K(e),n=r.visualViewport,s=o.clientWidth,l=o.clientHeight,u=0,a=0;if(n){s=n.width,l=n.height;var i=vt();(i||!i&&t==="fixed")&&(u=n.offsetLeft,a=n.offsetTop)}return{width:s,height:l,x:u+_e(e),y:a}}function hr(e){var t,r=K(e),o=Me(e),n=(t=e.ownerDocument)==null?void 0:t.body,s=re(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),l=re(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),u=-o.scrollLeft+_e(e),a=-o.scrollTop;return F(n||r).direction==="rtl"&&(u+=re(r.clientWidth,n?n.clientWidth:0)-s),{width:s,height:l,x:u,y:a}}function He(e){var t=F(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function xt(e){return["html","body","#document"].indexOf(I(e))>=0?e.ownerDocument.body:_(e)&&He(e)?e:xt(Le(e))}function ve(e,t){var r;t===void 0&&(t=[]);var o=xt(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),s=P(o),l=n?[s].concat(s.visualViewport||[],He(o)?o:[]):o,u=t.concat(l);return n?u:u.concat(ve(Le(l)))}function De(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function yr(e,t){var r=se(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function rt(e,t,r){return t===ct?De(gr(e,r)):ne(t)?yr(t,r):De(hr(K(e)))}function br(e){var t=ve(Le(e)),r=["absolute","fixed"].indexOf(F(e).position)>=0,o=r&&_(e)?be(e):e;return ne(o)?t.filter(function(n){return ne(n)&&mt(n,o)&&I(n)!=="body"}):[]}function wr(e,t,r,o){var n=t==="clippingParents"?br(e):[].concat(t),s=[].concat(n,[r]),l=s[0],u=s.reduce(function(a,i){var f=rt(e,i,o);return a.top=re(f.top,a.top),a.right=Te(f.right,a.right),a.bottom=Te(f.bottom,a.bottom),a.left=re(f.left,a.left),a},rt(e,l,o));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Ot(e){var t=e.reference,r=e.element,o=e.placement,n=o?z(o):null,s=o?ue(o):null,l=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,a;switch(n){case j:a={x:l,y:t.y-r.height};break;case H:a={x:l,y:t.y+t.height};break;case N:a={x:t.x+t.width,y:u};break;case B:a={x:t.x-r.width,y:u};break;default:a={x:t.x,y:t.y}}var i=n?Pe(n):null;if(i!=null){var f=i==="y"?"height":"width";switch(s){case ie:a[i]=a[i]-(t[f]/2-r[f]/2);break;case ge:a[i]=a[i]+(t[f]/2-r[f]/2);break}}return a}function he(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=o===void 0?e.placement:o,s=r.strategy,l=s===void 0?e.strategy:s,u=r.boundary,a=u===void 0?Ut:u,i=r.rootBoundary,f=i===void 0?ct:i,p=r.elementContext,c=p===void 0?ce:p,v=r.altBoundary,g=v===void 0?!1:v,d=r.padding,x=d===void 0?0:d,O=ht(typeof x!="number"?x:yt(x,ye)),L=c===ce?zt:ce,A=e.rects.popper,m=e.elements[g?L:c],b=wr(ne(m)?m:m.contextElement||K(e.elements.popper),a,f,l),E=se(e.elements.reference),T=Ot({reference:E,element:A,placement:n}),S=De(Object.assign({},A,T)),w=c===ce?S:E,R={top:b.top-w.top+O.top,bottom:w.bottom-b.bottom+O.bottom,left:b.left-w.left+O.left,right:w.right-b.right+O.right},k=e.modifiersData.offset;if(c===ce&&k){var $=k[n];Object.keys(R).forEach(function(W){var V=[N,H].indexOf(W)>=0?1:-1,h=[j,H].indexOf(W)>=0?"y":"x";R[W]+=$[h]*V})}return R}function xr(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=r.boundary,s=r.rootBoundary,l=r.padding,u=r.flipVariations,a=r.allowedAutoPlacements,i=a===void 0?pt:a,f=ue(o),p=f?u?Qe:Qe.filter(function(g){return ue(g)===f}):ye,c=p.filter(function(g){return i.indexOf(g)>=0});c.length===0&&(c=p);var v=c.reduce(function(g,d){return g[d]=he(e,{placement:d,boundary:n,rootBoundary:s,padding:l})[z(d)],g},{});return Object.keys(v).sort(function(g,d){return v[g]-v[d]})}function Or(e){if(z(e)===$e)return[];var t=Se(e);return[tt(e),t,tt(t)]}function Er(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=r.mainAxis,s=n===void 0?!0:n,l=r.altAxis,u=l===void 0?!0:l,a=r.fallbackPlacements,i=r.padding,f=r.boundary,p=r.rootBoundary,c=r.altBoundary,v=r.flipVariations,g=v===void 0?!0:v,d=r.allowedAutoPlacements,x=t.options.placement,O=z(x),L=O===x,A=a||(L||!g?[Se(x)]:Or(x)),m=[x].concat(A).reduce(function(Z,X){return Z.concat(z(X)===$e?xr(t,{placement:X,boundary:f,rootBoundary:p,padding:i,flipVariations:g,allowedAutoPlacements:d}):X)},[]),b=t.rects.reference,E=t.rects.popper,T=new Map,S=!0,w=m[0],R=0;R<m.length;R++){var k=m[R],$=z(k),W=ue(k)===ie,V=[j,H].indexOf($)>=0,h=V?"width":"height",C=he(t,{placement:k,boundary:f,rootBoundary:p,altBoundary:c,padding:i}),D=V?W?N:B:W?H:j;b[h]>E[h]&&(D=Se(D));var Y=Se(D),q=[];if(s&&q.push(C[$]<=0),u&&q.push(C[D]<=0,C[Y]<=0),q.every(function(Z){return Z})){w=k,S=!1;break}T.set(k,q)}if(S)for(var J=g?3:1,Q=function(Z){var X=m.find(function(xe){var le=T.get(xe);if(le)return le.slice(0,Z).every(function(oe){return oe})});if(X)return w=X,"break"},fe=J;fe>0;fe--){var we=Q(fe);if(we==="break")break}t.placement!==w&&(t.modifiersData[o]._skip=!0,t.placement=w,t.reset=!0)}}var Sr={name:"flip",enabled:!0,phase:"main",fn:Er,requiresIfExists:["offset"],data:{_skip:!1}};function nt(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ot(e){return[j,N,H,B].some(function(t){return e[t]>=0})}function Tr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,s=t.modifiersData.preventOverflow,l=he(t,{elementContext:"reference"}),u=he(t,{altBoundary:!0}),a=nt(l,o),i=nt(u,n,s),f=ot(a),p=ot(i);t.modifiersData[r]={referenceClippingOffsets:a,popperEscapeOffsets:i,isReferenceHidden:f,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}var Rr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Tr};function Lr(e,t,r){var o=z(e),n=[B,j].indexOf(o)>=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,l=s[0],u=s[1];return l=l||0,u=(u||0)*n,[B,N].indexOf(o)>=0?{x:u,y:l}:{x:l,y:u}}function Cr(e){var t=e.state,r=e.options,o=e.name,n=r.offset,s=n===void 0?[0,0]:n,l=pt.reduce(function(f,p){return f[p]=Lr(p,t.rects,s),f},{}),u=l[t.placement],a=u.x,i=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=i),t.modifiersData[o]=l}var Ar={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Cr};function kr(e){var t=e.state,r=e.name;t.modifiersData[r]=Ot({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var Et={name:"popperOffsets",enabled:!0,phase:"read",fn:kr,data:{}};function Dr(e){return e==="x"?"y":"x"}function Wr(e){var t=e.state,r=e.options,o=e.name,n=r.mainAxis,s=n===void 0?!0:n,l=r.altAxis,u=l===void 0?!1:l,a=r.boundary,i=r.rootBoundary,f=r.altBoundary,p=r.padding,c=r.tether,v=c===void 0?!0:c,g=r.tetherOffset,d=g===void 0?0:g,x=he(t,{boundary:a,rootBoundary:i,padding:p,altBoundary:f}),O=z(t.placement),L=ue(t.placement),A=!L,m=Pe(O),b=Dr(m),E=t.modifiersData.popperOffsets,T=t.rects.reference,S=t.rects.popper,w=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,R=typeof w=="number"?{mainAxis:w,altAxis:w}:Object.assign({mainAxis:0,altAxis:0},w),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(E){if(s){var W,V=m==="y"?j:B,h=m==="y"?H:N,C=m==="y"?"height":"width",D=E[m],Y=D+x[V],q=D-x[h],J=v?-S[C]/2:0,Q=L===ie?T[C]:S[C],fe=L===ie?-S[C]:-T[C],we=t.elements.arrow,Z=v&&we?Be(we):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:gt(),xe=X[V],le=X[h],oe=de(0,T[C],Z[C]),Ct=A?T[C]/2-J-oe-xe-R.mainAxis:Q-oe-xe-R.mainAxis,At=A?-T[C]/2+J+oe+le+R.mainAxis:fe+oe+le+R.mainAxis,Ce=t.elements.arrow&&be(t.elements.arrow),kt=Ce?m==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ve=(W=k?.[m])!=null?W:0,Dt=D+Ct-Ve-kt,Wt=D+At-Ve,qe=de(v?Te(Y,Dt):Y,D,v?re(q,Wt):q);E[m]=qe,$[m]=qe-D}if(u){var Ue,$t=m==="x"?j:B,jt=m==="x"?H:N,ee=E[b],Oe=b==="y"?"height":"width",ze=ee+x[$t],Ie=ee-x[jt],Ae=[j,B].indexOf(O)!==-1,Ye=(Ue=k?.[b])!=null?Ue:0,Xe=Ae?ze:ee-T[Oe]-S[Oe]-Ye+R.altAxis,Fe=Ae?ee+T[Oe]+S[Oe]-Ye-R.altAxis:Ie,Ge=v&&Ae?ir(Xe,ee,Fe):de(v?Xe:ze,ee,v?Fe:Ie);E[b]=Ge,$[b]=Ge-ee}t.modifiersData[o]=$}}var $r={name:"preventOverflow",enabled:!0,phase:"main",fn:Wr,requiresIfExists:["offset"]};function jr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Br(e){return e===P(e)||!_(e)?Me(e):jr(e)}function Pr(e){var t=e.getBoundingClientRect(),r=ae(t.width)/e.offsetWidth||1,o=ae(t.height)/e.offsetHeight||1;return r!==1||o!==1}function Mr(e,t,r){r===void 0&&(r=!1);var o=_(t),n=_(t)&&Pr(t),s=K(t),l=se(e,n,r),u={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!r)&&((I(t)!=="body"||He(s))&&(u=Br(t)),_(t)?(a=se(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=_e(s))),{x:l.left+u.scrollLeft-a.x,y:l.top+u.scrollTop-a.y,width:l.width,height:l.height}}function _r(e){var t=new Map,r=new Set,o=[];e.forEach(function(s){t.set(s.name,s)});function n(s){r.add(s.name);var l=[].concat(s.requires||[],s.requiresIfExists||[]);l.forEach(function(u){if(!r.has(u)){var a=t.get(u);a&&n(a)}}),o.push(s)}return e.forEach(function(s){r.has(s.name)||n(s)}),o}function Hr(e){var t=_r(e);return er.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function Nr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Vr(e){var t=e.reduce(function(r,o){var n=r[o.name];return r[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var it={placement:"bottom",modifiers:[],strategy:"absolute"};function at(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function Ne(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,o=r===void 0?[]:r,n=t.defaultOptions,s=n===void 0?it:n;return function(l,u,a){a===void 0&&(a=s);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},it,s),modifiersData:{},elements:{reference:l,popper:u},attributes:{},styles:{}},f=[],p=!1,c={state:i,setOptions:function(d){var x=typeof d=="function"?d(i.options):d;g(),i.options=Object.assign({},s,i.options,x),i.scrollParents={reference:ne(l)?ve(l):l.contextElement?ve(l.contextElement):[],popper:ve(u)};var O=Hr(Vr([].concat(o,i.options.modifiers)));return i.orderedModifiers=O.filter(function(L){return L.enabled}),v(),c.update()},forceUpdate:function(){if(!p){var d=i.elements,x=d.reference,O=d.popper;if(at(x,O)){i.rects={reference:Mr(x,be(O),i.options.strategy==="fixed"),popper:Be(O)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(S){return i.modifiersData[S.name]=Object.assign({},S.data)});for(var L=0;L<i.orderedModifiers.length;L++){if(i.reset===!0){i.reset=!1,L=-1;continue}var A=i.orderedModifiers[L],m=A.fn,b=A.options,E=b===void 0?{}:b,T=A.name;typeof m=="function"&&(i=m({state:i,options:E,name:T,instance:c})||i)}}}},update:Nr(function(){return new Promise(function(d){c.forceUpdate(),d(i)})}),destroy:function(){g(),p=!0}};if(!at(l,u))return c;c.setOptions(a).then(function(d){!p&&a.onFirstUpdate&&a.onFirstUpdate(d)});function v(){i.orderedModifiers.forEach(function(d){var x=d.name,O=d.options,L=O===void 0?{}:O,A=d.effect;if(typeof A=="function"){var m=A({state:i,name:x,instance:c,options:L}),b=function(){};f.push(m||b)}})}function g(){f.forEach(function(d){return d()}),f=[]}return c}}Ne();var qr=[wt,Et,bt,dt];Ne({defaultModifiers:qr});var Ur=[wt,Et,bt,dt,Ar,Sr,$r,fr,Rr],zr=Ne({defaultModifiers:Ur}),Ir=We(Ht()),Yr=[],Xr=function(e,t,r){r===void 0&&(r={});var o=y.useRef(null),n={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||Yr},s=y.useState({styles:{popper:{position:n.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=s[0],u=s[1],a=y.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(p){var c=p.state,v=Object.keys(c.elements);Mt.flushSync(function(){u({styles:Ke(v.map(function(g){return[g,c.styles[g]||{}]})),attributes:Ke(v.map(function(g){return[g,c.attributes[g]]}))})})},requires:["computeStyles"]}},[]),i=y.useMemo(function(){var p={onFirstUpdate:n.onFirstUpdate,placement:n.placement,strategy:n.strategy,modifiers:[].concat(n.modifiers,[a,{name:"applyStyles",enabled:!1}])};return(0,Ir.default)(o.current,p)?o.current||p:(o.current=p,p)},[n.onFirstUpdate,n.placement,n.strategy,n.modifiers,a]),f=y.useRef();return Je(function(){f.current&&f.current.setOptions(i)},[i]),Je(function(){if(!(e==null||t==null)){var p=r.createPopper||zr,c=p(e,t,i);return f.current=c,function(){c.destroy(),f.current=null}}},[e,t,r.createPopper]),{state:f.current?f.current.state:null,styles:l.styles,attributes:l.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}};We(Nt());function St(e){var t=y.useRef(e);return t.current=e,y.useCallback(function(){return t.current},[])}var Fr=function(){};function Gr(e){var t=e.initial,r=e.value,o=e.onChange,n=o===void 0?Fr:o;if(t===void 0&&r===void 0)throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');var s=y.useState(t),l=s[0],u=s[1],a=St(l),i=y.useCallback(function(p){var c=a(),v=typeof p=="function"?p(c):p;typeof v.persist=="function"&&v.persist(),u(v),typeof n=="function"&&n(v)},[a,n]),f=r!==void 0;return[f?r:l,f?n:i]}function Tt(e,t){return e===void 0&&(e=0),t===void 0&&(t=0),function(){return{width:0,height:0,top:t,right:e,bottom:t,left:e,x:0,y:0,toJSON:function(){return null}}}}var Kr=["styles","attributes"],st={getBoundingClientRect:Tt()},ut={closeOnOutsideClick:!0,closeOnTriggerHidden:!1,defaultVisible:!1,delayHide:0,delayShow:0,followCursor:!1,interactive:!1,mutationObserverOptions:{attributes:!0,childList:!0,subtree:!0},offset:[0,6],trigger:"hover"};function Jr(e,t){var r,o,n;e===void 0&&(e={}),t===void 0&&(t={});var s=Object.keys(ut).reduce(function(h,C){var D;return te({},h,(D={},D[C]=h[C]!==void 0?h[C]:ut[C],D))},e),l=y.useMemo(function(){return[{name:"offset",options:{offset:s.offset}}]},Array.isArray(s.offset)?s.offset:[]),u=te({},t,{placement:t.placement||s.placement,modifiers:t.modifiers||l}),a=y.useState(null),i=a[0],f=a[1],p=y.useState(null),c=p[0],v=p[1],g=Gr({initial:s.defaultVisible,value:s.visible,onChange:s.onVisibleChange}),d=g[0],x=g[1],O=y.useRef();y.useEffect(function(){return function(){return clearTimeout(O.current)}},[]);var L=Xr(s.followCursor?st:i,c,u),A=L.styles,m=L.attributes,b=Pt(L,Kr),E=b.update,T=St({visible:d,triggerRef:i,tooltipRef:c,finalConfig:s}),S=y.useCallback(function(h){return Array.isArray(s.trigger)?s.trigger.includes(h):s.trigger===h},Array.isArray(s.trigger)?s.trigger:[s.trigger]),w=y.useCallback(function(){clearTimeout(O.current),O.current=window.setTimeout(function(){return x(!1)},s.delayHide)},[s.delayHide,x]),R=y.useCallback(function(){clearTimeout(O.current),O.current=window.setTimeout(function(){return x(!0)},s.delayShow)},[s.delayShow,x]),k=y.useCallback(function(){T().visible?w():R()},[T,w,R]);y.useEffect(function(){if(T().finalConfig.closeOnOutsideClick){var h=function(C){var D,Y=T(),q=Y.tooltipRef,J=Y.triggerRef,Q=(C.composedPath==null||(D=C.composedPath())==null?void 0:D[0])||C.target;Q instanceof Node&&q!=null&&J!=null&&!q.contains(Q)&&!J.contains(Q)&&w()};return document.addEventListener("mousedown",h),function(){return document.removeEventListener("mousedown",h)}}},[T,w]),y.useEffect(function(){if(!(i==null||!S("click")))return i.addEventListener("click",k),function(){return i.removeEventListener("click",k)}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("double-click")))return i.addEventListener("dblclick",k),function(){return i.removeEventListener("dblclick",k)}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("right-click"))){var h=function(C){C.preventDefault(),k()};return i.addEventListener("contextmenu",h),function(){return i.removeEventListener("contextmenu",h)}}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("focus")))return i.addEventListener("focus",R),i.addEventListener("blur",w),function(){i.removeEventListener("focus",R),i.removeEventListener("blur",w)}},[i,S,R,w]),y.useEffect(function(){if(!(i==null||!S("hover")))return i.addEventListener("mouseenter",R),i.addEventListener("mouseleave",w),function(){i.removeEventListener("mouseenter",R),i.removeEventListener("mouseleave",w)}},[i,S,R,w]),y.useEffect(function(){if(!(c==null||!S("hover")||!T().finalConfig.interactive))return c.addEventListener("mouseenter",R),c.addEventListener("mouseleave",w),function(){c.removeEventListener("mouseenter",R),c.removeEventListener("mouseleave",w)}},[c,S,R,w,T]);var $=b==null||(r=b.state)==null||(o=r.modifiersData)==null||(n=o.hide)==null?void 0:n.isReferenceHidden;y.useEffect(function(){s.closeOnTriggerHidden&&$&&w()},[s.closeOnTriggerHidden,w,$]),y.useEffect(function(){if(!s.followCursor||i==null)return;function h(C){var D=C.clientX,Y=C.clientY;st.getBoundingClientRect=Tt(D,Y),E?.()}return i.addEventListener("mousemove",h),function(){return i.removeEventListener("mousemove",h)}},[s.followCursor,i,E]),y.useEffect(function(){if(!(c==null||E==null||s.mutationObserverOptions==null)){var h=new MutationObserver(E);return h.observe(c,s.mutationObserverOptions),function(){return h.disconnect()}}},[s.mutationObserverOptions,c,E]);var W=function(h){return h===void 0&&(h={}),te({},h,{style:te({},h.style,A.popper)},m.popper,{"data-popper-interactive":s.interactive})},V=function(h){return h===void 0&&(h={}),te({},h,m.arrow,{style:te({},h.style,A.arrow),"data-popper-arrow":!0})};return te({getArrowProps:V,getTooltipProps:W,setTooltipRef:v,setTriggerRef:f,tooltipRef:c,triggerRef:i,visible:d},b)}var{document:me}=qt,M=(0,Vt.default)(1e3)((e,t,r,o=0)=>t.split("-")[0]===e?r:o),G=8,Qr=Re.div({position:"absolute",borderStyle:"solid"},({placement:e})=>{let t=0,r=0;switch(!0){case(e.startsWith("left")||e.startsWith("right")):{r=8;break}case(e.startsWith("top")||e.startsWith("bottom")):{t=8;break}}return{transform:`translate3d(${t}px, ${r}px, 0px)`}},({theme:e,color:t,placement:r})=>({bottom:`${M("top",r,`${G*-1}px`,"auto")}`,top:`${M("bottom",r,`${G*-1}px`,"auto")}`,right:`${M("left",r,`${G*-1}px`,"auto")}`,left:`${M("right",r,`${G*-1}px`,"auto")}`,borderBottomWidth:`${M("top",r,"0",G)}px`,borderTopWidth:`${M("bottom",r,"0",G)}px`,borderRightWidth:`${M("left",r,"0",G)}px`,borderLeftWidth:`${M("right",r,"0",G)}px`,borderTopColor:M("top",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderBottomColor:M("bottom",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderLeftColor:M("left",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderRightColor:M("right",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent")})),Zr=Re.div(({hidden:e})=>({display:e?"none":"inline-block",zIndex:2147483647,colorScheme:"light dark"}),({theme:e,color:t,hasChrome:r})=>r?{background:t&&e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,filter:`
1
+ import{R as Bt,_ as Pt,d as Mt}from"./blocks-YjKl5E55.js";import{R as U,S as Re,r as y,a1 as pe,M as We,T as _t,a3 as te,_ as ft}from"./iframe-CufEXQ5F.js";import"./preload-helper-PPVm8Dsz.js";var Ht=ft({"../../node_modules/react-fast-compare/index.js"(e,t){var r=typeof Element<"u",o=typeof Map=="function",n=typeof Set=="function",s=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function l(u,a){if(u===a)return!0;if(u&&a&&typeof u=="object"&&typeof a=="object"){if(u.constructor!==a.constructor)return!1;var i,f,p;if(Array.isArray(u)){if(i=u.length,i!=a.length)return!1;for(f=i;f--!==0;)if(!l(u[f],a[f]))return!1;return!0}var c;if(o&&u instanceof Map&&a instanceof Map){if(u.size!==a.size)return!1;for(c=u.entries();!(f=c.next()).done;)if(!a.has(f.value[0]))return!1;for(c=u.entries();!(f=c.next()).done;)if(!l(f.value[1],a.get(f.value[0])))return!1;return!0}if(n&&u instanceof Set&&a instanceof Set){if(u.size!==a.size)return!1;for(c=u.entries();!(f=c.next()).done;)if(!a.has(f.value[0]))return!1;return!0}if(s&&ArrayBuffer.isView(u)&&ArrayBuffer.isView(a)){if(i=u.length,i!=a.length)return!1;for(f=i;f--!==0;)if(u[f]!==a[f])return!1;return!0}if(u.constructor===RegExp)return u.source===a.source&&u.flags===a.flags;if(u.valueOf!==Object.prototype.valueOf&&typeof u.valueOf=="function"&&typeof a.valueOf=="function")return u.valueOf()===a.valueOf();if(u.toString!==Object.prototype.toString&&typeof u.toString=="function"&&typeof a.toString=="function")return u.toString()===a.toString();if(p=Object.keys(u),i=p.length,i!==Object.keys(a).length)return!1;for(f=i;f--!==0;)if(!Object.prototype.hasOwnProperty.call(a,p[f]))return!1;if(r&&u instanceof Element)return!1;for(f=i;f--!==0;)if(!((p[f]==="_owner"||p[f]==="__v"||p[f]==="__o")&&u.$$typeof)&&!l(u[p[f]],a[p[f]]))return!1;return!0}return u!==u&&a!==a}t.exports=function(u,a){try{return l(u,a)}catch(i){if((i.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw i}}}}),Nt=ft({"../../node_modules/warning/warning.js"(e,t){var r=function(){};t.exports=r}}),Vt=We(_t(),1);const{deprecate:lt}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{global:qt}=__STORYBOOK_MODULE_GLOBAL__;y.createContext();y.createContext();var Ke=function(e){return e.reduce(function(t,r){var o=r[0],n=r[1];return t[o]=n,t},{})},Je=typeof window<"u"&&window.document&&window.document.createElement?y.useLayoutEffect:y.useEffect,j="top",H="bottom",N="right",B="left",$e="auto",ye=[j,H,N,B],ie="start",ge="end",Ut="clippingParents",ct="viewport",ce="popper",zt="reference",Qe=ye.reduce(function(e,t){return e.concat([t+"-"+ie,t+"-"+ge])},[]),pt=[].concat(ye,[$e]).reduce(function(e,t){return e.concat([t,t+"-"+ie,t+"-"+ge])},[]),It="beforeRead",Yt="read",Xt="afterRead",Ft="beforeMain",Gt="main",Kt="afterMain",Jt="beforeWrite",Qt="write",Zt="afterWrite",er=[It,Yt,Xt,Ft,Gt,Kt,Jt,Qt,Zt];function I(e){return e?(e.nodeName||"").toLowerCase():null}function P(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ne(e){var t=P(e).Element;return e instanceof t||e instanceof Element}function _(e){var t=P(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function je(e){if(typeof ShadowRoot>"u")return!1;var t=P(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function tr(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},s=t.elements[r];!_(s)||!I(s)||(Object.assign(s.style,o),Object.keys(n).forEach(function(l){var u=n[l];u===!1?s.removeAttribute(l):s.setAttribute(l,u===!0?"":u)}))})}function rr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],s=t.attributes[o]||{},l=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),u=l.reduce(function(a,i){return a[i]="",a},{});!_(n)||!I(n)||(Object.assign(n.style,u),Object.keys(s).forEach(function(a){n.removeAttribute(a)}))})}}var dt={name:"applyStyles",enabled:!0,phase:"write",fn:tr,effect:rr,requires:["computeStyles"]};function z(e){return e.split("-")[0]}var re=Math.max,Te=Math.min,ae=Math.round;function ke(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function vt(){return!/^((?!chrome|android).)*safari/i.test(ke())}function se(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,s=1;t&&_(e)&&(n=e.offsetWidth>0&&ae(o.width)/e.offsetWidth||1,s=e.offsetHeight>0&&ae(o.height)/e.offsetHeight||1);var l=ne(e)?P(e):window,u=l.visualViewport,a=!vt()&&r,i=(o.left+(a&&u?u.offsetLeft:0))/n,f=(o.top+(a&&u?u.offsetTop:0))/s,p=o.width/n,c=o.height/s;return{width:p,height:c,top:f,right:i+p,bottom:f+c,left:i,x:i,y:f}}function Be(e){var t=se(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function mt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&je(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function F(e){return P(e).getComputedStyle(e)}function nr(e){return["table","td","th"].indexOf(I(e))>=0}function K(e){return((ne(e)?e.ownerDocument:e.document)||window.document).documentElement}function Le(e){return I(e)==="html"?e:e.assignedSlot||e.parentNode||(je(e)?e.host:null)||K(e)}function Ze(e){return!_(e)||F(e).position==="fixed"?null:e.offsetParent}function or(e){var t=/firefox/i.test(ke()),r=/Trident/i.test(ke());if(r&&_(e)){var o=F(e);if(o.position==="fixed")return null}var n=Le(e);for(je(n)&&(n=n.host);_(n)&&["html","body"].indexOf(I(n))<0;){var s=F(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function be(e){for(var t=P(e),r=Ze(e);r&&nr(r)&&F(r).position==="static";)r=Ze(r);return r&&(I(r)==="html"||I(r)==="body"&&F(r).position==="static")?t:r||or(e)||t}function Pe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function de(e,t,r){return re(e,Te(t,r))}function ir(e,t,r){var o=de(e,t,r);return o>r?r:o}function gt(){return{top:0,right:0,bottom:0,left:0}}function ht(e){return Object.assign({},gt(),e)}function yt(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var ar=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,ht(typeof e!="number"?e:yt(e,ye))};function sr(e){var t,r=e.state,o=e.name,n=e.options,s=r.elements.arrow,l=r.modifiersData.popperOffsets,u=z(r.placement),a=Pe(u),i=[B,N].indexOf(u)>=0,f=i?"height":"width";if(!(!s||!l)){var p=ar(n.padding,r),c=Be(s),v=a==="y"?j:B,g=a==="y"?H:N,d=r.rects.reference[f]+r.rects.reference[a]-l[a]-r.rects.popper[f],x=l[a]-r.rects.reference[a],O=be(s),L=O?a==="y"?O.clientHeight||0:O.clientWidth||0:0,A=d/2-x/2,m=p[v],b=L-c[f]-p[g],E=L/2-c[f]/2+A,T=de(m,E,b),S=a;r.modifiersData[o]=(t={},t[S]=T,t.centerOffset=T-E,t)}}function ur(e){var t=e.state,r=e.options,o=r.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||mt(t.elements.popper,n)&&(t.elements.arrow=n))}var fr={name:"arrow",enabled:!0,phase:"main",fn:sr,effect:ur,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ue(e){return e.split("-")[1]}var lr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function cr(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:ae(r*n)/n||0,y:ae(o*n)/n||0}}function et(e){var t,r=e.popper,o=e.popperRect,n=e.placement,s=e.variation,l=e.offsets,u=e.position,a=e.gpuAcceleration,i=e.adaptive,f=e.roundOffsets,p=e.isFixed,c=l.x,v=c===void 0?0:c,g=l.y,d=g===void 0?0:g,x=typeof f=="function"?f({x:v,y:d}):{x:v,y:d};v=x.x,d=x.y;var O=l.hasOwnProperty("x"),L=l.hasOwnProperty("y"),A=B,m=j,b=window;if(i){var E=be(r),T="clientHeight",S="clientWidth";if(E===P(r)&&(E=K(r),F(E).position!=="static"&&u==="absolute"&&(T="scrollHeight",S="scrollWidth")),E=E,n===j||(n===B||n===N)&&s===ge){m=H;var w=p&&E===b&&b.visualViewport?b.visualViewport.height:E[T];d-=w-o.height,d*=a?1:-1}if(n===B||(n===j||n===H)&&s===ge){A=N;var R=p&&E===b&&b.visualViewport?b.visualViewport.width:E[S];v-=R-o.width,v*=a?1:-1}}var k=Object.assign({position:u},i&&lr),$=f===!0?cr({x:v,y:d},P(r)):{x:v,y:d};if(v=$.x,d=$.y,a){var W;return Object.assign({},k,(W={},W[m]=L?"0":"",W[A]=O?"0":"",W.transform=(b.devicePixelRatio||1)<=1?"translate("+v+"px, "+d+"px)":"translate3d("+v+"px, "+d+"px, 0)",W))}return Object.assign({},k,(t={},t[m]=L?d+"px":"",t[A]=O?v+"px":"",t.transform="",t))}function pr(e){var t=e.state,r=e.options,o=r.gpuAcceleration,n=o===void 0?!0:o,s=r.adaptive,l=s===void 0?!0:s,u=r.roundOffsets,a=u===void 0?!0:u,i={placement:z(t.placement),variation:ue(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,et(Object.assign({},i,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,et(Object.assign({},i,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var bt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:pr,data:{}},Ee={passive:!0};function dr(e){var t=e.state,r=e.instance,o=e.options,n=o.scroll,s=n===void 0?!0:n,l=o.resize,u=l===void 0?!0:l,a=P(t.elements.popper),i=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&i.forEach(function(f){f.addEventListener("scroll",r.update,Ee)}),u&&a.addEventListener("resize",r.update,Ee),function(){s&&i.forEach(function(f){f.removeEventListener("scroll",r.update,Ee)}),u&&a.removeEventListener("resize",r.update,Ee)}}var wt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:dr,data:{}},vr={left:"right",right:"left",bottom:"top",top:"bottom"};function Se(e){return e.replace(/left|right|bottom|top/g,function(t){return vr[t]})}var mr={start:"end",end:"start"};function tt(e){return e.replace(/start|end/g,function(t){return mr[t]})}function Me(e){var t=P(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function _e(e){return se(K(e)).left+Me(e).scrollLeft}function gr(e,t){var r=P(e),o=K(e),n=r.visualViewport,s=o.clientWidth,l=o.clientHeight,u=0,a=0;if(n){s=n.width,l=n.height;var i=vt();(i||!i&&t==="fixed")&&(u=n.offsetLeft,a=n.offsetTop)}return{width:s,height:l,x:u+_e(e),y:a}}function hr(e){var t,r=K(e),o=Me(e),n=(t=e.ownerDocument)==null?void 0:t.body,s=re(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),l=re(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),u=-o.scrollLeft+_e(e),a=-o.scrollTop;return F(n||r).direction==="rtl"&&(u+=re(r.clientWidth,n?n.clientWidth:0)-s),{width:s,height:l,x:u,y:a}}function He(e){var t=F(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function xt(e){return["html","body","#document"].indexOf(I(e))>=0?e.ownerDocument.body:_(e)&&He(e)?e:xt(Le(e))}function ve(e,t){var r;t===void 0&&(t=[]);var o=xt(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),s=P(o),l=n?[s].concat(s.visualViewport||[],He(o)?o:[]):o,u=t.concat(l);return n?u:u.concat(ve(Le(l)))}function De(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function yr(e,t){var r=se(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function rt(e,t,r){return t===ct?De(gr(e,r)):ne(t)?yr(t,r):De(hr(K(e)))}function br(e){var t=ve(Le(e)),r=["absolute","fixed"].indexOf(F(e).position)>=0,o=r&&_(e)?be(e):e;return ne(o)?t.filter(function(n){return ne(n)&&mt(n,o)&&I(n)!=="body"}):[]}function wr(e,t,r,o){var n=t==="clippingParents"?br(e):[].concat(t),s=[].concat(n,[r]),l=s[0],u=s.reduce(function(a,i){var f=rt(e,i,o);return a.top=re(f.top,a.top),a.right=Te(f.right,a.right),a.bottom=Te(f.bottom,a.bottom),a.left=re(f.left,a.left),a},rt(e,l,o));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Ot(e){var t=e.reference,r=e.element,o=e.placement,n=o?z(o):null,s=o?ue(o):null,l=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,a;switch(n){case j:a={x:l,y:t.y-r.height};break;case H:a={x:l,y:t.y+t.height};break;case N:a={x:t.x+t.width,y:u};break;case B:a={x:t.x-r.width,y:u};break;default:a={x:t.x,y:t.y}}var i=n?Pe(n):null;if(i!=null){var f=i==="y"?"height":"width";switch(s){case ie:a[i]=a[i]-(t[f]/2-r[f]/2);break;case ge:a[i]=a[i]+(t[f]/2-r[f]/2);break}}return a}function he(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=o===void 0?e.placement:o,s=r.strategy,l=s===void 0?e.strategy:s,u=r.boundary,a=u===void 0?Ut:u,i=r.rootBoundary,f=i===void 0?ct:i,p=r.elementContext,c=p===void 0?ce:p,v=r.altBoundary,g=v===void 0?!1:v,d=r.padding,x=d===void 0?0:d,O=ht(typeof x!="number"?x:yt(x,ye)),L=c===ce?zt:ce,A=e.rects.popper,m=e.elements[g?L:c],b=wr(ne(m)?m:m.contextElement||K(e.elements.popper),a,f,l),E=se(e.elements.reference),T=Ot({reference:E,element:A,placement:n}),S=De(Object.assign({},A,T)),w=c===ce?S:E,R={top:b.top-w.top+O.top,bottom:w.bottom-b.bottom+O.bottom,left:b.left-w.left+O.left,right:w.right-b.right+O.right},k=e.modifiersData.offset;if(c===ce&&k){var $=k[n];Object.keys(R).forEach(function(W){var V=[N,H].indexOf(W)>=0?1:-1,h=[j,H].indexOf(W)>=0?"y":"x";R[W]+=$[h]*V})}return R}function xr(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=r.boundary,s=r.rootBoundary,l=r.padding,u=r.flipVariations,a=r.allowedAutoPlacements,i=a===void 0?pt:a,f=ue(o),p=f?u?Qe:Qe.filter(function(g){return ue(g)===f}):ye,c=p.filter(function(g){return i.indexOf(g)>=0});c.length===0&&(c=p);var v=c.reduce(function(g,d){return g[d]=he(e,{placement:d,boundary:n,rootBoundary:s,padding:l})[z(d)],g},{});return Object.keys(v).sort(function(g,d){return v[g]-v[d]})}function Or(e){if(z(e)===$e)return[];var t=Se(e);return[tt(e),t,tt(t)]}function Er(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=r.mainAxis,s=n===void 0?!0:n,l=r.altAxis,u=l===void 0?!0:l,a=r.fallbackPlacements,i=r.padding,f=r.boundary,p=r.rootBoundary,c=r.altBoundary,v=r.flipVariations,g=v===void 0?!0:v,d=r.allowedAutoPlacements,x=t.options.placement,O=z(x),L=O===x,A=a||(L||!g?[Se(x)]:Or(x)),m=[x].concat(A).reduce(function(Z,X){return Z.concat(z(X)===$e?xr(t,{placement:X,boundary:f,rootBoundary:p,padding:i,flipVariations:g,allowedAutoPlacements:d}):X)},[]),b=t.rects.reference,E=t.rects.popper,T=new Map,S=!0,w=m[0],R=0;R<m.length;R++){var k=m[R],$=z(k),W=ue(k)===ie,V=[j,H].indexOf($)>=0,h=V?"width":"height",C=he(t,{placement:k,boundary:f,rootBoundary:p,altBoundary:c,padding:i}),D=V?W?N:B:W?H:j;b[h]>E[h]&&(D=Se(D));var Y=Se(D),q=[];if(s&&q.push(C[$]<=0),u&&q.push(C[D]<=0,C[Y]<=0),q.every(function(Z){return Z})){w=k,S=!1;break}T.set(k,q)}if(S)for(var J=g?3:1,Q=function(Z){var X=m.find(function(xe){var le=T.get(xe);if(le)return le.slice(0,Z).every(function(oe){return oe})});if(X)return w=X,"break"},fe=J;fe>0;fe--){var we=Q(fe);if(we==="break")break}t.placement!==w&&(t.modifiersData[o]._skip=!0,t.placement=w,t.reset=!0)}}var Sr={name:"flip",enabled:!0,phase:"main",fn:Er,requiresIfExists:["offset"],data:{_skip:!1}};function nt(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ot(e){return[j,N,H,B].some(function(t){return e[t]>=0})}function Tr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,s=t.modifiersData.preventOverflow,l=he(t,{elementContext:"reference"}),u=he(t,{altBoundary:!0}),a=nt(l,o),i=nt(u,n,s),f=ot(a),p=ot(i);t.modifiersData[r]={referenceClippingOffsets:a,popperEscapeOffsets:i,isReferenceHidden:f,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}var Rr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Tr};function Lr(e,t,r){var o=z(e),n=[B,j].indexOf(o)>=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,l=s[0],u=s[1];return l=l||0,u=(u||0)*n,[B,N].indexOf(o)>=0?{x:u,y:l}:{x:l,y:u}}function Cr(e){var t=e.state,r=e.options,o=e.name,n=r.offset,s=n===void 0?[0,0]:n,l=pt.reduce(function(f,p){return f[p]=Lr(p,t.rects,s),f},{}),u=l[t.placement],a=u.x,i=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=i),t.modifiersData[o]=l}var Ar={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Cr};function kr(e){var t=e.state,r=e.name;t.modifiersData[r]=Ot({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var Et={name:"popperOffsets",enabled:!0,phase:"read",fn:kr,data:{}};function Dr(e){return e==="x"?"y":"x"}function Wr(e){var t=e.state,r=e.options,o=e.name,n=r.mainAxis,s=n===void 0?!0:n,l=r.altAxis,u=l===void 0?!1:l,a=r.boundary,i=r.rootBoundary,f=r.altBoundary,p=r.padding,c=r.tether,v=c===void 0?!0:c,g=r.tetherOffset,d=g===void 0?0:g,x=he(t,{boundary:a,rootBoundary:i,padding:p,altBoundary:f}),O=z(t.placement),L=ue(t.placement),A=!L,m=Pe(O),b=Dr(m),E=t.modifiersData.popperOffsets,T=t.rects.reference,S=t.rects.popper,w=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,R=typeof w=="number"?{mainAxis:w,altAxis:w}:Object.assign({mainAxis:0,altAxis:0},w),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(E){if(s){var W,V=m==="y"?j:B,h=m==="y"?H:N,C=m==="y"?"height":"width",D=E[m],Y=D+x[V],q=D-x[h],J=v?-S[C]/2:0,Q=L===ie?T[C]:S[C],fe=L===ie?-S[C]:-T[C],we=t.elements.arrow,Z=v&&we?Be(we):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:gt(),xe=X[V],le=X[h],oe=de(0,T[C],Z[C]),Ct=A?T[C]/2-J-oe-xe-R.mainAxis:Q-oe-xe-R.mainAxis,At=A?-T[C]/2+J+oe+le+R.mainAxis:fe+oe+le+R.mainAxis,Ce=t.elements.arrow&&be(t.elements.arrow),kt=Ce?m==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ve=(W=k?.[m])!=null?W:0,Dt=D+Ct-Ve-kt,Wt=D+At-Ve,qe=de(v?Te(Y,Dt):Y,D,v?re(q,Wt):q);E[m]=qe,$[m]=qe-D}if(u){var Ue,$t=m==="x"?j:B,jt=m==="x"?H:N,ee=E[b],Oe=b==="y"?"height":"width",ze=ee+x[$t],Ie=ee-x[jt],Ae=[j,B].indexOf(O)!==-1,Ye=(Ue=k?.[b])!=null?Ue:0,Xe=Ae?ze:ee-T[Oe]-S[Oe]-Ye+R.altAxis,Fe=Ae?ee+T[Oe]+S[Oe]-Ye-R.altAxis:Ie,Ge=v&&Ae?ir(Xe,ee,Fe):de(v?Xe:ze,ee,v?Fe:Ie);E[b]=Ge,$[b]=Ge-ee}t.modifiersData[o]=$}}var $r={name:"preventOverflow",enabled:!0,phase:"main",fn:Wr,requiresIfExists:["offset"]};function jr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Br(e){return e===P(e)||!_(e)?Me(e):jr(e)}function Pr(e){var t=e.getBoundingClientRect(),r=ae(t.width)/e.offsetWidth||1,o=ae(t.height)/e.offsetHeight||1;return r!==1||o!==1}function Mr(e,t,r){r===void 0&&(r=!1);var o=_(t),n=_(t)&&Pr(t),s=K(t),l=se(e,n,r),u={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!r)&&((I(t)!=="body"||He(s))&&(u=Br(t)),_(t)?(a=se(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=_e(s))),{x:l.left+u.scrollLeft-a.x,y:l.top+u.scrollTop-a.y,width:l.width,height:l.height}}function _r(e){var t=new Map,r=new Set,o=[];e.forEach(function(s){t.set(s.name,s)});function n(s){r.add(s.name);var l=[].concat(s.requires||[],s.requiresIfExists||[]);l.forEach(function(u){if(!r.has(u)){var a=t.get(u);a&&n(a)}}),o.push(s)}return e.forEach(function(s){r.has(s.name)||n(s)}),o}function Hr(e){var t=_r(e);return er.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function Nr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Vr(e){var t=e.reduce(function(r,o){var n=r[o.name];return r[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var it={placement:"bottom",modifiers:[],strategy:"absolute"};function at(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function Ne(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,o=r===void 0?[]:r,n=t.defaultOptions,s=n===void 0?it:n;return function(l,u,a){a===void 0&&(a=s);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},it,s),modifiersData:{},elements:{reference:l,popper:u},attributes:{},styles:{}},f=[],p=!1,c={state:i,setOptions:function(d){var x=typeof d=="function"?d(i.options):d;g(),i.options=Object.assign({},s,i.options,x),i.scrollParents={reference:ne(l)?ve(l):l.contextElement?ve(l.contextElement):[],popper:ve(u)};var O=Hr(Vr([].concat(o,i.options.modifiers)));return i.orderedModifiers=O.filter(function(L){return L.enabled}),v(),c.update()},forceUpdate:function(){if(!p){var d=i.elements,x=d.reference,O=d.popper;if(at(x,O)){i.rects={reference:Mr(x,be(O),i.options.strategy==="fixed"),popper:Be(O)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(S){return i.modifiersData[S.name]=Object.assign({},S.data)});for(var L=0;L<i.orderedModifiers.length;L++){if(i.reset===!0){i.reset=!1,L=-1;continue}var A=i.orderedModifiers[L],m=A.fn,b=A.options,E=b===void 0?{}:b,T=A.name;typeof m=="function"&&(i=m({state:i,options:E,name:T,instance:c})||i)}}}},update:Nr(function(){return new Promise(function(d){c.forceUpdate(),d(i)})}),destroy:function(){g(),p=!0}};if(!at(l,u))return c;c.setOptions(a).then(function(d){!p&&a.onFirstUpdate&&a.onFirstUpdate(d)});function v(){i.orderedModifiers.forEach(function(d){var x=d.name,O=d.options,L=O===void 0?{}:O,A=d.effect;if(typeof A=="function"){var m=A({state:i,name:x,instance:c,options:L}),b=function(){};f.push(m||b)}})}function g(){f.forEach(function(d){return d()}),f=[]}return c}}Ne();var qr=[wt,Et,bt,dt];Ne({defaultModifiers:qr});var Ur=[wt,Et,bt,dt,Ar,Sr,$r,fr,Rr],zr=Ne({defaultModifiers:Ur}),Ir=We(Ht()),Yr=[],Xr=function(e,t,r){r===void 0&&(r={});var o=y.useRef(null),n={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||Yr},s=y.useState({styles:{popper:{position:n.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=s[0],u=s[1],a=y.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(p){var c=p.state,v=Object.keys(c.elements);Mt.flushSync(function(){u({styles:Ke(v.map(function(g){return[g,c.styles[g]||{}]})),attributes:Ke(v.map(function(g){return[g,c.attributes[g]]}))})})},requires:["computeStyles"]}},[]),i=y.useMemo(function(){var p={onFirstUpdate:n.onFirstUpdate,placement:n.placement,strategy:n.strategy,modifiers:[].concat(n.modifiers,[a,{name:"applyStyles",enabled:!1}])};return(0,Ir.default)(o.current,p)?o.current||p:(o.current=p,p)},[n.onFirstUpdate,n.placement,n.strategy,n.modifiers,a]),f=y.useRef();return Je(function(){f.current&&f.current.setOptions(i)},[i]),Je(function(){if(!(e==null||t==null)){var p=r.createPopper||zr,c=p(e,t,i);return f.current=c,function(){c.destroy(),f.current=null}}},[e,t,r.createPopper]),{state:f.current?f.current.state:null,styles:l.styles,attributes:l.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}};We(Nt());function St(e){var t=y.useRef(e);return t.current=e,y.useCallback(function(){return t.current},[])}var Fr=function(){};function Gr(e){var t=e.initial,r=e.value,o=e.onChange,n=o===void 0?Fr:o;if(t===void 0&&r===void 0)throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');var s=y.useState(t),l=s[0],u=s[1],a=St(l),i=y.useCallback(function(p){var c=a(),v=typeof p=="function"?p(c):p;typeof v.persist=="function"&&v.persist(),u(v),typeof n=="function"&&n(v)},[a,n]),f=r!==void 0;return[f?r:l,f?n:i]}function Tt(e,t){return e===void 0&&(e=0),t===void 0&&(t=0),function(){return{width:0,height:0,top:t,right:e,bottom:t,left:e,x:0,y:0,toJSON:function(){return null}}}}var Kr=["styles","attributes"],st={getBoundingClientRect:Tt()},ut={closeOnOutsideClick:!0,closeOnTriggerHidden:!1,defaultVisible:!1,delayHide:0,delayShow:0,followCursor:!1,interactive:!1,mutationObserverOptions:{attributes:!0,childList:!0,subtree:!0},offset:[0,6],trigger:"hover"};function Jr(e,t){var r,o,n;e===void 0&&(e={}),t===void 0&&(t={});var s=Object.keys(ut).reduce(function(h,C){var D;return te({},h,(D={},D[C]=h[C]!==void 0?h[C]:ut[C],D))},e),l=y.useMemo(function(){return[{name:"offset",options:{offset:s.offset}}]},Array.isArray(s.offset)?s.offset:[]),u=te({},t,{placement:t.placement||s.placement,modifiers:t.modifiers||l}),a=y.useState(null),i=a[0],f=a[1],p=y.useState(null),c=p[0],v=p[1],g=Gr({initial:s.defaultVisible,value:s.visible,onChange:s.onVisibleChange}),d=g[0],x=g[1],O=y.useRef();y.useEffect(function(){return function(){return clearTimeout(O.current)}},[]);var L=Xr(s.followCursor?st:i,c,u),A=L.styles,m=L.attributes,b=Pt(L,Kr),E=b.update,T=St({visible:d,triggerRef:i,tooltipRef:c,finalConfig:s}),S=y.useCallback(function(h){return Array.isArray(s.trigger)?s.trigger.includes(h):s.trigger===h},Array.isArray(s.trigger)?s.trigger:[s.trigger]),w=y.useCallback(function(){clearTimeout(O.current),O.current=window.setTimeout(function(){return x(!1)},s.delayHide)},[s.delayHide,x]),R=y.useCallback(function(){clearTimeout(O.current),O.current=window.setTimeout(function(){return x(!0)},s.delayShow)},[s.delayShow,x]),k=y.useCallback(function(){T().visible?w():R()},[T,w,R]);y.useEffect(function(){if(T().finalConfig.closeOnOutsideClick){var h=function(C){var D,Y=T(),q=Y.tooltipRef,J=Y.triggerRef,Q=(C.composedPath==null||(D=C.composedPath())==null?void 0:D[0])||C.target;Q instanceof Node&&q!=null&&J!=null&&!q.contains(Q)&&!J.contains(Q)&&w()};return document.addEventListener("mousedown",h),function(){return document.removeEventListener("mousedown",h)}}},[T,w]),y.useEffect(function(){if(!(i==null||!S("click")))return i.addEventListener("click",k),function(){return i.removeEventListener("click",k)}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("double-click")))return i.addEventListener("dblclick",k),function(){return i.removeEventListener("dblclick",k)}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("right-click"))){var h=function(C){C.preventDefault(),k()};return i.addEventListener("contextmenu",h),function(){return i.removeEventListener("contextmenu",h)}}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("focus")))return i.addEventListener("focus",R),i.addEventListener("blur",w),function(){i.removeEventListener("focus",R),i.removeEventListener("blur",w)}},[i,S,R,w]),y.useEffect(function(){if(!(i==null||!S("hover")))return i.addEventListener("mouseenter",R),i.addEventListener("mouseleave",w),function(){i.removeEventListener("mouseenter",R),i.removeEventListener("mouseleave",w)}},[i,S,R,w]),y.useEffect(function(){if(!(c==null||!S("hover")||!T().finalConfig.interactive))return c.addEventListener("mouseenter",R),c.addEventListener("mouseleave",w),function(){c.removeEventListener("mouseenter",R),c.removeEventListener("mouseleave",w)}},[c,S,R,w,T]);var $=b==null||(r=b.state)==null||(o=r.modifiersData)==null||(n=o.hide)==null?void 0:n.isReferenceHidden;y.useEffect(function(){s.closeOnTriggerHidden&&$&&w()},[s.closeOnTriggerHidden,w,$]),y.useEffect(function(){if(!s.followCursor||i==null)return;function h(C){var D=C.clientX,Y=C.clientY;st.getBoundingClientRect=Tt(D,Y),E?.()}return i.addEventListener("mousemove",h),function(){return i.removeEventListener("mousemove",h)}},[s.followCursor,i,E]),y.useEffect(function(){if(!(c==null||E==null||s.mutationObserverOptions==null)){var h=new MutationObserver(E);return h.observe(c,s.mutationObserverOptions),function(){return h.disconnect()}}},[s.mutationObserverOptions,c,E]);var W=function(h){return h===void 0&&(h={}),te({},h,{style:te({},h.style,A.popper)},m.popper,{"data-popper-interactive":s.interactive})},V=function(h){return h===void 0&&(h={}),te({},h,m.arrow,{style:te({},h.style,A.arrow),"data-popper-arrow":!0})};return te({getArrowProps:V,getTooltipProps:W,setTooltipRef:v,setTriggerRef:f,tooltipRef:c,triggerRef:i,visible:d},b)}var{document:me}=qt,M=(0,Vt.default)(1e3)((e,t,r,o=0)=>t.split("-")[0]===e?r:o),G=8,Qr=Re.div({position:"absolute",borderStyle:"solid"},({placement:e})=>{let t=0,r=0;switch(!0){case(e.startsWith("left")||e.startsWith("right")):{r=8;break}case(e.startsWith("top")||e.startsWith("bottom")):{t=8;break}}return{transform:`translate3d(${t}px, ${r}px, 0px)`}},({theme:e,color:t,placement:r})=>({bottom:`${M("top",r,`${G*-1}px`,"auto")}`,top:`${M("bottom",r,`${G*-1}px`,"auto")}`,right:`${M("left",r,`${G*-1}px`,"auto")}`,left:`${M("right",r,`${G*-1}px`,"auto")}`,borderBottomWidth:`${M("top",r,"0",G)}px`,borderTopWidth:`${M("bottom",r,"0",G)}px`,borderRightWidth:`${M("left",r,"0",G)}px`,borderLeftWidth:`${M("right",r,"0",G)}px`,borderTopColor:M("top",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderBottomColor:M("bottom",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderLeftColor:M("left",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderRightColor:M("right",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent")})),Zr=Re.div(({hidden:e})=>({display:e?"none":"inline-block",zIndex:2147483647,colorScheme:"light dark"}),({theme:e,color:t,hasChrome:r})=>r?{background:t&&e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,filter:`
2
2
  drop-shadow(0px 5px 5px rgba(0,0,0,0.05))
3
3
  drop-shadow(0 1px 3px rgba(0,0,0,0.1))
4
4
  `,borderRadius:e.appBorderRadius+2,fontSize:e.typography.size.s1}:{}),Rt=U.forwardRef(({placement:e="top",hasChrome:t=!0,children:r,arrowProps:o={},tooltipRef:n,color:s,withArrows:l,...u},a)=>U.createElement(Zr,{"data-testid":"tooltip",hasChrome:t,ref:a,...u,color:s},t&&l&&U.createElement(Qr,{placement:e,...o,color:s}),r));Rt.displayName="Tooltip";var en=Re.div`