@limetech/lime-elements 39.9.0 → 39.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/{component-DC8AD-ZG.js → component-BrNWuGdj.js} +1 -1
  3. package/dist/cjs/{component-BflTavfP.js → component-CFk7Dfoi.js} +3 -3
  4. package/dist/cjs/{component--XvTU1MI.js → component-y8swlNNR.js} +1 -1
  5. package/dist/cjs/lime-elements.cjs.js +1 -1
  6. package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +4 -4
  7. package/dist/cjs/limel-button-group.cjs.entry.js +3 -7
  8. package/dist/cjs/limel-chip_2.cjs.entry.js +4 -4
  9. package/dist/cjs/limel-code-diff.cjs.entry.js +645 -711
  10. package/dist/cjs/limel-date-picker.cjs.entry.js +4 -4
  11. package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
  12. package/dist/cjs/limel-portal_3.cjs.entry.js +3 -3
  13. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-select.cjs.entry.js +2 -2
  15. package/dist/cjs/limel-slider.cjs.entry.js +2 -2
  16. package/dist/cjs/limel-switch.cjs.entry.js +18 -632
  17. package/dist/cjs/limel-tab-bar.cjs.entry.js +4 -4
  18. package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
  19. package/dist/cjs/limel-table.cjs.entry.js +3 -3
  20. package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +3 -3
  21. package/dist/cjs/limel-text-editor.cjs.entry.js +1 -1
  22. package/dist/cjs/loader.cjs.js +1 -1
  23. package/dist/cjs/{ponyfill-CNdYytGF.js → ponyfill-BgIFyUG5.js} +0 -1
  24. package/dist/collection/components/button-group/button-group.css +38 -33
  25. package/dist/collection/components/button-group/button-group.js +3 -7
  26. package/dist/collection/components/switch/switch.css +69 -769
  27. package/dist/collection/components/switch/switch.js +18 -50
  28. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  29. package/dist/collection/components/tab-panel/tab-panel.js +1 -1
  30. package/dist/collection/components/table/table.js +3 -3
  31. package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +3 -3
  32. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
  33. package/dist/collection/components/text-editor/text-editor.js +1 -1
  34. package/dist/collection/components/tooltip/tooltip-content.js +1 -1
  35. package/dist/collection/components/tooltip/tooltip.js +2 -2
  36. package/dist/esm/{component-CfpvJ0ln.js → component-7QB0OUSF.js} +1 -1
  37. package/dist/esm/{component-zxri0Bi3.js → component-D4qgwaTf.js} +1 -1
  38. package/dist/esm/{component-BsWKksqY.js → component-wGVqvUmL.js} +3 -3
  39. package/dist/esm/lime-elements.js +1 -1
  40. package/dist/esm/limel-breadcrumbs_7.entry.js +4 -4
  41. package/dist/esm/limel-button-group.entry.js +4 -8
  42. package/dist/esm/limel-chip_2.entry.js +4 -4
  43. package/dist/esm/limel-code-diff.entry.js +645 -711
  44. package/dist/esm/limel-date-picker.entry.js +4 -4
  45. package/dist/esm/limel-dialog.entry.js +2 -2
  46. package/dist/esm/limel-portal_3.entry.js +3 -3
  47. package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
  48. package/dist/esm/limel-select.entry.js +2 -2
  49. package/dist/esm/limel-slider.entry.js +2 -2
  50. package/dist/esm/limel-switch.entry.js +19 -633
  51. package/dist/esm/limel-tab-bar.entry.js +4 -4
  52. package/dist/esm/limel-tab-panel.entry.js +1 -1
  53. package/dist/esm/limel-table.entry.js +3 -3
  54. package/dist/esm/limel-text-editor-link-menu.entry.js +3 -3
  55. package/dist/esm/limel-text-editor.entry.js +1 -1
  56. package/dist/esm/loader.js +1 -1
  57. package/dist/esm/{ponyfill-D-I_3IxW.js → ponyfill-ChRGk668.js} +1 -1
  58. package/dist/lime-elements/lime-elements.esm.js +1 -1
  59. package/dist/lime-elements/{p-89dfbd4a.entry.js → p-13f4d39d.entry.js} +1 -1
  60. package/dist/lime-elements/{p-68ffd790.entry.js → p-1a3a7374.entry.js} +1 -1
  61. package/dist/lime-elements/p-266c228c.entry.js +1 -0
  62. package/dist/lime-elements/{p-90f8d2ef.entry.js → p-288aa326.entry.js} +1 -1
  63. package/dist/lime-elements/{p-6b05db4a.entry.js → p-2af214de.entry.js} +1 -1
  64. package/dist/lime-elements/{p-c6e9af7c.entry.js → p-37b41bad.entry.js} +1 -1
  65. package/dist/lime-elements/{p-ce22f3da.entry.js → p-74cd80a9.entry.js} +4 -4
  66. package/dist/lime-elements/{p-70e2e60c.entry.js → p-767935ac.entry.js} +1 -1
  67. package/dist/lime-elements/{p-b95a42ea.entry.js → p-86eebe44.entry.js} +1 -1
  68. package/dist/lime-elements/{p-D7ojrUFG.js → p-BN1-aIOw.js} +1 -1
  69. package/dist/lime-elements/{p-ClrXWM0F.js → p-C9yTLqR8.js} +1 -1
  70. package/dist/lime-elements/{p-D-I_3IxW.js → p-ChRGk668.js} +3 -3
  71. package/dist/lime-elements/{p-BDAjvVhN.js → p-DZkKQUDM.js} +3 -3
  72. package/dist/lime-elements/{p-dcf3cc71.entry.js → p-b2ea92be.entry.js} +1 -1
  73. package/dist/lime-elements/p-b3622713.entry.js +1 -0
  74. package/dist/lime-elements/{p-8ec4fdee.entry.js → p-cd722648.entry.js} +2 -2
  75. package/dist/lime-elements/{p-ee3afb60.entry.js → p-cdd5b814.entry.js} +9 -9
  76. package/dist/lime-elements/{p-8ec92025.entry.js → p-db51323c.entry.js} +1 -1
  77. package/dist/lime-elements/{p-64f664b0.entry.js → p-e2f1b070.entry.js} +1 -1
  78. package/dist/lime-elements/p-f10ca306.entry.js +1 -0
  79. package/dist/types/components/switch/switch.d.ts +4 -6
  80. package/package.json +3 -3
  81. package/dist/lime-elements/p-5be668d8.entry.js +0 -1
  82. package/dist/lime-elements/p-644911cc.entry.js +0 -68
  83. package/dist/lime-elements/p-965288d2.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as t,c as e,h as r,a as n}from"./p-DBTJNfo7.js";import{g as i,b as o}from"./p-CgNJbSP4.js";import{i as a}from"./p-DkL-aPMx.js";import{_ as c,a as s,g as l,M as d,c as u,m as f,b as h}from"./p-D-I_3IxW.js";import{a as b,b as m,M as p}from"./p-D7ojrUFG.js";import{a as g,c as v}from"./p-DTNvx8HZ.js";import{a as _,b as y,i as w,c as x}from"./p-Cv8K0N31.js";import"./p-DtS35Df5.js";import"./p-BJQylLSL.js";import"./p-efBXH4mj.js";import"./p-B8VKuhvH.js";import"./p-oiMYqRQ0.js";import"./p-BgPHaiMH.js";import"./p-CK4jS9_E.js";import"./p-f_1nwOC8.js";var C,k=y((function(t,e){return w(t)?function(t,e){var r=-1,n=_,i=!0,o=t.length,a=[],c=e.length;if(!o)return a;e.length>=200&&(n=v,i=!1,e=new g(e));t:for(;++r<o;){var s=t[r],l=s;if(s=0!==s?s:0,i&&l==l){for(var d=c;d--;)if(e[d]===l)continue t;a.push(s)}else n(e,l,undefined)||a.push(s)}return a}(t,x(e,1,w)):[]})),T={ANIMATING:"mdc-tab-scroller--animating",SCROLL_AREA_SCROLL:"mdc-tab-scroller__scroll-area--scroll",SCROLL_TEST:"mdc-tab-scroller__test"},E={AREA_SELECTOR:".mdc-tab-scroller__scroll-area",CONTENT_SELECTOR:".mdc-tab-scroller__scroll-content"},S=function(t){this.adapter=t},A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(){var t=this.adapter.getScrollAreaScrollLeft(),e=this.calculateScrollEdges().right;return Math.round(e-t)},e.prototype.scrollToRTL=function(t){var e=this.calculateScrollEdges(),r=this.adapter.getScrollAreaScrollLeft(),n=this.clampScrollValue(e.right-t);return{finalScrollPosition:n,scrollDelta:n-r}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.getAnimatingScrollPosition=function(t){return t},e.prototype.calculateScrollEdges=function(){return{left:0,right:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth()}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.left,t),e.right)},e}(S),O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft();return Math.round(t-e)},e.prototype.scrollToRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.getAnimatingScrollPosition=function(t,e){return t-e},e.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth();return{left:this.adapter.getScrollAreaOffsetWidth()-t,right:0}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.max(Math.min(e.right,t),e.left)},e}(S),R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft();return Math.round(e-t)},e.prototype.scrollToRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(t);return{finalScrollPosition:r,scrollDelta:e-r}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e+t);return{finalScrollPosition:r,scrollDelta:e-r}},e.prototype.getAnimatingScrollPosition=function(t,e){return t+e},e.prototype.calculateScrollEdges=function(){return{left:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth(),right:0}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.right,t),e.left)},e}(S),I=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.isAnimating=!1,n}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return E},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{eventTargetMatchesSelector:function(){return!1},addClass:function(){},removeClass:function(){},addScrollAreaClass:function(){},setScrollAreaStyleProperty:function(){},setScrollContentStyleProperty:function(){},getScrollContentStyleValue:function(){return""},setScrollAreaScrollLeft:function(){},getScrollAreaScrollLeft:function(){return 0},getScrollContentOffsetWidth:function(){return 0},getScrollAreaOffsetWidth:function(){return 0},computeScrollAreaClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeScrollContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeHorizontalScrollbarHeight:function(){return 0}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this.adapter.computeHorizontalScrollbarHeight();this.adapter.setScrollAreaStyleProperty("margin-bottom",-t+"px"),this.adapter.addScrollAreaClass(e.cssClasses.SCROLL_AREA_SCROLL)},e.prototype.getScrollPosition=function(){if(this.isRTL())return this.computeCurrentScrollPositionRTL();var t=this.calculateCurrentTranslateX();return this.adapter.getScrollAreaScrollLeft()-t},e.prototype.handleInteraction=function(){this.isAnimating&&this.stopScrollAnimation()},e.prototype.handleTransitionEnd=function(t){this.isAnimating&&this.adapter.eventTargetMatchesSelector(t.target,e.strings.CONTENT_SELECTOR)&&(this.isAnimating=!1,this.adapter.removeClass(e.cssClasses.ANIMATING))},e.prototype.incrementScroll=function(t){0!==t&&this.animate(this.getIncrementScrollOperation(t))},e.prototype.incrementScrollImmediate=function(t){if(0!==t){var e=this.getIncrementScrollOperation(t);0!==e.scrollDelta&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(e.finalScrollPosition))}},e.prototype.scrollTo=function(t){this.isRTL()?this.scrollToImplRTL(t):this.scrollToImpl(t)},e.prototype.getRTLScroller=function(){return this.rtlScrollerInstance||(this.rtlScrollerInstance=this.rtlScrollerFactory()),this.rtlScrollerInstance},e.prototype.calculateCurrentTranslateX=function(){var t=this.adapter.getScrollContentStyleValue("transform");if("none"===t)return 0;var e=/\((.+?)\)/.exec(t);if(!e)return 0;var r=l(e[1].split(","),6);return parseFloat(r[4])},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.left,t),e.right)},e.prototype.computeCurrentScrollPositionRTL=function(){var t=this.calculateCurrentTranslateX();return this.getRTLScroller().getScrollPositionRTL(t)},e.prototype.calculateScrollEdges=function(){return{left:0,right:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth()}},e.prototype.scrollToImpl=function(t){var e=this.getScrollPosition(),r=this.clampScrollValue(t);this.animate({finalScrollPosition:r,scrollDelta:r-e})},e.prototype.scrollToImplRTL=function(t){var e=this.getRTLScroller().scrollToRTL(t);this.animate(e)},e.prototype.getIncrementScrollOperation=function(t){if(this.isRTL())return this.getRTLScroller().incrementScrollRTL(t);var e=this.getScrollPosition(),r=this.clampScrollValue(t+e);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.animate=function(t){var r=this;0!==t.scrollDelta&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(t.finalScrollPosition),this.adapter.setScrollContentStyleProperty("transform","translateX("+t.scrollDelta+"px)"),this.adapter.computeScrollAreaClientRect(),requestAnimationFrame((function(){r.adapter.addClass(e.cssClasses.ANIMATING),r.adapter.setScrollContentStyleProperty("transform","none")})),this.isAnimating=!0)},e.prototype.stopScrollAnimation=function(){this.isAnimating=!1;var t=this.getAnimatingScrollPosition();this.adapter.removeClass(e.cssClasses.ANIMATING),this.adapter.setScrollContentStyleProperty("transform","translateX(0px)"),this.adapter.setScrollAreaScrollLeft(t)},e.prototype.getAnimatingScrollPosition=function(){var t=this.calculateCurrentTranslateX(),e=this.adapter.getScrollAreaScrollLeft();return this.isRTL()?this.getRTLScroller().getAnimatingScrollPosition(e,t):e-t},e.prototype.rtlScrollerFactory=function(){var t=this.adapter.getScrollAreaScrollLeft();this.adapter.setScrollAreaScrollLeft(t-1);var e=this.adapter.getScrollAreaScrollLeft();if(e<0)return this.adapter.setScrollAreaScrollLeft(t),new O(this.adapter);var r=this.adapter.computeScrollAreaClientRect(),n=this.adapter.computeScrollContentClientRect(),i=Math.round(n.right-r.right);return this.adapter.setScrollAreaScrollLeft(t),i===e?new R(this.adapter):new A(this.adapter)},e.prototype.isRTL=function(){return"rtl"===this.adapter.getScrollContentStyleValue("direction")},e}(d),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.area=this.root.querySelector(I.strings.AREA_SELECTOR),this.content=this.root.querySelector(I.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleInteraction=function(){t.foundation.handleInteraction()},this.handleTransitionEnd=function(e){t.foundation.handleTransitionEnd(e)},this.area.addEventListener("wheel",this.handleInteraction,b()),this.area.addEventListener("touchstart",this.handleInteraction,b()),this.area.addEventListener("pointerdown",this.handleInteraction,b()),this.area.addEventListener("mousedown",this.handleInteraction,b()),this.area.addEventListener("keydown",this.handleInteraction,b()),this.content.addEventListener("transitionend",this.handleTransitionEnd)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.area.removeEventListener("wheel",this.handleInteraction,b()),this.area.removeEventListener("touchstart",this.handleInteraction,b()),this.area.removeEventListener("pointerdown",this.handleInteraction,b()),this.area.removeEventListener("mousedown",this.handleInteraction,b()),this.area.removeEventListener("keydown",this.handleInteraction,b()),this.content.removeEventListener("transitionend",this.handleTransitionEnd)},e.prototype.getDefaultFoundation=function(){var t=this;return new I({eventTargetMatchesSelector:function(t,e){return f(t,e)},addClass:function(e){t.root.classList.add(e)},removeClass:function(e){t.root.classList.remove(e)},addScrollAreaClass:function(e){t.area.classList.add(e)},setScrollAreaStyleProperty:function(e,r){t.area.style.setProperty(e,r)},setScrollContentStyleProperty:function(e,r){t.content.style.setProperty(e,r)},getScrollContentStyleValue:function(e){return window.getComputedStyle(t.content).getPropertyValue(e)},setScrollAreaScrollLeft:function(e){return t.area.scrollLeft=e},getScrollAreaScrollLeft:function(){return t.area.scrollLeft},getScrollContentOffsetWidth:function(){return t.content.offsetWidth},getScrollAreaOffsetWidth:function(){return t.area.offsetWidth},computeScrollAreaClientRect:function(){return t.area.getBoundingClientRect()},computeScrollContentClientRect:function(){return t.content.getBoundingClientRect()},computeHorizontalScrollbarHeight:function(){return function(t,e){if(void 0===e&&(e=!0),e&&void 0!==C)return C;var r=t.createElement("div");r.classList.add(T.SCROLL_TEST),t.body.appendChild(r);var n=r.offsetHeight-r.clientHeight;return t.body.removeChild(r),e&&(C=n),n}
1
+ import{r as t,c as e,h as r,a as n}from"./p-DBTJNfo7.js";import{g as i,b as o}from"./p-CgNJbSP4.js";import{i as a}from"./p-DkL-aPMx.js";import{_ as c,a as s,f as l,M as d,c as u,m as f,b as h}from"./p-ChRGk668.js";import{a as b,b as m,M as p}from"./p-BN1-aIOw.js";import{a as g,c as v}from"./p-DTNvx8HZ.js";import{a as _,b as y,i as w,c as x}from"./p-Cv8K0N31.js";import"./p-DtS35Df5.js";import"./p-BJQylLSL.js";import"./p-efBXH4mj.js";import"./p-B8VKuhvH.js";import"./p-oiMYqRQ0.js";import"./p-BgPHaiMH.js";import"./p-CK4jS9_E.js";import"./p-f_1nwOC8.js";var C,k=y((function(t,e){return w(t)?function(t,e){var r=-1,n=_,i=!0,o=t.length,a=[],c=e.length;if(!o)return a;e.length>=200&&(n=v,i=!1,e=new g(e));t:for(;++r<o;){var s=t[r],l=s;if(s=0!==s?s:0,i&&l==l){for(var d=c;d--;)if(e[d]===l)continue t;a.push(s)}else n(e,l,undefined)||a.push(s)}return a}(t,x(e,1,w)):[]})),T={ANIMATING:"mdc-tab-scroller--animating",SCROLL_AREA_SCROLL:"mdc-tab-scroller__scroll-area--scroll",SCROLL_TEST:"mdc-tab-scroller__test"},E={AREA_SELECTOR:".mdc-tab-scroller__scroll-area",CONTENT_SELECTOR:".mdc-tab-scroller__scroll-content"},S=function(t){this.adapter=t},A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(){var t=this.adapter.getScrollAreaScrollLeft(),e=this.calculateScrollEdges().right;return Math.round(e-t)},e.prototype.scrollToRTL=function(t){var e=this.calculateScrollEdges(),r=this.adapter.getScrollAreaScrollLeft(),n=this.clampScrollValue(e.right-t);return{finalScrollPosition:n,scrollDelta:n-r}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.getAnimatingScrollPosition=function(t){return t},e.prototype.calculateScrollEdges=function(){return{left:0,right:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth()}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.left,t),e.right)},e}(S),O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft();return Math.round(t-e)},e.prototype.scrollToRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.getAnimatingScrollPosition=function(t,e){return t-e},e.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth();return{left:this.adapter.getScrollAreaOffsetWidth()-t,right:0}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.max(Math.min(e.right,t),e.left)},e}(S),R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft();return Math.round(e-t)},e.prototype.scrollToRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(t);return{finalScrollPosition:r,scrollDelta:e-r}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e+t);return{finalScrollPosition:r,scrollDelta:e-r}},e.prototype.getAnimatingScrollPosition=function(t,e){return t+e},e.prototype.calculateScrollEdges=function(){return{left:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth(),right:0}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.right,t),e.left)},e}(S),I=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.isAnimating=!1,n}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return E},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{eventTargetMatchesSelector:function(){return!1},addClass:function(){},removeClass:function(){},addScrollAreaClass:function(){},setScrollAreaStyleProperty:function(){},setScrollContentStyleProperty:function(){},getScrollContentStyleValue:function(){return""},setScrollAreaScrollLeft:function(){},getScrollAreaScrollLeft:function(){return 0},getScrollContentOffsetWidth:function(){return 0},getScrollAreaOffsetWidth:function(){return 0},computeScrollAreaClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeScrollContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeHorizontalScrollbarHeight:function(){return 0}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this.adapter.computeHorizontalScrollbarHeight();this.adapter.setScrollAreaStyleProperty("margin-bottom",-t+"px"),this.adapter.addScrollAreaClass(e.cssClasses.SCROLL_AREA_SCROLL)},e.prototype.getScrollPosition=function(){if(this.isRTL())return this.computeCurrentScrollPositionRTL();var t=this.calculateCurrentTranslateX();return this.adapter.getScrollAreaScrollLeft()-t},e.prototype.handleInteraction=function(){this.isAnimating&&this.stopScrollAnimation()},e.prototype.handleTransitionEnd=function(t){this.isAnimating&&this.adapter.eventTargetMatchesSelector(t.target,e.strings.CONTENT_SELECTOR)&&(this.isAnimating=!1,this.adapter.removeClass(e.cssClasses.ANIMATING))},e.prototype.incrementScroll=function(t){0!==t&&this.animate(this.getIncrementScrollOperation(t))},e.prototype.incrementScrollImmediate=function(t){if(0!==t){var e=this.getIncrementScrollOperation(t);0!==e.scrollDelta&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(e.finalScrollPosition))}},e.prototype.scrollTo=function(t){this.isRTL()?this.scrollToImplRTL(t):this.scrollToImpl(t)},e.prototype.getRTLScroller=function(){return this.rtlScrollerInstance||(this.rtlScrollerInstance=this.rtlScrollerFactory()),this.rtlScrollerInstance},e.prototype.calculateCurrentTranslateX=function(){var t=this.adapter.getScrollContentStyleValue("transform");if("none"===t)return 0;var e=/\((.+?)\)/.exec(t);if(!e)return 0;var r=l(e[1].split(","),6);return parseFloat(r[4])},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.left,t),e.right)},e.prototype.computeCurrentScrollPositionRTL=function(){var t=this.calculateCurrentTranslateX();return this.getRTLScroller().getScrollPositionRTL(t)},e.prototype.calculateScrollEdges=function(){return{left:0,right:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth()}},e.prototype.scrollToImpl=function(t){var e=this.getScrollPosition(),r=this.clampScrollValue(t);this.animate({finalScrollPosition:r,scrollDelta:r-e})},e.prototype.scrollToImplRTL=function(t){var e=this.getRTLScroller().scrollToRTL(t);this.animate(e)},e.prototype.getIncrementScrollOperation=function(t){if(this.isRTL())return this.getRTLScroller().incrementScrollRTL(t);var e=this.getScrollPosition(),r=this.clampScrollValue(t+e);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.animate=function(t){var r=this;0!==t.scrollDelta&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(t.finalScrollPosition),this.adapter.setScrollContentStyleProperty("transform","translateX("+t.scrollDelta+"px)"),this.adapter.computeScrollAreaClientRect(),requestAnimationFrame((function(){r.adapter.addClass(e.cssClasses.ANIMATING),r.adapter.setScrollContentStyleProperty("transform","none")})),this.isAnimating=!0)},e.prototype.stopScrollAnimation=function(){this.isAnimating=!1;var t=this.getAnimatingScrollPosition();this.adapter.removeClass(e.cssClasses.ANIMATING),this.adapter.setScrollContentStyleProperty("transform","translateX(0px)"),this.adapter.setScrollAreaScrollLeft(t)},e.prototype.getAnimatingScrollPosition=function(){var t=this.calculateCurrentTranslateX(),e=this.adapter.getScrollAreaScrollLeft();return this.isRTL()?this.getRTLScroller().getAnimatingScrollPosition(e,t):e-t},e.prototype.rtlScrollerFactory=function(){var t=this.adapter.getScrollAreaScrollLeft();this.adapter.setScrollAreaScrollLeft(t-1);var e=this.adapter.getScrollAreaScrollLeft();if(e<0)return this.adapter.setScrollAreaScrollLeft(t),new O(this.adapter);var r=this.adapter.computeScrollAreaClientRect(),n=this.adapter.computeScrollContentClientRect(),i=Math.round(n.right-r.right);return this.adapter.setScrollAreaScrollLeft(t),i===e?new R(this.adapter):new A(this.adapter)},e.prototype.isRTL=function(){return"rtl"===this.adapter.getScrollContentStyleValue("direction")},e}(d),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.area=this.root.querySelector(I.strings.AREA_SELECTOR),this.content=this.root.querySelector(I.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleInteraction=function(){t.foundation.handleInteraction()},this.handleTransitionEnd=function(e){t.foundation.handleTransitionEnd(e)},this.area.addEventListener("wheel",this.handleInteraction,b()),this.area.addEventListener("touchstart",this.handleInteraction,b()),this.area.addEventListener("pointerdown",this.handleInteraction,b()),this.area.addEventListener("mousedown",this.handleInteraction,b()),this.area.addEventListener("keydown",this.handleInteraction,b()),this.content.addEventListener("transitionend",this.handleTransitionEnd)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.area.removeEventListener("wheel",this.handleInteraction,b()),this.area.removeEventListener("touchstart",this.handleInteraction,b()),this.area.removeEventListener("pointerdown",this.handleInteraction,b()),this.area.removeEventListener("mousedown",this.handleInteraction,b()),this.area.removeEventListener("keydown",this.handleInteraction,b()),this.content.removeEventListener("transitionend",this.handleTransitionEnd)},e.prototype.getDefaultFoundation=function(){var t=this;return new I({eventTargetMatchesSelector:function(t,e){return f(t,e)},addClass:function(e){t.root.classList.add(e)},removeClass:function(e){t.root.classList.remove(e)},addScrollAreaClass:function(e){t.area.classList.add(e)},setScrollAreaStyleProperty:function(e,r){t.area.style.setProperty(e,r)},setScrollContentStyleProperty:function(e,r){t.content.style.setProperty(e,r)},getScrollContentStyleValue:function(e){return window.getComputedStyle(t.content).getPropertyValue(e)},setScrollAreaScrollLeft:function(e){return t.area.scrollLeft=e},getScrollAreaScrollLeft:function(){return t.area.scrollLeft},getScrollContentOffsetWidth:function(){return t.content.offsetWidth},getScrollAreaOffsetWidth:function(){return t.area.offsetWidth},computeScrollAreaClientRect:function(){return t.area.getBoundingClientRect()},computeScrollContentClientRect:function(){return t.content.getBoundingClientRect()},computeHorizontalScrollbarHeight:function(){return function(t,e){if(void 0===e&&(e=!0),e&&void 0!==C)return C;var r=t.createElement("div");r.classList.add(T.SCROLL_TEST),t.body.appendChild(r);var n=r.offsetHeight-r.clientHeight;return t.body.removeChild(r),e&&(C=n),n}
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2018 Google Inc.
@@ -20,7 +20,7 @@ import{r as t,c as e,h as r,a as n}from"./p-DBTJNfo7.js";import{g as i,b as o}fr
20
20
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
  * THE SOFTWARE.
23
- */(document)}})},e.prototype.getScrollPosition=function(){return this.foundation.getScrollPosition()},e.prototype.getScrollContentWidth=function(){return this.content.offsetWidth},e.prototype.incrementScroll=function(t){this.foundation.incrementScroll(t)},e.prototype.scrollTo=function(t){this.foundation.scrollTo(t)},e}(u),L={ACTIVE:"mdc-tab-indicator--active",FADE:"mdc-tab-indicator--fade",NO_TRANSITION:"mdc-tab-indicator--no-transition"},z={CONTENT_SELECTOR:".mdc-tab-indicator__content"},D=function(t){function e(r){return t.call(this,s(s({},e.defaultAdapter),r))||this}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return z},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},computeContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},setContentStyleProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.computeContentClientRect=function(){return this.adapter.computeContentClientRect()},e}(d),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.activate=function(){this.adapter.addClass(D.cssClasses.ACTIVE)},e.prototype.deactivate=function(){this.adapter.removeClass(D.cssClasses.ACTIVE)},e}(D),N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.activate=function(t){if(t){var e=this.computeContentClientRect(),r=t.width/e.width,n=t.left-e.left;this.adapter.addClass(D.cssClasses.NO_TRANSITION),this.adapter.setContentStyleProperty("transform","translateX("+n+"px) scaleX("+r+")"),this.computeContentClientRect(),this.adapter.removeClass(D.cssClasses.NO_TRANSITION),this.adapter.addClass(D.cssClasses.ACTIVE),this.adapter.setContentStyleProperty("transform","")}else this.adapter.addClass(D.cssClasses.ACTIVE)},e.prototype.deactivate=function(){this.adapter.removeClass(D.cssClasses.ACTIVE)},e}(D),P=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.content=this.root.querySelector(D.strings.CONTENT_SELECTOR)},e.prototype.computeContentClientRect=function(){return this.foundation.computeContentClientRect()},e.prototype.getDefaultFoundation=function(){var t=this,e={addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},computeContentClientRect:function(){return t.content.getBoundingClientRect()},setContentStyleProperty:function(e,r){t.content.style.setProperty(e,r)}};return this.root.classList.contains(D.cssClasses.FADE)?new M(e):new N(e)},e.prototype.activate=function(t){this.foundation.activate(t)},e.prototype.deactivate=function(){this.foundation.deactivate()},e}(u),W={ACTIVE:"mdc-tab--active"},B={ARIA_SELECTED:"aria-selected",CONTENT_SELECTOR:".mdc-tab__content",INTERACTED_EVENT:"MDCTab:interacted",RIPPLE_SELECTOR:".mdc-tab__ripple",TABINDEX:"tabIndex",TAB_INDICATOR_SELECTOR:".mdc-tab-indicator"},H=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.focusOnActivate=!0,n}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return W},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return B},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},activateIndicator:function(){},deactivateIndicator:function(){},notifyInteracted:function(){},getOffsetLeft:function(){return 0},getOffsetWidth:function(){return 0},getContentOffsetLeft:function(){return 0},getContentOffsetWidth:function(){return 0},focus:function(){}}},enumerable:!1,configurable:!0}),e.prototype.handleClick=function(){this.adapter.notifyInteracted()},e.prototype.isActive=function(){return this.adapter.hasClass(W.ACTIVE)},e.prototype.setFocusOnActivate=function(t){this.focusOnActivate=t},e.prototype.activate=function(t){this.adapter.addClass(W.ACTIVE),this.adapter.setAttr(B.ARIA_SELECTED,"true"),this.adapter.setAttr(B.TABINDEX,"0"),this.adapter.activateIndicator(t),this.focusOnActivate&&this.adapter.focus()},e.prototype.deactivate=function(){this.isActive()&&(this.adapter.removeClass(W.ACTIVE),this.adapter.setAttr(B.ARIA_SELECTED,"false"),this.adapter.setAttr(B.TABINDEX,"-1"),this.adapter.deactivateIndicator())},e.prototype.computeDimensions=function(){var t=this.adapter.getOffsetWidth(),e=this.adapter.getOffsetLeft(),r=this.adapter.getContentOffsetWidth(),n=this.adapter.getContentOffsetLeft();return{contentLeft:e+n,contentRight:e+n+r,rootLeft:e,rootRight:e+t}},e}(d),K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e){void 0===t&&(t=function(t,e){return new p(t,e)}),void 0===e&&(e=function(t){return new P(t)}),this.id=this.root.id;var r=new m(p.createAdapter(this));this.ripple=t(this.root,r);var n=this.root.querySelector(H.strings.TAB_INDICATOR_SELECTOR);this.tabIndicator=e(n),this.content=this.root.querySelector(H.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick=function(){t.foundation.handleClick()},this.listen("click",this.handleClick)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),t.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this;return new H({setAttr:function(e,r){return t.root.setAttribute(e,r)},addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},hasClass:function(e){return t.root.classList.contains(e)},activateIndicator:function(e){t.tabIndicator.activate(e)},deactivateIndicator:function(){t.tabIndicator.deactivate()},notifyInteracted:function(){return t.emit(H.strings.INTERACTED_EVENT,{tabId:t.id},!0)},getOffsetLeft:function(){return t.root.offsetLeft},getOffsetWidth:function(){return t.root.offsetWidth},getContentOffsetLeft:function(){return t.content.offsetLeft},getContentOffsetWidth:function(){return t.content.offsetWidth},focus:function(){return t.root.focus()}})},Object.defineProperty(e.prototype,"active",{get:function(){return this.foundation.isActive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focusOnActivate",{set:function(t){this.foundation.setFocusOnActivate(t)},enumerable:!1,configurable:!0}),e.prototype.activate=function(t){this.foundation.activate(t)},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.computeIndicatorClientRect=function(){return this.tabIndicator.computeContentClientRect()},e.prototype.computeDimensions=function(){return this.foundation.computeDimensions()},e.prototype.focus=function(){this.root.focus()},e}(u),Y={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_ACTIVATED_EVENT:"MDCTabBar:activated",TAB_SCROLLER_SELECTOR:".mdc-tab-scroller",TAB_SELECTOR:".mdc-tab"},V={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,ENTER_KEYCODE:13,EXTRA_SCROLL_AMOUNT:20,HOME_KEYCODE:36,SPACE_KEYCODE:32},F=new Set;
23
+ */(document)}})},e.prototype.getScrollPosition=function(){return this.foundation.getScrollPosition()},e.prototype.getScrollContentWidth=function(){return this.content.offsetWidth},e.prototype.incrementScroll=function(t){this.foundation.incrementScroll(t)},e.prototype.scrollTo=function(t){this.foundation.scrollTo(t)},e}(u),L={ACTIVE:"mdc-tab-indicator--active",FADE:"mdc-tab-indicator--fade",NO_TRANSITION:"mdc-tab-indicator--no-transition"},z={CONTENT_SELECTOR:".mdc-tab-indicator__content"},D=function(t){function e(r){return t.call(this,s(s({},e.defaultAdapter),r))||this}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return z},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},computeContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},setContentStyleProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.computeContentClientRect=function(){return this.adapter.computeContentClientRect()},e}(d),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.activate=function(){this.adapter.addClass(D.cssClasses.ACTIVE)},e.prototype.deactivate=function(){this.adapter.removeClass(D.cssClasses.ACTIVE)},e}(D),N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.activate=function(t){if(t){var e=this.computeContentClientRect(),r=t.width/e.width,n=t.left-e.left;this.adapter.addClass(D.cssClasses.NO_TRANSITION),this.adapter.setContentStyleProperty("transform","translateX("+n+"px) scaleX("+r+")"),this.computeContentClientRect(),this.adapter.removeClass(D.cssClasses.NO_TRANSITION),this.adapter.addClass(D.cssClasses.ACTIVE),this.adapter.setContentStyleProperty("transform","")}else this.adapter.addClass(D.cssClasses.ACTIVE)},e.prototype.deactivate=function(){this.adapter.removeClass(D.cssClasses.ACTIVE)},e}(D),P=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.content=this.root.querySelector(D.strings.CONTENT_SELECTOR)},e.prototype.computeContentClientRect=function(){return this.foundation.computeContentClientRect()},e.prototype.getDefaultFoundation=function(){var t=this,e={addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},computeContentClientRect:function(){return t.content.getBoundingClientRect()},setContentStyleProperty:function(e,r){t.content.style.setProperty(e,r)}};return this.root.classList.contains(D.cssClasses.FADE)?new M(e):new N(e)},e.prototype.activate=function(t){this.foundation.activate(t)},e.prototype.deactivate=function(){this.foundation.deactivate()},e}(u),B={ACTIVE:"mdc-tab--active"},W={ARIA_SELECTED:"aria-selected",CONTENT_SELECTOR:".mdc-tab__content",INTERACTED_EVENT:"MDCTab:interacted",RIPPLE_SELECTOR:".mdc-tab__ripple",TABINDEX:"tabIndex",TAB_INDICATOR_SELECTOR:".mdc-tab-indicator"},H=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.focusOnActivate=!0,n}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return B},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return W},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},activateIndicator:function(){},deactivateIndicator:function(){},notifyInteracted:function(){},getOffsetLeft:function(){return 0},getOffsetWidth:function(){return 0},getContentOffsetLeft:function(){return 0},getContentOffsetWidth:function(){return 0},focus:function(){}}},enumerable:!1,configurable:!0}),e.prototype.handleClick=function(){this.adapter.notifyInteracted()},e.prototype.isActive=function(){return this.adapter.hasClass(B.ACTIVE)},e.prototype.setFocusOnActivate=function(t){this.focusOnActivate=t},e.prototype.activate=function(t){this.adapter.addClass(B.ACTIVE),this.adapter.setAttr(W.ARIA_SELECTED,"true"),this.adapter.setAttr(W.TABINDEX,"0"),this.adapter.activateIndicator(t),this.focusOnActivate&&this.adapter.focus()},e.prototype.deactivate=function(){this.isActive()&&(this.adapter.removeClass(B.ACTIVE),this.adapter.setAttr(W.ARIA_SELECTED,"false"),this.adapter.setAttr(W.TABINDEX,"-1"),this.adapter.deactivateIndicator())},e.prototype.computeDimensions=function(){var t=this.adapter.getOffsetWidth(),e=this.adapter.getOffsetLeft(),r=this.adapter.getContentOffsetWidth(),n=this.adapter.getContentOffsetLeft();return{contentLeft:e+n,contentRight:e+n+r,rootLeft:e,rootRight:e+t}},e}(d),K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e){void 0===t&&(t=function(t,e){return new p(t,e)}),void 0===e&&(e=function(t){return new P(t)}),this.id=this.root.id;var r=new m(p.createAdapter(this));this.ripple=t(this.root,r);var n=this.root.querySelector(H.strings.TAB_INDICATOR_SELECTOR);this.tabIndicator=e(n),this.content=this.root.querySelector(H.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick=function(){t.foundation.handleClick()},this.listen("click",this.handleClick)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),t.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this;return new H({setAttr:function(e,r){return t.root.setAttribute(e,r)},addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},hasClass:function(e){return t.root.classList.contains(e)},activateIndicator:function(e){t.tabIndicator.activate(e)},deactivateIndicator:function(){t.tabIndicator.deactivate()},notifyInteracted:function(){return t.emit(H.strings.INTERACTED_EVENT,{tabId:t.id},!0)},getOffsetLeft:function(){return t.root.offsetLeft},getOffsetWidth:function(){return t.root.offsetWidth},getContentOffsetLeft:function(){return t.content.offsetLeft},getContentOffsetWidth:function(){return t.content.offsetWidth},focus:function(){return t.root.focus()}})},Object.defineProperty(e.prototype,"active",{get:function(){return this.foundation.isActive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focusOnActivate",{set:function(t){this.foundation.setFocusOnActivate(t)},enumerable:!1,configurable:!0}),e.prototype.activate=function(t){this.foundation.activate(t)},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.computeIndicatorClientRect=function(){return this.tabIndicator.computeContentClientRect()},e.prototype.computeDimensions=function(){return this.foundation.computeDimensions()},e.prototype.focus=function(){this.root.focus()},e}(u),Y={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_ACTIVATED_EVENT:"MDCTabBar:activated",TAB_SCROLLER_SELECTOR:".mdc-tab-scroller",TAB_SELECTOR:".mdc-tab"},V={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,ENTER_KEYCODE:13,EXTRA_SCROLL_AMOUNT:20,HOME_KEYCODE:36,SPACE_KEYCODE:32},F=new Set;
24
24
  /**
25
25
  * @license
26
26
  * Copyright 2018 Google Inc.
@@ -42,7 +42,7 @@ import{r as t,c as e,h as r,a as n}from"./p-DBTJNfo7.js";import{g as i,b as o}fr
42
42
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
43
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
44
44
  * THE SOFTWARE.
45
- */F.add(Y.ARROW_LEFT_KEY),F.add(Y.ARROW_RIGHT_KEY),F.add(Y.END_KEY),F.add(Y.HOME_KEY),F.add(Y.ENTER_KEY),F.add(Y.SPACE_KEY);var X=new Map;X.set(V.ARROW_LEFT_KEYCODE,Y.ARROW_LEFT_KEY),X.set(V.ARROW_RIGHT_KEYCODE,Y.ARROW_RIGHT_KEY),X.set(V.END_KEYCODE,Y.END_KEY),X.set(V.HOME_KEYCODE,Y.HOME_KEY),X.set(V.ENTER_KEYCODE,Y.ENTER_KEY),X.set(V.SPACE_KEYCODE,Y.SPACE_KEY);var U=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.useAutomaticActivation=!1,n}return c(e,t),Object.defineProperty(e,"strings",{get:function(){return Y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return V},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{scrollTo:function(){},incrementScroll:function(){},getScrollPosition:function(){return 0},getScrollContentWidth:function(){return 0},getOffsetWidth:function(){return 0},isRTL:function(){return!1},setActiveTab:function(){},activateTabAtIndex:function(){},deactivateTabAtIndex:function(){},focusTabAtIndex:function(){},getTabIndicatorClientRectAtIndex:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabDimensionsAtIndex:function(){return{rootLeft:0,rootRight:0,contentLeft:0,contentRight:0}},getPreviousActiveTabIndex:function(){return-1},getFocusedTabIndex:function(){return-1},getIndexOfTabById:function(){return-1},getTabListLength:function(){return 0},notifyTabActivated:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setUseAutomaticActivation=function(t){this.useAutomaticActivation=t},e.prototype.activateTab=function(t){var e,r=this.adapter.getPreviousActiveTabIndex();this.indexIsInRange(t)&&t!==r&&(-1!==r&&(this.adapter.deactivateTabAtIndex(r),e=this.adapter.getTabIndicatorClientRectAtIndex(r)),this.adapter.activateTabAtIndex(t,e),this.scrollIntoView(t),this.adapter.notifyTabActivated(t))},e.prototype.handleKeyDown=function(t){var e=this.getKeyFromEvent(t);if(void 0!==e)if(this.isActivationKey(e)||t.preventDefault(),this.useAutomaticActivation){if(this.isActivationKey(e))return;var r=this.determineTargetFromKey(this.adapter.getPreviousActiveTabIndex(),e);this.adapter.setActiveTab(r),this.scrollIntoView(r)}else{var n=this.adapter.getFocusedTabIndex();this.isActivationKey(e)?this.adapter.setActiveTab(n):(r=this.determineTargetFromKey(n,e),this.adapter.focusTabAtIndex(r),this.scrollIntoView(r))}},e.prototype.handleTabInteraction=function(t){this.adapter.setActiveTab(this.adapter.getIndexOfTabById(t.detail.tabId))},e.prototype.scrollIntoView=function(t){this.indexIsInRange(t)&&(0!==t?t!==this.adapter.getTabListLength()-1?this.isRTL()?this.scrollIntoViewImplRTL(t):this.scrollIntoViewImpl(t):this.adapter.scrollTo(this.adapter.getScrollContentWidth()):this.adapter.scrollTo(0))},e.prototype.determineTargetFromKey=function(t,e){var r=this.isRTL(),n=this.adapter.getTabListLength()-1,i=t;return e===Y.END_KEY?i=n:e===Y.ARROW_LEFT_KEY&&!r||e===Y.ARROW_RIGHT_KEY&&r?i-=1:e===Y.ARROW_RIGHT_KEY&&!r||e===Y.ARROW_LEFT_KEY&&r?i+=1:i=0,i<0?i=n:i>n&&(i=0),i},e.prototype.calculateScrollIncrement=function(t,e,r,n){var i=this.adapter.getTabDimensionsAtIndex(e),o=i.contentLeft-r-n+V.EXTRA_SCROLL_AMOUNT;return e<t?Math.min(i.contentRight-r-V.EXTRA_SCROLL_AMOUNT,0):Math.max(o,0)},e.prototype.calculateScrollIncrementRTL=function(t,e,r,n,i){var o=this.adapter.getTabDimensionsAtIndex(e),a=i-o.contentLeft-r-V.EXTRA_SCROLL_AMOUNT;return e>t?Math.max(i-o.contentRight-r-n+V.EXTRA_SCROLL_AMOUNT,0):Math.min(a,0)},e.prototype.findAdjacentTabIndexClosestToEdge=function(t,e,r,n){var i=e.rootLeft-r,o=e.rootRight-r-n,a=i+o;return i<0||a<0?t-1:o>0||a>0?t+1:-1},e.prototype.findAdjacentTabIndexClosestToEdgeRTL=function(t,e,r,n,i){var o=i-e.rootLeft-n-r,a=i-e.rootRight-r,c=o+a;return o>0||c>0?t+1:a<0||c<0?t-1:-1},e.prototype.getKeyFromEvent=function(t){return F.has(t.key)?t.key:X.get(t.keyCode)},e.prototype.isActivationKey=function(t){return t===Y.SPACE_KEY||t===Y.ENTER_KEY},e.prototype.indexIsInRange=function(t){return t>=0&&t<this.adapter.getTabListLength()},e.prototype.isRTL=function(){return this.adapter.isRTL()},e.prototype.scrollIntoViewImpl=function(t){var e=this.adapter.getScrollPosition(),r=this.adapter.getOffsetWidth(),n=this.adapter.getTabDimensionsAtIndex(t),i=this.findAdjacentTabIndexClosestToEdge(t,n,e,r);if(this.indexIsInRange(i)){var o=this.calculateScrollIncrement(t,i,e,r);this.adapter.incrementScroll(o)}},e.prototype.scrollIntoViewImplRTL=function(t){var e=this.adapter.getScrollPosition(),r=this.adapter.getOffsetWidth(),n=this.adapter.getTabDimensionsAtIndex(t),i=this.adapter.getScrollContentWidth(),o=this.findAdjacentTabIndexClosestToEdgeRTL(t,n,e,r,i);if(this.indexIsInRange(o)){var a=this.calculateScrollIncrementRTL(t,o,e,r,i);this.adapter.incrementScroll(a)}},e}(d),G=U.strings,q=0,J=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"focusOnActivate",{set:function(t){var e,r;try{for(var n=h(this.tabList),i=n.next();!i.done;i=n.next())i.value.focusOnActivate=t}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useAutomaticActivation",{set:function(t){this.foundation.setUseAutomaticActivation(t)},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){void 0===t&&(t=function(t){return new K(t)}),void 0===e&&(e=function(t){return new j(t)}),this.tabList=this.instantiateTabs(t),this.tabScroller=this.instantiatetabScroller(e)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleTabInteraction=function(e){t.foundation.handleTabInteraction(e)},this.handleKeyDown=function(e){t.foundation.handleKeyDown(e)},this.listen(H.strings.INTERACTED_EVENT,this.handleTabInteraction),this.listen("keydown",this.handleKeyDown);for(var e=0;e<this.tabList.length;e++)if(this.tabList[e].active){this.scrollIntoView(e);break}},e.prototype.destroy=function(){var e,r;t.prototype.destroy.call(this),this.unlisten(H.strings.INTERACTED_EVENT,this.handleTabInteraction),this.unlisten("keydown",this.handleKeyDown);try{for(var n=h(this.tabList),i=n.next();!i.done;i=n.next())i.value.destroy()}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}this.tabScroller&&this.tabScroller.destroy()},e.prototype.getDefaultFoundation=function(){var t=this;return new U({scrollTo:function(e){t.tabScroller.scrollTo(e)},incrementScroll:function(e){t.tabScroller.incrementScroll(e)},getScrollPosition:function(){return t.tabScroller.getScrollPosition()},getScrollContentWidth:function(){return t.tabScroller.getScrollContentWidth()},getOffsetWidth:function(){return t.root.offsetWidth},isRTL:function(){return"rtl"===window.getComputedStyle(t.root).getPropertyValue("direction")},setActiveTab:function(e){t.foundation.activateTab(e)},activateTabAtIndex:function(e,r){t.tabList[e].activate(r)},deactivateTabAtIndex:function(e){t.tabList[e].deactivate()},focusTabAtIndex:function(e){t.tabList[e].focus()},getTabIndicatorClientRectAtIndex:function(e){return t.tabList[e].computeIndicatorClientRect()},getTabDimensionsAtIndex:function(e){return t.tabList[e].computeDimensions()},getPreviousActiveTabIndex:function(){for(var e=0;e<t.tabList.length;e++)if(t.tabList[e].active)return e;return-1},getFocusedTabIndex:function(){var e=t.getTabElements(),r=document.activeElement;return e.indexOf(r)},getIndexOfTabById:function(e){for(var r=0;r<t.tabList.length;r++)if(t.tabList[r].id===e)return r;return-1},getTabListLength:function(){return t.tabList.length},notifyTabActivated:function(e){return t.emit(G.TAB_ACTIVATED_EVENT,{index:e},!0)}})},e.prototype.activateTab=function(t){this.foundation.activateTab(t)},e.prototype.scrollIntoView=function(t){this.foundation.scrollIntoView(t)},e.prototype.getTabElements=function(){return[].slice.call(this.root.querySelectorAll(G.TAB_SELECTOR))},e.prototype.instantiateTabs=function(t){return this.getTabElements().map((function(e){return e.id=e.id||"mdc-tab-"+ ++q,t(e)}))},e.prototype.instantiatetabScroller=function(t){var e=this.root.querySelector(G.TAB_SCROLLER_SELECTOR);return e?t(e):null},e}(u);
45
+ */F.add(Y.ARROW_LEFT_KEY),F.add(Y.ARROW_RIGHT_KEY),F.add(Y.END_KEY),F.add(Y.HOME_KEY),F.add(Y.ENTER_KEY),F.add(Y.SPACE_KEY);var X=new Map;X.set(V.ARROW_LEFT_KEYCODE,Y.ARROW_LEFT_KEY),X.set(V.ARROW_RIGHT_KEYCODE,Y.ARROW_RIGHT_KEY),X.set(V.END_KEYCODE,Y.END_KEY),X.set(V.HOME_KEYCODE,Y.HOME_KEY),X.set(V.ENTER_KEYCODE,Y.ENTER_KEY),X.set(V.SPACE_KEYCODE,Y.SPACE_KEY);var G=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.useAutomaticActivation=!1,n}return c(e,t),Object.defineProperty(e,"strings",{get:function(){return Y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return V},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{scrollTo:function(){},incrementScroll:function(){},getScrollPosition:function(){return 0},getScrollContentWidth:function(){return 0},getOffsetWidth:function(){return 0},isRTL:function(){return!1},setActiveTab:function(){},activateTabAtIndex:function(){},deactivateTabAtIndex:function(){},focusTabAtIndex:function(){},getTabIndicatorClientRectAtIndex:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabDimensionsAtIndex:function(){return{rootLeft:0,rootRight:0,contentLeft:0,contentRight:0}},getPreviousActiveTabIndex:function(){return-1},getFocusedTabIndex:function(){return-1},getIndexOfTabById:function(){return-1},getTabListLength:function(){return 0},notifyTabActivated:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setUseAutomaticActivation=function(t){this.useAutomaticActivation=t},e.prototype.activateTab=function(t){var e,r=this.adapter.getPreviousActiveTabIndex();this.indexIsInRange(t)&&t!==r&&(-1!==r&&(this.adapter.deactivateTabAtIndex(r),e=this.adapter.getTabIndicatorClientRectAtIndex(r)),this.adapter.activateTabAtIndex(t,e),this.scrollIntoView(t),this.adapter.notifyTabActivated(t))},e.prototype.handleKeyDown=function(t){var e=this.getKeyFromEvent(t);if(void 0!==e)if(this.isActivationKey(e)||t.preventDefault(),this.useAutomaticActivation){if(this.isActivationKey(e))return;var r=this.determineTargetFromKey(this.adapter.getPreviousActiveTabIndex(),e);this.adapter.setActiveTab(r),this.scrollIntoView(r)}else{var n=this.adapter.getFocusedTabIndex();this.isActivationKey(e)?this.adapter.setActiveTab(n):(r=this.determineTargetFromKey(n,e),this.adapter.focusTabAtIndex(r),this.scrollIntoView(r))}},e.prototype.handleTabInteraction=function(t){this.adapter.setActiveTab(this.adapter.getIndexOfTabById(t.detail.tabId))},e.prototype.scrollIntoView=function(t){this.indexIsInRange(t)&&(0!==t?t!==this.adapter.getTabListLength()-1?this.isRTL()?this.scrollIntoViewImplRTL(t):this.scrollIntoViewImpl(t):this.adapter.scrollTo(this.adapter.getScrollContentWidth()):this.adapter.scrollTo(0))},e.prototype.determineTargetFromKey=function(t,e){var r=this.isRTL(),n=this.adapter.getTabListLength()-1,i=t;return e===Y.END_KEY?i=n:e===Y.ARROW_LEFT_KEY&&!r||e===Y.ARROW_RIGHT_KEY&&r?i-=1:e===Y.ARROW_RIGHT_KEY&&!r||e===Y.ARROW_LEFT_KEY&&r?i+=1:i=0,i<0?i=n:i>n&&(i=0),i},e.prototype.calculateScrollIncrement=function(t,e,r,n){var i=this.adapter.getTabDimensionsAtIndex(e),o=i.contentLeft-r-n+V.EXTRA_SCROLL_AMOUNT;return e<t?Math.min(i.contentRight-r-V.EXTRA_SCROLL_AMOUNT,0):Math.max(o,0)},e.prototype.calculateScrollIncrementRTL=function(t,e,r,n,i){var o=this.adapter.getTabDimensionsAtIndex(e),a=i-o.contentLeft-r-V.EXTRA_SCROLL_AMOUNT;return e>t?Math.max(i-o.contentRight-r-n+V.EXTRA_SCROLL_AMOUNT,0):Math.min(a,0)},e.prototype.findAdjacentTabIndexClosestToEdge=function(t,e,r,n){var i=e.rootLeft-r,o=e.rootRight-r-n,a=i+o;return i<0||a<0?t-1:o>0||a>0?t+1:-1},e.prototype.findAdjacentTabIndexClosestToEdgeRTL=function(t,e,r,n,i){var o=i-e.rootLeft-n-r,a=i-e.rootRight-r,c=o+a;return o>0||c>0?t+1:a<0||c<0?t-1:-1},e.prototype.getKeyFromEvent=function(t){return F.has(t.key)?t.key:X.get(t.keyCode)},e.prototype.isActivationKey=function(t){return t===Y.SPACE_KEY||t===Y.ENTER_KEY},e.prototype.indexIsInRange=function(t){return t>=0&&t<this.adapter.getTabListLength()},e.prototype.isRTL=function(){return this.adapter.isRTL()},e.prototype.scrollIntoViewImpl=function(t){var e=this.adapter.getScrollPosition(),r=this.adapter.getOffsetWidth(),n=this.adapter.getTabDimensionsAtIndex(t),i=this.findAdjacentTabIndexClosestToEdge(t,n,e,r);if(this.indexIsInRange(i)){var o=this.calculateScrollIncrement(t,i,e,r);this.adapter.incrementScroll(o)}},e.prototype.scrollIntoViewImplRTL=function(t){var e=this.adapter.getScrollPosition(),r=this.adapter.getOffsetWidth(),n=this.adapter.getTabDimensionsAtIndex(t),i=this.adapter.getScrollContentWidth(),o=this.findAdjacentTabIndexClosestToEdgeRTL(t,n,e,r,i);if(this.indexIsInRange(o)){var a=this.calculateScrollIncrementRTL(t,o,e,r,i);this.adapter.incrementScroll(a)}},e}(d),U=G.strings,q=0,J=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"focusOnActivate",{set:function(t){var e,r;try{for(var n=h(this.tabList),i=n.next();!i.done;i=n.next())i.value.focusOnActivate=t}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useAutomaticActivation",{set:function(t){this.foundation.setUseAutomaticActivation(t)},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){void 0===t&&(t=function(t){return new K(t)}),void 0===e&&(e=function(t){return new j(t)}),this.tabList=this.instantiateTabs(t),this.tabScroller=this.instantiatetabScroller(e)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleTabInteraction=function(e){t.foundation.handleTabInteraction(e)},this.handleKeyDown=function(e){t.foundation.handleKeyDown(e)},this.listen(H.strings.INTERACTED_EVENT,this.handleTabInteraction),this.listen("keydown",this.handleKeyDown);for(var e=0;e<this.tabList.length;e++)if(this.tabList[e].active){this.scrollIntoView(e);break}},e.prototype.destroy=function(){var e,r;t.prototype.destroy.call(this),this.unlisten(H.strings.INTERACTED_EVENT,this.handleTabInteraction),this.unlisten("keydown",this.handleKeyDown);try{for(var n=h(this.tabList),i=n.next();!i.done;i=n.next())i.value.destroy()}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}this.tabScroller&&this.tabScroller.destroy()},e.prototype.getDefaultFoundation=function(){var t=this;return new G({scrollTo:function(e){t.tabScroller.scrollTo(e)},incrementScroll:function(e){t.tabScroller.incrementScroll(e)},getScrollPosition:function(){return t.tabScroller.getScrollPosition()},getScrollContentWidth:function(){return t.tabScroller.getScrollContentWidth()},getOffsetWidth:function(){return t.root.offsetWidth},isRTL:function(){return"rtl"===window.getComputedStyle(t.root).getPropertyValue("direction")},setActiveTab:function(e){t.foundation.activateTab(e)},activateTabAtIndex:function(e,r){t.tabList[e].activate(r)},deactivateTabAtIndex:function(e){t.tabList[e].deactivate()},focusTabAtIndex:function(e){t.tabList[e].focus()},getTabIndicatorClientRectAtIndex:function(e){return t.tabList[e].computeIndicatorClientRect()},getTabDimensionsAtIndex:function(e){return t.tabList[e].computeDimensions()},getPreviousActiveTabIndex:function(){for(var e=0;e<t.tabList.length;e++)if(t.tabList[e].active)return e;return-1},getFocusedTabIndex:function(){var e=t.getTabElements(),r=document.activeElement;return e.indexOf(r)},getIndexOfTabById:function(e){for(var r=0;r<t.tabList.length;r++)if(t.tabList[r].id===e)return r;return-1},getTabListLength:function(){return t.tabList.length},notifyTabActivated:function(e){return t.emit(U.TAB_ACTIVATED_EVENT,{index:e},!0)}})},e.prototype.activateTab=function(t){this.foundation.activateTab(t)},e.prototype.scrollIntoView=function(t){this.foundation.scrollIntoView(t)},e.prototype.getTabElements=function(){return[].slice.call(this.root.querySelectorAll(U.TAB_SELECTOR))},e.prototype.instantiateTabs=function(t){return this.getTabElements().map((function(e){return e.id=e.id||"mdc-tab-"+ ++q,t(e)}))},e.prototype.instantiatetabScroller=function(t){var e=this.root.querySelector(U.TAB_SCROLLER_SELECTOR);return e?t(e):null},e}(u);
46
46
  /**
47
47
  * @license
48
48
  * Copyright 2018 Google Inc.
@@ -64,4 +64,4 @@ import{r as t,c as e,h as r,a as n}from"./p-DBTJNfo7.js";import{g as i,b as o}fr
64
64
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
65
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
66
66
  * THE SOFTWARE.
67
- */const{TAB_ACTIVATED_EVENT:Q}=Y,Z=class{constructor(r){t(this,r),this.changeTab=e(this,"changeTab"),this.tabs=[],this.canScrollLeft=!1,this.canScrollRight=!1,this.setupMdc=!1,this.handleTabActivated=this.handleTabActivated.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleLeftScrollClick=this.handleLeftScrollClick.bind(this),this.handleRightScrollClick=this.handleRightScrollClick.bind(this),this.renderTab=this.renderTab.bind(this)}connectedCallback(){this.setup()}componentDidLoad(){this.setup(),this.triggerIconColorWarning()}componentDidUpdate(){this.setupMdc&&(this.setup(),this.setupMdc=!1)}disconnectedCallback(){this.tearDown()}render(){return r("div",{key:"24724f0e550a495e3c76157322aec3c1795c35d2",class:"mdc-tab-bar",role:"tablist"},r("div",{key:"e715431c3daba67c220731763fa4ee1d3fb05964",class:{"mdc-tab-scroller":!0,"can-scroll-left":this.canScrollLeft,"can-scroll-right":this.canScrollRight}},r("div",{key:"13575d1fd979e0acba904279929e0dc0f170770e",class:"mdc-tab-scroller__scroll-area lime-hide-scrollbars"},r("div",{key:"090cabba1bdfe2166c7a4af3b31e744e8d04f415",class:"mdc-tab-scroller__scroll-content"},this.tabs.map(this.renderTab))),r("div",{key:"8c2319f5f15bf1d5c06fe7f92a688c99ce302d1a",class:"scroll-fade left"}),r("div",{key:"5d54b52b021b1d65756bfba38b47367124233e38",class:"scroll-button left"},r("button",{key:"126822721bc814a391cd20e45506d4884069d8e7",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollLeft,onClick:this.handleLeftScrollClick},r("limel-icon",{key:"d8bd0a943c89c3a58e9f3e7b4fa46024413de92b",name:"angle_left"}))),r("div",{key:"eb1e078fca4124c6277cbbd8e1584b0b3879c581",class:"scroll-fade right"}),r("div",{key:"4309055997e231e6aae0c573fa4abeec72b27201",class:"scroll-button right"},r("button",{key:"c965ef3d215e9c3d44260894fc7a8e3edfb5d675",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollRight,onClick:this.handleRightScrollClick},r("limel-icon",{key:"83132fe176b81172f308dd0ebb06c20741f1df6c",name:"angle_right"})))))}tabsChanged(t=[],e=[]){const r=t.map((t=>t.id)),n=e.map((t=>t.id));a(r,n)||(this.setupMdc=!0,this.tearDown())}handleWindowResize(){this.scrollArea&&this.handleScroll()}setup(){const t=this.host.shadowRoot.querySelector(".mdc-tab-bar");t&&(this.mdcTabBar=new J(t),this.mdcTabBar.focusOnActivate=!0,this.mdcTabBar.useAutomaticActivation=!0,this.scrollArea=t.querySelector(".mdc-tab-scroller__scroll-area"),this.scrollContent=t.querySelector(".mdc-tab-scroller__scroll-content"),this.setupListeners(),setTimeout(this.handleScroll,0))}tearDown(){this.scrollArea&&this.scrollArea.removeEventListener("scroll",this.handleScroll),this.mdcTabBar&&(this.mdcTabBar.unlisten(Q,this.handleTabActivated),this.mdcTabBar.destroy())}setupListeners(){this.mdcTabBar.listen(Q,this.handleTabActivated),this.scrollArea.addEventListener("scroll",this.handleScroll,{passive:!0})}handleTabActivated(t){const e=function(t,e){const r=t.findIndex((t=>!0===t.active)),n=[...t];return-1!==r&&(n[r]=Object.assign(Object.assign({},t[r]),{active:!1})),n[e]=Object.assign(Object.assign({},t[e]),{active:!0}),n}(this.tabs,t.detail.index);k(e,this.tabs).sort(this.sortByInactive).forEach((t=>{this.changeTab.emit(t)})),this.tabs=e}sortByInactive(t,e){return Number(t.active)-Number(e.active)}handleScroll(){const t=this.scrollArea.scrollLeft,e=Math.floor(this.scrollContent.getBoundingClientRect().width-this.scrollArea.getBoundingClientRect().width-t);this.canScrollLeft=t>40,this.canScrollRight=e>40}handleLeftScrollClick(){const t=this.getScrollDistance();this.scrollArea.scroll({left:this.scrollArea.scrollLeft-t,behavior:"smooth"})}handleRightScrollClick(){const t=this.getScrollDistance();this.scrollArea.scroll({left:this.scrollArea.scrollLeft+t,behavior:"smooth"})}getScrollDistance(){if(!this.scrollArea)return 150;const t=this.scrollArea.getBoundingClientRect().width;return Math.max(.8*t,150)}renderIcon(t){if(!t.icon)return;const e=i(t.icon),n=o(t.icon,t.iconColor),a={color:""};return n&&(a.color=n),r("limel-icon",{class:"mdc-tab__icon",name:e,style:a,size:"small","aria-hidden":"true"})}renderTab(t){return r("button",{class:{"mdc-tab":!0,"mdc-tab--active":!!t.active},role:"tab","aria-selected":t.active?"true":"false",tabindex:t.active?0:-1},r("span",{class:"mdc-tab__content"},this.renderIcon(t),r("span",{class:"mdc-tab__text-label"},t.text),t.badge?r("limel-badge",{label:t.badge}):""),r("span",{class:{"mdc-tab-indicator":!0,"mdc-tab-indicator--active":!!t.active}},r("span",{class:"mdc-tab-indicator__content mdc-tab-indicator__content--underline"})),r("span",{class:"mdc-tab__ripple"}))}triggerIconColorWarning(){this.tabs.some((t=>t.iconColor))&&console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}get host(){return n(this)}static get watchers(){return{tabs:[{tabsChanged:0}]}}};Z.style="@charset \"UTF-8\";.scroll-fade,.scroll-button{position:absolute;transition-property:transform;transition-duration:0.3s;transition-timing-function:ease-out}.scroll-fade{top:0;height:100%;width:4rem;pointer-events:none}.scroll-fade.left{transform:translate3d(-4rem, 0, 0);left:0;background:linear-gradient(270deg, rgba(var(--limel-tab-background-color), 0) 0%, rgba(var(--limel-tab-background-color), 0.8) 40%, rgba(var(--limel-tab-background-color), 0.8) 100%)}.scroll-fade.right{transform:translate3d(4rem, 0, 0);right:0;background:linear-gradient(90deg, rgba(var(--limel-tab-background-color), 0) 0%, rgba(var(--limel-tab-background-color), 0.8) 40%, rgba(var(--limel-tab-background-color), 0.8) 100%)}.scroll-button{display:flex;align-items:center;top:0;bottom:0}.scroll-button.left{transform:translate3d(-4rem, 0, 0);left:0.25rem}.scroll-button.right{transform:translate3d(4rem, 0, 0);right:0.25rem}.scroll-button:hover{transform:translate3d(0, 0, 0)}.scroll-button button{all:unset;display:flex;align-items:center;justify-content:center;width:1.25rem;height:calc(100% - 0.25rem * 2);border-radius:0.25rem}.scroll-button button:not(:disabled){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):focus,.scroll-button button:not(:disabled):focus-visible{will-change:color, background-color, box-shadow, transform}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.scroll-button button:not(:disabled):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.scroll-button limel-icon{width:1rem}.mdc-tab-scroller{position:relative;overflow:hidden}.mdc-tab-scroller.can-scroll-left .scroll-fade.left,.mdc-tab-scroller.can-scroll-left .scroll-button.left,.mdc-tab-scroller.can-scroll-right .scroll-fade.right,.mdc-tab-scroller.can-scroll-right .scroll-button.right{transform:translate3d(0, 0, 0)}.mdc-tab-scroller.can-scroll-left:not(.can-scroll-right) .scroll-button.right,.mdc-tab-scroller.can-scroll-right:not(.can-scroll-left) .scroll-button.left{opacity:0.5;transition-delay:0.5s}.lime-hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.mdc-tab-scroller__scroll-content{padding:0.25rem var(--limel-tab-active-outer-edge-curve-size) 0 var(--limel-tab-active-outer-edge-curve-size);background-color:rgb(var(--limel-tab-background-color))}.mdc-tab-bar{width:100%}.mdc-tab{height:48px}.mdc-tab--stacked{height:72px}.mdc-tab-scroller.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-scroller{overflow-y:hidden}.mdc-tab-scroller__test{position:absolute;top:-9999px;width:100px;height:100px;overflow-x:scroll}.mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:touch;display:flex;overflow-x:hidden}.mdc-tab-scroller__scroll-area::-webkit-scrollbar,.mdc-tab-scroller__test::-webkit-scrollbar{display:none}.mdc-tab-scroller__scroll-area--scroll{overflow-x:scroll}.mdc-tab-scroller__scroll-content{position:relative;display:flex;flex:1 0 auto;transform:none;will-change:transform}.mdc-tab-scroller--align-start .mdc-tab-scroller__scroll-content{justify-content:flex-start}.mdc-tab-scroller--align-end .mdc-tab-scroller__scroll-content{justify-content:flex-end}.mdc-tab-scroller--align-center .mdc-tab-scroller__scroll-content{justify-content:center}.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:auto}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-tab-indicator .mdc-tab-indicator__content--icon{color:#018786;color:var(--mdc-theme-secondary, #018786)}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mdc-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase)}.mdc-tab .mdc-tab__text-label{color:rgba(0, 0, 0, 0.6)}.mdc-tab .mdc-tab__icon{color:rgba(0, 0, 0, 0.54);fill:currentColor}.mdc-tab{position:relative}.mdc-tab__content{position:relative}.mdc-tab__icon{width:24px;height:24px;font-size:24px}.mdc-tab--active .mdc-tab__text-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-tab--active .mdc-tab__icon{color:#6200ee;color:var(--mdc-theme-primary, #6200ee);fill:currentColor}.mdc-tab{background:none}.mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px;}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-tab{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-tab .mdc-tab__ripple::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-tab .mdc-tab__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-tab.mdc-ripple-upgraded--unbounded .mdc-tab__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-tab.mdc-ripple-upgraded--foreground-activation .mdc-tab__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-tab.mdc-ripple-upgraded--foreground-deactivation .mdc-tab__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-tab:hover .mdc-tab__ripple::before,.mdc-tab.mdc-ripple-surface--hover .mdc-tab__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-tab.mdc-ripple-upgraded--background-focused .mdc-tab__ripple::before,.mdc-tab:not(.mdc-ripple-upgraded):focus .mdc-tab__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-tab:not(.mdc-ripple-upgraded) .mdc-tab__ripple::after{transition:opacity 150ms linear}.mdc-tab:not(.mdc-ripple-upgraded):active .mdc-tab__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-tab.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-tab__ripple{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;will-change:transform, opacity}:host(limel-tab-bar){--limel-tab-background-color:var(--contrast-300);--limel-tab-border-radius:0.625rem;--limel-active-tab-background-color:var( --tab-panel-background-color, rgb(var(--contrast-100)) );--limel-tab-active-outer-edge-curve-size:0.75rem;--limel-tab-separator-width:0.125rem;--limel-tab-separator-background-color:rgb(var(--contrast-600));isolation:isolate;display:block;position:relative}:host(.has-tabs-with-equal-width) .mdc-tab{flex:1 0 auto}.mdc-tab{font-family:inherit;font-weight:400;letter-spacing:normal;font-size:var(--limel-theme-default-font-size);text-transform:none}.mdc-tab-indicator .mdc-tab-indicator__content{border:none}.mdc-tab__ripple{box-sizing:border-box;border-radius:var(--limel-tab-border-radius);border-style:solid;border-color:transparent;border-width:0.25rem;opacity:0.7}.mdc-tab__ripple:before,.mdc-tab__ripple:after{transition:background-color 0.5s ease}.mdc-tab{border-radius:0;padding-right:1rem;padding-left:1rem;min-width:2.5rem;background-color:transparent;flex:0 0 auto;height:2.5rem}.mdc-tab:not(.mdc-tab--active):after{content:\"\";display:block;background-color:var(--limel-tab-separator-background-color);width:var(--limel-tab-separator-width);height:1rem;margin:auto;position:absolute;top:0;bottom:0;border-radius:1rem;right:calc(-1 * var(--limel-tab-separator-width))}.mdc-tab:not(.mdc-tab--active):last-of-type:after{display:none}.mdc-tab .mdc-tab__icon{color:rgb(var(--contrast-800));margin-left:-0.25rem}.mdc-tab limel-badge{margin-right:-0.25rem;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.mdc-tab--active{border-radius:var(--limel-tab-border-radius) var(--limel-tab-border-radius) 0 0;background-color:var(--limel-active-tab-background-color);z-index:2}.mdc-tab--active:before,.mdc-tab--active:after{content:\"\";display:block;width:var(--limel-tab-active-outer-edge-curve-size);height:var(--limel-tab-active-outer-edge-curve-size);position:absolute;bottom:0;background-color:var(--limel-active-tab-background-color);-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\")}.mdc-tab--active:before{left:calc(-1 * var(--limel-tab-active-outer-edge-curve-size));transform:rotateY(180deg)}.mdc-tab--active:after{right:calc(-1 * var(--limel-tab-active-outer-edge-curve-size))}.mdc-tab--active .mdc-ripple-upgraded--background-focused:before{background-color:transparent;transition:background-color 1s ease}.mdc-tab--active .mdc-tab__icon{color:var(--mdc-theme-primary)}.mdc-tab__content{gap:0.375rem}.mdc-tab .mdc-tab__text-label{transition:color 0.2s ease;padding-left:0 !important;color:var(--limel-theme-on-surface-color)}.mdc-tab:hover .mdc-tab__text-label{color:var(--limel-theme-text-primary-on-background-color)}.mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--lime-primary-color, var(--limel-theme-primary-color))}";export{Z as limel_tab_bar}
67
+ */const{TAB_ACTIVATED_EVENT:Q}=Y,Z=class{constructor(r){t(this,r),this.changeTab=e(this,"changeTab"),this.tabs=[],this.canScrollLeft=!1,this.canScrollRight=!1,this.setupMdc=!1,this.handleTabActivated=this.handleTabActivated.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleLeftScrollClick=this.handleLeftScrollClick.bind(this),this.handleRightScrollClick=this.handleRightScrollClick.bind(this),this.renderTab=this.renderTab.bind(this)}connectedCallback(){this.setup()}componentDidLoad(){this.setup(),this.triggerIconColorWarning()}componentDidUpdate(){this.setupMdc&&(this.setup(),this.setupMdc=!1)}disconnectedCallback(){this.tearDown()}render(){return r("div",{key:"5c2300a224442e40e2dc2f6b49538f0688bc7a53",class:"mdc-tab-bar",role:"tablist"},r("div",{key:"bd4d9d8f3f302cf1592fab3cfd15d3316f132470",class:{"mdc-tab-scroller":!0,"can-scroll-left":this.canScrollLeft,"can-scroll-right":this.canScrollRight}},r("div",{key:"f48abfa3b0169e952befc47e8adf9574aee616af",class:"mdc-tab-scroller__scroll-area lime-hide-scrollbars"},r("div",{key:"7322a7ab34b24822a1043ad3172f1b2f3efc6244",class:"mdc-tab-scroller__scroll-content"},this.tabs.map(this.renderTab))),r("div",{key:"668ebaaf096d5926b17e1e1a50b0569c4e6d11c1",class:"scroll-fade left"}),r("div",{key:"02c3b8484f4467ece6e1a0617578b0967641a536",class:"scroll-button left"},r("button",{key:"22bd6170b849aadb7a78b3f0fe2ae0213d7a6cb5",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollLeft,onClick:this.handleLeftScrollClick},r("limel-icon",{key:"62f4b1fff0ab4fac4b8b379c2ab5bda44579e589",name:"angle_left"}))),r("div",{key:"fe3e1014ffde25bea6f16731e0edc3ce280f321d",class:"scroll-fade right"}),r("div",{key:"d79950639da735d25053272ae0a53f28d3ce233c",class:"scroll-button right"},r("button",{key:"24b05b9fdae0479c15159253d7c785853db21b1d",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollRight,onClick:this.handleRightScrollClick},r("limel-icon",{key:"5388965c9a27d888583ddc2d892ea5c3810500e4",name:"angle_right"})))))}tabsChanged(t=[],e=[]){const r=t.map((t=>t.id)),n=e.map((t=>t.id));a(r,n)||(this.setupMdc=!0,this.tearDown())}handleWindowResize(){this.scrollArea&&this.handleScroll()}setup(){const t=this.host.shadowRoot.querySelector(".mdc-tab-bar");t&&(this.mdcTabBar=new J(t),this.mdcTabBar.focusOnActivate=!0,this.mdcTabBar.useAutomaticActivation=!0,this.scrollArea=t.querySelector(".mdc-tab-scroller__scroll-area"),this.scrollContent=t.querySelector(".mdc-tab-scroller__scroll-content"),this.setupListeners(),setTimeout(this.handleScroll,0))}tearDown(){this.scrollArea&&this.scrollArea.removeEventListener("scroll",this.handleScroll),this.mdcTabBar&&(this.mdcTabBar.unlisten(Q,this.handleTabActivated),this.mdcTabBar.destroy())}setupListeners(){this.mdcTabBar.listen(Q,this.handleTabActivated),this.scrollArea.addEventListener("scroll",this.handleScroll,{passive:!0})}handleTabActivated(t){const e=function(t,e){const r=t.findIndex((t=>!0===t.active)),n=[...t];return-1!==r&&(n[r]=Object.assign(Object.assign({},t[r]),{active:!1})),n[e]=Object.assign(Object.assign({},t[e]),{active:!0}),n}(this.tabs,t.detail.index);k(e,this.tabs).sort(this.sortByInactive).forEach((t=>{this.changeTab.emit(t)})),this.tabs=e}sortByInactive(t,e){return Number(t.active)-Number(e.active)}handleScroll(){const t=this.scrollArea.scrollLeft,e=Math.floor(this.scrollContent.getBoundingClientRect().width-this.scrollArea.getBoundingClientRect().width-t);this.canScrollLeft=t>40,this.canScrollRight=e>40}handleLeftScrollClick(){const t=this.getScrollDistance();this.scrollArea.scroll({left:this.scrollArea.scrollLeft-t,behavior:"smooth"})}handleRightScrollClick(){const t=this.getScrollDistance();this.scrollArea.scroll({left:this.scrollArea.scrollLeft+t,behavior:"smooth"})}getScrollDistance(){if(!this.scrollArea)return 150;const t=this.scrollArea.getBoundingClientRect().width;return Math.max(.8*t,150)}renderIcon(t){if(!t.icon)return;const e=i(t.icon),n=o(t.icon,t.iconColor),a={color:""};return n&&(a.color=n),r("limel-icon",{class:"mdc-tab__icon",name:e,style:a,size:"small","aria-hidden":"true"})}renderTab(t){return r("button",{class:{"mdc-tab":!0,"mdc-tab--active":!!t.active},role:"tab","aria-selected":t.active?"true":"false",tabindex:t.active?0:-1},r("span",{class:"mdc-tab__content"},this.renderIcon(t),r("span",{class:"mdc-tab__text-label"},t.text),t.badge?r("limel-badge",{label:t.badge}):""),r("span",{class:{"mdc-tab-indicator":!0,"mdc-tab-indicator--active":!!t.active}},r("span",{class:"mdc-tab-indicator__content mdc-tab-indicator__content--underline"})),r("span",{class:"mdc-tab__ripple"}))}triggerIconColorWarning(){this.tabs.some((t=>t.iconColor))&&console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}get host(){return n(this)}static get watchers(){return{tabs:[{tabsChanged:0}]}}};Z.style="@charset \"UTF-8\";.scroll-fade,.scroll-button{position:absolute;transition-property:transform;transition-duration:0.3s;transition-timing-function:ease-out}.scroll-fade{top:0;height:100%;width:4rem;pointer-events:none}.scroll-fade.left{transform:translate3d(-4rem, 0, 0);left:0;background:linear-gradient(270deg, rgba(var(--limel-tab-background-color), 0) 0%, rgba(var(--limel-tab-background-color), 0.8) 40%, rgba(var(--limel-tab-background-color), 0.8) 100%)}.scroll-fade.right{transform:translate3d(4rem, 0, 0);right:0;background:linear-gradient(90deg, rgba(var(--limel-tab-background-color), 0) 0%, rgba(var(--limel-tab-background-color), 0.8) 40%, rgba(var(--limel-tab-background-color), 0.8) 100%)}.scroll-button{display:flex;align-items:center;top:0;bottom:0}.scroll-button.left{transform:translate3d(-4rem, 0, 0);left:0.25rem}.scroll-button.right{transform:translate3d(4rem, 0, 0);right:0.25rem}.scroll-button:hover{transform:translate3d(0, 0, 0)}.scroll-button button{all:unset;display:flex;align-items:center;justify-content:center;width:1.25rem;height:calc(100% - 0.25rem * 2);border-radius:0.25rem}.scroll-button button:not(:disabled){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):focus,.scroll-button button:not(:disabled):focus-visible{will-change:color, background-color, box-shadow, transform}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.scroll-button button:not(:disabled):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.scroll-button limel-icon{width:1rem}.mdc-tab-scroller{position:relative;overflow:hidden}.mdc-tab-scroller.can-scroll-left .scroll-fade.left,.mdc-tab-scroller.can-scroll-left .scroll-button.left,.mdc-tab-scroller.can-scroll-right .scroll-fade.right,.mdc-tab-scroller.can-scroll-right .scroll-button.right{transform:translate3d(0, 0, 0)}.mdc-tab-scroller.can-scroll-left:not(.can-scroll-right) .scroll-button.right,.mdc-tab-scroller.can-scroll-right:not(.can-scroll-left) .scroll-button.left{opacity:0.5;transition-delay:0.5s}.lime-hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.mdc-tab-scroller__scroll-content{padding:0.25rem var(--limel-tab-active-outer-edge-curve-size) 0 var(--limel-tab-active-outer-edge-curve-size);background-color:rgb(var(--limel-tab-background-color))}.mdc-tab-bar{width:100%}.mdc-tab{height:48px}.mdc-tab--stacked{height:72px}.mdc-tab-scroller.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-scroller{overflow-y:hidden}.mdc-tab-scroller__test{position:absolute;top:-9999px;width:100px;height:100px;overflow-x:scroll}.mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:touch;display:flex;overflow-x:hidden}.mdc-tab-scroller__scroll-area::-webkit-scrollbar,.mdc-tab-scroller__test::-webkit-scrollbar{display:none}.mdc-tab-scroller__scroll-area--scroll{overflow-x:scroll}.mdc-tab-scroller__scroll-content{position:relative;display:flex;flex:1 0 auto;transform:none;will-change:transform}.mdc-tab-scroller--align-start .mdc-tab-scroller__scroll-content{justify-content:flex-start}.mdc-tab-scroller--align-end .mdc-tab-scroller__scroll-content{justify-content:flex-end}.mdc-tab-scroller--align-center .mdc-tab-scroller__scroll-content{justify-content:center}.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:auto}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-tab-indicator .mdc-tab-indicator__content--icon{color:#018786;color:var(--mdc-theme-secondary, #018786)}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mdc-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase)}.mdc-tab .mdc-tab__text-label{color:rgba(0, 0, 0, 0.6)}.mdc-tab .mdc-tab__icon{color:rgba(0, 0, 0, 0.54);fill:currentColor}.mdc-tab{position:relative}.mdc-tab__content{position:relative}.mdc-tab__icon{width:24px;height:24px;font-size:24px}.mdc-tab--active .mdc-tab__text-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-tab--active .mdc-tab__icon{color:#6200ee;color:var(--mdc-theme-primary, #6200ee);fill:currentColor}.mdc-tab{background:none}.mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px;}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-tab{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-tab .mdc-tab__ripple::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-tab .mdc-tab__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-tab.mdc-ripple-upgraded--unbounded .mdc-tab__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-tab.mdc-ripple-upgraded--foreground-activation .mdc-tab__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-tab.mdc-ripple-upgraded--foreground-deactivation .mdc-tab__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-tab:hover .mdc-tab__ripple::before,.mdc-tab.mdc-ripple-surface--hover .mdc-tab__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-tab.mdc-ripple-upgraded--background-focused .mdc-tab__ripple::before,.mdc-tab:not(.mdc-ripple-upgraded):focus .mdc-tab__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-tab:not(.mdc-ripple-upgraded) .mdc-tab__ripple::after{transition:opacity 150ms linear}.mdc-tab:not(.mdc-ripple-upgraded):active .mdc-tab__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-tab.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-tab__ripple{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;will-change:transform, opacity}:host(limel-tab-bar){--limel-tab-background-color:var(--contrast-300);--limel-tab-border-radius:0.625rem;--limel-active-tab-background-color:var( --tab-panel-background-color, rgb(var(--contrast-100)) );--limel-tab-active-outer-edge-curve-size:0.75rem;--limel-tab-separator-width:0.125rem;--limel-tab-separator-background-color:rgb(var(--contrast-600));isolation:isolate;display:block;position:relative}:host(.has-tabs-with-equal-width) .mdc-tab{flex:1 0 auto}.mdc-tab{font-family:inherit;font-weight:400;letter-spacing:normal;font-size:var(--limel-theme-default-font-size);text-transform:none}.mdc-tab-indicator .mdc-tab-indicator__content{border:none}.mdc-tab__ripple{box-sizing:border-box;border-radius:var(--limel-tab-border-radius);border-style:solid;border-color:transparent;border-width:0.25rem;opacity:0.7}.mdc-tab__ripple:before,.mdc-tab__ripple:after{transition:background-color 0.5s ease}.mdc-tab{border-radius:0;padding-right:1rem;padding-left:1rem;min-width:2.5rem;background-color:transparent;flex:0 0 auto;height:2.5rem}.mdc-tab:not(.mdc-tab--active):after{content:\"\";display:block;background-color:var(--limel-tab-separator-background-color);width:var(--limel-tab-separator-width);height:1rem;margin:auto;position:absolute;top:0;bottom:0;border-radius:1rem;right:calc(-1 * var(--limel-tab-separator-width))}.mdc-tab:not(.mdc-tab--active):last-of-type:after{display:none}.mdc-tab .mdc-tab__icon{color:rgb(var(--contrast-800));margin-left:-0.25rem}.mdc-tab limel-badge{margin-right:-0.25rem;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.mdc-tab--active{border-radius:var(--limel-tab-border-radius) var(--limel-tab-border-radius) 0 0;background-color:var(--limel-active-tab-background-color);z-index:2}.mdc-tab--active:before,.mdc-tab--active:after{content:\"\";display:block;width:var(--limel-tab-active-outer-edge-curve-size);height:var(--limel-tab-active-outer-edge-curve-size);position:absolute;bottom:0;background-color:var(--limel-active-tab-background-color);-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\")}.mdc-tab--active:before{left:calc(-1 * var(--limel-tab-active-outer-edge-curve-size));transform:rotateY(180deg)}.mdc-tab--active:after{right:calc(-1 * var(--limel-tab-active-outer-edge-curve-size))}.mdc-tab--active .mdc-ripple-upgraded--background-focused:before{background-color:transparent;transition:background-color 1s ease}.mdc-tab--active .mdc-tab__icon{color:var(--mdc-theme-primary)}.mdc-tab__content{gap:0.375rem}.mdc-tab .mdc-tab__text-label{transition:color 0.2s ease;padding-left:0 !important;color:var(--limel-theme-on-surface-color)}.mdc-tab:hover .mdc-tab__text-label{color:var(--limel-theme-text-primary-on-background-color)}.mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--lime-primary-color, var(--limel-theme-primary-color))}";export{Z as limel_tab_bar}
@@ -1 +1 @@
1
- import{r as i,c as t,h as e}from"./p-DBTJNfo7.js";import{t as s}from"./p-DVRaJQvC.js";import{a,E as n}from"./p-CxzDbuiY.js";const o=class{constructor(e){i(this,e),this.cancel=t(this,"cancel"),this.save=t(this,"save"),this.linkChange=t(this,"linkChange"),this.language="en",this.isOpen=!1,this.getTranslation=i=>s.get(i,this.language),this.isValid=i=>{try{new URL(i)}catch(i){return!1}return!0},this.handleKeyDown=i=>{var t;i.key===a&&(this.saveButton&&this.saveButton.focus(),i.preventDefault(),this.isValid(null===(t=this.link)||void 0===t?void 0:t.href)&&this.handleSave(i))},this.handleCancel=i=>{i instanceof KeyboardEvent&&i.key!==n||(i.stopPropagation(),i.preventDefault(),this.cancel.emit())},this.handleSave=i=>{i.stopPropagation(),this.save.emit()},this.handleLinkInputAction=i=>{window.open(this.link.href,"_blank"),i.stopPropagation()},this.handleLinkTitleChange=i=>{var t;this.emitLinkChange(i.detail,null===(t=this.link)||void 0===t?void 0:t.href)},this.handleLinkValueChange=i=>{var t;this.emitLinkChange(null===(t=this.link)||void 0===t?void 0:t.text,i.detail)},this.emitLinkChange=(i,t)=>{this.linkChange.emit({text:i,href:t})}}connectedCallback(){this.setupGlobalHandlers()}disconnectedCallback(){this.teardownGlobalHandlers()}setupGlobalHandlers(){this.isOpen&&document.addEventListener("keyup",this.handleCancel)}teardownGlobalHandlers(){document.removeEventListener("keyup",this.handleCancel)}componentDidLoad(){this.focusOnTextInput()}focusOnTextInput(){if(this.textInput){const i=this.textInput.shadowRoot.querySelector("input");i&&requestAnimationFrame((()=>{i.focus()}))}}render(){var i,t;const s=this.isValid(this.link.href);return[e("limel-input-field",{key:"59a19c43140dc628d165014767ed46d2c01012d4",label:this.getTranslation("editor-link-menu.text"),value:(null===(i=this.link)||void 0===i?void 0:i.text)||"",leadingIcon:"text_cursor",onChange:this.handleLinkTitleChange,onKeyDown:this.handleKeyDown,ref:i=>this.textInput=i}),e("limel-input-field",{key:"de5d72e0ff74a96278615c55871a86883ebc8ad5",label:this.getTranslation("editor-link-menu.link"),value:(null===(t=this.link)||void 0===t?void 0:t.href)||"",type:"text",leadingIcon:"-lime-text-link",trailingIcon:"external_link",invalid:!s,onChange:this.handleLinkValueChange,onAction:this.handleLinkInputAction,onKeyDown:this.handleKeyDown}),e("div",{key:"28e258290e650ae336b348bc8ff5d749100438f0",class:"actions"},e("limel-button",{key:"de6ca7d3594dd64897a8589c5e2fc04e7f0b623e",label:this.getTranslation("cancel"),onClick:this.handleCancel}),e("limel-button",{key:"be505a063196c20992e4918fa60d1d0bcd0b40d5",primary:!0,label:this.getTranslation("save"),disabled:!s,onClick:this.handleSave,ref:i=>this.saveButton=i,slot:"button"}))]}};o.style=":host(limel-text-editor-link-menu){animation:fade 0.2s ease forwards;animation-delay:0.1s;opacity:0;display:flex;flex-direction:column;gap:0.5rem;padding:0.5rem;max-width:calc(100vw - 2rem);border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--shadow-depth-16)}.actions{display:flex;justify-content:end;gap:0.5rem}@keyframes fade{0%{scale:0.86;opacity:0}100%{scale:1;opacity:1}}";export{o as limel_text_editor_link_menu}
1
+ import{r as i,c as t,h as e}from"./p-DBTJNfo7.js";import{t as s}from"./p-DVRaJQvC.js";import{a,E as n}from"./p-CxzDbuiY.js";const o=class{constructor(e){i(this,e),this.cancel=t(this,"cancel"),this.save=t(this,"save"),this.linkChange=t(this,"linkChange"),this.language="en",this.isOpen=!1,this.getTranslation=i=>s.get(i,this.language),this.isValid=i=>{try{new URL(i)}catch(i){return!1}return!0},this.handleKeyDown=i=>{var t;i.key===a&&(this.saveButton&&this.saveButton.focus(),i.preventDefault(),this.isValid(null===(t=this.link)||void 0===t?void 0:t.href)&&this.handleSave(i))},this.handleCancel=i=>{i instanceof KeyboardEvent&&i.key!==n||(i.stopPropagation(),i.preventDefault(),this.cancel.emit())},this.handleSave=i=>{i.stopPropagation(),this.save.emit()},this.handleLinkInputAction=i=>{window.open(this.link.href,"_blank"),i.stopPropagation()},this.handleLinkTitleChange=i=>{var t;this.emitLinkChange(i.detail,null===(t=this.link)||void 0===t?void 0:t.href)},this.handleLinkValueChange=i=>{var t;this.emitLinkChange(null===(t=this.link)||void 0===t?void 0:t.text,i.detail)},this.emitLinkChange=(i,t)=>{this.linkChange.emit({text:i,href:t})}}connectedCallback(){this.setupGlobalHandlers()}disconnectedCallback(){this.teardownGlobalHandlers()}setupGlobalHandlers(){this.isOpen&&document.addEventListener("keyup",this.handleCancel)}teardownGlobalHandlers(){document.removeEventListener("keyup",this.handleCancel)}componentDidLoad(){this.focusOnTextInput()}focusOnTextInput(){if(this.textInput){const i=this.textInput.shadowRoot.querySelector("input");i&&requestAnimationFrame((()=>{i.focus()}))}}render(){var i,t;const s=this.isValid(this.link.href);return[e("limel-input-field",{key:"c24762264468b63deceaaed1b4eeb2dc0b05366f",label:this.getTranslation("editor-link-menu.text"),value:(null===(i=this.link)||void 0===i?void 0:i.text)||"",leadingIcon:"text_cursor",onChange:this.handleLinkTitleChange,onKeyDown:this.handleKeyDown,ref:i=>this.textInput=i}),e("limel-input-field",{key:"c9ad52741aa7d1106321191a3f820798c4eb1ef5",label:this.getTranslation("editor-link-menu.link"),value:(null===(t=this.link)||void 0===t?void 0:t.href)||"",type:"text",leadingIcon:"-lime-text-link",trailingIcon:"external_link",invalid:!s,onChange:this.handleLinkValueChange,onAction:this.handleLinkInputAction,onKeyDown:this.handleKeyDown}),e("div",{key:"0ed7c838c5b3cb5336e4751ebf0008389dfa54a9",class:"actions"},e("limel-button",{key:"d19515f0c0f77c599d1a2d14bec90bf5fde49152",label:this.getTranslation("cancel"),onClick:this.handleCancel}),e("limel-button",{key:"1e2e2ab778b133631a23c6525b16c9bbd1d5b211",primary:!0,label:this.getTranslation("save"),disabled:!s,onClick:this.handleSave,ref:i=>this.saveButton=i,slot:"button"}))]}};o.style=":host(limel-text-editor-link-menu){animation:fade 0.2s ease forwards;animation-delay:0.1s;opacity:0;display:flex;flex-direction:column;gap:0.5rem;padding:0.5rem;max-width:calc(100vw - 2rem);border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--shadow-depth-16)}.actions{display:flex;justify-content:end;gap:0.5rem}@keyframes fade{0%{scale:0.86;opacity:0}100%{scale:1;opacity:1}}";export{o as limel_text_editor_link_menu}
@@ -1 +1 @@
1
- import{r as t,h as e,a as n}from"./p-DBTJNfo7.js";import{c as i}from"./p-JbKhhoXs.js";var r="top",o="bottom",s="right",a="left",u="auto",c=[r,o,s,a],f="start",l="end",h="viewport",d="popper",p=c.reduce((function(t,e){return t.concat([e+"-"+f,e+"-"+l])}),[]),v=[].concat(c,[u]).reduce((function(t,e){return t.concat([e,e+"-"+f,e+"-"+l])}),[]),b=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function m(t){return t?(t.nodeName||"").toLowerCase():null}function y(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function g(t){return t instanceof y(t).Element||t instanceof Element}function x(t){return t instanceof y(t).HTMLElement||t instanceof HTMLElement}function w(t){return"undefined"!=typeof ShadowRoot&&(t instanceof y(t).ShadowRoot||t instanceof ShadowRoot)}function O(t){return t.split("-")[0]}var j=Math.max,k=Math.min,C=Math.round;function M(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function P(){return!/^((?!chrome|android).)*safari/i.test(M())}function A(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&x(t)&&(r=t.offsetWidth>0&&C(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&C(i.height)/t.offsetHeight||1);var s=(g(t)?y(t):window).visualViewport,a=!P()&&n,u=(i.left+(a&&s?s.offsetLeft:0))/r,c=(i.top+(a&&s?s.offsetTop:0))/o,f=i.width/r,l=i.height/o;return{width:f,height:l,top:c,right:u+f,bottom:c+l,left:u,x:u,y:c}}function L(t){var e=A(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function S(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&w(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function T(t){return y(t).getComputedStyle(t)}function W(t){return["table","td","th"].indexOf(m(t))>=0}function q(t){return((g(t)?t.ownerDocument:t.document)||window.document).documentElement}function z(t){return"html"===m(t)?t:t.assignedSlot||t.parentNode||(w(t)?t.host:null)||q(t)}function B(t){return x(t)&&"fixed"!==T(t).position?t.offsetParent:null}function E(t){for(var e=y(t),n=B(t);n&&W(n)&&"static"===T(n).position;)n=B(n);return n&&("html"===m(n)||"body"===m(n)&&"static"===T(n).position)?e:n||function(t){var e=/firefox/i.test(M());if(/Trident/i.test(M())&&x(t)&&"fixed"===T(t).position)return null;var n=z(t);for(w(n)&&(n=n.host);x(n)&&["html","body"].indexOf(m(n))<0;){var i=T(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function R(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function H(t,e,n){return j(t,k(e,n))}function D(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function I(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function _(t){return t.split("-")[1]}var F={top:"auto",right:"auto",bottom:"auto",left:"auto"};function N(t){var e,n=t.popper,i=t.popperRect,u=t.placement,c=t.variation,f=t.offsets,h=t.position,d=t.gpuAcceleration,p=t.adaptive,v=t.roundOffsets,b=t.isFixed,m=f.x,g=void 0===m?0:m,x=f.y,w=void 0===x?0:x,O="function"==typeof v?v({x:g,y:w}):{x:g,y:w};g=O.x,w=O.y;var j=f.hasOwnProperty("x"),k=f.hasOwnProperty("y"),M=a,P=r,A=window;if(p){var L=E(n),S="clientHeight",W="clientWidth";L===y(n)&&"static"!==T(L=q(n)).position&&"absolute"===h&&(S="scrollHeight",W="scrollWidth"),(u===r||(u===a||u===s)&&c===l)&&(P=o,w-=(b&&L===A&&A.visualViewport?A.visualViewport.height:L[S])-i.height,w*=d?1:-1),u!==a&&(u!==r&&u!==o||c!==l)||(M=s,g-=(b&&L===A&&A.visualViewport?A.visualViewport.width:L[W])-i.width,g*=d?1:-1)}var z,B=Object.assign({position:h},p&&F),R=!0===v?function(t,e){var n=t.y,i=e.devicePixelRatio||1;return{x:C(t.x*i)/i||0,y:C(n*i)/i||0}}({x:g,y:w},y(n)):{x:g,y:w};return g=R.x,w=R.y,Object.assign({},B,d?((z={})[P]=k?"0":"",z[M]=j?"0":"",z.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+w+"px)":"translate3d("+g+"px, "+w+"px, 0)",z):((e={})[P]=k?w+"px":"",e[M]=j?g+"px":"",e.transform="",e))}var V={passive:!0},$={left:"right",right:"left",bottom:"top",top:"bottom"};function J(t){return t.replace(/left|right|bottom|top/g,(function(t){return $[t]}))}var K={start:"end",end:"start"};function U(t){return t.replace(/start|end/g,(function(t){return K[t]}))}function X(t){var e=y(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function G(t){return A(q(t)).left+X(t).scrollLeft}function Q(t){var e=T(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function Y(t){return["html","body","#document"].indexOf(m(t))>=0?t.ownerDocument.body:x(t)&&Q(t)?t:Y(z(t))}function Z(t,e){var n;void 0===e&&(e=[]);var i=Y(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),o=y(i),s=r?[o].concat(o.visualViewport||[],Q(i)?i:[]):i,a=e.concat(s);return r?a:a.concat(Z(z(s)))}function tt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function et(t,e,n){return e===h?tt(function(t,e){var n=y(t),i=q(t),r=n.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,u=0;if(r){o=r.width,s=r.height;var c=P();(c||!c&&"fixed"===e)&&(a=r.offsetLeft,u=r.offsetTop)}return{width:o,height:s,x:a+G(t),y:u}}(t,n)):g(e)?function(t,e){var n=A(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):tt(function(t){var e,n=q(t),i=X(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=j(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=j(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+G(t),u=-i.scrollTop;return"rtl"===T(r||n).direction&&(a+=j(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(q(t)))}function nt(t){var e,n=t.reference,i=t.element,u=t.placement,c=u?O(u):null,h=u?_(u):null,d=n.x+n.width/2-i.width/2,p=n.y+n.height/2-i.height/2;switch(c){case r:e={x:d,y:n.y-i.height};break;case o:e={x:d,y:n.y+n.height};break;case s:e={x:n.x+n.width,y:p};break;case a:e={x:n.x-i.width,y:p};break;default:e={x:n.x,y:n.y}}var v=c?R(c):null;if(null!=v){var b="y"===v?"height":"width";switch(h){case f:e[v]=e[v]-(n[b]/2-i[b]/2);break;case l:e[v]=e[v]+(n[b]/2-i[b]/2)}}return e}function it(t,e){void 0===e&&(e={});var n=e.placement,i=void 0===n?t.placement:n,a=e.strategy,u=void 0===a?t.strategy:a,f=e.boundary,l=void 0===f?"clippingParents":f,p=e.rootBoundary,v=void 0===p?h:p,b=e.elementContext,y=void 0===b?d:b,w=e.altBoundary,O=void 0!==w&&w,C=e.padding,M=void 0===C?0:C,P=D("number"!=typeof M?M:I(M,c)),L=t.rects.popper,W=t.elements[O?y===d?"reference":d:y],B=function(t,e,n,i){var r="clippingParents"===e?function(t){var e=Z(z(t)),n=["absolute","fixed"].indexOf(T(t).position)>=0&&x(t)?E(t):t;return g(n)?e.filter((function(t){return g(t)&&S(t,n)&&"body"!==m(t)})):[]}(t):[].concat(e),o=[].concat(r,[n]),s=o.reduce((function(e,n){var r=et(t,n,i);return e.top=j(r.top,e.top),e.right=k(r.right,e.right),e.bottom=k(r.bottom,e.bottom),e.left=j(r.left,e.left),e}),et(t,o[0],i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(g(W)?W:W.contextElement||q(t.elements.popper),l,v,u),R=A(t.elements.reference),H=nt({reference:R,element:L,placement:i}),_=tt(Object.assign({},L,H)),F=y===d?_:R,N={top:B.top-F.top+P.top,bottom:F.bottom-B.bottom+P.bottom,left:B.left-F.left+P.left,right:F.right-B.right+P.right},V=t.modifiersData.offset;if(y===d&&V){var $=V[i];Object.keys(N).forEach((function(t){var e=[s,o].indexOf(t)>=0?1:-1,n=[r,o].indexOf(t)>=0?"y":"x";N[t]+=$[n]*e}))}return N}function rt(t,e){void 0===e&&(e={});var n=e.boundary,i=e.rootBoundary,r=e.padding,o=e.flipVariations,s=e.allowedAutoPlacements,a=void 0===s?v:s,u=_(e.placement),f=u?o?p:p.filter((function(t){return _(t)===u})):c,l=f.filter((function(t){return a.indexOf(t)>=0}));0===l.length&&(l=f);var h=l.reduce((function(e,o){return e[o]=it(t,{placement:o,boundary:n,rootBoundary:i,padding:r})[O(o)],e}),{});return Object.keys(h).sort((function(t,e){return h[t]-h[e]}))}var ot={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var c=n.mainAxis,l=void 0===c||c,h=n.altAxis,d=void 0===h||h,p=n.fallbackPlacements,v=n.padding,b=n.boundary,m=n.rootBoundary,y=n.altBoundary,g=n.flipVariations,x=void 0===g||g,w=n.allowedAutoPlacements,j=e.options.placement,k=O(j),C=p||(k!==j&&x?function(t){if(O(t)===u)return[];var e=J(t);return[U(t),e,U(e)]}(j):[J(j)]),M=[j].concat(C).reduce((function(t,n){return t.concat(O(n)===u?rt(e,{placement:n,boundary:b,rootBoundary:m,padding:v,flipVariations:x,allowedAutoPlacements:w}):n)}),[]),P=e.rects.reference,A=e.rects.popper,L=new Map,S=!0,T=M[0],W=0;W<M.length;W++){var q=M[W],z=O(q),B=_(q)===f,E=[r,o].indexOf(z)>=0,R=E?"width":"height",H=it(e,{placement:q,boundary:b,rootBoundary:m,altBoundary:y,padding:v}),D=E?B?s:a:B?o:r;P[R]>A[R]&&(D=J(D));var I=J(D),F=[];if(l&&F.push(H[z]<=0),d&&F.push(H[D]<=0,H[I]<=0),F.every((function(t){return t}))){T=q,S=!1;break}L.set(q,F)}if(S)for(var N=function(t){var e=M.find((function(e){var n=L.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},V=x?3:1;V>0&&"break"!==N(V);V--);e.placement!==T&&(e.modifiersData[i]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function st(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function at(t){return[r,s,o,a].some((function(e){return t[e]>=0}))}function ut(t,e,n){void 0===n&&(n=!1);var i,r,o=x(e),s=x(e)&&function(t){var e=t.getBoundingClientRect(),n=C(e.width)/t.offsetWidth||1,i=C(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=q(e),u=A(t,s,n),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(o||!o&&!n)&&(("body"!==m(e)||Q(a))&&(c=(i=e)!==y(i)&&x(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:X(i)),x(e)?((f=A(e,!0)).x+=e.clientLeft,f.y+=e.clientTop):a&&(f.x=G(a))),{x:u.left+c.scrollLeft-f.x,y:u.top+c.scrollTop-f.y,width:u.width,height:u.height}}function ct(t){var e=new Map,n=new Set,i=[];function r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||r(t)})),i}var ft={placement:"bottom",modifiers:[],strategy:"absolute"};function lt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function ht(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,i=t.defaultOptions,r=void 0===i?ft:i;return function(t,e,i){void 0===i&&(i=r);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},ft,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},u=[],c=!1,f={state:a,setOptions:function(i){var o="function"==typeof i?i(a.options):i;l(),a.options=Object.assign({},r,a.options,o),a.scrollParents={reference:g(t)?Z(t):t.contextElement?Z(t.contextElement):[],popper:Z(e)};var s,c,h=function(t){var e=ct(t);return b.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((s=[].concat(n,a.options.modifiers),c=s.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return a.orderedModifiers=h.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.options,n=t.effect;if("function"==typeof n){var i=n({state:a,name:t.name,instance:f,options:void 0===e?{}:e});u.push(i||function(){})}})),f.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,n=t.popper;if(lt(e,n)){a.rects={reference:ut(e,E(n),"fixed"===a.options.strategy),popper:L(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],o=r.fn,s=r.options;"function"==typeof o&&(a=o({state:a,options:void 0===s?{}:s,name:r.name,instance:f})||a)}else a.reset=!1,i=-1}}},update:(o=function(){return new Promise((function(t){f.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(o())}))}))),s}),destroy:function(){l(),c=!0}};if(!lt(t,e))return f;function l(){u.forEach((function(t){return t()})),u=[]}return f.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),f}}var dt=ht({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,s=i.resize,a=void 0===s||s,u=y(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",n.update,V)})),a&&u.addEventListener("resize",n.update,V),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",n.update,V)})),a&&u.removeEventListener("resize",n.update,V)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=nt({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=void 0===i||i,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,u=void 0===a||a,c={placement:O(e.placement),variation:_(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,N(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:u})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,N(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];x(r)&&m(r)&&(Object.assign(r.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});x(i)&&m(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.name,i=t.options.offset,o=void 0===i?[0,0]:i,u=v.reduce((function(t,n){return t[n]=function(t,e,n){var i=O(t),o=[a,r].indexOf(i)>=0?-1:1,u="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=u[0],f=u[1];return c=c||0,f=(f||0)*o,[a,s].indexOf(i)>=0?{x:f,y:c}:{x:c,y:f}}(n,e.rects,o),t}),{}),c=u[e.placement],f=c.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=c.x,e.modifiersData.popperOffsets.y+=f),e.modifiersData[n]=u}},ot,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,u=n.mainAxis,c=void 0===u||u,l=n.altAxis,h=void 0!==l&&l,d=n.tether,p=void 0===d||d,v=n.tetherOffset,b=void 0===v?0:v,m=it(e,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),y=O(e.placement),g=_(e.placement),x=!g,w=R(y),C="x"===w?"y":"x",M=e.modifiersData.popperOffsets,P=e.rects.reference,A=e.rects.popper,S="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,T="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),W=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,q={x:0,y:0};if(M){if(c){var z,B="y"===w?r:a,D="y"===w?o:s,I="y"===w?"height":"width",F=M[w],N=F+m[B],V=F-m[D],$=p?-A[I]/2:0,J=g===f?P[I]:A[I],K=g===f?-A[I]:-P[I],U=e.elements.arrow,X=p&&U?L(U):{width:0,height:0},G=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=G[B],Y=G[D],Z=H(0,P[I],X[I]),tt=x?P[I]/2-$-Z-Q-T.mainAxis:J-Z-Q-T.mainAxis,et=x?-P[I]/2+$+Z+Y+T.mainAxis:K+Z+Y+T.mainAxis,nt=e.elements.arrow&&E(e.elements.arrow),rt=null!=(z=null==W?void 0:W[w])?z:0,ot=F+et-rt,st=H(p?k(N,F+tt-rt-(nt?"y"===w?nt.clientTop||0:nt.clientLeft||0:0)):N,F,p?j(V,ot):V);M[w]=st,q[w]=st-F}if(h){var at,ut=M[C],ct="y"===C?"height":"width",ft=ut+m["x"===w?r:a],lt=ut-m["x"===w?o:s],ht=-1!==[r,a].indexOf(y),dt=null!=(at=null==W?void 0:W[C])?at:0,pt=ht?ft:ut-P[ct]-A[ct]-dt+T.altAxis,vt=ht?ut+P[ct]+A[ct]-dt-T.altAxis:lt,bt=p&&ht?function(t,e,n){var i=H(t,e,n);return i>n?n:i}(pt,ut,vt):H(p?pt:ft,ut,p?vt:lt);M[C]=bt,q[C]=bt-ut}e.modifiersData[i]=q}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,u=t.options,f=n.elements.arrow,l=n.modifiersData.popperOffsets,h=O(n.placement),d=R(h),p=[a,s].indexOf(h)>=0?"height":"width";if(f&&l){var v=function(t,e){return D("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:I(t,c))}(u.padding,n),b=L(f),m="y"===d?r:a,y="y"===d?o:s,g=n.rects.reference[p]+n.rects.reference[d]-l[d]-n.rects.popper[p],x=l[d]-n.rects.reference[d],w=E(f),j=w?"y"===d?w.clientHeight||0:w.clientWidth||0:0,k=j/2-b[p]/2+(g/2-x/2),C=H(v[m],k,j-b[p]-v[y]);n.modifiersData[i]=((e={})[d]=C,e.centerOffset=C-k,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&S(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=it(e,{elementContext:"reference"}),a=it(e,{altBoundary:!0}),u=st(s,i),c=st(a,r,o),f=at(u),l=at(c);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:l},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":l})}}]});const pt="is-visible",vt="is-hiding",bt=class{constructor(e){t(this,e),this.openDirection="bottom",this.position="absolute",this.containerStyle={},this.inheritParentWidth=!1,this.visible=!1,this.anchor=null,this.loaded=!1,this.parents=new WeakMap}disconnectedCallback(){this.removeContainer(),this.destroyPopper(),this.observer&&this.container&&this.observer.unobserve(this.container),this.container=null}connectedCallback(){this.loaded&&this.visible&&this.init()}componentDidLoad(){this.loaded=!0,this.connectedCallback()}init(){this.host.isConnected&&(this.createContainer(),this.hideContainer(),this.attachContainer(),this.styleContainer(),this.visible&&(this.createPopper(),this.showContainer()),"ResizeObserver"in window&&(this.observer=new ResizeObserver((()=>{this.popperInstance&&(this.styleContainer(),this.popperInstance.update())})),this.observer.observe(this.container)))}render(){return e("slot",{key:"e41cbd7a44b0e55525f9e99d056cc9ab627082d0"})}onVisible(){this.container||!this.visible?this.visible?(this.styleContainer(),this.createPopper(),requestAnimationFrame((()=>{this.showContainer()}))):this.animateHideAndCleanup():this.init()}createContainer(){const t=this.host.shadowRoot.querySelector("slot"),e=t.assignedElements&&t.assignedElements()||[];this.container=document.createElement("div"),this.container.setAttribute("id",this.containerId),this.container.setAttribute("class","limel-portal--container"),Object.assign(this.container,{portalSource:this.host}),e.forEach((t=>{this.parents.set(t,t.parentElement),this.container.append(t)}))}attachContainer(){this.getParent().append(this.container)}removeContainer(){this.container&&([...this.container.children].forEach((t=>{const e=this.parents.get(t);e&&e.append(t)})),this.container.remove())}hideContainer(){this.container&&this.container.classList.remove(pt)}showContainer(){this.container.classList.add(pt)}animateHideAndCleanup(){this.container&&(this.container.classList.add(vt),this.styleContainer(),setTimeout((()=>{this.container&&(this.container.classList.remove(vt),this.visible||(this.container.classList.remove(pt),this.destroyPopper()))}),300))}styleContainer(){this.setContainerWidth(),this.setContainerHeight(),this.setContainerStyles()}setContainerWidth(){const t=this.host.getBoundingClientRect().width;if(this.inheritParentWidth){let e=this.getContentWidth(this.container);t>0&&(e=t),this.container.style.width=`${e}px`}}getContentWidth(t){if(!t)return null;const e=t.getBoundingClientRect().width;if(0!==e)return e;const n=t.querySelector("*");return this.getContentWidth(n)}setContainerStyles(){for(const t of Object.keys(this.containerStyle))this.container.style[t]=this.containerStyle[t]}createPopper(){const t=this.createPopperConfig();this.popperInstance=dt(this.anchor||this.host,this.container,t)}destroyPopper(){var t;null===(t=this.popperInstance)||void 0===t||t.destroy(),this.popperInstance=null}createPopperConfig(){const t=this.getPlacement(this.openDirection),e=this.getFlipPlacement(this.openDirection);return{strategy:this.position,placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:[e]}}]}}getPlacement(t){return{"left-start":"left-start",left:"left","left-end":"left-end","right-start":"right-start",right:"right","right-end":"right-end","top-start":"top-start",top:"top","top-end":"top-end","bottom-start":"bottom-start",bottom:"bottom","bottom-end":"bottom-end"}[t]}getFlipPlacement(t){return{"left-start":"right-start",left:"right","left-end":"right-end","right-start":"left-start",right:"left","right-end":"left-end","top-start":"bottom-start",top:"bottom","top-end":"bottom-end","bottom-start":"top-start",bottom:"top","bottom-end":"top-end"}[t]}setContainerHeight(){const t=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0),{top:e,bottom:n}=this.host.getBoundingClientRect(),i=Math.max(e,0),r=Math.max(t-n,0),o=Math.max(i,r)-16;this.container.style.maxHeight=`${o}px`}getParent(){let t=this.anchor||this.host;for(;t;){const e=t.closest(".limel-portal--parent");if(e)return e;t=t.getRootNode().host}return document.body}get host(){return n(this)}static get watchers(){return{visible:[{onVisible:0}]}}};bt.style=":host(limel-portal){display:block;position:absolute;top:0;bottom:0;width:100%;pointer-events:none}:host([hidden]){display:none}slot{display:none}";class mt{constructor(t,e,n=500){this.timerHandle=null,this.showCallback=t,this.hideCallback=e,this.delayForShowing=n}showAfterDelay(){this.timerHandle||(this.timerHandle=setTimeout(this.showCallback,this.delayForShowing))}hide(){clearTimeout(this.timerHandle),this.timerHandle=null,this.hideCallback()}}const yt=class{constructor(e){t(this,e),this.maxlength=50,this.openDirection="top",this.showTooltip=()=>{this.tooltipTimer.showAfterDelay()},this.hideTooltip=()=>{this.tooltipTimer.hide()},this.portalId=i(),this.tooltipId=i(),this.tooltipTimer=new mt((()=>this.open=!0),(()=>this.open=!1))}connectedCallback(){this.ownerElement=function(t,e){let n=e;do{n=n.parentNode}while(n&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&n.nodeType!==Node.DOCUMENT_NODE);return null==n?void 0:n.getElementById(t)}(this.elementId,this.host),this.setOwnerAriaLabel(),this.addListeners()}disconnectedCallback(){this.removeListeners()}render(){const t=getComputedStyle(this.host).getPropertyValue("--tooltip-z-index");return e("div",{key:"9b3cb71f61c465c196d4beb767297478efe7855d",class:"trigger-anchor"},e("limel-portal",{key:"36d2dc1ec350e199face794b8100983dff284f29",openDirection:this.openDirection,visible:this.open,containerId:this.portalId,containerStyle:{"z-index":t,"pointer-events":"none"},anchor:this.ownerElement},e("limel-tooltip-content",{key:"5584b033478721872c759f59a7f442d2d032dea4",label:this.label,helperLabel:this.helperLabel,maxlength:this.maxlength,role:"tooltip","aria-hidden":!this.open,id:this.tooltipId})))}setOwnerAriaLabel(){var t;null===(t=this.ownerElement)||void 0===t||t.setAttribute("aria-describedby",this.tooltipId)}addListeners(){var t,e,n,i;null===(t=this.ownerElement)||void 0===t||t.addEventListener("mouseover",this.showTooltip),null===(e=this.ownerElement)||void 0===e||e.addEventListener("mouseout",this.hideTooltip),null===(n=this.ownerElement)||void 0===n||n.addEventListener("focus",this.showTooltip),null===(i=this.ownerElement)||void 0===i||i.addEventListener("blur",this.hideTooltip)}removeListeners(){var t,e,n,i;null===(t=this.ownerElement)||void 0===t||t.removeEventListener("mouseover",this.showTooltip),null===(e=this.ownerElement)||void 0===e||e.removeEventListener("mouseout",this.hideTooltip),null===(n=this.ownerElement)||void 0===n||n.removeEventListener("focus",this.showTooltip),null===(i=this.ownerElement)||void 0===i||i.removeEventListener("blur",this.hideTooltip)}get host(){return n(this)}};yt.style=":host(limel-tooltip){position:absolute;pointer-events:none}";const gt=class{constructor(e){t(this,e)}render(){let t=!1;this.helperLabel&&this.maxlength&&(t=this.label.length+this.helperLabel.length>this.maxlength);const n={};return this.maxlength&&(n.style={"--tooltip-max-width-of-text":`${this.maxlength}ch`}),[e("text",Object.assign({key:"3d96f1730668d689661312967b858e93497699c3",class:{"has-column-layout":t}},n),e("div",{key:"d1bad177a97b5f57011aaa7691d8ef99b6dfe3ee",class:"label"},this.label),e("div",{key:"6b593758bc01dd59b6b192cf000bc1dfbe9db3b2",class:"helper-label"},this.helperLabel))]}};gt.style=":host(limel-tooltip-content){display:flex;border-radius:0.25rem;padding:0.25rem 0.5rem;background-color:rgb(var(--contrast-1300));box-shadow:var(--shadow-depth-16)}text{font-size:var(--limel-theme-default-font-size);line-height:1.25;display:flex;column-gap:1rem}text.has-column-layout{display:table-cell;width:fit-content;max-width:min(var(--tooltip-max-width-of-text), 80vw)}text.has-column-layout .label{padding-bottom:0.5rem}text.has-column-layout .helper-label{padding-bottom:0.25rem}.label{color:rgb(var(--contrast-200))}.helper-label{color:rgb(var(--contrast-800))}.helper-label:empty{display:none}";export{bt as limel_portal,yt as limel_tooltip,gt as limel_tooltip_content}
1
+ import{r as t,h as e,a as n}from"./p-DBTJNfo7.js";import{c as i}from"./p-JbKhhoXs.js";var r="top",o="bottom",a="right",s="left",u="auto",c=[r,o,a,s],f="start",l="end",h="viewport",d="popper",p=c.reduce((function(t,e){return t.concat([e+"-"+f,e+"-"+l])}),[]),v=[].concat(c,[u]).reduce((function(t,e){return t.concat([e,e+"-"+f,e+"-"+l])}),[]),b=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function m(t){return t?(t.nodeName||"").toLowerCase():null}function y(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function g(t){return t instanceof y(t).Element||t instanceof Element}function x(t){return t instanceof y(t).HTMLElement||t instanceof HTMLElement}function w(t){return"undefined"!=typeof ShadowRoot&&(t instanceof y(t).ShadowRoot||t instanceof ShadowRoot)}function O(t){return t.split("-")[0]}var j=Math.max,k=Math.min,C=Math.round;function M(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function P(){return!/^((?!chrome|android).)*safari/i.test(M())}function A(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&x(t)&&(r=t.offsetWidth>0&&C(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&C(i.height)/t.offsetHeight||1);var a=(g(t)?y(t):window).visualViewport,s=!P()&&n,u=(i.left+(s&&a?a.offsetLeft:0))/r,c=(i.top+(s&&a?a.offsetTop:0))/o,f=i.width/r,l=i.height/o;return{width:f,height:l,top:c,right:u+f,bottom:c+l,left:u,x:u,y:c}}function L(t){var e=A(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function S(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&w(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function T(t){return y(t).getComputedStyle(t)}function W(t){return["table","td","th"].indexOf(m(t))>=0}function q(t){return((g(t)?t.ownerDocument:t.document)||window.document).documentElement}function z(t){return"html"===m(t)?t:t.assignedSlot||t.parentNode||(w(t)?t.host:null)||q(t)}function B(t){return x(t)&&"fixed"!==T(t).position?t.offsetParent:null}function E(t){for(var e=y(t),n=B(t);n&&W(n)&&"static"===T(n).position;)n=B(n);return n&&("html"===m(n)||"body"===m(n)&&"static"===T(n).position)?e:n||function(t){var e=/firefox/i.test(M());if(/Trident/i.test(M())&&x(t)&&"fixed"===T(t).position)return null;var n=z(t);for(w(n)&&(n=n.host);x(n)&&["html","body"].indexOf(m(n))<0;){var i=T(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function R(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function H(t,e,n){return j(t,k(e,n))}function D(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function I(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function _(t){return t.split("-")[1]}var F={top:"auto",right:"auto",bottom:"auto",left:"auto"};function N(t){var e,n=t.popper,i=t.popperRect,u=t.placement,c=t.variation,f=t.offsets,h=t.position,d=t.gpuAcceleration,p=t.adaptive,v=t.roundOffsets,b=t.isFixed,m=f.x,g=void 0===m?0:m,x=f.y,w=void 0===x?0:x,O="function"==typeof v?v({x:g,y:w}):{x:g,y:w};g=O.x,w=O.y;var j=f.hasOwnProperty("x"),k=f.hasOwnProperty("y"),M=s,P=r,A=window;if(p){var L=E(n),S="clientHeight",W="clientWidth";L===y(n)&&"static"!==T(L=q(n)).position&&"absolute"===h&&(S="scrollHeight",W="scrollWidth"),(u===r||(u===s||u===a)&&c===l)&&(P=o,w-=(b&&L===A&&A.visualViewport?A.visualViewport.height:L[S])-i.height,w*=d?1:-1),u!==s&&(u!==r&&u!==o||c!==l)||(M=a,g-=(b&&L===A&&A.visualViewport?A.visualViewport.width:L[W])-i.width,g*=d?1:-1)}var z,B=Object.assign({position:h},p&&F),R=!0===v?function(t,e){var n=t.y,i=e.devicePixelRatio||1;return{x:C(t.x*i)/i||0,y:C(n*i)/i||0}}({x:g,y:w},y(n)):{x:g,y:w};return g=R.x,w=R.y,Object.assign({},B,d?((z={})[P]=k?"0":"",z[M]=j?"0":"",z.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+w+"px)":"translate3d("+g+"px, "+w+"px, 0)",z):((e={})[P]=k?w+"px":"",e[M]=j?g+"px":"",e.transform="",e))}var V={passive:!0},$={left:"right",right:"left",bottom:"top",top:"bottom"};function J(t){return t.replace(/left|right|bottom|top/g,(function(t){return $[t]}))}var K={start:"end",end:"start"};function U(t){return t.replace(/start|end/g,(function(t){return K[t]}))}function X(t){var e=y(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function G(t){return A(q(t)).left+X(t).scrollLeft}function Q(t){var e=T(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function Y(t){return["html","body","#document"].indexOf(m(t))>=0?t.ownerDocument.body:x(t)&&Q(t)?t:Y(z(t))}function Z(t,e){var n;void 0===e&&(e=[]);var i=Y(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),o=y(i),a=r?[o].concat(o.visualViewport||[],Q(i)?i:[]):i,s=e.concat(a);return r?s:s.concat(Z(z(a)))}function tt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function et(t,e,n){return e===h?tt(function(t,e){var n=y(t),i=q(t),r=n.visualViewport,o=i.clientWidth,a=i.clientHeight,s=0,u=0;if(r){o=r.width,a=r.height;var c=P();(c||!c&&"fixed"===e)&&(s=r.offsetLeft,u=r.offsetTop)}return{width:o,height:a,x:s+G(t),y:u}}(t,n)):g(e)?function(t,e){var n=A(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):tt(function(t){var e,n=q(t),i=X(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=j(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=j(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-i.scrollLeft+G(t),u=-i.scrollTop;return"rtl"===T(r||n).direction&&(s+=j(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}(q(t)))}function nt(t){var e,n=t.reference,i=t.element,u=t.placement,c=u?O(u):null,h=u?_(u):null,d=n.x+n.width/2-i.width/2,p=n.y+n.height/2-i.height/2;switch(c){case r:e={x:d,y:n.y-i.height};break;case o:e={x:d,y:n.y+n.height};break;case a:e={x:n.x+n.width,y:p};break;case s:e={x:n.x-i.width,y:p};break;default:e={x:n.x,y:n.y}}var v=c?R(c):null;if(null!=v){var b="y"===v?"height":"width";switch(h){case f:e[v]=e[v]-(n[b]/2-i[b]/2);break;case l:e[v]=e[v]+(n[b]/2-i[b]/2)}}return e}function it(t,e){void 0===e&&(e={});var n=e.placement,i=void 0===n?t.placement:n,s=e.strategy,u=void 0===s?t.strategy:s,f=e.boundary,l=void 0===f?"clippingParents":f,p=e.rootBoundary,v=void 0===p?h:p,b=e.elementContext,y=void 0===b?d:b,w=e.altBoundary,O=void 0!==w&&w,C=e.padding,M=void 0===C?0:C,P=D("number"!=typeof M?M:I(M,c)),L=t.rects.popper,W=t.elements[O?y===d?"reference":d:y],B=function(t,e,n,i){var r="clippingParents"===e?function(t){var e=Z(z(t)),n=["absolute","fixed"].indexOf(T(t).position)>=0&&x(t)?E(t):t;return g(n)?e.filter((function(t){return g(t)&&S(t,n)&&"body"!==m(t)})):[]}(t):[].concat(e),o=[].concat(r,[n]),a=o.reduce((function(e,n){var r=et(t,n,i);return e.top=j(r.top,e.top),e.right=k(r.right,e.right),e.bottom=k(r.bottom,e.bottom),e.left=j(r.left,e.left),e}),et(t,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(g(W)?W:W.contextElement||q(t.elements.popper),l,v,u),R=A(t.elements.reference),H=nt({reference:R,element:L,placement:i}),_=tt(Object.assign({},L,H)),F=y===d?_:R,N={top:B.top-F.top+P.top,bottom:F.bottom-B.bottom+P.bottom,left:B.left-F.left+P.left,right:F.right-B.right+P.right},V=t.modifiersData.offset;if(y===d&&V){var $=V[i];Object.keys(N).forEach((function(t){var e=[a,o].indexOf(t)>=0?1:-1,n=[r,o].indexOf(t)>=0?"y":"x";N[t]+=$[n]*e}))}return N}function rt(t,e){void 0===e&&(e={});var n=e.boundary,i=e.rootBoundary,r=e.padding,o=e.flipVariations,a=e.allowedAutoPlacements,s=void 0===a?v:a,u=_(e.placement),f=u?o?p:p.filter((function(t){return _(t)===u})):c,l=f.filter((function(t){return s.indexOf(t)>=0}));0===l.length&&(l=f);var h=l.reduce((function(e,o){return e[o]=it(t,{placement:o,boundary:n,rootBoundary:i,padding:r})[O(o)],e}),{});return Object.keys(h).sort((function(t,e){return h[t]-h[e]}))}var ot={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var c=n.mainAxis,l=void 0===c||c,h=n.altAxis,d=void 0===h||h,p=n.fallbackPlacements,v=n.padding,b=n.boundary,m=n.rootBoundary,y=n.altBoundary,g=n.flipVariations,x=void 0===g||g,w=n.allowedAutoPlacements,j=e.options.placement,k=O(j),C=p||(k!==j&&x?function(t){if(O(t)===u)return[];var e=J(t);return[U(t),e,U(e)]}(j):[J(j)]),M=[j].concat(C).reduce((function(t,n){return t.concat(O(n)===u?rt(e,{placement:n,boundary:b,rootBoundary:m,padding:v,flipVariations:x,allowedAutoPlacements:w}):n)}),[]),P=e.rects.reference,A=e.rects.popper,L=new Map,S=!0,T=M[0],W=0;W<M.length;W++){var q=M[W],z=O(q),B=_(q)===f,E=[r,o].indexOf(z)>=0,R=E?"width":"height",H=it(e,{placement:q,boundary:b,rootBoundary:m,altBoundary:y,padding:v}),D=E?B?a:s:B?o:r;P[R]>A[R]&&(D=J(D));var I=J(D),F=[];if(l&&F.push(H[z]<=0),d&&F.push(H[D]<=0,H[I]<=0),F.every((function(t){return t}))){T=q,S=!1;break}L.set(q,F)}if(S)for(var N=function(t){var e=M.find((function(e){var n=L.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},V=x?3:1;V>0&&"break"!==N(V);V--);e.placement!==T&&(e.modifiersData[i]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function at(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function st(t){return[r,a,o,s].some((function(e){return t[e]>=0}))}function ut(t,e,n){void 0===n&&(n=!1);var i,r,o=x(e),a=x(e)&&function(t){var e=t.getBoundingClientRect(),n=C(e.width)/t.offsetWidth||1,i=C(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),s=q(e),u=A(t,a,n),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(o||!o&&!n)&&(("body"!==m(e)||Q(s))&&(c=(i=e)!==y(i)&&x(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:X(i)),x(e)?((f=A(e,!0)).x+=e.clientLeft,f.y+=e.clientTop):s&&(f.x=G(s))),{x:u.left+c.scrollLeft-f.x,y:u.top+c.scrollTop-f.y,width:u.width,height:u.height}}function ct(t){var e=new Map,n=new Set,i=[];function r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||r(t)})),i}var ft={placement:"bottom",modifiers:[],strategy:"absolute"};function lt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function ht(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,i=t.defaultOptions,r=void 0===i?ft:i;return function(t,e,i){void 0===i&&(i=r);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},ft,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},u=[],c=!1,f={state:s,setOptions:function(i){var o="function"==typeof i?i(s.options):i;l(),s.options=Object.assign({},r,s.options,o),s.scrollParents={reference:g(t)?Z(t):t.contextElement?Z(t.contextElement):[],popper:Z(e)};var a,c,h=function(t){var e=ct(t);return b.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((a=[].concat(n,s.options.modifiers),c=a.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return s.orderedModifiers=h.filter((function(t){return t.enabled})),s.orderedModifiers.forEach((function(t){var e=t.options,n=t.effect;if("function"==typeof n){var i=n({state:s,name:t.name,instance:f,options:void 0===e?{}:e});u.push(i||function(){})}})),f.update()},forceUpdate:function(){if(!c){var t=s.elements,e=t.reference,n=t.popper;if(lt(e,n)){s.rects={reference:ut(e,E(n),"fixed"===s.options.strategy),popper:L(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(t){return s.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<s.orderedModifiers.length;i++)if(!0!==s.reset){var r=s.orderedModifiers[i],o=r.fn,a=r.options;"function"==typeof o&&(s=o({state:s,options:void 0===a?{}:a,name:r.name,instance:f})||s)}else s.reset=!1,i=-1}}},update:(o=function(){return new Promise((function(t){f.forceUpdate(),t(s)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){l(),c=!0}};if(!lt(t,e))return f;function l(){u.forEach((function(t){return t()})),u=[]}return f.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),f}}var dt=ht({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,a=i.resize,s=void 0===a||a,u=y(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",n.update,V)})),s&&u.addEventListener("resize",n.update,V),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",n.update,V)})),s&&u.removeEventListener("resize",n.update,V)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=nt({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=void 0===i||i,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,u=void 0===s||s,c={placement:O(e.placement),variation:_(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,N(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:u})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,N(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];x(r)&&m(r)&&(Object.assign(r.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});x(i)&&m(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.name,i=t.options.offset,o=void 0===i?[0,0]:i,u=v.reduce((function(t,n){return t[n]=function(t,e,n){var i=O(t),o=[s,r].indexOf(i)>=0?-1:1,u="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=u[0],f=u[1];return c=c||0,f=(f||0)*o,[s,a].indexOf(i)>=0?{x:f,y:c}:{x:c,y:f}}(n,e.rects,o),t}),{}),c=u[e.placement],f=c.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=c.x,e.modifiersData.popperOffsets.y+=f),e.modifiersData[n]=u}},ot,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,u=n.mainAxis,c=void 0===u||u,l=n.altAxis,h=void 0!==l&&l,d=n.tether,p=void 0===d||d,v=n.tetherOffset,b=void 0===v?0:v,m=it(e,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),y=O(e.placement),g=_(e.placement),x=!g,w=R(y),C="x"===w?"y":"x",M=e.modifiersData.popperOffsets,P=e.rects.reference,A=e.rects.popper,S="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,T="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),W=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,q={x:0,y:0};if(M){if(c){var z,B="y"===w?r:s,D="y"===w?o:a,I="y"===w?"height":"width",F=M[w],N=F+m[B],V=F-m[D],$=p?-A[I]/2:0,J=g===f?P[I]:A[I],K=g===f?-A[I]:-P[I],U=e.elements.arrow,X=p&&U?L(U):{width:0,height:0},G=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=G[B],Y=G[D],Z=H(0,P[I],X[I]),tt=x?P[I]/2-$-Z-Q-T.mainAxis:J-Z-Q-T.mainAxis,et=x?-P[I]/2+$+Z+Y+T.mainAxis:K+Z+Y+T.mainAxis,nt=e.elements.arrow&&E(e.elements.arrow),rt=null!=(z=null==W?void 0:W[w])?z:0,ot=F+et-rt,at=H(p?k(N,F+tt-rt-(nt?"y"===w?nt.clientTop||0:nt.clientLeft||0:0)):N,F,p?j(V,ot):V);M[w]=at,q[w]=at-F}if(h){var st,ut=M[C],ct="y"===C?"height":"width",ft=ut+m["x"===w?r:s],lt=ut-m["x"===w?o:a],ht=-1!==[r,s].indexOf(y),dt=null!=(st=null==W?void 0:W[C])?st:0,pt=ht?ft:ut-P[ct]-A[ct]-dt+T.altAxis,vt=ht?ut+P[ct]+A[ct]-dt-T.altAxis:lt,bt=p&&ht?function(t,e,n){var i=H(t,e,n);return i>n?n:i}(pt,ut,vt):H(p?pt:ft,ut,p?vt:lt);M[C]=bt,q[C]=bt-ut}e.modifiersData[i]=q}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,u=t.options,f=n.elements.arrow,l=n.modifiersData.popperOffsets,h=O(n.placement),d=R(h),p=[s,a].indexOf(h)>=0?"height":"width";if(f&&l){var v=function(t,e){return D("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:I(t,c))}(u.padding,n),b=L(f),m="y"===d?r:s,y="y"===d?o:a,g=n.rects.reference[p]+n.rects.reference[d]-l[d]-n.rects.popper[p],x=l[d]-n.rects.reference[d],w=E(f),j=w?"y"===d?w.clientHeight||0:w.clientWidth||0:0,k=j/2-b[p]/2+(g/2-x/2),C=H(v[m],k,j-b[p]-v[y]);n.modifiersData[i]=((e={})[d]=C,e.centerOffset=C-k,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&S(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,a=it(e,{elementContext:"reference"}),s=it(e,{altBoundary:!0}),u=at(a,i),c=at(s,r,o),f=st(u),l=st(c);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:l},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":l})}}]});const pt="is-visible",vt="is-hiding",bt=class{constructor(e){t(this,e),this.openDirection="bottom",this.position="absolute",this.containerStyle={},this.inheritParentWidth=!1,this.visible=!1,this.anchor=null,this.loaded=!1,this.parents=new WeakMap}disconnectedCallback(){this.removeContainer(),this.destroyPopper(),this.observer&&this.container&&this.observer.unobserve(this.container),this.container=null}connectedCallback(){this.loaded&&this.visible&&this.init()}componentDidLoad(){this.loaded=!0,this.connectedCallback()}init(){this.host.isConnected&&(this.createContainer(),this.hideContainer(),this.attachContainer(),this.styleContainer(),this.visible&&(this.createPopper(),this.showContainer()),"ResizeObserver"in window&&(this.observer=new ResizeObserver((()=>{this.popperInstance&&(this.styleContainer(),this.popperInstance.update())})),this.observer.observe(this.container)))}render(){return e("slot",{key:"e41cbd7a44b0e55525f9e99d056cc9ab627082d0"})}onVisible(){this.container||!this.visible?this.visible?(this.styleContainer(),this.createPopper(),requestAnimationFrame((()=>{this.showContainer()}))):this.animateHideAndCleanup():this.init()}createContainer(){const t=this.host.shadowRoot.querySelector("slot"),e=t.assignedElements&&t.assignedElements()||[];this.container=document.createElement("div"),this.container.setAttribute("id",this.containerId),this.container.setAttribute("class","limel-portal--container"),Object.assign(this.container,{portalSource:this.host}),e.forEach((t=>{this.parents.set(t,t.parentElement),this.container.append(t)}))}attachContainer(){this.getParent().append(this.container)}removeContainer(){this.container&&([...this.container.children].forEach((t=>{const e=this.parents.get(t);e&&e.append(t)})),this.container.remove())}hideContainer(){this.container&&this.container.classList.remove(pt)}showContainer(){this.container.classList.add(pt)}animateHideAndCleanup(){this.container&&(this.container.classList.add(vt),this.styleContainer(),setTimeout((()=>{this.container&&(this.container.classList.remove(vt),this.visible||(this.container.classList.remove(pt),this.destroyPopper()))}),300))}styleContainer(){this.setContainerWidth(),this.setContainerHeight(),this.setContainerStyles()}setContainerWidth(){const t=this.host.getBoundingClientRect().width;if(this.inheritParentWidth){let e=this.getContentWidth(this.container);t>0&&(e=t),this.container.style.width=`${e}px`}}getContentWidth(t){if(!t)return null;const e=t.getBoundingClientRect().width;if(0!==e)return e;const n=t.querySelector("*");return this.getContentWidth(n)}setContainerStyles(){for(const t of Object.keys(this.containerStyle))this.container.style[t]=this.containerStyle[t]}createPopper(){const t=this.createPopperConfig();this.popperInstance=dt(this.anchor||this.host,this.container,t)}destroyPopper(){var t;null===(t=this.popperInstance)||void 0===t||t.destroy(),this.popperInstance=null}createPopperConfig(){const t=this.getPlacement(this.openDirection),e=this.getFlipPlacement(this.openDirection);return{strategy:this.position,placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:[e]}}]}}getPlacement(t){return{"left-start":"left-start",left:"left","left-end":"left-end","right-start":"right-start",right:"right","right-end":"right-end","top-start":"top-start",top:"top","top-end":"top-end","bottom-start":"bottom-start",bottom:"bottom","bottom-end":"bottom-end"}[t]}getFlipPlacement(t){return{"left-start":"right-start",left:"right","left-end":"right-end","right-start":"left-start",right:"left","right-end":"left-end","top-start":"bottom-start",top:"bottom","top-end":"bottom-end","bottom-start":"top-start",bottom:"top","bottom-end":"top-end"}[t]}setContainerHeight(){const t=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0),{top:e,bottom:n}=this.host.getBoundingClientRect(),i=Math.max(e,0),r=Math.max(t-n,0),o=Math.max(i,r)-16;this.container.style.maxHeight=`${o}px`}getParent(){let t=this.anchor||this.host;for(;t;){const e=t.closest(".limel-portal--parent");if(e)return e;t=t.getRootNode().host}return document.body}get host(){return n(this)}static get watchers(){return{visible:[{onVisible:0}]}}};bt.style=":host(limel-portal){display:block;position:absolute;top:0;bottom:0;width:100%;pointer-events:none}:host([hidden]){display:none}slot{display:none}";class mt{constructor(t,e,n=500){this.timerHandle=null,this.showCallback=t,this.hideCallback=e,this.delayForShowing=n}showAfterDelay(){this.timerHandle||(this.timerHandle=setTimeout(this.showCallback,this.delayForShowing))}hide(){clearTimeout(this.timerHandle),this.timerHandle=null,this.hideCallback()}}const yt=class{constructor(e){t(this,e),this.maxlength=50,this.openDirection="top",this.showTooltip=()=>{this.tooltipTimer.showAfterDelay()},this.hideTooltip=()=>{this.tooltipTimer.hide()},this.portalId=i(),this.tooltipId=i(),this.tooltipTimer=new mt((()=>this.open=!0),(()=>this.open=!1))}connectedCallback(){this.ownerElement=function(t,e){let n=e;do{n=n.parentNode}while(n&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&n.nodeType!==Node.DOCUMENT_NODE);return null==n?void 0:n.getElementById(t)}(this.elementId,this.host),this.setOwnerAriaLabel(),this.addListeners()}disconnectedCallback(){this.removeListeners()}render(){const t=getComputedStyle(this.host).getPropertyValue("--tooltip-z-index");return e("div",{key:"aaa9995f9223094c080d27aa4530c09f95fa2bfc",class:"trigger-anchor"},e("limel-portal",{key:"175a57a6702519efbcd45738f0bf2b56308c3f63",openDirection:this.openDirection,visible:this.open,containerId:this.portalId,containerStyle:{"z-index":t,"pointer-events":"none"},anchor:this.ownerElement},e("limel-tooltip-content",{key:"0468b3922536241c605698a795730217c39f861c",label:this.label,helperLabel:this.helperLabel,maxlength:this.maxlength,role:"tooltip","aria-hidden":!this.open,id:this.tooltipId})))}setOwnerAriaLabel(){var t;null===(t=this.ownerElement)||void 0===t||t.setAttribute("aria-describedby",this.tooltipId)}addListeners(){var t,e,n,i;null===(t=this.ownerElement)||void 0===t||t.addEventListener("mouseover",this.showTooltip),null===(e=this.ownerElement)||void 0===e||e.addEventListener("mouseout",this.hideTooltip),null===(n=this.ownerElement)||void 0===n||n.addEventListener("focus",this.showTooltip),null===(i=this.ownerElement)||void 0===i||i.addEventListener("blur",this.hideTooltip)}removeListeners(){var t,e,n,i;null===(t=this.ownerElement)||void 0===t||t.removeEventListener("mouseover",this.showTooltip),null===(e=this.ownerElement)||void 0===e||e.removeEventListener("mouseout",this.hideTooltip),null===(n=this.ownerElement)||void 0===n||n.removeEventListener("focus",this.showTooltip),null===(i=this.ownerElement)||void 0===i||i.removeEventListener("blur",this.hideTooltip)}get host(){return n(this)}};yt.style=":host(limel-tooltip){position:absolute;pointer-events:none}";const gt=class{constructor(e){t(this,e)}render(){let t=!1;this.helperLabel&&this.maxlength&&(t=this.label.length+this.helperLabel.length>this.maxlength);const n={};return this.maxlength&&(n.style={"--tooltip-max-width-of-text":`${this.maxlength}ch`}),[e("text",Object.assign({key:"17f145f906af010db827853f75206cf19a0fc7b8",class:{"has-column-layout":t}},n),e("div",{key:"007daa0b685ff71c4954dccef1947034627aa848",class:"label"},this.label),e("div",{key:"9c5e6a7cf0cf4f80dd89964d789347fcc8787ba4",class:"helper-label"},this.helperLabel))]}};gt.style=":host(limel-tooltip-content){display:flex;border-radius:0.25rem;padding:0.25rem 0.5rem;background-color:rgb(var(--contrast-1300));box-shadow:var(--shadow-depth-16)}text{font-size:var(--limel-theme-default-font-size);line-height:1.25;display:flex;column-gap:1rem}text.has-column-layout{display:table-cell;width:fit-content;max-width:min(var(--tooltip-max-width-of-text), 80vw)}text.has-column-layout .label{padding-bottom:0.5rem}text.has-column-layout .helper-label{padding-bottom:0.25rem}.label{color:rgb(var(--contrast-200))}.helper-label{color:rgb(var(--contrast-800))}.helper-label:empty{display:none}";export{bt as limel_portal,yt as limel_tooltip,gt as limel_tooltip_content}
@@ -1,4 +1,4 @@
1
- import{_ as t,a as i,b as n,M as e,m as r,c as s}from"./p-D-I_3IxW.js";
1
+ import{_ as t,a as i,b as n,M as e,m as r,c as s}from"./p-ChRGk668.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2019 Google Inc.
@@ -1,4 +1,4 @@
1
- import{_ as n,a as t,M as i,c as e,e as r}from"./p-D-I_3IxW.js";
1
+ import{_ as n,a as t,M as i,c as e,e as r}from"./p-ChRGk668.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2016 Google Inc.
@@ -1,4 +1,4 @@
1
- var n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])},n(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}var r=function(){return r=Object.assign||function(n){for(var t,r=1,e=arguments.length;r<e;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},r.apply(this,arguments)};function e(n){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&n[t],e=0;if(r)return r.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&e>=n.length&&(n=void 0),{value:n&&n[e++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(n,t){var r="function"==typeof Symbol&&n[Symbol.iterator];if(!r)return n;var e,o,u=r.call(n),i=[];try{for(;(void 0===t||t-- >0)&&!(e=u.next()).done;)i.push(e.value)}catch(n){o={error:n}}finally{try{e&&!e.done&&(r=u.return)&&r.call(u)}finally{if(o)throw o.error}}return i}function u(n,t,r){if(r||2===arguments.length)for(var e,o=0,u=t.length;o<u;o++)!e&&o in t||(e||(e=Array.prototype.slice.call(t,0,o)),e[o]=t[o]);return n.concat(e||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;
1
+ var n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])},n(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}var r=function(){return r=Object.assign||function(n){for(var t,r=1,e=arguments.length;r<e;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},r.apply(this,arguments)};function e(n){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&n[t],e=0;if(r)return r.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&e>=n.length&&(n=void 0),{value:n&&n[e++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(n,t){var r="function"==typeof Symbol&&n[Symbol.iterator];if(!r)return n;var e,o,u=r.call(n),i=[];try{for(;(void 0===t||t-- >0)&&!(e=u.next()).done;)i.push(e.value)}catch(n){o={error:n}}finally{try{e&&!e.done&&(r=u.return)&&r.call(u)}finally{if(o)throw o.error}}return i}"function"==typeof SuppressedError&&SuppressedError;
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2016 Google Inc.
@@ -21,7 +21,7 @@ var n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
  * THE SOFTWARE.
23
23
  */
24
- var i=function(){function n(n){void 0===n&&(n={}),this.adapter=n}return Object.defineProperty(n,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),n.prototype.init=function(){},n.prototype.destroy=function(){},n}(),f=function(){function n(n,t){for(var r=[],e=2;e<arguments.length;e++)r[e-2]=arguments[e];this.root=n,this.initialize.apply(this,u([],o(r))),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return n.attachTo=function(t){return new n(t,new i({}))},n.prototype.initialize=function(){},n.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},n.prototype.initialSyncWithDOM=function(){},n.prototype.destroy=function(){this.foundation.destroy()},n.prototype.listen=function(n,t,r){this.root.addEventListener(n,t,r)},n.prototype.unlisten=function(n,t,r){this.root.removeEventListener(n,t,r)},n.prototype.emit=function(n,t,r){var e;void 0===r&&(r=!1),"function"==typeof CustomEvent?e=new CustomEvent(n,{bubbles:r,detail:t}):(e=document.createEvent("CustomEvent")).initCustomEvent(n,r,!1,t),this.root.dispatchEvent(e)},n}();
24
+ var u=function(){function n(n){void 0===n&&(n={}),this.adapter=n}return Object.defineProperty(n,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),n.prototype.init=function(){},n.prototype.destroy=function(){},n}(),i=function(){function n(n,t){for(var r=[],e=2;e<arguments.length;e++)r[e-2]=arguments[e];this.root=n,this.initialize.apply(this,function(n,t,r){if(r||2===arguments.length)for(var e,o=0,u=t.length;o<u;o++)!e&&o in t||(e||(e=Array.prototype.slice.call(t,0,o)),e[o]=t[o]);return n.concat(e||Array.prototype.slice.call(t))}([],o(r))),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return n.attachTo=function(t){return new n(t,new u({}))},n.prototype.initialize=function(){},n.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},n.prototype.initialSyncWithDOM=function(){},n.prototype.destroy=function(){this.foundation.destroy()},n.prototype.listen=function(n,t,r){this.root.addEventListener(n,t,r)},n.prototype.unlisten=function(n,t,r){this.root.removeEventListener(n,t,r)},n.prototype.emit=function(n,t,r){var e;void 0===r&&(r=!1),"function"==typeof CustomEvent?e=new CustomEvent(n,{bubbles:r,detail:t}):(e=document.createEvent("CustomEvent")).initCustomEvent(n,r,!1,t),this.root.dispatchEvent(e)},n}();
25
25
  /**
26
26
  * @license
27
27
  * Copyright 2016 Google Inc.
@@ -66,4 +66,4 @@ var i=function(){function n(n){void 0===n&&(n={}),this.adapter=n}return Object.d
66
66
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
67
67
  * THE SOFTWARE.
68
68
  */
69
- function c(n,t){if(n.closest)return n.closest(t);for(var r=n;r;){if(a(r,t))return r;r=r.parentElement}return null}function a(n,t){return(n.matches||n.webkitMatchesSelector||n.msMatchesSelector).call(n,t)}function s(n){if(null!==n.offsetParent)return n.scrollWidth;var t=n.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);var r=t.scrollWidth;return document.documentElement.removeChild(t),r}export{i as M,t as _,r as a,e as b,f as c,c as d,s as e,u as f,o as g,a as m}
69
+ function f(n,t){if(n.closest)return n.closest(t);for(var r=n;r;){if(c(r,t))return r;r=r.parentElement}return null}function c(n,t){return(n.matches||n.webkitMatchesSelector||n.msMatchesSelector).call(n,t)}function a(n){if(null!==n.offsetParent)return n.scrollWidth;var t=n.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);var r=t.scrollWidth;return document.documentElement.removeChild(t),r}export{u as M,t as _,r as a,e as b,i as c,f as d,a as e,o as f,c as m}