@momentum-ui/web-components 3.0.0-alpha.1 → 3.0.0-alpha.3
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.
- package/dist/1200.js +1 -1
- package/dist/1873.js +2 -0
- package/dist/2555.js +5 -5
- package/dist/591.js +1 -1
- package/dist/6752.js +1 -1
- package/dist/679.js +16 -16
- package/dist/8028.js +1 -1
- package/dist/8210.js +1 -1
- package/dist/comp/md-advance-list-entry.js +5 -5
- package/dist/comp/md-avatar-entry.js +1 -1
- package/dist/comp/md-badge-entry.js +5 -5
- package/dist/comp/md-badge.js +1 -1
- package/dist/comp/md-card-v2-entry.js +7 -7
- package/dist/comp/md-card-v2.js +1 -1
- package/dist/comp/md-checkbox-entry.js +2 -2
- package/dist/comp/md-coachmark-popover-entry.js +5 -5
- package/dist/comp/md-coachmark-popover.js +1 -1
- package/dist/comp/md-country-code-picker-entry.js +8 -8
- package/dist/comp/md-country-code-picker.js +1 -1
- package/dist/comp/md-date-range-picker-entry.js +1 -1
- package/dist/comp/md-date-range-picker.js +1 -1
- package/dist/comp/md-datepicker-entry.js +1 -1
- package/dist/comp/md-datepicker.js +1 -1
- package/dist/comp/md-icon-entry.js +3 -3
- package/dist/comp/md-phone-input-entry.js +9 -9
- package/dist/comp/md-phone-input.js +1 -1
- package/dist/comp/md-popover-entry.js +5 -5
- package/dist/comp/md-popover.js +1 -1
- package/dist/comp/md-radiogroup-entry.js +2 -2
- package/dist/comp/md-tabs-entry.js +2 -2
- package/dist/comp/md-tabs.js +1 -1
- package/dist/comp/md-task-item-entry.js +12 -12
- package/dist/comp/md-task-item.js +1 -1
- package/dist/comp/md-theme-entry.js +1 -1
- package/dist/index-entry.js +115 -115
- package/dist/index.js +1 -1
- package/dist/types/components/advance-list/AdvanceList.d.ts +2 -2
- package/dist/types/components/avatar/Avatar.d.ts +2 -1
- package/dist/types/components/badge/Badge.d.ts +1 -2
- package/dist/types/components/badge/NotificationBadge.d.ts +1 -1
- package/dist/types/components/checkbox/Checkbox.d.ts +1 -1
- package/dist/types/components/floating-button-bar/FloatingButtonBar.d.ts +2 -2
- package/dist/types/components/form/index.d.ts +5 -6
- package/dist/types/components/grabber/Grabber.d.ts +1 -1
- package/dist/types/components/radio/RadioGroup.d.ts +1 -1
- package/dist/types/components/skeleton/Skeleton.d.ts +20 -0
- package/dist/types/components/tabs/Tabs.d.ts +1 -0
- package/dist/types/components/taskitem/TaskItem.utils.d.ts +2 -2
- package/dist/types/components/theme/Theme.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/1990.js +0 -2
- package/dist/1990.js.LICENSE.txt +0 -5
- package/dist/4371.js +0 -2
- package/dist/4371.js.LICENSE.txt +0 -5
- package/dist/4935.js +0 -2
- package/dist/4935.js.LICENSE.txt +0 -5
- package/dist/6683.js +0 -2
- package/dist/7228.js +0 -2
- package/dist/7228.js.LICENSE.txt +0 -5
- package/dist/9609.js +0 -2
- package/dist/9609.js.LICENSE.txt +0 -5
- /package/dist/{6683.js.LICENSE.txt → 1873.js.LICENSE.txt} +0 -0
package/dist/index-entry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@lit-labs/virtualizer"),require("lit/directives/until.js"),require("lit/directives/repeat.js"),require("luxon"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom"),require("highlight.js/lib/core"),require("country-codes-list"),require("country-flags-svg"),require("sortablejs"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/interact/index"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit/directives/unsafe-html.js"),require("papaparse"),require("@popperjs/core/lib"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","@lit-labs/virtualizer","lit/directives/until.js","lit/directives/repeat.js","luxon","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","@popperjs/core/lib/popper-lite","@floating-ui/dom","highlight.js/lib/core","country-codes-list","country-flags-svg","sortablejs","dompurify","@interactjs/actions/drag","@interactjs/actions/resize","@interactjs/auto-start","@interactjs/interact/index","@interactjs/modifiers","libphonenumber-js","lit/directives/unsafe-html.js","papaparse","@popperjs/core/lib"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@lit-labs/virtualizer"),require("lit/directives/until.js"),require("lit/directives/repeat.js"),require("luxon"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom"),require("highlight.js/lib/core"),require("country-codes-list"),require("country-flags-svg"),require("sortablejs"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/interact/index"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit/directives/unsafe-html.js"),require("papaparse"),require("@popperjs/core/lib")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx,t["@lit-labs/virtualizer"],t["lit/directives/until.js"],t["lit/directives/repeat.js"],t.luxon,t["@popperjs/core/lib/modifiers/arrow"],t["@popperjs/core/lib/modifiers/flip"],t["@popperjs/core/lib/modifiers/offset"],t["@popperjs/core/lib/modifiers/preventOverflow"],t["@popperjs/core/lib/popper-lite"],t["@floating-ui/dom"],t["highlight.js/lib/core"],t["country-codes-list"],t["country-flags-svg"],t.sortablejs,t.dompurify,t["@interactjs/actions/drag"],t["@interactjs/actions/resize"],t["@interactjs/auto-start"],t["@interactjs/interact/index"],t["@interactjs/modifiers"],t["libphonenumber-js"],t["lit/directives/unsafe-html.js"],t.papaparse,t["@popperjs/core/lib"]);for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(self,(t,e,i,s,o,r,a,n,l,d,h,c,p,u,m,y,b,v,g,f,w,C,x,S,E,$,T,A,k,I,L,O)=>(()=>{"use strict";var M,D,P,R,_,B={860:t=>{t.exports=k},1072:(t,e,i)=>{i.d(e,{Theme:()=>s});var s,o=i(62848),r=i(31890),a=i(4893),n=i(4863),l=i(87161),d=i(70429),h=i(38161),c=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.darkTheme=!1,this.lumos=!1,this.activeTheme=h.dW,this.placement="bottom",this.popperInstance=null,this.activeTooltipTrigger=null,this.handleTooltipRemoved=()=>{this.hideVirtualTooltip(),this.activeTooltipTrigger=null}}setTheme(){return"momentum"===this.theme?this.darkTheme?h.Pm:h.f3:"lumos"===this.theme?this.darkTheme?h.Lu:h.dW:"momentumV2"===this.theme?this.darkTheme?h.Pm:h.f3:this.lumos?this.darkTheme?h.Lu:h.dW:this.darkTheme?h.Pm:h.f3}getStyleElement(){return document.createElement("style")}applyStyle(){const t=this.shadowRoot;if("adoptedStyleSheets"in document){const e=new CSSStyleSheet;e.replaceSync(this.activeTheme),t.adoptedStyleSheets=[e]}else{const e=this.getStyleElement();e.textContent=this.activeTheme.cssText,t.appendChild(e)}}removeChildFromVirtualPopper(){for(;this.virtualWrapper.firstElementChild;)this.virtualWrapper.firstElementChild.remove()}setInitStyleToVirtualReference(){const{style:t}=this.virtualReference;t.top="0",t.bottom="0",t.left="0",t.right="0",t.width="0",t.height="0",t.zIndex="-1"}setStyleToVirtualReference(t){const{style:e}=this.virtualReference,{top:i,bottom:s,left:o,right:r,width:a,height:n}=t;e.position="fixed",e.top=`${i}px`,e.bottom=`${s}px`,e.left=`${o}px`,e.right=`${r}px`,e.width=`${a}px`,e.height=`${n}px`,e.zIndex="-1"}setVirtualReferencePosition(t){const e=t.getBoundingClientRect();this.setStyleToVirtualReference(e)}initVirtualElements(t,e,i){const s=t.cloneNode(!0);this.virtualWrapper.hasChildNodes()&&this.removeChildFromVirtualPopper(),this.virtualWrapper.append(s),i&&this.setVirtualSlotContent(i),this.setVirtualReferencePosition(e)}setVirtualSlotContent(t){if(this.virtualTooltipContent){for(;this.virtualTooltipContent.firstElementChild;)this.virtualTooltipContent.firstElementChild.remove();t.forEach(t=>this.virtualTooltipContent.append(t))}}updated(t){super.updated(t),(t.has("lumos")||t.has("darkTheme")||t.has("theme"))&&this.dispatchEvent(new CustomEvent("theme-changed",{composed:!0,bubbles:!0,detail:{darkTheme:this.darkTheme,lumos:this.lumos,theme:this.theme}})),this.activeTheme=this.setTheme(),this.applyStyle()}handleVirtualTooltipCreate(t){t.stopPropagation();const{popper:e,placement:i,reference:s,slotContent:o}=t.detail;this.activeTooltipTrigger=s,this.placement=i,this.initVirtualElements(e,s,o),this.startContinuousPositionTracking(s),this.showVirtualTooltip()}startContinuousPositionTracking(t){this.stopContinuousPositionTracking();const e=()=>{this.activeTooltipTrigger===t&&this.popperInstance&&(this.setVirtualReferencePosition(t),this.popperInstance.update(),this.positionTrackingId=requestAnimationFrame(e))};this.positionTrackingId=requestAnimationFrame(e)}stopContinuousPositionTracking(){this.positionTrackingId&&(cancelAnimationFrame(this.positionTrackingId),this.positionTrackingId=void 0)}handleVirtualTooltipDestroy(t){t.stopPropagation(),this.hideVirtualTooltip(),this.activeTooltipTrigger===t.detail.reference&&(this.activeTooltipTrigger=null)}handleVirtualTooltipChangeMessage(t){var e;const{popper:i,reference:s}=t.detail;if(this.activeTooltipTrigger!==s)return;const o=i.querySelector(".md-tooltip__content"),r=this.virtualWrapper.querySelector(".md-tooltip__content");if(o&&r){const t=o.textContent,i=r.textContent;t&&i&&(r.textContent=t,null===(e=this.popperInstance)||void 0===e||e.update())}}handleVirtualTooltipSlotChange(t){const{slotContent:e}=t.detail;e&&this.setVirtualSlotContent(e)}destroyPopperInstance(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}createPopperInstance(t){if(this.virtualPopper){const e=8,i=4;this.popperInstance=(0,a.createPopper)(this.virtualReference,this.virtualPopper,{placement:t,modifiers:[...n.defaultModifiers,a.flip,a.offset,a.arrow,{name:"offset",options:{offset:({placement:t})=>{const s=e+i;return t.startsWith("left")||t.startsWith("right")||t.startsWith("top")||t.startsWith("bottom")?[0,s]:[8,8]}}},...this.virtualArrow?[{name:"arrow",options:{element:this.virtualArrow,padding:e}}]:[]]})}}get virtualPopper(){return this.shadowRoot.querySelector(".md-tooltip__popper")}get virtualArrow(){return this.shadowRoot.querySelector(".md-tooltip__arrow")}get virtualTooltipContent(){return this.shadowRoot.querySelector(".md-tooltip__content")}showVirtualTooltip(){this.virtualPopper&&(this.virtualPopper.toggleAttribute("data-show",!0),this.createPopperInstance(this.placement))}hideVirtualTooltip(){this.virtualPopper&&(this.virtualPopper.toggleAttribute("data-show",!1),this.destroyPopperInstance(),this.stopContinuousPositionTracking(),this.setInitStyleToVirtualReference())}setupEvents(){this.addEventListener("tooltip-create",this.handleVirtualTooltipCreate),this.addEventListener("tooltip-destroy",this.handleVirtualTooltipDestroy),this.addEventListener("tooltip-message",this.handleVirtualTooltipChangeMessage),this.addEventListener("tooltip-slot",this.handleVirtualTooltipSlotChange),document.addEventListener("tooltip-disconnected",this.handleTooltipRemoved,!0)}teardownEvents(){this.removeEventListener("tooltip-create",this.handleVirtualTooltipCreate),this.removeEventListener("tooltip-destroy",this.handleVirtualTooltipDestroy),this.removeEventListener("tooltip-message",this.handleVirtualTooltipChangeMessage),this.removeEventListener("tooltip-slot",this.handleVirtualTooltipSlotChange),document.removeEventListener("tooltip-disconnected",this.handleTooltipRemoved,!0)}disconnectedCallback(){super.disconnectedCallback(),this.stopContinuousPositionTracking(),this.teardownEvents()}firstUpdated(t){const e=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return i=this,s=void 0,r=function*(){e.firstUpdated.call(this,t),yield new Promise(t=>setTimeout(t,0)),this.setupEvents()},new((o=void 0)||(o=Promise))(function(t,e){function a(t){try{l(r.next(t))}catch(t){e(t)}}function n(t){try{l(r.throw(t))}catch(t){e(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(a,n)}l((r=r.apply(i,s||[])).next())});var i,s,o,r}static get styles(){return[h.dW]}render(){return l.html`
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@lit-labs/virtualizer"),require("lit/directives/until.js"),require("lit/directives/repeat.js"),require("luxon"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom"),require("highlight.js/lib/core"),require("country-codes-list"),require("country-flags-svg"),require("sortablejs"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/interact/index"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit/directives/unsafe-html.js"),require("papaparse"),require("@popperjs/core/lib"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","@lit-labs/virtualizer","lit/directives/until.js","lit/directives/repeat.js","luxon","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","@popperjs/core/lib/popper-lite","@floating-ui/dom","highlight.js/lib/core","country-codes-list","country-flags-svg","sortablejs","dompurify","@interactjs/actions/drag","@interactjs/actions/resize","@interactjs/auto-start","@interactjs/interact/index","@interactjs/modifiers","libphonenumber-js","lit/directives/unsafe-html.js","papaparse","@popperjs/core/lib"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@lit-labs/virtualizer"),require("lit/directives/until.js"),require("lit/directives/repeat.js"),require("luxon"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom"),require("highlight.js/lib/core"),require("country-codes-list"),require("country-flags-svg"),require("sortablejs"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/interact/index"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit/directives/unsafe-html.js"),require("papaparse"),require("@popperjs/core/lib")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx,t["@lit-labs/virtualizer"],t["lit/directives/until.js"],t["lit/directives/repeat.js"],t.luxon,t["@popperjs/core/lib/modifiers/arrow"],t["@popperjs/core/lib/modifiers/flip"],t["@popperjs/core/lib/modifiers/offset"],t["@popperjs/core/lib/modifiers/preventOverflow"],t["@popperjs/core/lib/popper-lite"],t["@floating-ui/dom"],t["highlight.js/lib/core"],t["country-codes-list"],t["country-flags-svg"],t.sortablejs,t.dompurify,t["@interactjs/actions/drag"],t["@interactjs/actions/resize"],t["@interactjs/auto-start"],t["@interactjs/interact/index"],t["@interactjs/modifiers"],t["libphonenumber-js"],t["lit/directives/unsafe-html.js"],t.papaparse,t["@popperjs/core/lib"]);for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(self,(t,e,i,s,o,r,a,n,l,d,h,c,p,u,m,y,b,v,g,f,w,C,x,S,E,$,T,k,A,I,L,O)=>(()=>{"use strict";var M,D,P,R,_,B={860:t=>{t.exports=A},1072:(t,e,i)=>{i.d(e,{Theme:()=>s});var s,o=i(62848),r=i(31890),a=i(4893),n=i(4863),l=i(87161),d=i(70429),h=i(38161),c=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.darkTheme=!1,this.lumos=!1,this.activeTheme=h.dW,this.placement="bottom",this.popperInstance=null,this.activeTooltipTrigger=null,this.handleTooltipRemoved=()=>{this.hideVirtualTooltip(),this.activeTooltipTrigger=null}}setTheme(){return"momentum"===this.theme?this.darkTheme?h.Pm:h.f3:"lumos"===this.theme?this.darkTheme?h.Lu:h.dW:"momentumV2"===this.theme?this.darkTheme?h.Pm:h.f3:this.lumos?this.darkTheme?h.Lu:h.dW:this.darkTheme?h.Pm:h.f3}getStyleElement(){return document.createElement("style")}applyStyle(){const t=this.shadowRoot;if("adoptedStyleSheets"in document){const e=new CSSStyleSheet;e.replaceSync(this.activeTheme),t.adoptedStyleSheets=[e]}else{const e=this.getStyleElement();e.textContent=this.activeTheme.cssText,t.appendChild(e)}}removeChildFromVirtualPopper(){for(;this.virtualWrapper.firstElementChild;)this.virtualWrapper.firstElementChild.remove()}setInitStyleToVirtualReference(){const{style:t}=this.virtualReference;t.top="0",t.bottom="0",t.left="0",t.right="0",t.width="0",t.height="0",t.zIndex="-1"}setStyleToVirtualReference(t){const{style:e}=this.virtualReference,{top:i,bottom:s,left:o,right:r,width:a,height:n}=t;e.position="fixed",e.top=`${i}px`,e.bottom=`${s}px`,e.left=`${o}px`,e.right=`${r}px`,e.width=`${a}px`,e.height=`${n}px`,e.zIndex="-1"}setVirtualReferencePosition(t){const e=t.getBoundingClientRect();this.setStyleToVirtualReference(e)}initVirtualElements(t,e,i){const s=t.cloneNode(!0);this.virtualWrapper.hasChildNodes()&&this.removeChildFromVirtualPopper(),this.virtualWrapper.append(s),i&&this.setVirtualSlotContent(i),this.setVirtualReferencePosition(e)}setVirtualSlotContent(t){if(this.virtualTooltipContent){for(;this.virtualTooltipContent.firstElementChild;)this.virtualTooltipContent.firstElementChild.remove();t.forEach(t=>this.virtualTooltipContent.append(t))}}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),(t.has("lumos")||t.has("darkTheme")||t.has("theme"))&&(this.activeTheme=this.setTheme())}updated(t){super.updated(t),(t.has("lumos")||t.has("darkTheme")||t.has("theme"))&&(this.dispatchEvent(new CustomEvent("theme-changed",{composed:!0,bubbles:!0,detail:{darkTheme:this.darkTheme,lumos:this.lumos,theme:this.theme}})),this.applyStyle())}handleVirtualTooltipCreate(t){t.stopPropagation();const{popper:e,placement:i,reference:s,slotContent:o}=t.detail;this.activeTooltipTrigger=s,this.placement=i,this.initVirtualElements(e,s,o),this.startContinuousPositionTracking(s),this.showVirtualTooltip()}startContinuousPositionTracking(t){this.stopContinuousPositionTracking();const e=()=>{this.activeTooltipTrigger===t&&this.popperInstance&&(this.setVirtualReferencePosition(t),this.popperInstance.update(),this.positionTrackingId=requestAnimationFrame(e))};this.positionTrackingId=requestAnimationFrame(e)}stopContinuousPositionTracking(){this.positionTrackingId&&(cancelAnimationFrame(this.positionTrackingId),this.positionTrackingId=void 0)}handleVirtualTooltipDestroy(t){t.stopPropagation(),this.hideVirtualTooltip(),this.activeTooltipTrigger===t.detail.reference&&(this.activeTooltipTrigger=null)}handleVirtualTooltipChangeMessage(t){var e;const{popper:i,reference:s}=t.detail;if(this.activeTooltipTrigger!==s)return;const o=i.querySelector(".md-tooltip__content"),r=this.virtualWrapper.querySelector(".md-tooltip__content");if(o&&r){const t=o.textContent,i=r.textContent;t&&i&&(r.textContent=t,null===(e=this.popperInstance)||void 0===e||e.update())}}handleVirtualTooltipSlotChange(t){const{slotContent:e}=t.detail;e&&this.setVirtualSlotContent(e)}destroyPopperInstance(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}createPopperInstance(t){if(this.virtualPopper){const e=8,i=4;this.popperInstance=(0,a.createPopper)(this.virtualReference,this.virtualPopper,{placement:t,modifiers:[...n.defaultModifiers,a.flip,a.offset,a.arrow,{name:"offset",options:{offset:({placement:t})=>{const s=e+i;return t.startsWith("left")||t.startsWith("right")||t.startsWith("top")||t.startsWith("bottom")?[0,s]:[8,8]}}},...this.virtualArrow?[{name:"arrow",options:{element:this.virtualArrow,padding:e}}]:[]]})}}get virtualPopper(){return this.shadowRoot.querySelector(".md-tooltip__popper")}get virtualArrow(){return this.shadowRoot.querySelector(".md-tooltip__arrow")}get virtualTooltipContent(){return this.shadowRoot.querySelector(".md-tooltip__content")}showVirtualTooltip(){this.virtualPopper&&(this.virtualPopper.toggleAttribute("data-show",!0),this.createPopperInstance(this.placement))}hideVirtualTooltip(){this.virtualPopper&&(this.virtualPopper.toggleAttribute("data-show",!1),this.destroyPopperInstance(),this.stopContinuousPositionTracking(),this.setInitStyleToVirtualReference())}setupEvents(){this.addEventListener("tooltip-create",this.handleVirtualTooltipCreate),this.addEventListener("tooltip-destroy",this.handleVirtualTooltipDestroy),this.addEventListener("tooltip-message",this.handleVirtualTooltipChangeMessage),this.addEventListener("tooltip-slot",this.handleVirtualTooltipSlotChange),document.addEventListener("tooltip-disconnected",this.handleTooltipRemoved,!0)}teardownEvents(){this.removeEventListener("tooltip-create",this.handleVirtualTooltipCreate),this.removeEventListener("tooltip-destroy",this.handleVirtualTooltipDestroy),this.removeEventListener("tooltip-message",this.handleVirtualTooltipChangeMessage),this.removeEventListener("tooltip-slot",this.handleVirtualTooltipSlotChange),document.removeEventListener("tooltip-disconnected",this.handleTooltipRemoved,!0)}disconnectedCallback(){super.disconnectedCallback(),this.stopContinuousPositionTracking(),this.teardownEvents()}firstUpdated(t){const e=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return i=this,s=void 0,r=function*(){e.firstUpdated.call(this,t),yield new Promise(t=>setTimeout(t,0)),this.setupEvents()},new((o=void 0)||(o=Promise))(function(t,e){function a(t){try{l(r.next(t))}catch(t){e(t)}}function n(t){try{l(r.throw(t))}catch(t){e(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(a,n)}l((r=r.apply(i,s||[])).next())});var i,s,o,r}static get styles(){return[h.dW]}render(){return l.html`
|
|
2
2
|
<div class="theme-wrapper" part="theme-wrapper">
|
|
3
3
|
<style>
|
|
4
4
|
${o.A} .theme-wrapper {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div class="md-composite-avatar ${(0,l.classMap)(this.avatarClassMap)}">
|
|
14
14
|
<slot></slot>
|
|
15
15
|
</div>
|
|
16
|
-
`}};h([(0,n.property)({type:Number})],e.prototype,"size",void 0),e=h([(0,o.w)("md-composite-avatar")],e),t.ELEMENT=e}(s||(s={}))},3001:(t,e,i)=>{i.d(e,{Io:()=>a.I,TS:()=>n.T,UM:()=>r.U,dY:()=>o.d,wW:()=>l.w,yC:()=>s.y}),i(18889);var s=i(32972),o=i(28373),r=i(70300),a=i(84624),n=i(68387),l=i(31890)},3288:t=>{t.exports=
|
|
16
|
+
`}};h([(0,n.property)({type:Number})],e.prototype,"size",void 0),e=h([(0,o.w)("md-composite-avatar")],e),t.ELEMENT=e}(s||(s={}))},3001:(t,e,i)=>{i.d(e,{Io:()=>a.I,TS:()=>n.T,UM:()=>r.U,dY:()=>o.d,wW:()=>l.w,yC:()=>s.y}),i(18889);var s=i(32972),o=i(28373),r=i(70300),a=i(84624),n=i(68387),l=i(31890)},3288:t=>{t.exports=k},3664:(t,e,i)=>{i.d(e,{Checkbox:()=>s}),i(61200);var s,o=i(90195),r=i(3001),a=i(31890),n=i(4313),l=i(87161),d=i(70429),h=i(32056),c=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends((0,r.yC)(l.LitElement)){constructor(){super(...arguments),this.autofocus=!1,this._checked=!1,this._indeterminate=!1,this._disabled=!1,this.label="",this.tabIndex=0}get checked(){return this._checked}set checked(t){const e=this._checked;this._checked=t,this.requestUpdate("checked",e)}get indeterminate(){return this._indeterminate}set indeterminate(t){const e=this._indeterminate;this._indeterminate=t,this.requestUpdate("indeterminate",e)}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.tabIndex=t?-1:0,this.requestUpdate("disabled",e)}static get styles(){return[n.A,h.A]}toggleCheckbox(){this.checked=!this.checked}isCheckboxActive(){return this.disabled||this.indeterminate}handleClick(t){this.isCheckboxActive()?t.stopPropagation():(this.toggleCheckbox(),this.handleChange(t))}handleKeyDown(t){const{code:e}=t;e!==o.Uz.Space&&e!==o.Uz.Enter||(t.preventDefault(),this.isCheckboxActive()?t.stopPropagation():(this.toggleCheckbox(),this.handleChange(t)))}handleChange(t){this.dispatchEvent(new CustomEvent("checkbox-change",{bubbles:!0,composed:!0,detail:{sourceEvent:t,checked:this.checked}}))}firstUpdated(t){super.firstUpdated(t),this.setAttribute("role","checkbox"),this.label&&this.setAttribute("aria-label",this.label)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("indeterminate")&&this.indeterminate&&(this._checked=!1),(t.has("checked")||t.has("indeterminate"))&&(this.indeterminate?this.setAttribute("aria-checked","mixed"):this.setAttribute("aria-checked",`${this.checked}`)),t.has("disabled")&&this.setAttribute("aria-disabled",`${this.disabled}`)}updated(t){super.updated(t),t.has("indeterminate")&&(this.input.indeterminate=this.indeterminate)}get checkboxIconName(){return this.checked?"check-bold":this.indeterminate?"minus-bold":null}checkboxIconTemplate(){const t=this.checkboxIconName;return t?l.html`<md-icon name="${t}" iconSet="momentumDesign" size="16"></md-icon>`:l.nothing}checkboxBoxTemplate(){return l.html` <div part="checkbox-box" class="checkbox-box">${this.checkboxIconTemplate()}</div> `}render(){return l.html`
|
|
17
17
|
<input
|
|
18
18
|
class="checkbox-input"
|
|
19
19
|
type="checkbox"
|
|
@@ -456,7 +456,7 @@
|
|
|
456
456
|
.filterParams=${this.filterParams}
|
|
457
457
|
.datePickerProps=${this.datePickerProps}
|
|
458
458
|
></md-datepicker-week>
|
|
459
|
-
`),e=(0,r.J4)(e,1)}while((0,r.tF)(e,this.day)||i.length<6);return i}}static get styles(){return[a.A,d.A]}render(){return n.html` <div class="md-datepicker__month">${this.renderWeeks()}</div> `}};h([(0,l.property)({attribute:!1})],e.prototype,"day",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"filterParams",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"datePickerProps",void 0),e=h([(0,o.w)("md-datepicker-month")],e),t.ELEMENT=e}(s||(s={}))},18224:(t,e,i)=>{i.d(e,{CountryCodePicker:()=>s}),i(4928);var s,o=i(31890),r=i(4313),a=i(13060),n=i(65875),l=i(87161),d=i(
|
|
459
|
+
`),e=(0,r.J4)(e,1)}while((0,r.tF)(e,this.day)||i.length<6);return i}}static get styles(){return[a.A,d.A]}render(){return n.html` <div class="md-datepicker__month">${this.renderWeeks()}</div> `}};h([(0,l.property)({attribute:!1})],e.prototype,"day",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"filterParams",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"datePickerProps",void 0),e=h([(0,o.w)("md-datepicker-month")],e),t.ELEMENT=e}(s||(s={}))},18224:(t,e,i)=>{i.d(e,{CountryCodePicker:()=>s}),i(4928);var s,o=i(31890),r=i(4313),a=i(13060),n=i(65875),l=i(87161),d=i(70429),h=i(85125),c=i(58175),p=i(75838),u=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.codePlaceholder="+1",this.countryCallingCode="",this.showFlags=!1,this.pill=!1,this.disabled=!1,this.ariaLabel="",this.clearAriaLabel="Clear Country Code",this.id="",this.newMomentum=!1,this.isDropdownArrow=!0,this.countryCode="US",this.codeList=[]}connectedCallback(){super.connectedCallback(),this.codeList=(0,a.customArray)({name:"{countryNameEn}",value:"{countryCallingCode}",code:"{countryCode}"}),""===this.id&&(this.id=`md-country-code-picker-${Math.random().toString(36).substring(2,6)}`)}getCountryFlag(t){return l.html`
|
|
460
460
|
<span class="flag-svg-wrapper">
|
|
461
461
|
<img src="${(0,n.findFlagUrlByIso2Code)(t)}" />
|
|
462
462
|
</span>
|
|
@@ -468,15 +468,15 @@
|
|
|
468
468
|
slot=${e}
|
|
469
469
|
aria-label="+${t.value}, ${t.name}, ${t.code}"
|
|
470
470
|
>
|
|
471
|
-
${this.showFlags?this.getCountryFlag(t.code):
|
|
471
|
+
${this.showFlags?this.getCountryFlag(t.code):l.nothing}
|
|
472
472
|
<span>${t.name}</span>
|
|
473
473
|
<span>+${t.value}</span>
|
|
474
474
|
</div>
|
|
475
|
-
`}handleCountryChange(t){var e,i;t.detail.value&&(null===(e=t.detail.value)||void 0===e?void 0:e.id)?(this.countryCallingCode=t.detail.value.id,this.countryCode=null===(i=t.detail.value.id.split(",")[2])||void 0===i?void 0:i.trim()):(this.countryCode="US",this.countryCallingCode=""),this.dispatchEvent(new CustomEvent("country-code-changed",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get flagClassMap(){return{"new-momentum":this.newMomentum}}get containerClassMap(){return{"md-country-code-picker__container":!0,"show-flags":this.showFlags}}getFormatedCountryCallingCode(){var t;return{id:this.countryCallingCode,value:null===(t=this.countryCallingCode.split(",")[0])||void 0===t?void 0:t.trim()}}static get styles(){return[r.A,
|
|
476
|
-
<div class="${(0,h.
|
|
475
|
+
`}handleCountryChange(t){var e,i;t.detail.value&&(null===(e=t.detail.value)||void 0===e?void 0:e.id)?(this.countryCallingCode=t.detail.value.id,this.countryCode=null===(i=t.detail.value.id.split(",")[2])||void 0===i?void 0:i.trim()):(this.countryCode="US",this.countryCallingCode=""),this.dispatchEvent(new CustomEvent("country-code-changed",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get flagClassMap(){return{"new-momentum":this.newMomentum}}get containerClassMap(){return{"md-country-code-picker__container":!0,"show-flags":this.showFlags}}getFormatedCountryCallingCode(){var t;return{id:this.countryCallingCode,value:null===(t=this.countryCallingCode.split(",")[0])||void 0===t?void 0:t.trim()}}static get styles(){return[r.A,p.A]}render(){return l.html`
|
|
476
|
+
<div class="${(0,h.classMap)(this.containerClassMap)}">
|
|
477
477
|
${this.showFlags?l.html`
|
|
478
|
-
<span class="flag-box ${(0,h.
|
|
479
|
-
`:
|
|
478
|
+
<span class="flag-box ${(0,h.classMap)(this.flagClassMap)}">${this.getCountryFlag(this.countryCode)}</span>
|
|
479
|
+
`:l.nothing}
|
|
480
480
|
<md-combobox
|
|
481
481
|
part="combobox"
|
|
482
482
|
exportparts="group: combobox-group, combobox-options: options-container"
|
|
@@ -491,10 +491,10 @@
|
|
|
491
491
|
?is-dropdown-arrow=${this.isDropdownArrow}
|
|
492
492
|
.clearAriaLabel="${this.clearAriaLabel}"
|
|
493
493
|
>
|
|
494
|
-
${(0,c.
|
|
494
|
+
${(0,c.repeat)(this.codeList,t=>t.name,(t,e)=>this.countryCodeOptionTemplate(t,e))}
|
|
495
495
|
</md-combobox>
|
|
496
496
|
</div>
|
|
497
|
-
`}};
|
|
497
|
+
`}};u([(0,d.property)({type:String,reflect:!0})],e.prototype,"codePlaceholder",void 0),u([(0,d.property)({type:String,attribute:"country-calling-code"})],e.prototype,"countryCallingCode",void 0),u([(0,d.property)({type:Boolean,attribute:"show-flags"})],e.prototype,"showFlags",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"pill",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaLabel",void 0),u([(0,d.property)({type:String})],e.prototype,"clearAriaLabel",void 0),u([(0,d.property)({type:String})],e.prototype,"id",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"newMomentum",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"isDropdownArrow",void 0),u([(0,d.state)()],e.prototype,"countryCode",void 0),u([(0,d.state)()],e.prototype,"codeList",void 0),u([(0,d.query)("md-combobox")],e.prototype,"combobox",void 0),e=u([(0,o.w)("md-country-code-picker")],e),t.ELEMENT=e}(s||(s={}))},19026:(t,e,i)=>{i.d(e,{Link:()=>s});var s,o=i(31890),r=i(4313),a=i(87161),n=i(70429),l=i(85125),d=i(20291),h=i(24889),c=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.color="",this.ariaLabel="",this.ariaRole="link",this.disabled=!1,this.inline=!1,this.inlineStyle=void 0,this.inverted=void 0,this.href="",this.tag="a",this.target="_self",this.size=void 0,this._tabIndex=0}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}static get styles(){return[r.A,h.A]}render(){const t={[`md-link--${this.color}`]:this.color,"md-link--inline":this.inline,[`md-link--inline-style-${this.inlineStyle}`]:!!this.inlineStyle,[`${this.size}`]:!!this.size,inverted:!0===this.inverted,disabled:this.disabled};return a.html` ${(()=>{switch(this.tag){case"div":return a.html`
|
|
498
498
|
<div
|
|
499
499
|
class="md-link ${(0,l.classMap)(t)}"
|
|
500
500
|
tabindex=${this.tabIndex}
|
|
@@ -998,7 +998,7 @@
|
|
|
998
998
|
height: ${this.containerHeight};
|
|
999
999
|
}
|
|
1000
1000
|
</style>
|
|
1001
|
-
`}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),null===(t=this.listContainer)||void 0===t||t.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(t){var e;super.firstUpdated(t),null===(e=this.listContainer)||void 0===e||e.addEventListener("keydown",this.handleKeyDown)}
|
|
1001
|
+
`}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),null===(t=this.listContainer)||void 0===t||t.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(t){var e;super.firstUpdated(t),null===(e=this.listContainer)||void 0===e||e.addEventListener("keydown",this.handleKeyDown)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&(this.selectedItemsIds=this.value),t.has("selectAllItems")&&this.selectAllItems&&(this.selectedItemsIds=this.items.filter(t=>!this.disabledItems.includes(t.id)).map(t=>t.id)),t.has("focusReset")&&this.focusReset&&(this.activeId="")}updated(t){super.updated(t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&this.updateSelectedState(),t.has("selectAllItems")&&this.selectAllItems&&(this.updateSelectedState(),this.notifySelectedChange())}setCheckboxAttributes(t,e){var i,s,o,r;!t||(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))&&"true"===(null===(s=e.firstElementChild)||void 0===s?void 0:s.getAttribute("aria-disabled"))?null===(r=e.querySelector("md-checkbox"))||void 0===r||r.removeAttribute("checked"):null===(o=e.querySelector("md-checkbox"))||void 0===o||o.setAttribute("checked","true")}updateWrapperAttributes(t,e){this.isMulti?this.setCheckboxAttributes(e,t):t.classList.toggle("selected",e),t.setAttribute("selected",e.toString()),t.setAttribute("aria-selected",e.toString()),t.setAttribute("tabindex",e?"0":"-1")}updateSelectedState(){var e;Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]).forEach(e=>{var i,s;const o=this.selectedItemsIds.some(i=>e.id===`${t.prefixId}${i}`);this.updateWrapperAttributes(e,o),this.groupOnMultiSelect&&this.value.length>0&&this.items.length!==this.value.length&&e.id===`${t.prefixId}${this.lastSelectedIdByOrder}`?e.classList.add("selected-border-bottom"):e.classList.remove("selected-border-bottom"),e.id===`${t.prefixId}${this.activeId}`?(e.setAttribute("tabindex","0"),e.focus()):e.setAttribute("tabindex","-1"),""==this.activeId&&e.id===`${t.prefixId}${this.value[0]}`&&e.setAttribute("tabindex","0"),(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))||"true"===(null===(s=e.firstElementChild)||void 0===s?void 0:s.getAttribute("aria-disabled"))?(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true")):(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"))})}findClickedItem(t){var e;const i=Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]),s=t.composedPath(),o=i.find(t=>s.includes(t));if(o)return(null==o?void 0:o.hasAttribute("disabled"))||"true"===(null==o?void 0:o.getAttribute("aria-disabled"))?0:o}isNextElemenentStatusIndicator(t){return(this.isLoading||this.isError)&&t===this.items.length-2}updateItemForMultiSelect(t){const e=this.selectedItemsIds.indexOf(t);-1===e?(this.selectedItemsIds.push(this.activeId),this.selectedItemsIds.length===this.items.length-this.disabledItems.length&&(this.selectAllItems=!0)):(this.selectedItemsIds.splice(e,1),this.selectAllItems=!1)}updateItemSelection(t){t&&(this.activeId=t.id.substring(t.id.indexOf("-")+1),this.isMulti?this.updateItemForMultiSelect(this.activeId):this.selectedItemsIds=[this.activeId],this.updateSelectedState(),this.notifySelectedChange())}handleClick(t){t.preventDefault(),this.isUserNavigated=!1;const e=this.findClickedItem(t);e&&(this.scrollIndex=parseInt(e.getAttribute("index")||"0"),this.updateItemSelection(e))}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selectedItemsIds},bubbles:!0,composed:!0}))}getActiveDescendant(){return this.activeId?`${t.prefixId}${this.activeId}`:this.value?`${t.prefixId}${this.value[0]}`:""}render(){return l.html`
|
|
1002
1002
|
${this.getStyles()}
|
|
1003
1003
|
<div
|
|
1004
1004
|
class="md-advance-list-wrapper virtual-scroll"
|
|
@@ -1014,7 +1014,7 @@
|
|
|
1014
1014
|
.renderItem=${(t,e)=>this.renderItem(t,e)}
|
|
1015
1015
|
></lit-virtualizer>
|
|
1016
1016
|
</div>
|
|
1017
|
-
`}};c([(0,d.property)({type:Array})],e.prototype,"items",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"isLoading",void 0),c([(0,d.property)({type:Boolean,attribute:"is-multi"})],e.prototype,"isMulti",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"groupOnMultiSelect",void 0),c([(0,d.property)({type:Array})],e.prototype,"value",void 0),c([(0,d.property)({type:String})],e.prototype,"ariaRoleList",void 0),c([(0,d.property)({type:String})],e.prototype,"ariaRoleListItem",void 0),c([(0,d.property)({type:String})],e.prototype,"ariaLabelList",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"isError",void 0),c([(0,d.property)({type:String})],e.prototype,"containerHeight",void 0),c([(0,d.property)({type:String})],e.prototype,"lastSelectedIdByOrder",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"selectAllItems",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"focusReset",void 0),c([(0,d.property)({type:Array})],e.prototype,"disabledItems",void 0),c([(0,d.property)({type:Number})],e.prototype,"totalRecords",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"isNonSelectable",void 0),c([(0,d.
|
|
1017
|
+
`}};c([(0,d.property)({type:Array})],e.prototype,"items",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"isLoading",void 0),c([(0,d.property)({type:Boolean,attribute:"is-multi"})],e.prototype,"isMulti",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"groupOnMultiSelect",void 0),c([(0,d.property)({type:Array})],e.prototype,"value",void 0),c([(0,d.property)({type:String})],e.prototype,"ariaRoleList",void 0),c([(0,d.property)({type:String})],e.prototype,"ariaRoleListItem",void 0),c([(0,d.property)({type:String})],e.prototype,"ariaLabelList",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"isError",void 0),c([(0,d.property)({type:String})],e.prototype,"containerHeight",void 0),c([(0,d.property)({type:String})],e.prototype,"lastSelectedIdByOrder",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"selectAllItems",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"focusReset",void 0),c([(0,d.property)({type:Array})],e.prototype,"disabledItems",void 0),c([(0,d.property)({type:Number})],e.prototype,"totalRecords",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"isNonSelectable",void 0),c([(0,d.query)(".virtual-scroll")],e.prototype,"listContainer",void 0),c([(0,d.state)()],e.prototype,"scrollIndex",void 0),c([(0,d.state)()],e.prototype,"activeId",void 0),c([(0,d.state)()],e.prototype,"selectedItemsIds",void 0),c([(0,d.state)()],e.prototype,"isUserNavigated",void 0),e=c([(0,r.w)("md-advance-list")],e),t.ELEMENT=e}(s||(s={}))},29895:(t,e,i)=>{i.d(e,{CoachmarkPopover:()=>s}),i(96798),i(61200),i(71128);var s,o=i(31890),r=i(4313),a=i(87161),n=i(70429),l=i(85125),d=i(32924),h=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.placement="bottom",this.triggerID="",this.headerIconName=void 0,this.header=void 0,this.message=void 0,this.show=!1,this.hideCloseButton=!1,this.href="",this.slotContent=null}static get styles(){return[r.A,d.A]}connectedCallback(){super.connectedCallback()}notifyCustomEvent(t){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:{placement:this.placement,triggerComponent:this.triggerComponent,popper:this.popper}}))}notifyCoachCreate(){this.notifyCustomEvent("coach-create")}notifyPrimaryButtonAction(){this.notifyCustomEvent("primary-button-action")}notifySecondaryButtonAction(){this.notifyCustomEvent("secondary-button-action")}notifyLinkAction(){this.notifyCustomEvent("link-action")}notifyCoachClose(){this.notifyCustomEvent("coachmark-close")}handleSlotChange(t){const e=t.target;if(e){const t=e.assignedElements({flatten:!0});t.length&&(this.slotContent=t)}}updated(t){super.updated(t),t.has("show")&&(this.show?this.notifyCoachCreate():this.notifyCoachClose())}coachmarkContentTemplate(){return a.html`
|
|
1018
1018
|
<div class="md-coachmark__content">
|
|
1019
1019
|
${this.message?this.message:a.html` <slot name="coachmark-content" @slotchange=${this.handleSlotChange}></slot> `}
|
|
1020
1020
|
</div>
|
|
@@ -1066,7 +1066,7 @@
|
|
|
1066
1066
|
${this.renderHeader()} ${this.renderBody()} ${this.renderFooter()}
|
|
1067
1067
|
</div>
|
|
1068
1068
|
</md-popover>
|
|
1069
|
-
`}};h([(0,n.property)({type:String})],e.prototype,"placement",void 0),h([(0,n.property)({type:String,reflect:!0})],e.prototype,"triggerID",void 0),h([(0,n.property)({type:String})],e.prototype,"headerIconName",void 0),h([(0,n.property)({type:String})],e.prototype,"header",void 0),h([(0,n.property)({type:String})],e.prototype,"message",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"show",void 0),h([(0,n.property)({type:Boolean,reflect:!0,attribute:"hide-close-button"})],e.prototype,"hideCloseButton",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButton",void 0),h([(0,n.property)({type:String})],e.prototype,"secondaryButton",void 0),h([(0,n.property)({type:String})],e.prototype,"linkText",void 0),h([(0,n.property)({type:String})],e.prototype,"href",void 0),h([(0,n.query)(".md-coachmark__trigger-component")],e.prototype,"triggerComponent",void 0),h([(0,n.query)(".md-coachmark__popper")],e.prototype,"popper",void 0),e=h([(0,o.w)("md-coachmark-popover")],e),t.ELEMENT=e}(s||(s={}))},31347:t=>{t.exports=x},32022:t=>{t.exports=r},32217:(t,e,i)=>{i.d(e,{RadioGroup:()=>s});var s,o=i(90195),r=i(3001),a=i(31890),n=i(4313),l=i(87161),d=i(70429),h=i(60836),c=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends((0,r.Io)(l.LitElement)){constructor(){super(...arguments),this.label="group",this.checked=-1,this.alignment="vertical",this._disabled=!1}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.requestUpdate("disabled",e)}firstUpdated(t){super.firstUpdated(t),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}
|
|
1069
|
+
`}};h([(0,n.property)({type:String})],e.prototype,"placement",void 0),h([(0,n.property)({type:String,reflect:!0})],e.prototype,"triggerID",void 0),h([(0,n.property)({type:String})],e.prototype,"headerIconName",void 0),h([(0,n.property)({type:String})],e.prototype,"header",void 0),h([(0,n.property)({type:String})],e.prototype,"message",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"show",void 0),h([(0,n.property)({type:Boolean,reflect:!0,attribute:"hide-close-button"})],e.prototype,"hideCloseButton",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButton",void 0),h([(0,n.property)({type:String})],e.prototype,"secondaryButton",void 0),h([(0,n.property)({type:String})],e.prototype,"linkText",void 0),h([(0,n.property)({type:String})],e.prototype,"href",void 0),h([(0,n.query)(".md-coachmark__trigger-component")],e.prototype,"triggerComponent",void 0),h([(0,n.query)(".md-coachmark__popper")],e.prototype,"popper",void 0),e=h([(0,o.w)("md-coachmark-popover")],e),t.ELEMENT=e}(s||(s={}))},31347:t=>{t.exports=x},32022:t=>{t.exports=r},32217:(t,e,i)=>{i.d(e,{RadioGroup:()=>s});var s,o=i(90195),r=i(3001),a=i(31890),n=i(4313),l=i(87161),d=i(70429),h=i(60836),c=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends((0,r.Io)(l.LitElement)){constructor(){super(...arguments),this.label="group",this.checked=-1,this.alignment="vertical",this._disabled=!1}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.requestUpdate("disabled",e)}firstUpdated(t){super.firstUpdated(t),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),(t.has("slotted")||t.has("checked"))&&this.setFirstChecked()}get selectedRadioValue(){return this.slotted[this.selected].value}notifySelectedChange(){this.dispatchEvent(new CustomEvent("radio-change",{detail:{selected:this.selectedRadioValue},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}setFirstChecked(){-1!==this.checked&&(this.selected=this.checked,this.setChecked(this.checked))}findRadioIndex(t){const e=t.composedPath();return this.slotted.findIndex(t=>e.includes(t))}findCheckedRadioIndex(){return this.slotted.findIndex(t=>t.checked)}setChecked(t){const e=this.findCheckedRadioIndex();-1!==e&&e!==t&&this.slotted[e]&&(this.slotted[e].checked=!1),this.slotted[t]&&(this.slotted[t].checked=!0)}switchRadioOnArrowPress(t,e=1){const i=super.getAvailableSelectedIndex(t,e);-1!==i&&(this.selected=i,this.setChecked(i),this.notifySelectedChange())}isRadioDisabled(t){return this.slotted[t].disabled}handleClick(t){if(this.disabled)return!1;const e=this.findRadioIndex(t);-1!==e&&(this.isRadioDisabled(e)||(this.selected=e,this.setChecked(e),this.notifySelectedChange()))}handleKeyDown(t){if(this.disabled)return!1;const{code:e}=t;switch(e){case o.Uz.Enter:case o.Uz.Space:this.isRadioDisabled(this.selected)||(this.setChecked(this.selected),this.notifySelectedChange(),t.stopPropagation(),t.preventDefault());break;case o.Uz.ArrowUp:case o.Uz.ArrowLeft:0===this.selected?this.switchRadioOnArrowPress(this.slotted.length-1,-1):this.switchRadioOnArrowPress(this.selected-1,-1),t.stopPropagation(),t.preventDefault();break;case o.Uz.ArrowDown:case o.Uz.ArrowRight:this.selected===this.slotted.length-1?this.switchRadioOnArrowPress(0):this.switchRadioOnArrowPress(this.selected+1),t.stopPropagation(),t.preventDefault()}}get slotElement(){return this.radioSlot}static get styles(){return[n.A,h.A]}clearSelection(){const t=this.findCheckedRadioIndex();-1!=t&&(this.checked=-1,this.slotted[t].checked=!1)}render(){return l.html`
|
|
1070
1070
|
<div class="radio-group-container" part="radio-group-container">
|
|
1071
1071
|
<slot name="radio"></slot>
|
|
1072
1072
|
</div>
|
|
@@ -1146,85 +1146,7 @@
|
|
|
1146
1146
|
<div class="md-accordion" part="accordion">
|
|
1147
1147
|
<slot name="accordion-item"></slot>
|
|
1148
1148
|
</div>
|
|
1149
|
-
`}};c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"multiple",void 0),c([(0,d.property)({type:Boolean,attribute:"suppress-container-focus"})],e.prototype,"suppressContainerFocus",void 0),c([(0,d.query)('slot[name="accordion-item"]')],e.prototype,"accordionItemSlotElement",void 0),e=c([(0,a.w)("md-accordion")],e),t.ELEMENT=e}(s||(s={}))},
|
|
1150
|
-
<md-icon
|
|
1151
|
-
class="md-notification-badge-icon ${(0,b.H)({"md-notification-badge-overlay":this.overlay,[`md-notification-badge-icon__${e}`]:!0})}"
|
|
1152
|
-
iconSet="momentumDesign"
|
|
1153
|
-
name="${(0,v.J)(t)}"
|
|
1154
|
-
size="${w.zY.ICON_SIZE}"
|
|
1155
|
-
></md-icon>
|
|
1156
|
-
`}getBadgeDot(){return y.html`<div
|
|
1157
|
-
class="md-notification-badge-dot ${(0,b.H)({"md-notification-badge-overlay":this.overlay})}"
|
|
1158
|
-
></div>`}getBadgeCounterText(){return y.html`
|
|
1159
|
-
<div class="md-notification-badge-text ${(0,b.H)({"md-notification-badge-overlay":this.overlay})}">
|
|
1160
|
-
${this.getCounterText(this.maxCounter,this.counter)}
|
|
1161
|
-
</div>
|
|
1162
|
-
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(w.M_).includes(this.variant)&&(this.variant=w.zY.VARIANT);const{iconName:t,type:e,variant:i}=this;switch(e){case w.ZE.ICON:return this.getBadgeIcon(t||"",i);case w.ZE.COUNTER:return this.getBadgeCounterText();case w.ZE.SUCCESS:return this.getBadgeIcon(w.UZ.SUCCESS_ICON_NAME,w.su.SUCCESS);case w.ZE.WARNING:return this.getBadgeIcon(w.UZ.WARNING_ICON_NAME,w.su.WARNING);case w.ZE.ERROR:return this.getBadgeIcon(w.UZ.ERROR_ICON_NAME,w.su.ERROR);case w.ZE.DOT:default:return this.type=w.ZE.DOT,this.getBadgeDot()}}update(t){super.update(t),t.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};x([(0,g.property)({type:String,reflect:!0})],S.prototype,"type",void 0),x([(0,g.property)({type:String,reflect:!0})],S.prototype,"variant",void 0),x([(0,g.property)({type:Number})],S.prototype,"counter",void 0),x([(0,g.property)({type:Number,attribute:"max-counter",reflect:!0})],S.prototype,"maxCounter",void 0),x([(0,g.property)({type:Boolean})],S.prototype,"overlay",void 0),x([(0,g.property)({type:String,attribute:"icon-name"})],S.prototype,"iconName",void 0),x([(0,g.property)({type:String,attribute:"aria-label"})],S.prototype,"ariaLabel",void 0),S=x([(0,m.wW)("md-notification-badge")],S);var E=i(92992),$=i(45629),T=i(96798),A=i(64311),k=i(90827),I=i(10654),L=i(95281),O=i(3664),M=i(55294),D=i(60046),P=i(29895),R=i(46312),_=i(4313),B=i(45001),z=i.n(B);const F=y.css`:host(md-code-editor) .md-code-editor{background:#091e26;border-radius:.25rem;color:#fff;min-height:18.75rem;overflow:hidden}:host(md-code-editor) .md-code-editor-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;background:#092d3b;flex:0 0 auto;font-size:14px;padding:.625rem}:host(md-code-editor) .md-code-editor-name{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-code-editor) .md-code-editor md-badge::part(badge){border-radius:.25rem;height:1.25rem;margin-right:.625rem;padding:.25rem .375rem;text-transform:capitalize}:host(md-code-editor) .md-code-editor-copy{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;line-height:1}:host(md-code-editor) .md-code-editor-copy-btn::part(button){background:0 0;color:#00a0d1;margin-left:.625rem}:host(md-code-editor) .md-code-editor-copy-btn[disabled]{cursor:not-allowed;opacity:.5}:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-quote{color:#ffecc2}:host(md-code-editor) .hljs-deletion,:host(md-code-editor) .hljs-name,:host(md-code-editor) .hljs-regexp,:host(md-code-editor) .hljs-selector-class,:host(md-code-editor) .hljs-selector-id,:host(md-code-editor) .hljs-tag,:host(md-code-editor) .hljs-template-variable,:host(md-code-editor) .hljs-variable{color:#ff9d52}:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-type{color:#fc9d03}:host(md-code-editor) .hljs-attribute{color:#ebd460}:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol{color:#93c437}:host(md-code-editor) .hljs-section,:host(md-code-editor) .hljs-title{color:#22c7d6}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{color:#f0e3fc}:host(md-code-editor) .hljs{background:rgba(0,0,0,0);color:#dedede;display:block;overflow-x:auto;padding:.5em}:host(md-code-editor) .hljs-emphasis{font-style:italic}:host(md-code-editor) .hljs-strong{font-weight:700}@media screen and (forced-colors:active){:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-attribute,:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-quote,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol,:host(md-code-editor) .hljs-type{color:highlight}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{font-weight:700}}@media(forced-colors:active){:host(md-code-editor) .md-code-editor{outline:1px solid CanvasText}:host(md-code-editor) .md-code-editor-header{outline:1px solid CanvasText}}`;var V,N=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.copyLocalization="cURL",this.copiedLocalization="Copied",this.method="get",this.acceptLanguage="javascript",this.url="javascript",this.disableCopyButton=!0,this.acceptTypes="",this.copied=!1}static get styles(){return[_.A,F]}handleSlotChange(){if(this.slotNodes&&this.slotNodes.length){const t=this.slotNodes.find(t=>"CODE"===t.tagName);if(t){const e=t.textContent;e&&this.highlightBlock(e)}}}handleUrlSlotChange(){if(this.copied=!1,this.slotUrl&&this.slotUrl.length){const t=this.slotUrl.find(t=>t);if(t){const e=t.textContent;e&&this.copyUrl(e)}}}highlightBlock(t){t&&(this.codeBlock.innerText=t),z().highlightElement(this.codeBlock)}copyUrl(t){this.codeUrl.innerText=t,this.disableCopyButton=!1}copyClipboard(){this.disableCopyButton||this.selectTarget(this.codeUrl)}copyText(){try{document.execCommand("copy"),this.copied=!0}catch(t){console.warn("Copy text failed"),this.copied=!1}}select(t){const e=window.getSelection(),i=document.createRange();i.selectNodeContents(t),e&&(e.removeAllRanges(),e.addRange(i))}selectTarget(t){this.select(t),this.copyText()}importLanguage(t){return e=this,s=void 0,r=function*(){try{const{default:e}=yield i(29599)(`./${t}`);z().registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}},new((o=void 0)||(o=Promise))(function(t,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function n(t){try{l(r.throw(t))}catch(t){i(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(a,n)}l((r=r.apply(e,s||[])).next())});var e,s,o,r}getAllAcceptTypes(){const t=z().listLanguages();return t.length?t.map(t=>z().getLanguage(`${t}`).aliases).map(t=>t.map(t=>`.${t}`)).join(","):""}setAcceptTypes(){this.acceptTypes=this.getAllAcceptTypes()}updated(t){super.updated(t),t.has("acceptLanguage")&&this.importLanguage(this.acceptLanguage),t.has("acceptTypes")&&this.highlightBlock()}render(){return y.html`
|
|
1163
|
-
<div class="md-code-editor" part="code-editor">
|
|
1164
|
-
<div class="md-code-editor-header">
|
|
1165
|
-
<div class="md-code-editor-name">
|
|
1166
|
-
<md-badge color="blue">
|
|
1167
|
-
<slot name="method" method=${this.method}></slot>
|
|
1168
|
-
</md-badge>
|
|
1169
|
-
<span class="md-code-editor-url">
|
|
1170
|
-
<slot name="code-url" @slotchange=${this.handleUrlSlotChange}>${this.url}</slot>
|
|
1171
|
-
</span>
|
|
1172
|
-
</div>
|
|
1173
|
-
<div class="md-code-editor-copy">
|
|
1174
|
-
<span>${this.copied?this.copiedLocalization.trim():this.copyLocalization.trim()}</span>
|
|
1175
|
-
<md-button
|
|
1176
|
-
circle
|
|
1177
|
-
size="20"
|
|
1178
|
-
?disabled=${this.disableCopyButton}
|
|
1179
|
-
@click=${this.copyClipboard}
|
|
1180
|
-
class="md-code-editor-copy-btn"
|
|
1181
|
-
>
|
|
1182
|
-
<md-icon slot="icon" name="icon-copy_16"></md-icon>
|
|
1183
|
-
</md-button>
|
|
1184
|
-
</div>
|
|
1185
|
-
</div>
|
|
1186
|
-
<div class="md-code-editor-content">
|
|
1187
|
-
<pre class="md-code-editor-code-block">
|
|
1188
|
-
<slot name="code-block" @slotchange=${this.handleSlotChange}>
|
|
1189
|
-
<code class=${this.acceptLanguage}>
|
|
1190
|
-
</code>
|
|
1191
|
-
</slot>
|
|
1192
|
-
</pre>
|
|
1193
|
-
</div>
|
|
1194
|
-
</div>
|
|
1195
|
-
`}};N([(0,g.property)({type:String})],e.prototype,"copyLocalization",void 0),N([(0,g.property)({type:String})],e.prototype,"copiedLocalization",void 0),N([(0,g.property)({type:String})],e.prototype,"method",void 0),N([(0,g.property)({type:String,attribute:"accept-language"})],e.prototype,"acceptLanguage",void 0),N([(0,g.property)({type:String})],e.prototype,"url",void 0),N([(0,g.query)("input[type='file']")],e.prototype,"input",void 0),N([(0,g.query)(".md-code-editor-code-block")],e.prototype,"codeBlock",void 0),N([(0,g.query)(".md-code-editor-url")],e.prototype,"codeUrl",void 0),N([(0,g.state)()],e.prototype,"disableCopyButton",void 0),N([(0,g.state)()],e.prototype,"acceptTypes",void 0),N([(0,g.state)()],e.prototype,"copied",void 0),N([(0,g.queryAssignedNodes)({slot:"code-block"})],e.prototype,"slotNodes",void 0),N([(0,g.queryAssignedNodes)({slot:"code-url"})],e.prototype,"slotUrl",void 0),e=N([(0,m.wW)("md-code-editor")],e),t.ELEMENT=e}(V||(V={}));var j=i(4928),U=i(18224),q=i(69494),H=i(85416),W=i(38654),K=i(63208),G=i(16754),Y=i(17814),X=i(10984),Z=i(80072),Q=i(24627),J=i(23184),tt=i(50565),et=i(99850),it=i(83192),st=i(36752);const ot=y.css`:host{display:inline-flex;align-items:center;height:1.75rem;border-radius:1.5625rem;background-color:var(--floating-button-bar-bg-color);box-shadow:var(--md-elevation-1);padding:.25rem .5rem;gap:.5rem}.button{display:inline-flex;align-items:center;justify-content:center}.button.pill::part(button){font-size:.875rem;padding-left:.75rem;padding-right:.75rem}.cancel{color:var(--floating-button-bar-secondary-color)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}.label.primary{font-family:var(--brand-font-medium);color:var(--floating-button-bar-primary-color);flex:1;min-width:0;justify-content:center}.label.secondary{color:var(--floating-button-bar-secondary-color);padding-right:4px}.separator{width:1px;height:.75rem;background-color:var(--floating-button-bar-secondary-color)}md-tooltip::part(tooltip_reference){display:flex;align-items:center}`;var rt=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let at=class extends y.LitElement{constructor(){super(...arguments),this.leadingLabel="",this.closeButtonAriaLabel="",this.showCloseButton=!0,this.actions=[]}static get styles(){return[ot]}onCancelButttonAction(){this.dispatchEvent(new CustomEvent("cancel-button-action",{composed:!0,bubbles:!0}))}get closeButtonTemplate(){return y.html`
|
|
1196
|
-
<md-tooltip
|
|
1197
|
-
message="${(0,v.J)(this.closeButtonAriaLabel)}"
|
|
1198
|
-
?disabled=${!this.closeButtonAriaLabel}
|
|
1199
|
-
placement="top"
|
|
1200
|
-
>
|
|
1201
|
-
<md-button
|
|
1202
|
-
class="button cancel"
|
|
1203
|
-
circle
|
|
1204
|
-
size="20"
|
|
1205
|
-
variant="ghostInheritTextColor"
|
|
1206
|
-
ariaLabel=${(0,v.J)(this.closeButtonAriaLabel)}
|
|
1207
|
-
@button-click=${()=>this.onCancelButttonAction()}
|
|
1208
|
-
>
|
|
1209
|
-
<md-icon slot="icon" iconSet="momentumDesign" name="cancel-bold" size="16"></md-icon>
|
|
1210
|
-
</md-button>
|
|
1211
|
-
</md-tooltip>
|
|
1212
|
-
`}getPrimaryLabelTemplate(t){return y.html` <span class="label primary">${t}</span> `}getSecondaryLabelTemplate(t){return y.html` <span class="label secondary">${t}</span> `}get separatorTemplate(){return y.html` <div class="separator"></div> `}getIconTemplate(t){return y.html`${t.icon?y.html`<md-icon slot="icon" iconSet="momentumDesign" name=${t.icon} size="16"></md-icon>`:st.s6}`}getPillButtonTemplate(t){return y.html`
|
|
1213
|
-
<md-button class="button pill" size="24" variant="inverted-ghost" @button-click=${()=>t.action()}>
|
|
1214
|
-
${this.getIconTemplate(t)} ${this.getPrimaryLabelTemplate(t.label)}
|
|
1215
|
-
</md-button>
|
|
1216
|
-
`}getCircleButtonTemplate(t){return y.html`
|
|
1217
|
-
<md-button class="button" circle size="24" variant="inverted-secondary" @button-click=${()=>t.action()}>
|
|
1218
|
-
${this.getIconTemplate(t)}
|
|
1219
|
-
</md-button>
|
|
1220
|
-
`}getTooltipCircleButtonTemplate(t){return y.html`
|
|
1221
|
-
<md-tooltip message="${t.label}" placement="top"> ${this.getCircleButtonTemplate(t)} </md-tooltip>
|
|
1222
|
-
`}getActionAndLabelTemplate(t){var e;const i=null!==(e=t.iconAlign)&&void 0!==e?e:"right";return y.html`
|
|
1223
|
-
${"left"===i?y.html`${this.getCircleButtonTemplate(t)} ${this.getPrimaryLabelTemplate(t.label)}`:y.html`${this.getPrimaryLabelTemplate(t.label)} ${this.getCircleButtonTemplate(t)}`}
|
|
1224
|
-
`}getActionTemplate(t){return t.isIconOnly?this.getTooltipCircleButtonTemplate(t):this.getPillButtonTemplate(t)}getActionGroupTemplate(t){return y.html` ${this.separatorTemplate} ${t.actions.map(t=>this.getActionTemplate(t))} `}render(){return y.html`
|
|
1225
|
-
${this.showCloseButton?this.closeButtonTemplate:st.s6} ${this.getSecondaryLabelTemplate(this.leadingLabel)}
|
|
1226
|
-
${this.actions.map(t=>this.getActionGroupTemplate(t))}
|
|
1227
|
-
`}};rt([(0,g.property)({type:String})],at.prototype,"leadingLabel",void 0),rt([(0,g.property)({type:String})],at.prototype,"closeButtonAriaLabel",void 0),rt([(0,g.property)({type:Boolean})],at.prototype,"showCloseButton",void 0),rt([(0,g.property)({type:Array})],at.prototype,"actions",void 0),at=rt([(0,g.customElement)("md-floating-button-bar")],at);var nt=i(58871),lt=i(73093);class dt{constructor(){this.listeners=new Set}onChange(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}emitChange(){for(const t of Array.from(this.listeners))t(this)}}class ht extends dt{constructor(t,e=[]){super(),this.validationErrors=[],this.touched=!1,this.currentValue=t,this.validators=e,this.validate()}get value(){return this.currentValue}markAsTouched(){this.touched=!0,this.validate()}get valid(){return 0===this.validationErrors.length}get errors(){return this.touched?this.validationErrors:[]}setValue(t){this.currentValue=t,this.markAsTouched()}validate(){this.emitChange(),this.validationErrors=this.validators.map(t=>t(this.currentValue)).filter(t=>null!==t)}}class ct extends dt{constructor(t){var e;super(),this.controls=t;for(const t of Object.keys(this.controls)){const i=this.controls[t];null===(e=i.onChange)||void 0===e||e.call(i,()=>this.emitChange())}}get(t){return this.controls[t]}get value(){const t={};for(const e in this.controls)t[e]=this.controls[e].value;return t}get valid(){return Object.values(this.controls).every(t=>t.valid)}validate(){for(const t of Object.values(this.controls))t.validate();this.emitChange()}markAllAsTouched(){Object.values(this.controls).forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}class pt extends dt{constructor(t){var e;super(),this.controls=t;for(const t of this.controls)null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange())}at(t){return this.controls[t]}push(t){var e;this.controls.push(t),null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange()),this.emitChange()}removeAt(t){this.controls.splice(t,1),this.emitChange()}get value(){return this.controls.map(t=>t.value)}get valid(){return this.controls.every(t=>t.valid)}get length(){return this.controls.length}getControls(){return this.controls}validate(){this.controls.forEach(t=>t.validate()),this.emitChange()}markAllAsTouched(){this.controls.forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}const ut={required:()=>t=>null==t||"string"==typeof t&&""===t.trim()?{type:"required"}:null,minLength:t=>e=>e.length<t?{type:"minLength",count:t}:null,maxLength:t=>e=>e.length>t?{type:"maxLength",count:t}:null};var mt=i(97866),yt=i(69112),bt=i(20109),vt=i(52619),gt=i(96408),ft=i(6396),wt=i(19026),Ct=i(68490),xt=i(66245),St=i(69788),Et=i(61997),$t=i(11323),Tt=i(84032),At=i(48171),kt=i(32252),It=i(23026),Lt=i(84205),Ot=i(71128),Mt=i(15300),Dt=i(58287),Pt=i(81144),Rt=i(32217),_t=i(25428),Bt=i(12176),zt=i(77935),Ft=i(40428),Vt=i(16643),Nt=i(97737),jt=i(50226),Ut=i(86610),qt=i(1072),Ht=i(49256),Wt=i(20331),Kt=i(81786),Gt=i(37719)},37719:(t,e,i)=>{i.d(e,{ThemeManager:()=>o,registerThemeManagerGlobally:()=>a,themeManager:()=>r});var s=i(85314);class o{get isMomentumV2Enabled(){return"momentumV2"===this.themeName}constructor(t){this.isDarkMode=!1,this.themeName="lumos",this.isVisualRebrandEnabled=!1,this.isMomentumAvatarEnabled=!1,(0,s.makeObservable)(this,{isDarkMode:s.observable,themeName:s.observable,isVisualRebrandEnabled:s.observable,isMomentumAvatarEnabled:s.observable,isMomentumV2Enabled:s.computed,setDarkMode:s.action,setThemeName:s.action,setVisualRebrandEnabled:s.action,setMomentumAvatar:s.action,update:s.action}),t&&this.update(t)}update(t){void 0!==t.isDarkMode&&(this.isDarkMode=t.isDarkMode),void 0!==t.themeName&&(this.themeName=t.themeName),void 0!==t.isVisualRebrandEnabled&&(this.isVisualRebrandEnabled=t.isVisualRebrandEnabled),void 0!==t.isMomentumAvatarEnabled&&(this.isMomentumAvatarEnabled=t.isMomentumAvatarEnabled)}setDarkMode(t){this.isDarkMode=t}setThemeName(t){this.themeName=t}setVisualRebrandEnabled(t){this.isVisualRebrandEnabled=t}setMomentumAvatar(t){this.isMomentumAvatarEnabled=t}}const r=new o;function a(t="MomentumUIThemeManager",e=r){"undefined"!=typeof globalThis&&(globalThis[t]=e),"undefined"!=typeof window&&(window[t]=e),void 0!==i.g&&(i.g[t]=e)}},38028:(t,e,i)=>{i.d(e,{Avatar:()=>s}),i(61200),i(69788),i(15300);var s,o=i(31890),r=i(26283),a=i(4313),n=i(87161),l=i(70429),d=i(85125),h=i(20291),c=i(10318),p=i(89756),u=i(38923),m=i(7292),y=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this._tabIndex=0,this.alt="",this.src="",this.label="",this.title="",this.color="",this.decrypting=!1,this.role="img",this.iconName="",this.failurePresence=!1,this.type="",this.newMomentum=!1,this.typing=!1,this.size=40,this.hasNotification=!1,this.clickable=!1,this.avatarStyle="default",this.state="rest",this.imageLoaded=!1,this.imageErrored=!1,this.presenceColor="",this.presenceIcon="",this.iconNameMap={"channel-chat":"chat-filled","channel-chat-outbound":"chat-outbound-filled","channel-social":"sms-message-filled","channel-sms-inbound":"sms-filled","channel-sms-outbound":"sms-outgoing-filled","channel-email-inbound":"email-filled","channel-email-outbound":"email-outgoing-filled","channel-call":"handset-filled","channel-call-inbound":"incoming-call-legacy-filled","channel-callback":"outgoing-call-legacy-filled","channel-headset":"headset-filled","channel-campaign":"campaign-management-bold","channel-emoji":"emoji-happy-filled","channel-webex":"webex-app-icon-color-container","channel-fb-messenger":"social-fbmessenger-color","channel-facebook":"social-facebook-color","channel-apple-chat":"apple-business-chat-color","channel-line":"social-line-color","channel-twitter-x":"social-x","channel-viber":"social-viber-color","channel-whats-app":"social-whatsapp-color","channel-we-chat":"social-wechat-color","channel-spam":"participant-unknown-bold","channel-monitoring":"monitoring-bold"}}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}static get styles(){return[a.A,m.A]}isPresenceType(t){return u.e.includes(t)}firstUpdated(){const t=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(t){const{presenceColor:e,presenceIcon:i}=(0,u.E)(t,this.failurePresence,this.newMomentum);this.presenceColor=e,this.presenceIcon=i}}updated(t){super.updated(t);const e=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(e&&(t.has("type")||t.has("presenceType")||t.has("newMomentum"))){const{presenceColor:t,presenceIcon:i}=(0,u.E)(e,this.failurePresence,this.newMomentum);this.presenceColor=t,this.presenceIcon=i}t.has("role")&&this.style.setProperty("--avatar-cursor","button"===this.role?"pointer":"default")}get avatarClassMap(){return Object.assign(Object.assign({},this.newMomentum&&"bot"!==this.type||!this.type?{}:{[`md-avatar--${this.type}`]:!0}),{[`md-avatar--${this.size}`]:!!this.size,[`md-avatar--${this.color}`]:!!this.color,active:"active"===this.state})}get avatarLetterClassMap(){return{"md-decrypting":this.decrypting,[`md-avatar--${this.color}`]:this.color,"new-momentum":this.newMomentum,active:"active"===this.state}}get avatarStyleMap(){return{[`md-avatar--${this.color}`]:this.color}}get pretifyTitle(){if(this.title.length){const t=this.title.trim().split(" ");return 1===t.length?t[0].charAt(0):t[0].charAt(0)+t[t.length-1].charAt(0)}return this.title}get chatIconName(){return"chat-filled"}getIconName(t){return this.iconNameMap[t]||""}get chatIconSize(){return this.iconSize}get presenceSize(){return this.size<=24?10.5:this.size<=32?14:this.size<=48?13.94:this.size<=64?18.58:this.size<=72?20.9:this.size<=88?25.55:36}get iconSize(){return 24===this.size?"16":28===this.size?"18":32===this.size?"20":36===this.size?"22":40===this.size?"24":48===this.size?"28":56===this.size?"32":64===this.size?"36":72===this.size?"40":Math.round(this.size/1.7).toString()}get renderIsTyping(){return"typing"===this.type||this.typing?n.html` <md-loading></md-loading> `:n.nothing}get avatarLetter(){return this.title?n.html`
|
|
1149
|
+
`}};c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"multiple",void 0),c([(0,d.property)({type:Boolean,attribute:"suppress-container-focus"})],e.prototype,"suppressContainerFocus",void 0),c([(0,d.query)('slot[name="accordion-item"]')],e.prototype,"accordionItemSlotElement",void 0),e=c([(0,a.w)("md-accordion")],e),t.ELEMENT=e}(s||(s={}))},37719:(t,e,i)=>{i.d(e,{ThemeManager:()=>o,registerThemeManagerGlobally:()=>a,themeManager:()=>r});var s=i(85314);class o{get isMomentumV2Enabled(){return"momentumV2"===this.themeName}constructor(t){this.isDarkMode=!1,this.themeName="lumos",this.isVisualRebrandEnabled=!1,this.isMomentumAvatarEnabled=!1,(0,s.makeObservable)(this,{isDarkMode:s.observable,themeName:s.observable,isVisualRebrandEnabled:s.observable,isMomentumAvatarEnabled:s.observable,isMomentumV2Enabled:s.computed,setDarkMode:s.action,setThemeName:s.action,setVisualRebrandEnabled:s.action,setMomentumAvatar:s.action,update:s.action}),t&&this.update(t)}update(t){void 0!==t.isDarkMode&&(this.isDarkMode=t.isDarkMode),void 0!==t.themeName&&(this.themeName=t.themeName),void 0!==t.isVisualRebrandEnabled&&(this.isVisualRebrandEnabled=t.isVisualRebrandEnabled),void 0!==t.isMomentumAvatarEnabled&&(this.isMomentumAvatarEnabled=t.isMomentumAvatarEnabled)}setDarkMode(t){this.isDarkMode=t}setThemeName(t){this.themeName=t}setVisualRebrandEnabled(t){this.isVisualRebrandEnabled=t}setMomentumAvatar(t){this.isMomentumAvatarEnabled=t}}const r=new o;function a(t="MomentumUIThemeManager",e=r){"undefined"!=typeof globalThis&&(globalThis[t]=e),"undefined"!=typeof window&&(window[t]=e),void 0!==i.g&&(i.g[t]=e)}},38028:(t,e,i)=>{i.d(e,{Avatar:()=>s}),i(61200),i(69788),i(15300);var s,o=i(31890),r=i(26283),a=i(4313),n=i(87161),l=i(70429),d=i(85125),h=i(20291),c=i(10318),p=i(89756),u=i(38923),m=i(7292),y=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this._tabIndex=0,this.alt="",this.src="",this.label="",this.title="",this.color="",this.decrypting=!1,this.role="img",this.iconName="",this.failurePresence=!1,this.type="",this.newMomentum=!1,this.typing=!1,this.size=40,this.hasNotification=!1,this.clickable=!1,this.avatarStyle="default",this.state="rest",this.imageLoaded=!1,this.imageErrored=!1,this.presenceColor="",this.presenceIcon="",this.iconNameMap={"channel-chat":"chat-filled","channel-chat-outbound":"chat-outbound-filled","channel-social":"sms-message-filled","channel-sms-inbound":"sms-filled","channel-sms-outbound":"sms-outgoing-filled","channel-email-inbound":"email-filled","channel-email-outbound":"email-outgoing-filled","channel-call":"handset-filled","channel-call-inbound":"incoming-call-legacy-filled","channel-callback":"outgoing-call-legacy-filled","channel-headset":"headset-filled","channel-campaign":"campaign-management-bold","channel-emoji":"emoji-happy-filled","channel-webex":"webex-app-icon-color-container","channel-fb-messenger":"social-fbmessenger-color","channel-facebook":"social-facebook-color","channel-apple-chat":"apple-business-chat-color","channel-line":"social-line-color","channel-twitter-x":"social-x","channel-viber":"social-viber-color","channel-whats-app":"social-whatsapp-color","channel-we-chat":"social-wechat-color","channel-spam":"participant-unknown-bold","channel-monitoring":"monitoring-bold"}}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}static get styles(){return[a.A,m.A]}isPresenceType(t){return u.e.includes(t)}firstUpdated(){const t=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(t){const{presenceColor:e,presenceIcon:i}=(0,u.E)(t,this.failurePresence,this.newMomentum);this.presenceColor=e,this.presenceIcon=i}}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t);const i=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(i&&(t.has("type")||t.has("presenceType")||t.has("newMomentum"))){const{presenceColor:t,presenceIcon:e}=(0,u.E)(i,this.failurePresence,this.newMomentum);this.presenceColor=t,this.presenceIcon=e}}updated(t){super.updated(t),t.has("role")&&this.style.setProperty("--avatar-cursor","button"===this.role?"pointer":"default")}get avatarClassMap(){return Object.assign(Object.assign({},this.newMomentum&&"bot"!==this.type||!this.type?{}:{[`md-avatar--${this.type}`]:!0}),{[`md-avatar--${this.size}`]:!!this.size,[`md-avatar--${this.color}`]:!!this.color,active:"active"===this.state})}get avatarLetterClassMap(){return{"md-decrypting":this.decrypting,[`md-avatar--${this.color}`]:this.color,"new-momentum":this.newMomentum,active:"active"===this.state}}get avatarStyleMap(){return{[`md-avatar--${this.color}`]:this.color}}get pretifyTitle(){if(this.title.length){const t=this.title.trim().split(" ");return 1===t.length?t[0].charAt(0):t[0].charAt(0)+t[t.length-1].charAt(0)}return this.title}get chatIconName(){return"chat-filled"}getIconName(t){return this.iconNameMap[t]||""}get chatIconSize(){return this.iconSize}get presenceSize(){return this.size<=24?10.5:this.size<=32?14:this.size<=48?13.94:this.size<=64?18.58:this.size<=72?20.9:this.size<=88?25.55:36}get iconSize(){return 24===this.size?"16":28===this.size?"18":32===this.size?"20":36===this.size?"22":40===this.size?"24":48===this.size?"28":56===this.size?"32":64===this.size?"36":72===this.size?"40":Math.round(this.size/1.7).toString()}get renderIsTyping(){return"typing"===this.type||this.typing?n.html` <md-loading></md-loading> `:n.nothing}get avatarLetter(){return this.title?n.html`
|
|
1228
1150
|
<span class="md-avatar__letter ${(0,d.classMap)(this.avatarLetterClassMap)}">
|
|
1229
1151
|
${this.pretifyTitle}
|
|
1230
1152
|
<slot></slot>
|
|
@@ -1399,7 +1321,7 @@
|
|
|
1399
1321
|
${this.finalTwentyFourFormat?l.nothing:this.generateAmPmComboBox()}
|
|
1400
1322
|
</div>
|
|
1401
1323
|
</div>
|
|
1402
|
-
`}};m([(0,d.property)({type:Boolean,attribute:"two-digit-auto-tab"})],e.prototype,"twoDigitAutoTab",void 0),m([(0,d.property)({type:Boolean,attribute:"twenty-four-hour-format",reflect:!0})],e.prototype,"twentyFourHourFormat",void 0),m([(0,d.property)({type:String})],e.prototype,"timeSpecificity",void 0),m([(0,d.property)({type:String})],e.prototype,"locale",void 0),m([(0,d.property)({type:String,reflect:!0})],e.prototype,"value",void 0),m([(0,d.property)({type:Boolean,attribute:"show-default-now-time"})],e.prototype,"showDefaultNowTime",void 0),m([(0,d.state)()],e.prototype,"finalTwentyFourFormat",void 0),m([(0,d.state)()],e.prototype,"timeObject",void 0),m([(0,d.state)()],e.prototype,"tabNext",void 0),m([(0,d.state)()],e.prototype,"timeValue",void 0),m([(0,d.state)()],e.prototype,"timeValidity",void 0),e=m([(0,o.w)("md-timepicker")],e),t.ELEMENT=e}(g||(g={}))},50226:(t,e,i)=>{i.d(e,{Tabs:()=>O}),i(61200),i(11323),i(83192);var s=i(90195),o=i(3001),r=i(66677),a=i(59164),n=i(4313),l=i(87161),d=i(54765),h=i(70429),c=i(85125),p=i(58175),u=i(10318),m=i(16968),y=i(41891),b=i.n(y),v=i(97103),g=i(2669),f=i(16643),w=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},C=function(t,e,i,s){return new(i||(i=Promise))(function(o,r){function a(t){try{l(s.next(t))}catch(t){r(t)}}function n(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((s=s.apply(t,e||[])).next())})};const x="tab-more",S="more-menu-copy-",E="visibleToVisible",$="visibleToHidden",T="hiddenToVisible",A="hiddenToHidden",k="previous",I="next",L="fromMoreTabs";var O;!function(t){let e=class extends((0,o.UM)((0,o.Io)((0,o.TS)(l.LitElement)))){constructor(){super(...arguments),this.justified=!1,this.hugTabs=!1,this.overflowLabel="More Tabs",this.draggable=!1,this.direction="horizontal",this.moreItemsScrollLimit=Number.MAX_SAFE_INTEGER,this._selectedIndex=0,this.animation=100,this.ghostClass="",this.chosenClass="",this.forceFallback=!1,this.fallbackClass="",this.tabsId="",this.persistSelection=!1,this.compUniqueId="",this.type="line",this.newMomentum=!1,this.variant="ghost",this.scrollArrow=!1,this.leftArrowAriaLabel="Backward Button",this.rightArrowAriaLabel="Forward Button",this.size=28,this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1,this.isMoreTabMenuOpen=!1,this.isMoreTabMenuSelected=!1,this.isMoreTabMenuScrollable=!1,this.moreTabMenuOffsetWidth=0,this.moreTabMenuMaxHeight=null,this.tabsViewportDataList=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.noTabsVisible=!1,this.defaultTabsOrderArray=[],this.tabsOrderPrefsArray=[],this.isMoreTabTruncated=!1,this.showLeftArrow=!1,this.showRightArrow=!1,this.tabs=[],this.panels=[],this.tabsCopy=[],this.tabsHash={},this.tabsCopyHash={},this.tabsIdxHash={},this.tabsVisibleIdxHash={},this.tabsHiddenIdxHash={},this.visibleTabsSortableInstance=null,this.hiddenTabsSortableInstance=null,this.updateArrowsVisibility=()=>{this.tabsListElement&&requestAnimationFrame(()=>{const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.tabsListElement;this.showLeftArrow=t>0,this.showRightArrow=t+i<e-5})},this.handleOnDragEnd=t=>C(this,void 0,void 0,function*(){var e,i,s,o,r,a,n,l,d,h;t.stopPropagation();const c=t.oldIndex,p=t.newIndex,u=[...this.tabsFilteredAsVisibleList],m=[...this.tabsFilteredAsHiddenList],y=this.getDragDirection(t);if(void 0!==c&&void 0!==p){switch(y){case $:{null===(i=null===(e=this.hiddenTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t.item.id))||void 0===i||i.remove();const s=u[c],o=m.slice(-1)[0],r=p===this.tabsFilteredAsHiddenList.length?p-1:p;m.splice(r,0,s),m.pop();const a=u.filter(e=>e.id!==this.getNormalizedTabId(t.item.id));a.push(o),this.tabsFilteredAsVisibleList=[...a],this.tabsFilteredAsHiddenList=[...m];break}case E:{const t=u[c];u.splice(c,1),u.splice(p,0,t),this.tabsFilteredAsVisibleList=u,p===this.tabsFilteredAsVisibleList.length-1&&(null===(o=null===(s=this.visibleTabsContainerElement)||void 0===s?void 0:s.children[this.visibleTabsContainerElement.children.length-1])||void 0===o||o.remove());const e=this.visibleTabsContainerElement.children[c],i=this.visibleTabsContainerElement.children[p];if(!e||!i)return;null===(r=this.visibleTabsContainerElement)||void 0===r||r.replaceChild(i,e),null===(a=this.visibleTabsContainerElement)||void 0===a||a.insertBefore(e,i);break}case T:{null===(l=null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.querySelector("#"+t.item.id))||void 0===l||l.remove();const e=m[c],i=u.slice(-1)[0];m.splice(c,1),m.splice(0,0,i);const s=p===this.tabsFilteredAsVisibleList.length?p-1:p;u.splice(s,0,e),u.pop(),this.tabsFilteredAsVisibleList=u,this.tabsFilteredAsHiddenList=m;break}case A:{const t=m[c];m.splice(c,1),m.splice(p,0,t),this.tabsFilteredAsHiddenList=m,p===this.tabsFilteredAsHiddenList.length-1&&(null===(h=null===(d=this.hiddenTabsContainerElement)||void 0===d?void 0:d.children[this.hiddenTabsContainerElement.children.length-1])||void 0===h||h.remove());break}}if(this.compUniqueId){const t=[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],e=t.findIndex(t=>t.selected);this.storeSelectedTabIndex(e),this.tabsOrderPrefsArray=t.map(t=>t.name),localStorage.setItem(this.compUniqueId,this.tabsOrderPrefsArray.join(","))}}})}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){var e;if(-1===t)return;const i=this._selectedIndex;this._selectedIndex=t,i!==t&&(null===(e=this.tabs)||void 0===e?void 0:e.length)&&this.updateSelectedTab(t)}get isRtl(){return"rtl"===getComputedStyle(this).direction}generateOptions(){return{group:"shared",animation:10,swapThreshold:1,draggable:"md-tab",direction:this.direction,forceFallback:this.forceFallback,fallbackClass:this.fallbackClass,ghostClass:this.ghostClass,chosenClass:this.chosenClass,onEnd:this.handleOnDragEnd}}get currentTabsLayout(){return"horizontal"!==this.direction||this.scrollArrow?this.tabs:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList]}getCopyTabId(t){var e;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(S))?`${S}${t.id}`:t.id}getAriaControlId(t){var e,i;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(S))?`${S}${t.id}`:"tab_panel_"+(null===(i=t.id)||void 0===i?void 0:i.substring(4))}getTabIndex(t){var e,i;return this.isMoreTabMenuVisible&&0===this.getCurrentIndex(null==t?void 0:t.id)&&this.selected>(null===(e=this.tabsFilteredAsVisibleList)||void 0===e?void 0:e.length)-1||(null===(i=this.tabsFilteredAsVisibleList[this.selected])||void 0===i?void 0:i.id)===t.id?0:-1}getNormalizedTabId(t){return t.replace(S,"")}static get styles(){return[n.A,g.A]}ensureTabsUpdateComplete(t){return C(this,void 0,void 0,function*(){const e=t.map(t=>void 0!==t.updateComplete?t.updateComplete:null).filter(t=>null!==t);e.length&&(yield Promise.all(e))})}measureTabsOffsetWidth(){return this.justified||"vertical"===this.direction?this.tabs.map(t=>{t.setAttribute("measuringrealwidth","");const e=t.closable?t.offsetWidth+f.TAB_CROSS_WIDTH:t.offsetWidth;return t.removeAttribute("measuringrealwidth"),e}):this.tabs.map(t=>t.closable?t.offsetWidth+f.TAB_CROSS_WIDTH:t.offsetWidth)}updateIsMoreTabTruncated(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-menu-overlay__overflow-label");if(e){const t=e.scrollWidth>e.clientWidth;this.isMoreTabTruncated!=t&&(this.isMoreTabTruncated=t)}}measureHiddenTabsCopiesOffsetHeight(){return this.tabsCopy.map(t=>t.offsetHeight)}manageOverflow(){return C(this,void 0,void 0,function*(){var t,e;if("vertical"!==this.direction&&!this.scrollArrow){let i;i=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length?[...this.tabs]:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],i.forEach(t=>{var e,i,s,o,r,a;if((null===(e=t.children)||void 0===e?void 0:e.length)&&0===(null===(s=null===(i=t.children[0])||void 0===i?void 0:i.children)||void 0===s?void 0:s.length)){const e=null===(r=null===(o=null==t?void 0:t.querySelector("slot"))||void 0===o?void 0:o.assignedNodes({flatten:!0})[0])||void 0===r?void 0:r.cloneNode(!0);e&&(e.classList.add("tab-content"),null===(a=null==t?void 0:t.children[0])||void 0===a||a.appendChild(e))}});const s=i.length;if(this.tabsListElement&&s){const o=(null===(t=this.tabsSettingsElement)||void 0===t?void 0:t.offsetWidth)?this.tabsListElement.offsetWidth-(null===(e=this.tabsSettingsElement)||void 0===e?void 0:e.offsetWidth):this.tabsListElement.offsetWidth;yield this.ensureTabsUpdateComplete(this.tabs);const r=this.measureTabsOffsetWidth(),a=i.reduce((t,e,i)=>t+r[i],0);if(a){yield this.setupMoreTab();let t=!0;o<a&&(t=!1);const e=[];let n=0;i.forEach((i,a)=>{n+=r[a];const l=!t&&n+(a<s-1?this.moreTabMenuOffsetWidth:0)>o;e.push({isTabInViewportHidden:l,tabOffsetWidth:r[a]})}),this.tabsViewportDataList=e,this.tabsViewportDataList.forEach((t,e)=>this.tabs[e].viewportHidden=t.isTabInViewportHidden),this.isMoreTabMenuVisible=!!this.tabsViewportDataList.find(t=>t.isTabInViewportHidden),this.tabsFilteredAsVisibleList=i.filter((t,e)=>!this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsFilteredAsHiddenList=i.filter((t,e)=>this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})}}this.updateIsMoreTabMenuSelected();const o=this.tabsFilteredAsHiddenList.find(t=>!t.disabled);this.updateHiddenIdPositiveTabIndex(o)}})}updateIsMoreTabMenuSelected(){this.isMoreTabMenuSelected=!!this.tabsFilteredAsHiddenList.find(t=>t.selected)}updateHiddenIdPositiveTabIndex(t){this.tabHiddenIdPositiveTabIndex=t?t.id:void 0}sortTabsAndPanes(){if(!this.tabsOrderPrefsArray.length)return;const t=(t,e)=>{var i,s;const o=null!==(i=t.getAttribute("name"))&&void 0!==i?i:"",r=null!==(s=e.getAttribute("name"))&&void 0!==s?s:"";return this.tabsOrderPrefsArray.indexOf(o)-this.tabsOrderPrefsArray.indexOf(r)};this.tabs.sort(t),this.panels.sort(t)}linkPanelsAndTabs(){return C(this,void 0,void 0,function*(){this.sortTabsAndPanes();const{tabs:t,panels:e}=this;if(0===t.length||0===e.length)return void console.warn("The tabs or panels count should't be equal zero.");t.length!==e.length&&console.warn(`The amount of tabs (${t.length}) doesn't match the amount of panels (${e.length}).`);const i="vertical"===this.direction,s=this.selectedIndex<0?0:this.selectedIndex;t.forEach((t,o)=>{const r=(0,a.O)("tabs"),n="tab_"+r,l="tab_panel_"+r;t.setAttribute("id",n),t.setAttribute("aria-controls",l),t.selected=s===o,t.newMomentum=this.newMomentum,t.type=this.type,t.variant=this.variant,t.size=this.newMomentum?this.size:void 0,this.scrollArrow&&(t.visibleTab=!0),t.vertical!==i&&(t.vertical=i),t.viewportHidden&&(i||this.scrollArrow)&&(t.viewportHidden=!1);const d=e[o];d?(d.setAttribute("id",l),d.setAttribute("aria-labelledby",n),d.selected=s===o,t.disabled&&(d.hidden=!0,d.selected=!1)):t.disabled=!0});let o=s;for(;o<t.length&&t[o].disabled;)o++;o=o===t.length?0:o,t[o].selected=!0,e[o].selected=!0,this.tabsHash=this.tabs.reduce((t,e)=>(t[e.id]=e,t),{}),this.tabsIdxHash=this.tabs.reduce((t,e,i)=>(t[e.id]=i,t),{})})}get slotItem(){return this.tabSlotElement}filterSlotted(){return this.tabSlotElement.assignedElements()}handleResize(t){var e;null===(e=super.handleResize)||void 0===e||e.call(this,t),this.manageOverflow(),this.updateIsMoreTabTruncated(),this.scrollArrow&&this.updateArrowsVisibility()}getDragDirection(t){return t.from===this.visibleTabsContainerElement&&t.to===this.hiddenTabsContainerElement?$:t.from===this.visibleTabsContainerElement&&t.to===this.visibleTabsContainerElement?E:t.from===this.hiddenTabsContainerElement&&t.to===this.visibleTabsContainerElement?T:t.from===this.hiddenTabsContainerElement&&t.to===this.hiddenTabsContainerElement?A:void 0}makeTabCopyFocus(t){t&&t.focus()}handleTabClick(t){const{id:e}=t.detail;this.handleNewSelectedTab(e)}handleNewSelectedTab(t,e=!0){const i=this.tabsHash[this.getNormalizedTabId(t)];if(i&&!i.disabled){const t=this.tabsIdxHash[i.id];-1!==t&&this.updateSelectedTab(t,e);{const t=this.tabsCopyHash[this.getCopyTabId(i)];t&&e&&this.makeTabCopyFocus(t),this.updateHiddenIdPositiveTabIndex(i)}}}handleTabCrossClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseEvent(t){var e,i;const s=this.tabsHash[this.getNormalizedTabId(t)];if(s&&!s.disabled&&("auto"===s.closable||"custom"===s.closable)){const s=this.tabsFilteredAsVisibleList.findIndex(e=>this.getNormalizedTabId(e.id)===this.getNormalizedTabId(t));this.tabsFilteredAsVisibleList=this.tabsFilteredAsVisibleList.filter(e=>this.getNormalizedTabId(e.id)!==this.getNormalizedTabId(t)),null===(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t))||void 0===i||i.remove(),0!==this.tabsFilteredAsHiddenList.length&&(this.tabsFilteredAsVisibleList.push(this.tabsFilteredAsHiddenList[0]),this.tabsFilteredAsHiddenList.splice(0,1)),0===this.tabsFilteredAsHiddenList.length&&(this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1),this.handleUpdatedSeletedTabAfterCross(s)}}handleUpdatedSeletedTabAfterCross(t){var e;let i=t;for(;i<this.tabsFilteredAsVisibleList.length&&(null===(e=this.tabsFilteredAsVisibleList[i])||void 0===e?void 0:e.disabled);)i++;if(void 0===this.tabsFilteredAsVisibleList[i]||t===this.tabsFilteredAsVisibleList.length)for(i=t-1;i>=0&&this.tabsFilteredAsVisibleList[i].disabled;)i--;if(-1!==i){const t=this.tabs.findIndex(t=>t.id===this.tabsFilteredAsVisibleList[i].id);this.updateSelectedTab(t)}else this.updateSelectedTab(i);this.noTabsVisible=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length,this.requestUpdate()}setSelectedAttribute(t,e,i=!1){e&&(e.selected=i),t&&(t.selected=i,i&&(this.isMoreTabMenuSelected=this.isTabInMoreMenu(t)),this.isTabInMoreMenu(t)&&(this.isMoreTabMenuSelected=!0))}isTabInMoreMenu(t){return void 0!==this.tabsFilteredAsHiddenList.find(e=>e.id===t.id)}updateSelectedTab(t,e=!0){const{tabs:i,panels:s}=this,o=this.tabs.findIndex(t=>t.hasAttribute("selected"));if(i&&s&&(this.setSelectedAttribute((0,r.Qx)(i,o),(0,r.Qx)(s,o),!1),this.setSelectedAttribute((0,r.Qx)(i,t),(0,r.Qx)(s,t),!0)),t>=0&&t<i.length){this.dispatchSelectedChangedEvent(t);const s=this.currentTabsLayout.findIndex(e=>e.id===i[t].id);this.changeSelectedTabIdx(s,e)}}dispatchSelectedChangedEvent(t){const e=this.currentTabsLayout,i=this.tabs[t].id,s=e.findIndex(t=>t.id===i),o=[];e.forEach(t=>{o.push(t.name)}),this.dispatchEvent(new CustomEvent("selected-changed",{detail:{value:s,tabsOrder:o},composed:!0,bubbles:!0}))}changeSelectedTabIdx(t,e=!0){this.requestUpdate(),this.selected=t,this.updateComplete.then(()=>{var i,s;if(t<this.tabsFilteredAsVisibleList.length){if(e){const t=null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[this.selected];null==t||t.focus()}}else{const t=this.selected-this.tabsFilteredAsVisibleList.length,i=null===(s=this.hiddenTabsContainerElement)||void 0===s?void 0:s.children[t];e&&this.moveFocusToTab(i);const o=this.tabsFilteredAsHiddenList[t];(null==o?void 0:o.disabled)||this.updateHiddenIdPositiveTabIndex(o)}}),this.updateIsMoreTabMenuSelected(),this.storeSelectedTabIndex(t)}storeSelectedTabIndex(t){this.persistSelection&&this.tabsId&&t>-1&&""!==this.tabsId.trim()&&sessionStorage.setItem(this.tabsId,`${t}`)}getCurrentIndex(t){var e,i,s;if(this.scrollArrow){const e=this.tabs.length;for(let i=0;i<e;i++)if(this.tabs[i].id===t)return i}const o=null!==(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.children.length)&&void 0!==i?i:0;for(let e=0;e<o;e++)if((null===(s=this.visibleTabsContainerElement)||void 0===s?void 0:s.children[e].id)===t)return e;return this.tabsVisibleIdxHash[t]}moveFocusToAdjacentTab(t,e){var i,s,o;const r=this.getCurrentIndex(t),a=this.slotItem.assignedElements();let n=0;if(this.scrollArrow){e===k?n=0===r?a.length-1:r-1:e===I&&(n=r===a.length-1?0:r+1),this.moveFocusToTab(a[n]);const t=a[n],s=t.getBoundingClientRect(),o=null===(i=this.tabsListElement)||void 0===i?void 0:i.getBoundingClientRect();return o&&(s.left>=o.left&&s.right<=o.right&&s.top>=o.top&&s.bottom<=o.bottom||t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})),this.updateArrowsVisibility(),void(0,v.setTimeout)(()=>this.moveFocusToTab(a[n]),0)}const l=null===(s=this.visibleTabsContainerElement)||void 0===s?void 0:s.children,d=null!==(o=null==l?void 0:l.length)&&void 0!==o?o:0;l&&0!==d&&(e===k?n=0===r?d-1:r-1:e===I?n=r===d-1?0:r+1:e===L&&(n=this.selected>=d?0:this.selected),this.moveFocusToTab(l[n]))}moveFocusToTab(t){(0,v.setTimeout)(()=>null==t?void 0:t.focus(),0)}handleOverlayClose(){(0,v.setTimeout)(()=>{this.menuOverlayElement&&(this.menuOverlayElement.isOpen=!1)},0)}dispatchKeydownEvent(t,e){e&&this.dispatchEvent(new CustomEvent("tab-keydown",{detail:{id:e,key:t.code,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,srcEvent:t},bubbles:!0,composed:!0}))}handleTabKeydown(t){var e,i,o,r,a,n,l;const d=t.target;if(t.target!=this&&!this.tabs.find(t=>t.id===(null==d?void 0:d.id)))return!1;let h;if((null===(e=t.composedPath())||void 0===e?void 0:e.length)>0?h=t.composedPath()[0].id:t.originalTarget&&(h=t.originalTarget.id),!h)return;const c=this.getNormalizedTabId(h);this.dispatchKeydownEvent(t,c);const p=t.code,{shiftKey:u}=t,m=!!this.isMoreTabMenuVisible&&c===x,y=m&&this.isMoreTabMenuVisible?this.moreTabMenuElement:this.tabsHash[this.getNormalizedTabId(c)],b=!this.isMoreTabMenuVisible||y&&this.tabsVisibleIdxHash[y.id]>-1,v=!!this.isMoreTabMenuVisible&&y&&this.tabsHiddenIdxHash[y.id]>-1,g=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length-1:this.tabs.length-1,f=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length:-1,w=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length+this.tabsFilteredAsHiddenList.length-1:-1;switch(p){case s.Uz.Tab:m&&!this.isMoreTabMenuOpen&&u&&(t.preventDefault(),this.moveFocusToAdjacentTab(h,L));break;case s.Uz.End:m||(b?(t.preventDefault(),this.moveFocusToTab(null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[(null===(o=this.tabsFilteredAsVisibleList)||void 0===o?void 0:o.length)-1])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(r=this.hiddenTabsContainerElement)||void 0===r?void 0:r.children[(null===(a=this.tabsFilteredAsHiddenList)||void 0===a?void 0:a.length)-1])));break;case s.Uz.Home:b?(t.preventDefault(),this.moveFocusToTab(null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.children[0])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(l=this.hiddenTabsContainerElement)||void 0===l?void 0:l.children[0]));break;case s.Uz.ArrowLeft:m||(b||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(h,this.isRtl?I:k));break;case s.Uz.ArrowRight:m||(b||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(h,this.isRtl?k:I));break;case s.Uz.ArrowUp:if(m);else if(b&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(0===this.selected?g:this.selected-1);else if(v){t.preventDefault();const e=this.selected===f?w:this.selected-1;this.changeSelectedTabIdx(e)}break;case s.Uz.ArrowDown:if(m);else if(b&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(this.selected===g?0:this.selected+1);else if(v){t.preventDefault();const e=this.selected===w?f:this.selected+1;this.changeSelectedTabIdx(e)}break;case s.Uz.Enter:case s.Uz.NumpadEnter:case s.Uz.Space:if(m){const t=this.tabsFilteredAsHiddenList.filter(t=>!t.disabled),e=t.length?t.find(t=>t.selected)||t[0]:void 0;if(this.updateHiddenIdPositiveTabIndex(e),e){const t=this.tabsIdxHash[this.getNormalizedTabId(e.id)];-1!==t&&this.updateSelectedTab(t)}}else if(y&&!y.disabled){const e=this.tabsIdxHash[this.getNormalizedTabId(y.id)];-1!==e&&(t.preventDefault(),this.updateSelectedTab(e))}}}setupTabsEvents(){this.addEventListener("tab-click",this.handleTabClick),this.addEventListener("tab-cross-click",this.handleTabCrossClick),this.addEventListener("tab-close-click",this.handleTabCloseClick),this.addEventListener("keydown",this.handleTabKeydown),this.addEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}teardownTabsEvents(){this.removeEventListener("tab-click",this.handleTabClick),this.removeEventListener("tab-cross-click",this.handleTabCrossClick),this.removeEventListener("tab-close-click",this.handleTabCloseClick),this.removeEventListener("keydown",this.handleTabKeydown),this.removeEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}clearTabOrderPrefs(t){const{compUniqueId:e}=t.detail;e===this.compUniqueId&&(localStorage.removeItem(this.tabsId),sessionStorage.removeItem(this.tabsId),localStorage.removeItem(this.compUniqueId),this.tabsOrderPrefsArray=this.defaultTabsOrderArray,this.selected=0,this.initializeTabs(),this.dispatchSelectedChangedEvent(0))}setupPanelsAndTabs(){this.tabSlotElement&&(this.tabs=this.tabSlotElement.assignedElements()),this.panelSlotElement&&(this.panels=this.panelSlotElement.assignedElements()),this.defaultTabsOrderArray=this.tabs.map(t=>t.name)}setupMoreTab(){return C(this,void 0,void 0,function*(){"vertical"!==this.direction&&this.moreTabMenuElement&&!this.isMoreTabMenuMeasured&&(this.moreTabMenuElement.classList.add("md-menu-overlay__more_tab--measuring"),yield this.moreTabMenuElement.updateComplete,this.moreTabMenuElement.offsetWidth&&(this.moreTabMenuOffsetWidth=this.moreTabMenuElement.offsetWidth,this.isMoreTabMenuMeasured=!0),this.moreTabMenuElement.classList.remove("md-menu-overlay__more_tab--measuring"))})}initializeSortable(){this.visibleTabsContainerElement&&this.hiddenTabsContainerElement&&(this.visibleTabsSortableInstance=b().create(this.visibleTabsContainerElement,this.generateOptions()),this.hiddenTabsSortableInstance=b().create(this.hiddenTabsContainerElement,this.generateOptions()))}initializeTabs(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),this.manageOverflow(),this.requestUpdate()}connectedCallback(){var t;if(super.connectedCallback(),this.setupTabsEvents(),this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=localStorage.getItem(this.tabsId);this.selected=t&&parseInt(t)>-1?parseInt(t):this.selected}this.compUniqueId&&(this.tabsOrderPrefsArray=(null===(t=localStorage.getItem(this.compUniqueId))||void 0===t?void 0:t.split(","))||[])}selectTabFromStorage(){if(this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=sessionStorage.getItem(this.tabsId);let e=0;if(t){const i=parseInt(t);e=i>-1?i:this.selected}const i=this.currentTabsLayout;i.length&&i[e].id?(this._selectedIndex=e,this.handleNewSelectedTab(i[e].id,!1)):this.selected=e}}disconnectedCallback(){super.disconnectedCallback(),this.teardownTabsEvents()}firstUpdated(t){var e;super.firstUpdated(t),this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.selectTabFromStorage(),this.scrollArrow&&(this.updateArrowsVisibility(),null===(e=this.tabsListElement)||void 0===e||e.addEventListener("scroll",this.updateArrowsVisibility))}onDirectionChanged(){return C(this,void 0,void 0,function*(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),yield this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),"horizontal"===this.direction&&(yield this.manageOverflow()),this.selectTabFromStorage(),this.scrollArrow&&this.updateArrowsVisibility()})}updated(t){var e;if(super.updated(t),t.has("direction")&&t.get("direction")!==this.direction&&this.onDirectionChanged(),t.has("slotted")&&this.initializeTabs(),!this.draggable||this.visibleTabsSortableInstance||this.hiddenTabsSortableInstance||this.initializeSortable(),t.has("tabsFilteredAsHiddenList")&&(this.tabsCopy=Array.from((null===(e=this.tabsCopyHiddenListElements)||void 0===e?void 0:e.values())||[]),this.tabsCopyHash=this.tabsCopy.reduce((t,e)=>(t[e.id]=e,t),{})),(t.has("tabsFilteredAsVisibleList")||t.has("tabsFilteredAsHiddenList"))&&(this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})),t.has("isMoreTabMenuOpen")&&this.isMoreTabMenuVisible){const e=t.get("isMoreTabMenuOpen");this.isMoreTabMenuOpen&&!e&&(this.moreItemsScrollLimit<this.tabsCopy.length?(this.isMoreTabMenuScrollable=!0,this.moreTabMenuMaxHeight=`${this.measureHiddenTabsCopiesOffsetHeight().slice(0,this.moreItemsScrollLimit).reduce((t,e)=>t+e,0)}px`):(this.isMoreTabMenuScrollable=!1,this.moreTabMenuMaxHeight=null))}t.has("tabsId")&&this.selectTabFromStorage(),t.has("selectedIndex")&&(this.selected=this.selectedIndex,this.updateSelectedTab(this.selectedIndex,!1)),t.has("overflowLabel")&&this.updateIsMoreTabTruncated(),t.has("scrollArrow")&&this.onDirectionChanged()}scrollTabs(t){if(!this.tabsListElement||"vertical"===this.direction)return;const e="left"===t?-100:100;this.tabsListElement.scrollBy({left:e,behavior:"smooth"}),(0,v.setTimeout)(()=>this.updateArrowsVisibility(),300)}get moreMenuButtonTemplate(){return l.html`
|
|
1324
|
+
`}};m([(0,d.property)({type:Boolean,attribute:"two-digit-auto-tab"})],e.prototype,"twoDigitAutoTab",void 0),m([(0,d.property)({type:Boolean,attribute:"twenty-four-hour-format",reflect:!0})],e.prototype,"twentyFourHourFormat",void 0),m([(0,d.property)({type:String})],e.prototype,"timeSpecificity",void 0),m([(0,d.property)({type:String})],e.prototype,"locale",void 0),m([(0,d.property)({type:String,reflect:!0})],e.prototype,"value",void 0),m([(0,d.property)({type:Boolean,attribute:"show-default-now-time"})],e.prototype,"showDefaultNowTime",void 0),m([(0,d.state)()],e.prototype,"finalTwentyFourFormat",void 0),m([(0,d.state)()],e.prototype,"timeObject",void 0),m([(0,d.state)()],e.prototype,"tabNext",void 0),m([(0,d.state)()],e.prototype,"timeValue",void 0),m([(0,d.state)()],e.prototype,"timeValidity",void 0),e=m([(0,o.w)("md-timepicker")],e),t.ELEMENT=e}(g||(g={}))},50226:(t,e,i)=>{i.d(e,{Tabs:()=>O}),i(61200),i(11323),i(83192);var s=i(90195),o=i(3001),r=i(66677),a=i(59164),n=i(4313),l=i(87161),d=i(54765),h=i(70429),c=i(85125),p=i(58175),u=i(10318),m=i(16968),y=i(41891),b=i.n(y),v=i(97103),g=i(2669),f=i(16643),w=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},C=function(t,e,i,s){return new(i||(i=Promise))(function(o,r){function a(t){try{l(s.next(t))}catch(t){r(t)}}function n(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((s=s.apply(t,e||[])).next())})};const x="tab-more",S="more-menu-copy-",E="visibleToVisible",$="visibleToHidden",T="hiddenToVisible",k="hiddenToHidden",A="previous",I="next",L="fromMoreTabs";var O;!function(t){let e=class extends((0,o.UM)((0,o.Io)((0,o.TS)(l.LitElement)))){constructor(){super(...arguments),this.justified=!1,this.hugTabs=!1,this.overflowLabel="More Tabs",this.draggable=!1,this.direction="horizontal",this.moreItemsScrollLimit=Number.MAX_SAFE_INTEGER,this._selectedIndex=0,this.animation=100,this.ghostClass="",this.chosenClass="",this.forceFallback=!1,this.fallbackClass="",this.tabsId="",this.persistSelection=!1,this.compUniqueId="",this.type="line",this.newMomentum=!1,this.variant="ghost",this.scrollArrow=!1,this.leftArrowAriaLabel="Backward Button",this.rightArrowAriaLabel="Forward Button",this.size=28,this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1,this.isMoreTabMenuOpen=!1,this.isMoreTabMenuSelected=!1,this.isMoreTabMenuScrollable=!1,this.moreTabMenuOffsetWidth=0,this.moreTabMenuMaxHeight=null,this.tabsViewportDataList=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.noTabsVisible=!1,this.defaultTabsOrderArray=[],this.tabsOrderPrefsArray=[],this.isMoreTabTruncated=!1,this.showLeftArrow=!1,this.showRightArrow=!1,this.tabs=[],this.panels=[],this.tabsCopy=[],this.tabsHash={},this.tabsCopyHash={},this.tabsIdxHash={},this.tabsVisibleIdxHash={},this.tabsHiddenIdxHash={},this.visibleTabsSortableInstance=null,this.hiddenTabsSortableInstance=null,this.updateArrowsVisibility=()=>{this.tabsListElement&&requestAnimationFrame(()=>{const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.tabsListElement;this.showLeftArrow=t>0,this.showRightArrow=t+i<e-5})},this.handleOnDragEnd=t=>C(this,void 0,void 0,function*(){var e,i,s,o,r,a,n,l,d,h;t.stopPropagation();const c=t.oldIndex,p=t.newIndex,u=[...this.tabsFilteredAsVisibleList],m=[...this.tabsFilteredAsHiddenList],y=this.getDragDirection(t);if(void 0!==c&&void 0!==p){switch(y){case $:{null===(i=null===(e=this.hiddenTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t.item.id))||void 0===i||i.remove();const s=u[c],o=m.slice(-1)[0],r=p===this.tabsFilteredAsHiddenList.length?p-1:p;m.splice(r,0,s),m.pop();const a=u.filter(e=>e.id!==this.getNormalizedTabId(t.item.id));a.push(o),this.tabsFilteredAsVisibleList=[...a],this.tabsFilteredAsHiddenList=[...m];break}case E:{const t=u[c];u.splice(c,1),u.splice(p,0,t),this.tabsFilteredAsVisibleList=u,p===this.tabsFilteredAsVisibleList.length-1&&(null===(o=null===(s=this.visibleTabsContainerElement)||void 0===s?void 0:s.children[this.visibleTabsContainerElement.children.length-1])||void 0===o||o.remove());const e=this.visibleTabsContainerElement.children[c],i=this.visibleTabsContainerElement.children[p];if(!e||!i)return;null===(r=this.visibleTabsContainerElement)||void 0===r||r.replaceChild(i,e),null===(a=this.visibleTabsContainerElement)||void 0===a||a.insertBefore(e,i);break}case T:{null===(l=null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.querySelector("#"+t.item.id))||void 0===l||l.remove();const e=m[c],i=u.slice(-1)[0];m.splice(c,1),m.splice(0,0,i);const s=p===this.tabsFilteredAsVisibleList.length?p-1:p;u.splice(s,0,e),u.pop(),this.tabsFilteredAsVisibleList=u,this.tabsFilteredAsHiddenList=m;break}case k:{const t=m[c];m.splice(c,1),m.splice(p,0,t),this.tabsFilteredAsHiddenList=m,p===this.tabsFilteredAsHiddenList.length-1&&(null===(h=null===(d=this.hiddenTabsContainerElement)||void 0===d?void 0:d.children[this.hiddenTabsContainerElement.children.length-1])||void 0===h||h.remove());break}}if(this.compUniqueId){const t=[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],e=t.findIndex(t=>t.selected);this.storeSelectedTabIndex(e),this.tabsOrderPrefsArray=t.map(t=>t.name),localStorage.setItem(this.compUniqueId,this.tabsOrderPrefsArray.join(","))}}})}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){var e;if(-1===t)return;const i=this._selectedIndex;this._selectedIndex=t,i!==t&&(null===(e=this.tabs)||void 0===e?void 0:e.length)&&this.updateSelectedTab(t)}get isRtl(){return"rtl"===getComputedStyle(this).direction}generateOptions(){return{group:"shared",animation:10,swapThreshold:1,draggable:"md-tab",direction:this.direction,forceFallback:this.forceFallback,fallbackClass:this.fallbackClass,ghostClass:this.ghostClass,chosenClass:this.chosenClass,onEnd:this.handleOnDragEnd}}get currentTabsLayout(){return"horizontal"!==this.direction||this.scrollArrow?this.tabs:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList]}getCopyTabId(t){var e;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(S))?`${S}${t.id}`:t.id}getAriaControlId(t){var e,i;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(S))?`${S}${t.id}`:"tab_panel_"+(null===(i=t.id)||void 0===i?void 0:i.substring(4))}getTabIndex(t){var e,i;return this.isMoreTabMenuVisible&&0===this.getCurrentIndex(null==t?void 0:t.id)&&this.selected>(null===(e=this.tabsFilteredAsVisibleList)||void 0===e?void 0:e.length)-1||(null===(i=this.tabsFilteredAsVisibleList[this.selected])||void 0===i?void 0:i.id)===t.id?0:-1}getNormalizedTabId(t){return t.replace(S,"")}static get styles(){return[n.A,g.A]}ensureTabsUpdateComplete(t){return C(this,void 0,void 0,function*(){const e=t.map(t=>void 0!==t.updateComplete?t.updateComplete:null).filter(t=>null!==t);e.length&&(yield Promise.all(e))})}measureTabsOffsetWidth(){return this.justified||"vertical"===this.direction?this.tabs.map(t=>{t.setAttribute("measuringrealwidth","");const e=t.closable?t.offsetWidth+f.TAB_CROSS_WIDTH:t.offsetWidth;return t.removeAttribute("measuringrealwidth"),e}):this.tabs.map(t=>t.closable?t.offsetWidth+f.TAB_CROSS_WIDTH:t.offsetWidth)}updateIsMoreTabTruncated(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-menu-overlay__overflow-label");if(e){const t=e.scrollWidth>e.clientWidth;this.isMoreTabTruncated!=t&&(this.isMoreTabTruncated=t)}}measureHiddenTabsCopiesOffsetHeight(){return this.tabsCopy.map(t=>t.offsetHeight)}manageOverflow(){return C(this,void 0,void 0,function*(){var t,e;if("vertical"!==this.direction&&!this.scrollArrow){let i;i=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length?[...this.tabs]:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],i.forEach(t=>{var e,i,s,o,r,a;if((null===(e=t.children)||void 0===e?void 0:e.length)&&0===(null===(s=null===(i=t.children[0])||void 0===i?void 0:i.children)||void 0===s?void 0:s.length)){const e=null===(r=null===(o=null==t?void 0:t.querySelector("slot"))||void 0===o?void 0:o.assignedNodes({flatten:!0})[0])||void 0===r?void 0:r.cloneNode(!0);e&&(e.classList.add("tab-content"),null===(a=null==t?void 0:t.children[0])||void 0===a||a.appendChild(e))}});const s=i.length;if(this.tabsListElement&&s){const o=(null===(t=this.tabsSettingsElement)||void 0===t?void 0:t.offsetWidth)?this.tabsListElement.offsetWidth-(null===(e=this.tabsSettingsElement)||void 0===e?void 0:e.offsetWidth):this.tabsListElement.offsetWidth;yield this.ensureTabsUpdateComplete(this.tabs);const r=this.measureTabsOffsetWidth(),a=i.reduce((t,e,i)=>t+r[i],0);if(a){yield this.setupMoreTab();let t=!0;o<a&&(t=!1);const e=[];let n=0;i.forEach((i,a)=>{n+=r[a];const l=!t&&n+(a<s-1?this.moreTabMenuOffsetWidth:0)>o;e.push({isTabInViewportHidden:l,tabOffsetWidth:r[a]})}),this.tabsViewportDataList=e,this.tabsViewportDataList.forEach((t,e)=>this.tabs[e].viewportHidden=t.isTabInViewportHidden),this.isMoreTabMenuVisible=!!this.tabsViewportDataList.find(t=>t.isTabInViewportHidden),this.tabsFilteredAsVisibleList=i.filter((t,e)=>!this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsFilteredAsHiddenList=i.filter((t,e)=>this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})}}this.updateIsMoreTabMenuSelected();const o=this.tabsFilteredAsHiddenList.find(t=>!t.disabled);this.updateHiddenIdPositiveTabIndex(o)}})}updateIsMoreTabMenuSelected(){this.isMoreTabMenuSelected=!!this.tabsFilteredAsHiddenList.find(t=>t.selected)}updateHiddenIdPositiveTabIndex(t){this.tabHiddenIdPositiveTabIndex=t?t.id:void 0}sortTabsAndPanes(){if(!this.tabsOrderPrefsArray.length)return;const t=(t,e)=>{var i,s;const o=null!==(i=t.getAttribute("name"))&&void 0!==i?i:"",r=null!==(s=e.getAttribute("name"))&&void 0!==s?s:"";return this.tabsOrderPrefsArray.indexOf(o)-this.tabsOrderPrefsArray.indexOf(r)};this.tabs.sort(t),this.panels.sort(t)}linkPanelsAndTabs(){return C(this,void 0,void 0,function*(){this.sortTabsAndPanes();const{tabs:t,panels:e}=this;if(0===t.length||0===e.length)return void console.warn("The tabs or panels count should't be equal zero.");t.length!==e.length&&console.warn(`The amount of tabs (${t.length}) doesn't match the amount of panels (${e.length}).`);const i="vertical"===this.direction,s=this.selectedIndex<0?0:this.selectedIndex;t.forEach((t,o)=>{const r=(0,a.O)("tabs"),n="tab_"+r,l="tab_panel_"+r;t.setAttribute("id",n),t.setAttribute("aria-controls",l),t.selected=s===o,t.newMomentum=this.newMomentum,t.type=this.type,t.variant=this.variant,t.size=this.newMomentum?this.size:void 0,this.scrollArrow&&(t.visibleTab=!0),t.vertical!==i&&(t.vertical=i),t.viewportHidden&&(i||this.scrollArrow)&&(t.viewportHidden=!1);const d=e[o];d?(d.setAttribute("id",l),d.setAttribute("aria-labelledby",n),d.selected=s===o,t.disabled&&(d.hidden=!0,d.selected=!1)):t.disabled=!0});let o=s;for(;o<t.length&&t[o].disabled;)o++;o=o===t.length?0:o,t[o].selected=!0,e[o].selected=!0,this.tabsHash=this.tabs.reduce((t,e)=>(t[e.id]=e,t),{}),this.tabsIdxHash=this.tabs.reduce((t,e,i)=>(t[e.id]=i,t),{})})}get slotItem(){return this.tabSlotElement}filterSlotted(){return this.tabSlotElement.assignedElements()}handleResize(t){var e;null===(e=super.handleResize)||void 0===e||e.call(this,t),this.manageOverflow(),this.updateIsMoreTabTruncated(),this.scrollArrow&&this.updateArrowsVisibility()}getDragDirection(t){return t.from===this.visibleTabsContainerElement&&t.to===this.hiddenTabsContainerElement?$:t.from===this.visibleTabsContainerElement&&t.to===this.visibleTabsContainerElement?E:t.from===this.hiddenTabsContainerElement&&t.to===this.visibleTabsContainerElement?T:t.from===this.hiddenTabsContainerElement&&t.to===this.hiddenTabsContainerElement?k:void 0}makeTabCopyFocus(t){t&&t.focus()}handleTabClick(t){const{id:e}=t.detail;this.handleNewSelectedTab(e)}handleNewSelectedTab(t,e=!0){const i=this.tabsHash[this.getNormalizedTabId(t)];if(i&&!i.disabled){const t=this.tabsIdxHash[i.id];-1!==t&&this.updateSelectedTab(t,e);{const t=this.tabsCopyHash[this.getCopyTabId(i)];t&&e&&this.makeTabCopyFocus(t),this.updateHiddenIdPositiveTabIndex(i)}}}handleTabCrossClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseEvent(t){var e,i;const s=this.tabsHash[this.getNormalizedTabId(t)];if(s&&!s.disabled&&("auto"===s.closable||"custom"===s.closable)){const s=this.tabsFilteredAsVisibleList.findIndex(e=>this.getNormalizedTabId(e.id)===this.getNormalizedTabId(t));this.tabsFilteredAsVisibleList=this.tabsFilteredAsVisibleList.filter(e=>this.getNormalizedTabId(e.id)!==this.getNormalizedTabId(t)),null===(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t))||void 0===i||i.remove(),0!==this.tabsFilteredAsHiddenList.length&&(this.tabsFilteredAsVisibleList.push(this.tabsFilteredAsHiddenList[0]),this.tabsFilteredAsHiddenList.splice(0,1)),0===this.tabsFilteredAsHiddenList.length&&(this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1),this.handleUpdatedSeletedTabAfterCross(s)}}handleUpdatedSeletedTabAfterCross(t){var e;let i=t;for(;i<this.tabsFilteredAsVisibleList.length&&(null===(e=this.tabsFilteredAsVisibleList[i])||void 0===e?void 0:e.disabled);)i++;if(void 0===this.tabsFilteredAsVisibleList[i]||t===this.tabsFilteredAsVisibleList.length)for(i=t-1;i>=0&&this.tabsFilteredAsVisibleList[i].disabled;)i--;if(-1!==i){const t=this.tabs.findIndex(t=>t.id===this.tabsFilteredAsVisibleList[i].id);this.updateSelectedTab(t)}else this.updateSelectedTab(i);this.noTabsVisible=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length,this.requestUpdate()}setSelectedAttribute(t,e,i=!1){e&&(e.selected=i),t&&(t.selected=i,i&&(this.isMoreTabMenuSelected=this.isTabInMoreMenu(t)),this.isTabInMoreMenu(t)&&(this.isMoreTabMenuSelected=!0))}isTabInMoreMenu(t){return void 0!==this.tabsFilteredAsHiddenList.find(e=>e.id===t.id)}updateSelectedTab(t,e=!0){const{tabs:i,panels:s}=this,o=this.tabs.findIndex(t=>t.hasAttribute("selected"));if(i&&s&&(this.setSelectedAttribute((0,r.Qx)(i,o),(0,r.Qx)(s,o),!1),this.setSelectedAttribute((0,r.Qx)(i,t),(0,r.Qx)(s,t),!0)),t>=0&&t<i.length){this.dispatchSelectedChangedEvent(t);const s=this.currentTabsLayout.findIndex(e=>e.id===i[t].id);this.changeSelectedTabIdx(s,e)}}dispatchSelectedChangedEvent(t){const e=this.currentTabsLayout,i=this.tabs[t].id,s=e.findIndex(t=>t.id===i),o=[];e.forEach(t=>{o.push(t.name)}),this.dispatchEvent(new CustomEvent("selected-changed",{detail:{value:s,tabsOrder:o},composed:!0,bubbles:!0}))}changeSelectedTabIdx(t,e=!0){this.requestUpdate(),this.selected=t,this.updateComplete.then(()=>{var i,s;if(t<this.tabsFilteredAsVisibleList.length){if(e){const t=null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[this.selected];null==t||t.focus()}}else{const t=this.selected-this.tabsFilteredAsVisibleList.length,i=null===(s=this.hiddenTabsContainerElement)||void 0===s?void 0:s.children[t];e&&this.moveFocusToTab(i);const o=this.tabsFilteredAsHiddenList[t];(null==o?void 0:o.disabled)||this.updateHiddenIdPositiveTabIndex(o)}}),this.updateIsMoreTabMenuSelected(),this.storeSelectedTabIndex(t)}storeSelectedTabIndex(t){this.persistSelection&&this.tabsId&&t>-1&&""!==this.tabsId.trim()&&sessionStorage.setItem(this.tabsId,`${t}`)}getCurrentIndex(t){var e,i,s;if(this.scrollArrow){const e=this.tabs.length;for(let i=0;i<e;i++)if(this.tabs[i].id===t)return i}const o=null!==(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.children.length)&&void 0!==i?i:0;for(let e=0;e<o;e++)if((null===(s=this.visibleTabsContainerElement)||void 0===s?void 0:s.children[e].id)===t)return e;return this.tabsVisibleIdxHash[t]}moveFocusToAdjacentTab(t,e){var i,s,o;const r=this.getCurrentIndex(t),a=this.slotItem.assignedElements();let n=0;if(this.scrollArrow){e===A?n=0===r?a.length-1:r-1:e===I&&(n=r===a.length-1?0:r+1),this.moveFocusToTab(a[n]);const t=a[n],s=t.getBoundingClientRect(),o=null===(i=this.tabsListElement)||void 0===i?void 0:i.getBoundingClientRect();return o&&(s.left>=o.left&&s.right<=o.right&&s.top>=o.top&&s.bottom<=o.bottom||t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})),this.updateArrowsVisibility(),void(0,v.setTimeout)(()=>this.moveFocusToTab(a[n]),0)}const l=null===(s=this.visibleTabsContainerElement)||void 0===s?void 0:s.children,d=null!==(o=null==l?void 0:l.length)&&void 0!==o?o:0;l&&0!==d&&(e===A?n=0===r?d-1:r-1:e===I?n=r===d-1?0:r+1:e===L&&(n=this.selected>=d?0:this.selected),this.moveFocusToTab(l[n]))}moveFocusToTab(t){(0,v.setTimeout)(()=>null==t?void 0:t.focus(),0)}handleOverlayClose(){(0,v.setTimeout)(()=>{this.menuOverlayElement&&(this.menuOverlayElement.isOpen=!1)},0)}dispatchKeydownEvent(t,e){e&&this.dispatchEvent(new CustomEvent("tab-keydown",{detail:{id:e,key:t.code,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,srcEvent:t},bubbles:!0,composed:!0}))}handleTabKeydown(t){var e,i,o,r,a,n,l;const d=t.target;if(t.target!=this&&!this.tabs.find(t=>t.id===(null==d?void 0:d.id)))return!1;let h;if((null===(e=t.composedPath())||void 0===e?void 0:e.length)>0?h=t.composedPath()[0].id:t.originalTarget&&(h=t.originalTarget.id),!h)return;const c=this.getNormalizedTabId(h);this.dispatchKeydownEvent(t,c);const p=t.code,{shiftKey:u}=t,m=!!this.isMoreTabMenuVisible&&c===x,y=m&&this.isMoreTabMenuVisible?this.moreTabMenuElement:this.tabsHash[this.getNormalizedTabId(c)],b=!this.isMoreTabMenuVisible||y&&this.tabsVisibleIdxHash[y.id]>-1,v=!!this.isMoreTabMenuVisible&&y&&this.tabsHiddenIdxHash[y.id]>-1,g=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length-1:this.tabs.length-1,f=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length:-1,w=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length+this.tabsFilteredAsHiddenList.length-1:-1;switch(p){case s.Uz.Tab:m&&!this.isMoreTabMenuOpen&&u&&(t.preventDefault(),this.moveFocusToAdjacentTab(h,L));break;case s.Uz.End:m||(b?(t.preventDefault(),this.moveFocusToTab(null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[(null===(o=this.tabsFilteredAsVisibleList)||void 0===o?void 0:o.length)-1])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(r=this.hiddenTabsContainerElement)||void 0===r?void 0:r.children[(null===(a=this.tabsFilteredAsHiddenList)||void 0===a?void 0:a.length)-1])));break;case s.Uz.Home:b?(t.preventDefault(),this.moveFocusToTab(null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.children[0])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(l=this.hiddenTabsContainerElement)||void 0===l?void 0:l.children[0]));break;case s.Uz.ArrowLeft:m||(b||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(h,this.isRtl?I:A));break;case s.Uz.ArrowRight:m||(b||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(h,this.isRtl?A:I));break;case s.Uz.ArrowUp:if(m);else if(b&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(0===this.selected?g:this.selected-1);else if(v){t.preventDefault();const e=this.selected===f?w:this.selected-1;this.changeSelectedTabIdx(e)}break;case s.Uz.ArrowDown:if(m);else if(b&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(this.selected===g?0:this.selected+1);else if(v){t.preventDefault();const e=this.selected===w?f:this.selected+1;this.changeSelectedTabIdx(e)}break;case s.Uz.Enter:case s.Uz.NumpadEnter:case s.Uz.Space:if(m){const t=this.tabsFilteredAsHiddenList.filter(t=>!t.disabled),e=t.length?t.find(t=>t.selected)||t[0]:void 0;if(this.updateHiddenIdPositiveTabIndex(e),e){const t=this.tabsIdxHash[this.getNormalizedTabId(e.id)];-1!==t&&this.updateSelectedTab(t)}}else if(y&&!y.disabled){const e=this.tabsIdxHash[this.getNormalizedTabId(y.id)];-1!==e&&(t.preventDefault(),this.updateSelectedTab(e))}}}setupTabsEvents(){this.addEventListener("tab-click",this.handleTabClick),this.addEventListener("tab-cross-click",this.handleTabCrossClick),this.addEventListener("tab-close-click",this.handleTabCloseClick),this.addEventListener("keydown",this.handleTabKeydown),this.addEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}teardownTabsEvents(){this.removeEventListener("tab-click",this.handleTabClick),this.removeEventListener("tab-cross-click",this.handleTabCrossClick),this.removeEventListener("tab-close-click",this.handleTabCloseClick),this.removeEventListener("keydown",this.handleTabKeydown),this.removeEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}clearTabOrderPrefs(t){const{compUniqueId:e}=t.detail;e===this.compUniqueId&&(localStorage.removeItem(this.tabsId),sessionStorage.removeItem(this.tabsId),localStorage.removeItem(this.compUniqueId),this.tabsOrderPrefsArray=this.defaultTabsOrderArray,this.selected=0,this.initializeTabs(),this.dispatchSelectedChangedEvent(0))}setupPanelsAndTabs(){this.tabSlotElement&&(this.tabs=this.tabSlotElement.assignedElements()),this.panelSlotElement&&(this.panels=this.panelSlotElement.assignedElements()),this.defaultTabsOrderArray=this.tabs.map(t=>t.name)}setupMoreTab(){return C(this,void 0,void 0,function*(){"vertical"!==this.direction&&this.moreTabMenuElement&&!this.isMoreTabMenuMeasured&&(this.moreTabMenuElement.classList.add("md-menu-overlay__more_tab--measuring"),yield this.moreTabMenuElement.updateComplete,this.moreTabMenuElement.offsetWidth&&(this.moreTabMenuOffsetWidth=this.moreTabMenuElement.offsetWidth,this.isMoreTabMenuMeasured=!0),this.moreTabMenuElement.classList.remove("md-menu-overlay__more_tab--measuring"))})}initializeSortable(){this.visibleTabsContainerElement&&this.hiddenTabsContainerElement&&(this.visibleTabsSortableInstance=b().create(this.visibleTabsContainerElement,this.generateOptions()),this.hiddenTabsSortableInstance=b().create(this.hiddenTabsContainerElement,this.generateOptions()))}initializeTabs(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),this.manageOverflow()}connectedCallback(){var t;if(super.connectedCallback(),this.setupTabsEvents(),this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=localStorage.getItem(this.tabsId);this.selected=t&&parseInt(t)>-1?parseInt(t):this.selected}this.compUniqueId&&(this.tabsOrderPrefsArray=(null===(t=localStorage.getItem(this.compUniqueId))||void 0===t?void 0:t.split(","))||[])}selectTabFromStorage(){if(this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=sessionStorage.getItem(this.tabsId);let e=0;if(t){const i=parseInt(t);e=i>-1?i:this.selected}const i=this.currentTabsLayout;i.length&&i[e].id?(this._selectedIndex=e,this.handleNewSelectedTab(i[e].id,!1)):this.selected=e}}disconnectedCallback(){super.disconnectedCallback(),this.teardownTabsEvents()}firstUpdated(t){var e;super.firstUpdated(t),this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.selectTabFromStorage(),this.scrollArrow&&(this.updateArrowsVisibility(),null===(e=this.tabsListElement)||void 0===e||e.addEventListener("scroll",this.updateArrowsVisibility))}onDirectionChanged(){return C(this,void 0,void 0,function*(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),yield this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),"horizontal"===this.direction&&(yield this.manageOverflow()),this.selectTabFromStorage(),this.scrollArrow&&this.updateArrowsVisibility()})}willUpdate(t){var e,i;if(null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("selectedIndex")&&(this.selected=this.selectedIndex),t.has("tabsFilteredAsHiddenList")&&(this.tabsCopy=Array.from((null===(i=this.tabsCopyHiddenListElements)||void 0===i?void 0:i.values())||[]),this.tabsCopyHash=this.tabsCopy.reduce((t,e)=>(t[e.id]=e,t),{})),(t.has("tabsFilteredAsVisibleList")||t.has("tabsFilteredAsHiddenList"))&&(this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})),t.has("isMoreTabMenuOpen")&&this.isMoreTabMenuVisible){const e=t.get("isMoreTabMenuOpen");this.isMoreTabMenuOpen&&!e&&(this.moreItemsScrollLimit<this.tabsCopy.length?(this.isMoreTabMenuScrollable=!0,this.moreTabMenuMaxHeight=`${this.measureHiddenTabsCopiesOffsetHeight().slice(0,this.moreItemsScrollLimit).reduce((t,e)=>t+e,0)}px`):(this.isMoreTabMenuScrollable=!1,this.moreTabMenuMaxHeight=null))}}updated(t){super.updated(t),t.has("direction")&&t.get("direction")!==this.direction&&this.onDirectionChanged(),t.has("slotted")&&this.initializeTabs(),!this.draggable||this.visibleTabsSortableInstance||this.hiddenTabsSortableInstance||this.initializeSortable(),t.has("tabsId")&&this.selectTabFromStorage(),t.has("selectedIndex")&&this.updateSelectedTab(this.selectedIndex,!1),t.has("overflowLabel")&&this.updateIsMoreTabTruncated(),t.has("scrollArrow")&&this.onDirectionChanged()}scrollTabs(t){if(!this.tabsListElement||"vertical"===this.direction)return;const e="left"===t?-100:100;this.tabsListElement.scrollBy({left:e,behavior:"smooth"}),(0,v.setTimeout)(()=>this.updateArrowsVisibility(),300)}get moreMenuButtonTemplate(){return l.html`
|
|
1403
1325
|
<md-tab
|
|
1404
1326
|
slot="menu-trigger"
|
|
1405
1327
|
id="${x}"
|
|
@@ -1691,7 +1613,7 @@
|
|
|
1691
1613
|
<slot name="custom-right-content" part="chip-right"> </slot>
|
|
1692
1614
|
</span>
|
|
1693
1615
|
</md-tooltip>
|
|
1694
|
-
`}};p([(0,l.property)({type:String})],e.prototype,"color",void 0),p([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),p([(0,l.property)({type:String})],e.prototype,"textColor",void 0),p([(0,l.property)({type:String})],e.prototype,"height",void 0),p([(0,l.property)({type:String})],e.prototype,"icon",void 0),p([(0,l.property)({type:String})],e.prototype,"iconColor",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSize",void 0),p([(0,l.property)({type:String})],e.prototype,"role",void 0),p([(0,l.property)({type:String,reflect:!0})],e.prototype,"id",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"readonly",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Number})],e.prototype,"determinateProgress",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipText",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipPlacement",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSet",void 0),p([(0,l.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"decorative",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"shouldTruncateValue",void 0),p([(0,l.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),p([(0,l.state)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),p([(0,l.state)()],e.prototype,"renderedText",void 0),e=p([(0,r.w)("md-chip")],e),t.ELEMENT=e}(s||(s={}))},60554:t=>{t.exports=a},61200:(t,e,i)=>{i.d(e,{Icon:()=>s}),i(96798);var s,o=i(31890),r=i(4313),a=i(32022),n=i.n(a),l=i(60554),d=i.n(l),h=i(87161),c=i(70429),p=i(85125),u=i(20291),m=i(10318),y=i(57955),b=i(24480),v=i(81786),g=i(9223),f=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){var e;let i=e=class extends h.LitElement{constructor(){super(...arguments),this.color="",this.description="",this.name="",this.id="",this.size="",this.title="",this.ariaHidden=null,this.type="",this.isActive=!1,this.isComboBoxIcon=!1,this.sizeOverrided=!1,this.iconSet="momentumUI",this.svgIcon=null,this._ariaLabel="",this.consoleHandler=(t,e)=>{switch(t){case"color-warn":console.warn(`[@momentum-ui/web-component] Icon: ${e} may not exist in the design system, please use a color name from https://momentum.design/styles/color/style`);break;case"name-error":console.warn(`[@momentum-ui/web-component] Icon: Icon ${e} does not exist in the design system. Visit https://momentum.design/icons for a list of available icons or to request a new icon.`)}}}isSvgAlreadyLoaded(t){var e,i;return!!this.svgIcon&&(null===(i=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"))||void 0===i?void 0:i.includes(t))}loadSvgIcon(t){return e=this,i=void 0,o=function*(){var e,i;if(this.isSvgAlreadyLoaded(t))return;const s="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,g.Jp)(this.computedSvgPath,t,"svg"):yield(0,g.D6)(t);s&&(this.svgIcon=s,null===(e=this.svgIcon)||void 0===e||e.setAttribute("class",`icon ${t}`),null===(i=this.svgIcon)||void 0===i||i.setAttribute("part","icon"),this.setSvgIconAttributes()
|
|
1616
|
+
`}};p([(0,l.property)({type:String})],e.prototype,"color",void 0),p([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),p([(0,l.property)({type:String})],e.prototype,"textColor",void 0),p([(0,l.property)({type:String})],e.prototype,"height",void 0),p([(0,l.property)({type:String})],e.prototype,"icon",void 0),p([(0,l.property)({type:String})],e.prototype,"iconColor",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSize",void 0),p([(0,l.property)({type:String})],e.prototype,"role",void 0),p([(0,l.property)({type:String,reflect:!0})],e.prototype,"id",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"readonly",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Number})],e.prototype,"determinateProgress",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipText",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipPlacement",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSet",void 0),p([(0,l.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"decorative",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"shouldTruncateValue",void 0),p([(0,l.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),p([(0,l.state)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),p([(0,l.state)()],e.prototype,"renderedText",void 0),e=p([(0,r.w)("md-chip")],e),t.ELEMENT=e}(s||(s={}))},60554:t=>{t.exports=a},61200:(t,e,i)=>{i.d(e,{Icon:()=>s}),i(96798);var s,o=i(31890),r=i(4313),a=i(32022),n=i.n(a),l=i(60554),d=i.n(l),h=i(87161),c=i(70429),p=i(85125),u=i(20291),m=i(10318),y=i(57955),b=i(24480),v=i(81786),g=i(9223),f=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){var e;let i=e=class extends h.LitElement{constructor(){super(...arguments),this.color="",this.description="",this.name="",this.id="",this.size="",this.title="",this.ariaHidden=null,this.type="",this.isActive=!1,this.isComboBoxIcon=!1,this.sizeOverrided=!1,this.iconSet="momentumUI",this.svgIcon=null,this._ariaLabel="",this.consoleHandler=(t,e)=>{switch(t){case"color-warn":console.warn(`[@momentum-ui/web-component] Icon: ${e} may not exist in the design system, please use a color name from https://momentum.design/styles/color/style`);break;case"name-error":console.warn(`[@momentum-ui/web-component] Icon: Icon ${e} does not exist in the design system. Visit https://momentum.design/icons for a list of available icons or to request a new icon.`)}}}isSvgAlreadyLoaded(t){var e,i;return!!this.svgIcon&&(null===(i=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"))||void 0===i?void 0:i.includes(t))}loadSvgIcon(t){return e=this,i=void 0,o=function*(){var e,i;if(this.isSvgAlreadyLoaded(t))return;const s="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,g.Jp)(this.computedSvgPath,t,"svg"):yield(0,g.D6)(t);s&&(this.svgIcon=s,null===(e=this.svgIcon)||void 0===e||e.setAttribute("class",`icon ${t}`),null===(i=this.svgIcon)||void 0===i||i.setAttribute("part","icon"),this.setSvgIconAttributes())},new((s=void 0)||(s=Promise))(function(t,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof s?i:new s(function(t){t(i)})).then(a,n)}l((o=o.apply(e,i||[])).next())});var e,i,s,o}setSvgIconAttributes(){this.svgIcon&&(this.iconFontSize&&this.svgIcon.setAttribute("width",`${this.iconFontSize}px`),this.iconFontSize&&this.svgIcon.setAttribute("height",`${this.iconFontSize}px`),this.color?this.svgIcon.setAttribute("fill",this.iconColor):this.svgIcon.setAttribute("fill","currentColor"))}get computedSvgPath(){return this.svgUrl?this.svgUrl:v.O.svgIconUrl}getIsMomentumDesignName(t){return t.endsWith("-filled")||t.endsWith("-light")||t.endsWith("-regular")||t.endsWith("-bold")}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)return this.name;if("preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name))return this.name;const t=this.momentumUIIconLookupName,i=e.designLookup.get(t);return null!=i?i:t}updated(t){if(super.updated(t),this.doesIconSetSupportSVG)if(t.has("name")||t.has("iconSet")){const t=this.svgIconName;t&&"Unknown"!==t&&this.loadSvgIcon(t)}else(t.has("iconFontSize")||t.has("color"))&&this.setSvgIconAttributes()}get ariaLabel(){return this._ariaLabel?this._ariaLabel:this.title&&this.description?`${this.title} ${this.description}`:this.title?this.title:this.description?this.description:"icon"}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.requestUpdate("ariaLabel",e)}get buttonClassMap(){return{[`md-button--icon-${this.type}`]:!!this.type}}get iconFontSize(){const t=this.name.split("_")[1];return this.size||t||16}get iconColor(){return this.color.startsWith("#")?(this.consoleHandler("color-warn",this.color),this.color):this.color.startsWith("var(")?this.color:d()(this.color)}get iconClassMap(){return{"md-combobox-input__icon":this.isComboBoxIcon,"md-combobox-input__icon--active":this.isComboBoxIcon&&this.isActive,[`${this.iconName}`]:!!this.iconName}}get momentumUIIconLookupName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t=t.split("_")[0],t}getIconName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t}handleSizeOverride(t){return`${t.split("_")[0]}_${this.iconFontSize}`}get iconName(){const t=this.getIconName();return this.sizeOverrided?this.handleSizeOverride(t):"preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name)?"":n().includes(t)||""===t?`icon-${t}`:this.consoleHandler("name-error",t)}get iconStyleMap(){return Object.assign(Object.assign({},this.iconFontSize&&{"font-size":`${this.iconFontSize}px`}),this.color&&{color:this.iconColor})}static get styles(){return[r.A,b.A]}handleIconClick(t){this.dispatchEvent(new CustomEvent("icon-click",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get doesIconSetSupportSVG(){return"momentumDesign"===this.iconSet||"preferMomentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}get isSVGRender(){return this.svgIcon&&"preferMomentumDesign"===this.iconSet||"momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}render(){return this.isSVGRender?this.renderSVGIcon():this.renderFontIcon()}renderFontIcon(){var t;return h.html`
|
|
1695
1617
|
<i
|
|
1696
1618
|
part="icon"
|
|
1697
1619
|
id=${this.id}
|
|
@@ -1816,7 +1738,7 @@
|
|
|
1816
1738
|
</div>
|
|
1817
1739
|
`}connectedCallback(){var t,e,i;super.connectedCallback(),this.viewAnchorDate=(null===(t=this.datePickerProps)||void 0===t?void 0:t.focused)||(null===(e=this.datePickerProps)||void 0===e?void 0:e.selected)||(0,r.tB)(),this.localeMonth=(0,r.WV)(this.viewAnchorDate,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en").toFormat(this.monthFormat)}updated(t){var e,i,s,o,a;super.updated(t),t.has("datePickerProps")&&(null===(null===(e=this.datePickerProps)||void 0===e?void 0:e.selected.invalidReason)&&(this.viewAnchorDate=this.datePickerProps.selected||(0,r.tB)()),this.localeMonth=((null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)?(0,r.WV)(this.viewAnchorDate,null===(s=this.datePickerProps)||void 0===s?void 0:s.locale):this.viewAnchorDate).toFormat(this.monthFormat)),t.has("viewAnchorDate")&&(this.localeMonth=((null===(o=this.datePickerProps)||void 0===o?void 0:o.locale)?(0,r.WV)(this.viewAnchorDate,null===(a=this.datePickerProps)||void 0===a?void 0:a.locale):this.viewAnchorDate).toFormat(this.monthFormat))}getWeekDayName(t,e){return this.shortDay?(0,r.XY)(t,e):(0,r.DY)(t,e)}static get styles(){return[a.A,d.A]}render(){return n.html`
|
|
1818
1740
|
<div class="md-datepicker__calendar" id="Datepicker-Calendar">${this.viewAnchorDate&&this.renderMonth()}</div>
|
|
1819
|
-
`}};h([(0,l.property)({attribute:!1})],e.prototype,"monthFormat",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"filterParams",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"handleMonthChange",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"datePickerProps",void 0),h([(0,l.property)({type:Boolean,reflect:!0,attribute:"short-day"})],e.prototype,"shortDay",void 0),h([(0,l.state)()],e.prototype,"viewAnchorDate",void 0),h([(0,l.state)()],e.prototype,"localeMonth",void 0),e=h([(0,o.w)("md-datepicker-calendar")],e),t.ELEMENT=e}(s||(s={}))},63704:(t,e,i)=>{i.d(e,{Badge:()=>s});var s,o=i(31890),r=i(4313),a=i(87161),n=i(
|
|
1741
|
+
`}};h([(0,l.property)({attribute:!1})],e.prototype,"monthFormat",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"filterParams",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"handleMonthChange",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"datePickerProps",void 0),h([(0,l.property)({type:Boolean,reflect:!0,attribute:"short-day"})],e.prototype,"shortDay",void 0),h([(0,l.state)()],e.prototype,"viewAnchorDate",void 0),h([(0,l.state)()],e.prototype,"localeMonth",void 0),e=h([(0,o.w)("md-datepicker-calendar")],e),t.ELEMENT=e}(s||(s={}))},63704:(t,e,i)=>{i.d(e,{Badge:()=>s});var s,o=i(31890),r=i(4313),a=i(87161),n=i(70429),l=i(85125),d=i(20291),h=i(15427),c=i(49480),p=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.ariaLabel="",this.color="",this.bgColor="",this.textColor="",this.height="",this.width="",this.outlined=!1,this.compact=!1,this.circle=!1,this.circleSize=h.zj[40],this.small=!1,this.split=!1,this.disabled=!1,this.tabIndexing="",this.ariaHiddenSplits="",this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:a.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:a.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:a.nothing,this.renderWidth=()=>this.width?`width: ${this.width};`:a.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height||this.width?a.html`
|
|
1820
1742
|
<style>
|
|
1821
1743
|
:host .md-badge {
|
|
1822
1744
|
${this.renderBgColor()};
|
|
@@ -1825,30 +1747,30 @@
|
|
|
1825
1747
|
${this.renderWidth()};
|
|
1826
1748
|
}
|
|
1827
1749
|
</style>
|
|
1828
|
-
`:
|
|
1750
|
+
`:a.nothing}static get styles(){return[r.A,c.A]}get computedAriaHiddenSplits(){return"true"===this.ariaHiddenSplits||"false"!==this.ariaHiddenSplits&&void 0}get computedTabIndex(){const t=parseInt(this.tabIndexing);return isNaN(t)?void 0:t}render(){const t={"md-badge--circle":this.circle,[`md-badge--circle-${this.circleSize}`]:this.circle,"md-badge--split":this.split,"md-badge--compact":this.compact,"md-badge--small":this.small||24===this.size,[`md-badge--size-${this.size}`]:!!this.size&&24!==this.size,"md-badge--outline":this.outlined,"md-badge--disabled":this.disabled,[`md-badge--${this.color}`]:!this.disabled&&this.color};return a.html`
|
|
1829
1751
|
${this.getStyles()}
|
|
1830
1752
|
<span
|
|
1831
|
-
tabindex=${(0,
|
|
1753
|
+
tabindex=${(0,d.ifDefined)(this.computedTabIndex)}
|
|
1832
1754
|
part="badge"
|
|
1833
|
-
class="md-badge ${(0,
|
|
1755
|
+
class="md-badge ${(0,l.classMap)(t)}"
|
|
1834
1756
|
aria-label=${this.ariaLabel}
|
|
1835
1757
|
>
|
|
1836
1758
|
${this.split?(()=>a.html`
|
|
1837
1759
|
<slot
|
|
1838
|
-
aria-hidden=${(0,
|
|
1760
|
+
aria-hidden=${(0,d.ifDefined)(this.computedAriaHiddenSplits)}
|
|
1839
1761
|
name="split-left"
|
|
1840
1762
|
class="split split-left"
|
|
1841
1763
|
></slot>
|
|
1842
1764
|
<span aria-hidden="true" class="split-separator"> | </span>
|
|
1843
1765
|
<slot
|
|
1844
|
-
aria-hidden=${(0,
|
|
1766
|
+
aria-hidden=${(0,d.ifDefined)(this.computedAriaHiddenSplits)}
|
|
1845
1767
|
name="split-right"
|
|
1846
1768
|
class="split split-right"
|
|
1847
1769
|
></slot>
|
|
1848
|
-
`)():
|
|
1770
|
+
`)():a.nothing}
|
|
1849
1771
|
<slot></slot>
|
|
1850
1772
|
</span>
|
|
1851
|
-
`}};
|
|
1773
|
+
`}};p([(0,n.property)({type:String})],e.prototype,"ariaLabel",void 0),p([(0,n.property)({type:String})],e.prototype,"color",void 0),p([(0,n.property)({type:String})],e.prototype,"bgColor",void 0),p([(0,n.property)({type:String})],e.prototype,"textColor",void 0),p([(0,n.property)({type:String})],e.prototype,"height",void 0),p([(0,n.property)({type:String})],e.prototype,"width",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"outlined",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"compact",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"circle",void 0),p([(0,n.property)({type:Number,attribute:"circle-size"})],e.prototype,"circleSize",void 0),p([(0,n.property)({type:Number})],e.prototype,"size",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"small",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"split",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"disabled",void 0),p([(0,n.property)({type:String})],e.prototype,"tabIndexing",void 0),p([(0,n.property)({type:String})],e.prototype,"ariaHiddenSplits",void 0),e=p([(0,o.w)("md-badge")],e),t.ELEMENT=e}(s||(s={}))},64311:(t,e,i)=>{i.d(e,{CardAi:()=>o}),i(96798),i(61200);var s,o,r=i(31890),a=i(4313),n=i(87161),l=i(70429),d=i(85125),h=i(68148),c=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){t.USER_QUERY="user_query",t.RESPONSE="response"}(s||(s={})),function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.id="",this.title="",this.cardText="",this.timestamp="",this.summariseMoreVisible=!1,this.variant=s.RESPONSE,this.copyChecked=!1,this.thumbsUpChecked=!1,this.thumbsDownChecked=!1}static get styles(){return[a.A,h.A]}thumbsUpToggled(){this.thumbsDownChecked=!1,this.thumbsUpChecked=!this.thumbsUpChecked,this.dispatchEvent(new CustomEvent("thumbs-up-toggled",{detail:{id:this.id},bubbles:!0,composed:!0}))}thumbsDownToggled(){this.thumbsUpChecked=!1,this.thumbsDownChecked=!this.thumbsDownChecked,this.dispatchEvent(new CustomEvent("thumbs-down-toggled",{detail:{id:this.id},bubbles:!0,composed:!0}))}summariseMoreToggled(){this.dispatchEvent(new CustomEvent("summarise-more-toggled",{detail:{id:this.id},bubbles:!0,composed:!0}))}copyToggled(){navigator.clipboard.writeText(this.cardText),this.copyChecked=!0,setTimeout(()=>{this.copyChecked=!1},2e3)}get bottomBorderRadiusClass(){return this.timestamp?"with-bottom-border-radius":"no-bottom-border-radius"}get cardTextClassMap(){return{"md-card-ai-card-body-user-query":this.variant===s.USER_QUERY,[`md-card-ai-card-body-response-${this.bottomBorderRadiusClass}`]:this.variant===s.RESPONSE}}renderHeader(){return this.variant===s.RESPONSE&&""!==this.title?n.html`
|
|
1852
1774
|
<div class="md-card-ai-header">
|
|
1853
1775
|
<slot name="card-header-aside">
|
|
1854
1776
|
<md-icon name="cisco-ai-assistant-color-gradient" iconSet="momentumBrandVisuals"></md-icon>
|
|
@@ -1959,23 +1881,101 @@
|
|
|
1959
1881
|
<span class=${(0,l.classMap)(this.loadingIconClassMap)}></span>
|
|
1960
1882
|
<span class=${(0,l.classMap)(this.loadingIconClassMap)}></span>
|
|
1961
1883
|
</div>
|
|
1962
|
-
`}};h([(0,n.property)({type:String})],e.prototype,"size",void 0),e=h([(0,o.w)("md-loading")],e),t.ELEMENT=e}(s||(s={}))},70429:t=>{t.exports=e},71128:(t,e,i)=>{i.d(e,{Popover:()=>f,PopoverController:()=>g}),i(96798),i(61200);var s=i(31890),o=i(28373),r=i(66677),a=i(5784),n=i(87161),l=i(36752),d=i(54765),h=i(70429),c=i(68419),p=i(36365),u=i(3998),m=i(33759),y=i(86210),b=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},v=function(t,e,i,s){return new(i||(i=Promise))(function(o,r){function a(t){try{l(s.next(t))}catch(t){r(t)}}function n(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((s=s.apply(t,e||[])).next())})};class g{show(t){}hide(){}toggle(){}isVisible(){return!1}}let f=class extends((0,o.d)(n.LitElement)){set controller(t){t?(t.show=(t=!1)=>this.showPopover(t),t.hide=()=>this.hidePopover(),t.toggle=()=>this.togglePopoverVisible(),t.isVisible=()=>this.visible,this._controller=t):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=c.zY.TRIGGER,this.placement=c.zY.PLACEMENT,this.strategy=c.zY.STRATEGY,this.color=c.zY.COLOR,this.visible=c.zY.VISIBLE,this.offset=c.zY.OFFSET,this.focusTrap=c.zY.FOCUS_TRAP,this.preventScroll=c.zY.PREVENT_SCROLL,this.showArrow=c.zY.ARROW,this.closeButton=c.zY.CLOSE_BUTTON,this.interactive=c.zY.INTERACTIVE,this.delay=c.zY.DELAY,this.hideOnEscape=c.zY.HIDE_ON_ESCAPE,this.hideOnBlur=c.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=c.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=c.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=c.zY.FOCUS_BACK,this.backdrop=c.zY.BACKDROP,this.flip=c.zY.FLIP,this.size=c.zY.SIZE,this.zIndex=c.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=c.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=c.zY.DISABLE_ARIA_EXPANDED,this.animationFrame=c.zY.ANIMATION_FRAME,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=t=>{const e=t.composedPath();this.triggerElement&&e.includes(this.triggerElement)||e.includes(this)||u.S.shouldDeferToTopForOutsideClick(this)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.onEscapeKeydown=t=>{this.visible&&"Escape"===t.code&&(t.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=t=>{const e=t.relatedTarget;!e||this.isElementInPopover(e)?e||setTimeout(()=>{const t=(0,r.dw)();this.isElementInPopover(t)||this.hidePopover()},0):this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(t=!1)=>{this.cancelCloseDelay(),t&&this.openDelay>0?setTimeout(()=>{this.utils.handleAppendTo(!0),this.visible=!0},this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{u.S.peek()===this&&setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&(this.visible||(this.previousActiveElement=(0,r.dw)()),this.showPopover(!0))},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=t=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(t)||this.togglePopoverVisible()},this.utils=new m.h(this),this.preventClickOutside=!0}firstUpdated(t){const e=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return v(this,void 0,void 0,function*(){e.firstUpdated.call(this,t),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,p.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())})}disconnectedCallback(){const t=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return v(this,void 0,void 0,function*(){t.disconnectedCallback.call(this),this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=null,this.removeEventListeners(),p.T.onDestroyedPopover(this),u.S.remove(this)})}setupTriggerListener(){if(!this.triggerID)return;const t=this.getRootNode();if(this.triggerElement=(0,r.qi)(`[id="${this.triggerID}"]`,t),!this.triggerElement){const e=null==t?void 0:t.host;if(e){const t=e.querySelector("[slot]");(null==t?void 0:t.id)===this.triggerID&&(this.triggerElement=t)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==t||t.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==t||t.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(t){const e=Object.create(null,{updated:{get:()=>super.updated}});return v(this,void 0,void 0,function*(){if(e.updated.call(this,t),t.has("visible")){const e=t.get("visible")||!1;yield this.isOpenUpdated(e,this.visible),this.utils.updateAriaExpandedAttribute()}if(t.has("placement")&&this.setAttribute("placement",Object.values(c.ME).includes(this.placement)?this.placement:c.zY.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("trigger")){const t=this.trigger.split(" ").filter(t=>Object.values(c.tr).includes(t));this.setAttribute("trigger",t.length>0?this.trigger:c.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}t.has("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),t.has("color")&&this.setAttribute("color",Object.values(c.o$).includes(this.color)?this.color:c.zY.COLOR),t.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.setupAccessibility(),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),t.has("interactive")&&this.utils.updateAriaHasPopupAttribute()})}isElementInPopover(t){return!!t&&(!!this.contains(t)||(0,r.QZ)("md-popover",t)===this)}isOpenUpdated(t,e){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:t=>super.preventScroll=t}});return v(this,void 0,void 0,function*(){var s,o,r,a;if(t!==e&&this.triggerElement)if(e)u.S.peek()!==this&&u.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(s=this.activateFocusTrap)||void 0===s||s.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),p.T.onShowPopover(this);else{if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),u.S.removeItem(this),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(r=this.deactivateFocusTrap)||void 0===r||r.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const t=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==t&&"alertdialog"!==t||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(a=this.setFocusOnDeepestNestedElement)||void 0===a||a.call(this,this.triggerElement)),this.previousActiveElement=null,p.T.onHidePopover(this)}})}isRectOverTrigger(t,e){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return!1}isMouseOverTrigger(t){const{clientX:e,clientY:i}=t instanceof MouseEvent?t:{clientX:0,clientY:0};return this.isRectOverTrigger(e,i)}handleCreatePopoverFirstUpdate(){return v(this,void 0,void 0,function*(){var t,e;this.visible&&this.interactive&&(null===(t=this.setFocusableElements)||void 0===t||t.call(this),yield this.updateComplete,null===(e=this.setInitialFocus)||void 0===e||e.call(this))})}positionPopover(){if(!this.triggerElement)return;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);const t=[(0,a.shift)()];let e=this.offset;if(this.flip&&t.push((0,a.flip)()),this.size){const e=this.renderRoot.querySelector('[part="popover-content"]');t.push((0,a.size)({apply({availableHeight:t}){e&&Object.assign(e.style,{maxHeight:`${t}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;e=Math.sqrt(2*i**2)/2+this.offset,t.push((0,a.arrow)({element:this.arrowElement,padding:12}))}t.push((0,a.offset)(e)),this.cleanupAutoUpdate=(0,a.autoUpdate)(this.triggerElement,this,()=>v(this,void 0,void 0,function*(){if(!this.triggerElement)return;const{x:e,y:i,middlewareData:s,placement:o}=yield(0,a.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:t,strategy:this.strategy});this.utils.updatePopoverStyle(e,i),s.arrow&&this.arrowElement&&this.utils.updateArrowStyle(s.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}),{animationFrame:this.animationFrame})}render(){return n.html`
|
|
1884
|
+
`}};h([(0,n.property)({type:String})],e.prototype,"size",void 0),e=h([(0,o.w)("md-loading")],e),t.ELEMENT=e}(s||(s={}))},70429:t=>{t.exports=e},71128:(t,e,i)=>{i.d(e,{Popover:()=>g,PopoverController:()=>v}),i(96798),i(61200);var s=i(31890),o=i(28373),r=i(66677),a=i(5784),n=i(87161),l=i(70429),d=i(20291),h=i(68419),c=i(36365),p=i(3998),u=i(33759),m=i(86210),y=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},b=function(t,e,i,s){return new(i||(i=Promise))(function(o,r){function a(t){try{l(s.next(t))}catch(t){r(t)}}function n(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((s=s.apply(t,e||[])).next())})};class v{show(t){}hide(){}toggle(){}isVisible(){return!1}}let g=class extends((0,o.d)(n.LitElement)){set controller(t){t?(t.show=(t=!1)=>this.showPopover(t),t.hide=()=>this.hidePopover(),t.toggle=()=>this.togglePopoverVisible(),t.isVisible=()=>this.visible,this._controller=t):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=h.zY.TRIGGER,this.placement=h.zY.PLACEMENT,this.strategy=h.zY.STRATEGY,this.color=h.zY.COLOR,this.visible=h.zY.VISIBLE,this.offset=h.zY.OFFSET,this.focusTrap=h.zY.FOCUS_TRAP,this.preventScroll=h.zY.PREVENT_SCROLL,this.showArrow=h.zY.ARROW,this.closeButton=h.zY.CLOSE_BUTTON,this.interactive=h.zY.INTERACTIVE,this.delay=h.zY.DELAY,this.hideOnEscape=h.zY.HIDE_ON_ESCAPE,this.hideOnBlur=h.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=h.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=h.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=h.zY.FOCUS_BACK,this.backdrop=h.zY.BACKDROP,this.flip=h.zY.FLIP,this.size=h.zY.SIZE,this.zIndex=h.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=h.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=h.zY.DISABLE_ARIA_EXPANDED,this.animationFrame=h.zY.ANIMATION_FRAME,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=t=>{const e=t.composedPath();this.triggerElement&&e.includes(this.triggerElement)||e.includes(this)||p.S.shouldDeferToTopForOutsideClick(this)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.onEscapeKeydown=t=>{this.visible&&"Escape"===t.code&&(t.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=t=>{const e=t.relatedTarget;!e||this.isElementInPopover(e)?e||setTimeout(()=>{const t=(0,r.dw)();this.isElementInPopover(t)||this.hidePopover()},0):this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(t=!1)=>{this.cancelCloseDelay(),t&&this.openDelay>0?setTimeout(()=>{this.utils.handleAppendTo(!0),this.visible=!0},this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{p.S.peek()===this&&setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&(this.visible||(this.previousActiveElement=(0,r.dw)()),this.showPopover(!0))},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=t=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(t)||this.togglePopoverVisible()},this.utils=new u.h(this),this.preventClickOutside=!0}firstUpdated(t){const e=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return b(this,void 0,void 0,function*(){e.firstUpdated.call(this,t),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,c.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())})}disconnectedCallback(){const t=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return b(this,void 0,void 0,function*(){t.disconnectedCallback.call(this),this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=null,this.removeEventListeners(),c.T.onDestroyedPopover(this),p.S.remove(this)})}setupTriggerListener(){if(!this.triggerID)return;const t=this.getRootNode();if(this.triggerElement=(0,r.qi)(`[id="${this.triggerID}"]`,t),!this.triggerElement){const e=null==t?void 0:t.host;if(e){const t=e.querySelector("[slot]");(null==t?void 0:t.id)===this.triggerID&&(this.triggerElement=t)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==t||t.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==t||t.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(t){const e=Object.create(null,{updated:{get:()=>super.updated}});return b(this,void 0,void 0,function*(){if(e.updated.call(this,t),t.has("visible")){const e=t.get("visible")||!1;yield this.isOpenUpdated(e,this.visible),this.utils.updateAriaExpandedAttribute()}if(t.has("placement")&&this.setAttribute("placement",Object.values(h.ME).includes(this.placement)?this.placement:h.zY.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("trigger")){const t=this.trigger.split(" ").filter(t=>Object.values(h.tr).includes(t));this.setAttribute("trigger",t.length>0?this.trigger:h.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}t.has("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),t.has("color")&&this.setAttribute("color",Object.values(h.o$).includes(this.color)?this.color:h.zY.COLOR),t.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.setupAccessibility(),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),t.has("interactive")&&this.utils.updateAriaHasPopupAttribute()})}isElementInPopover(t){return!!t&&(!!this.contains(t)||(0,r.QZ)("md-popover",t)===this)}isOpenUpdated(t,e){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:t=>super.preventScroll=t}});return b(this,void 0,void 0,function*(){var s,o,r,a;if(t!==e&&this.triggerElement)if(e)p.S.peek()!==this&&p.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(s=this.activateFocusTrap)||void 0===s||s.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),c.T.onShowPopover(this);else{if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),p.S.removeItem(this),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(r=this.deactivateFocusTrap)||void 0===r||r.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const t=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==t&&"alertdialog"!==t||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(a=this.setFocusOnDeepestNestedElement)||void 0===a||a.call(this,this.triggerElement)),this.previousActiveElement=null,c.T.onHidePopover(this)}})}isRectOverTrigger(t,e){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return!1}isMouseOverTrigger(t){const{clientX:e,clientY:i}=t instanceof MouseEvent?t:{clientX:0,clientY:0};return this.isRectOverTrigger(e,i)}handleCreatePopoverFirstUpdate(){return b(this,void 0,void 0,function*(){var t,e;this.visible&&this.interactive&&(null===(t=this.setFocusableElements)||void 0===t||t.call(this),yield this.updateComplete,null===(e=this.setInitialFocus)||void 0===e||e.call(this))})}positionPopover(){if(!this.triggerElement)return;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);const t=[(0,a.shift)()];let e=this.offset;if(this.flip&&t.push((0,a.flip)()),this.size){const e=this.renderRoot.querySelector('[part="popover-content"]');t.push((0,a.size)({apply({availableHeight:t}){e&&Object.assign(e.style,{maxHeight:`${t}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;e=Math.sqrt(2*i**2)/2+this.offset,t.push((0,a.arrow)({element:this.arrowElement,padding:12}))}t.push((0,a.offset)(e)),this.cleanupAutoUpdate=(0,a.autoUpdate)(this.triggerElement,this,()=>b(this,void 0,void 0,function*(){if(!this.triggerElement)return;const{x:e,y:i,middlewareData:s,placement:o}=yield(0,a.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:t,strategy:this.strategy});this.utils.updatePopoverStyle(e,i),s.arrow&&this.arrowElement&&this.utils.updateArrowStyle(s.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}),{animationFrame:this.animationFrame})}render(){return n.html`
|
|
1963
1885
|
<div class="popover-hover-bridge"></div>
|
|
1964
1886
|
${this.closeButton?n.html` <md-button
|
|
1965
1887
|
class="popover-close"
|
|
1966
1888
|
hasRemoveStyle
|
|
1967
1889
|
size="20"
|
|
1968
1890
|
circle
|
|
1969
|
-
ariaLabel=${(0,d.
|
|
1891
|
+
ariaLabel=${(0,d.ifDefined)(this.closeButtonAriaLabel)||""}
|
|
1970
1892
|
@button-click="${this.hidePopover}"
|
|
1971
1893
|
>
|
|
1972
1894
|
<md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
1973
|
-
</md-button>`:
|
|
1974
|
-
${this.showArrow?n.html`<div class="popover-arrow"></div>`:
|
|
1895
|
+
</md-button>`:n.nothing}
|
|
1896
|
+
${this.showArrow?n.html`<div class="popover-arrow"></div>`:n.nothing}
|
|
1975
1897
|
<div part="popover-content">
|
|
1976
1898
|
<slot></slot>
|
|
1977
1899
|
</div>
|
|
1978
|
-
`}static get styles(){return[
|
|
1900
|
+
`}static get styles(){return[m.A]}};y([(0,l.property)({type:String,reflect:!0})],g.prototype,"id",void 0),y([(0,l.property)({type:String,reflect:!0})],g.prototype,"triggerID",void 0),y([(0,l.property)({type:String,reflect:!0})],g.prototype,"trigger",void 0),y([(0,l.property)({type:String,reflect:!0})],g.prototype,"placement",void 0),y([(0,l.property)({type:String,reflect:!0})],g.prototype,"strategy",void 0),y([(0,l.property)({type:String,reflect:!0})],g.prototype,"color",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],g.prototype,"visible",void 0),y([(0,l.property)({type:Number,reflect:!0})],g.prototype,"offset",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"focus-trap"})],g.prototype,"focusTrap",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],g.prototype,"preventScroll",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"show-arrow"})],g.prototype,"showArrow",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"close-button"})],g.prototype,"closeButton",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],g.prototype,"interactive",void 0),y([(0,l.property)({type:String,reflect:!0})],g.prototype,"delay",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],g.prototype,"hideOnEscape",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],g.prototype,"hideOnBlur",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-window-blur"})],g.prototype,"hideOnWindowBlur",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],g.prototype,"hideOnOutsideClick",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],g.prototype,"focusBackToTrigger",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],g.prototype,"backdrop",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],g.prototype,"flip",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],g.prototype,"size",void 0),y([(0,l.property)({type:Number,reflect:!0,attribute:"z-index"})],g.prototype,"zIndex",void 0),y([(0,l.property)({type:String,reflect:!0,attribute:"append-to"})],g.prototype,"appendTo",void 0),y([(0,l.property)({type:String,attribute:"close-button-aria-label",reflect:!0})],g.prototype,"closeButtonAriaLabel",void 0),y([(0,l.property)({type:String,reflect:!0})],g.prototype,"role",void 0),y([(0,l.property)({type:String,reflect:!0,attribute:"aria-labelledby"})],g.prototype,"ariaLabelledby",void 0),y([(0,l.property)({type:String,reflect:!0,attribute:"aria-describedby"})],g.prototype,"ariaDescribedby",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"disable-aria-expanded"})],g.prototype,"disableAriaExpanded",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"animation-frame"})],g.prototype,"animationFrame",void 0),y([(0,l.property)({type:Object,attribute:!1})],g.prototype,"controller",null),g=y([(0,s.w)("md-popover")],g)},72655:(t,e,i)=>{i.r(e),i.d(e,{Accordion:()=>s.Accordion,AccordionItem:()=>o.AccordionItem,ActivityButton:()=>r.ActivityButton,AdvanceList:()=>a.AdvanceList,Alert:()=>l.Alert,AlertBanner:()=>n.AlertBanner,AudioPlayer:()=>d.AudioPlayer,Avatar:()=>h.Avatar,AvatarType:()=>c,Badge:()=>u.Badge,Breadcrumb:()=>E.Breadcrumb,Button:()=>T.Button,ButtonGroup:()=>$.ButtonGroup,Card:()=>I.Card,CardAi:()=>k.CardAi,CardV2:()=>A.CardV2,ChatMessage:()=>L.ChatMessage,Checkbox:()=>O.Checkbox,CheckboxGroup:()=>M.CheckboxGroup,Chip:()=>D.Chip,Coachmark:()=>R.Coachmark,CoachmarkPopover:()=>P.CoachmarkPopover,CodeEditor:()=>V,ComboBox:()=>j.ComboBox,CompositeAvatar:()=>p.CompositeAvatar,CountryCodePicker:()=>U.CountryCodePicker,DatePicker:()=>W.DatePicker,DatePickerCalendar:()=>K.DatePickerCalendar,DatePickerDay:()=>G.DatePickerDay,DatePickerMonth:()=>Y.DatePickerMonth,DatePickerWeek:()=>X.DatePickerWeek,DateRangePicker:()=>q.DateRangePicker,DateTimePicker:()=>H.DateTimePicker,Draggable:()=>Z.Draggable,DraggableItem:()=>Q.DraggableItem,Dropdown:()=>J.Dropdown,EditableTextfield:()=>tt.EditableTextfield,Favorite:()=>et.Favorite,FloatingButtonBar:()=>at,FloatingMinimizedModal:()=>nt.FloatingMinimizedModal,FloatingModal:()=>lt.FloatingModal,Form:()=>mt.Form,FormArray:()=>ht,FormControl:()=>ct,FormGroup:()=>pt,Grabber:()=>yt.Grabber,HelpText:()=>bt.HelpText,Icon:()=>f.Icon,Input:()=>gt.Input,InputFile:()=>vt.InputFile,Label:()=>ft.Label,Link:()=>wt.Link,List:()=>Ct.List,ListItem:()=>xt.ListItem,Loading:()=>St.Loading,MeetingAlert:()=>Et.MeetingAlert,Menu:()=>Tt.Menu,MenuItem:()=>kt.MenuItem,MenuOverlay:()=>$t.MenuOverlay,Modal:()=>At.Modal,NotificationBadge:()=>S,Pagination:()=>It.Pagination,PhoneInput:()=>Lt.PhoneInput,Popover:()=>Ot.Popover,PopoverController:()=>Ot.PopoverController,Presence:()=>Mt.Presence,ProgressBar:()=>Dt.ProgressBar,Radio:()=>Pt.Radio,RadioGroup:()=>Rt.RadioGroup,Skeleton:()=>Bt,Slider:()=>Ft.Slider,Spinner:()=>Vt.Spinner,Tab:()=>Ut.Tab,TabPanel:()=>qt.TabPanel,Table:()=>jt.Table,TableAdvanced:()=>Nt.TableAdvanced,Tabs:()=>Ht.Tabs,TaskItem:()=>Wt.TaskItem,Theme:()=>Kt.Theme,ThemeManager:()=>Zt.ThemeManager,TimePicker:()=>Gt.TimePicker,ToggleSwitch:()=>Yt.ToggleSwitch,Tooltip:()=>it.Tooltip,Validators:()=>ut,iconUrlManager:()=>Xt.O,registerThemeManagerGlobally:()=>Zt.registerThemeManagerGlobally,themeManager:()=>Zt.themeManager});var s=i(33328),o=i(6779),r=i(94891),a=i(28307),n=i(19479),l=i(74896),d=i(23779),h=i(38028);const c=["bot","group","self","typing",""];var p=i(2207),u=i(63704),m=i(3001),y=i(87161),b=i(11873),v=i(54765),g=i(70429),f=i(61200),w=i(15427);const C=y.css`:host{color:var(--badge-notification-primary-foreground-color);font-size:var(--font-size-body-small,.75rem);font-weight:var(--brand-font-weight-medium,500);line-height:var(--font-lineheight-body-small,1rem);font-family:var(--brand-font-medium);box-sizing:border-box;align-items:center;display:flex;height:fit-content;justify-content:center;width:fit-content}.md-notification-badge-overlay{outline:.0625rem solid var(--badge-notification-overlay-border-color)}.md-notification-badge-text{box-sizing:border-box;padding:0 .25rem;border-radius:6.25rem;min-width:1rem;display:flex;justify-content:center;background-color:var(--badge-notification-primary-background-color)}.md-notification-badge-dot{width:.75rem;height:.75rem;border-radius:50%;background-color:var(--badge-notification-primary-background-color)}.md-notification-badge-icon{padding:2px;size:1rem;border-radius:50%;box-sizing:border-box}.md-notification-badge-icon__primary{background-color:var(--badge-notification-primary-background-color);color:var(--badge-notification-primary-foreground-color)}.md-notification-badge-icon__success{background-color:var(--badge-notification-success-background-color);color:var(--badge-notification-success-foreground-color)}.md-notification-badge-icon__warning{background-color:var(--badge-notification-warning-background-color);color:var(--badge-notification-warning-foreground-color)}.md-notification-badge-icon__error{background-color:var(--badge-notification-error-background-color);color:var(--badge-notification-error-foreground-color)}.md-notification-badge-icon__secondary{background-color:var(--badge-notification-secondary-background-color);color:var(--badge-notification-secondary-foreground-color)}@media(forced-colors:active){.md-notification-badge-dot,.md-notification-badge-icon,.md-notification-badge-text{outline:.125rem solid}}`;var x=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let S=class extends y.LitElement{constructor(){super(...arguments),this.variant=w.zY.VARIANT,this.maxCounter=w.zY.MAX_COUNTER,this.overlay=!1,this.ariaLabel=null}static get styles(){return[C]}getCounterText(t,e){return void 0===e||"number"!=typeof e||0===t?"":e>t?`${t}+`:t>w.zY.MAX_COUNTER_LIMIT||e>w.zY.MAX_COUNTER_LIMIT?`${w.zY.MAX_COUNTER_LIMIT}+`:e.toString()}getBadgeIcon(t,e){return y.html`
|
|
1901
|
+
<md-icon
|
|
1902
|
+
class="md-notification-badge-icon ${(0,b.H)({"md-notification-badge-overlay":this.overlay,[`md-notification-badge-icon__${e}`]:!0})}"
|
|
1903
|
+
iconSet="momentumDesign"
|
|
1904
|
+
name="${(0,v.J)(t)}"
|
|
1905
|
+
size="${w.zY.ICON_SIZE}"
|
|
1906
|
+
></md-icon>
|
|
1907
|
+
`}getBadgeDot(){return y.html`<div
|
|
1908
|
+
class="md-notification-badge-dot ${(0,b.H)({"md-notification-badge-overlay":this.overlay})}"
|
|
1909
|
+
></div>`}getBadgeCounterText(){return y.html`
|
|
1910
|
+
<div class="md-notification-badge-text ${(0,b.H)({"md-notification-badge-overlay":this.overlay})}">
|
|
1911
|
+
${this.getCounterText(this.maxCounter,this.counter)}
|
|
1912
|
+
</div>
|
|
1913
|
+
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(w.M_).includes(this.variant)&&(this.variant=w.zY.VARIANT);const{iconName:t,type:e,variant:i}=this;switch(e){case w.ZE.ICON:return this.getBadgeIcon(t||"",i);case w.ZE.COUNTER:return this.getBadgeCounterText();case w.ZE.SUCCESS:return this.getBadgeIcon(w.UZ.SUCCESS_ICON_NAME,w.su.SUCCESS);case w.ZE.WARNING:return this.getBadgeIcon(w.UZ.WARNING_ICON_NAME,w.su.WARNING);case w.ZE.ERROR:return this.getBadgeIcon(w.UZ.ERROR_ICON_NAME,w.su.ERROR);case w.ZE.DOT:default:return this.type=w.ZE.DOT,this.getBadgeDot()}}update(t){super.update(t),t.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};x([(0,g.property)({type:String,reflect:!0})],S.prototype,"type",void 0),x([(0,g.property)({type:String,reflect:!0})],S.prototype,"variant",void 0),x([(0,g.property)({type:Number})],S.prototype,"counter",void 0),x([(0,g.property)({type:Number,attribute:"max-counter",reflect:!0})],S.prototype,"maxCounter",void 0),x([(0,g.property)({type:Boolean})],S.prototype,"overlay",void 0),x([(0,g.property)({type:String,attribute:"icon-name"})],S.prototype,"iconName",void 0),x([(0,g.property)({type:String,attribute:"aria-label"})],S.prototype,"ariaLabel",void 0),S=x([(0,m.wW)("md-notification-badge")],S);var E=i(92992),$=i(45629),T=i(96798),k=i(64311),A=i(90827),I=i(10654),L=i(95281),O=i(3664),M=i(55294),D=i(60046),P=i(29895),R=i(46312),_=i(4313),B=i(45001),z=i.n(B);const F=y.css`:host(md-code-editor) .md-code-editor{background:#091e26;border-radius:.25rem;color:#fff;min-height:18.75rem;overflow:hidden}:host(md-code-editor) .md-code-editor-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;background:#092d3b;flex:0 0 auto;font-size:14px;padding:.625rem}:host(md-code-editor) .md-code-editor-name{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-code-editor) .md-code-editor md-badge::part(badge){border-radius:.25rem;height:1.25rem;margin-right:.625rem;padding:.25rem .375rem;text-transform:capitalize}:host(md-code-editor) .md-code-editor-copy{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;line-height:1}:host(md-code-editor) .md-code-editor-copy-btn::part(button){background:0 0;color:#00a0d1;margin-left:.625rem}:host(md-code-editor) .md-code-editor-copy-btn[disabled]{cursor:not-allowed;opacity:.5}:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-quote{color:#ffecc2}:host(md-code-editor) .hljs-deletion,:host(md-code-editor) .hljs-name,:host(md-code-editor) .hljs-regexp,:host(md-code-editor) .hljs-selector-class,:host(md-code-editor) .hljs-selector-id,:host(md-code-editor) .hljs-tag,:host(md-code-editor) .hljs-template-variable,:host(md-code-editor) .hljs-variable{color:#ff9d52}:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-type{color:#fc9d03}:host(md-code-editor) .hljs-attribute{color:#ebd460}:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol{color:#93c437}:host(md-code-editor) .hljs-section,:host(md-code-editor) .hljs-title{color:#22c7d6}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{color:#f0e3fc}:host(md-code-editor) .hljs{background:rgba(0,0,0,0);color:#dedede;display:block;overflow-x:auto;padding:.5em}:host(md-code-editor) .hljs-emphasis{font-style:italic}:host(md-code-editor) .hljs-strong{font-weight:700}@media screen and (forced-colors:active){:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-attribute,:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-quote,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol,:host(md-code-editor) .hljs-type{color:highlight}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{font-weight:700}}@media(forced-colors:active){:host(md-code-editor) .md-code-editor{outline:1px solid CanvasText}:host(md-code-editor) .md-code-editor-header{outline:1px solid CanvasText}}`;var V,N=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.copyLocalization="cURL",this.copiedLocalization="Copied",this.method="get",this.acceptLanguage="javascript",this.url="javascript",this.disableCopyButton=!0,this.acceptTypes="",this.copied=!1}static get styles(){return[_.A,F]}handleSlotChange(){if(this.slotNodes&&this.slotNodes.length){const t=this.slotNodes.find(t=>"CODE"===t.tagName);if(t){const e=t.textContent;e&&this.highlightBlock(e)}}}handleUrlSlotChange(){if(this.copied=!1,this.slotUrl&&this.slotUrl.length){const t=this.slotUrl.find(t=>t);if(t){const e=t.textContent;e&&this.copyUrl(e)}}}highlightBlock(t){t&&(this.codeBlock.innerText=t),z().highlightElement(this.codeBlock)}copyUrl(t){this.codeUrl.innerText=t,this.disableCopyButton=!1}copyClipboard(){this.disableCopyButton||this.selectTarget(this.codeUrl)}copyText(){try{document.execCommand("copy"),this.copied=!0}catch(t){console.warn("Copy text failed"),this.copied=!1}}select(t){const e=window.getSelection(),i=document.createRange();i.selectNodeContents(t),e&&(e.removeAllRanges(),e.addRange(i))}selectTarget(t){this.select(t),this.copyText()}importLanguage(t){return e=this,s=void 0,r=function*(){try{const{default:e}=yield i(29599)(`./${t}`);z().registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}},new((o=void 0)||(o=Promise))(function(t,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function n(t){try{l(r.throw(t))}catch(t){i(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(a,n)}l((r=r.apply(e,s||[])).next())});var e,s,o,r}getAllAcceptTypes(){const t=z().listLanguages();return t.length?t.map(t=>z().getLanguage(`${t}`).aliases).map(t=>t.map(t=>`.${t}`)).join(","):""}setAcceptTypes(){this.acceptTypes=this.getAllAcceptTypes()}updated(t){super.updated(t),t.has("acceptLanguage")&&this.importLanguage(this.acceptLanguage),t.has("acceptTypes")&&this.highlightBlock()}render(){return y.html`
|
|
1914
|
+
<div class="md-code-editor" part="code-editor">
|
|
1915
|
+
<div class="md-code-editor-header">
|
|
1916
|
+
<div class="md-code-editor-name">
|
|
1917
|
+
<md-badge color="blue">
|
|
1918
|
+
<slot name="method" method=${this.method}></slot>
|
|
1919
|
+
</md-badge>
|
|
1920
|
+
<span class="md-code-editor-url">
|
|
1921
|
+
<slot name="code-url" @slotchange=${this.handleUrlSlotChange}>${this.url}</slot>
|
|
1922
|
+
</span>
|
|
1923
|
+
</div>
|
|
1924
|
+
<div class="md-code-editor-copy">
|
|
1925
|
+
<span>${this.copied?this.copiedLocalization.trim():this.copyLocalization.trim()}</span>
|
|
1926
|
+
<md-button
|
|
1927
|
+
circle
|
|
1928
|
+
size="20"
|
|
1929
|
+
?disabled=${this.disableCopyButton}
|
|
1930
|
+
@click=${this.copyClipboard}
|
|
1931
|
+
class="md-code-editor-copy-btn"
|
|
1932
|
+
>
|
|
1933
|
+
<md-icon slot="icon" name="icon-copy_16"></md-icon>
|
|
1934
|
+
</md-button>
|
|
1935
|
+
</div>
|
|
1936
|
+
</div>
|
|
1937
|
+
<div class="md-code-editor-content">
|
|
1938
|
+
<pre class="md-code-editor-code-block">
|
|
1939
|
+
<slot name="code-block" @slotchange=${this.handleSlotChange}>
|
|
1940
|
+
<code class=${this.acceptLanguage}>
|
|
1941
|
+
</code>
|
|
1942
|
+
</slot>
|
|
1943
|
+
</pre>
|
|
1944
|
+
</div>
|
|
1945
|
+
</div>
|
|
1946
|
+
`}};N([(0,g.property)({type:String})],e.prototype,"copyLocalization",void 0),N([(0,g.property)({type:String})],e.prototype,"copiedLocalization",void 0),N([(0,g.property)({type:String})],e.prototype,"method",void 0),N([(0,g.property)({type:String,attribute:"accept-language"})],e.prototype,"acceptLanguage",void 0),N([(0,g.property)({type:String})],e.prototype,"url",void 0),N([(0,g.query)("input[type='file']")],e.prototype,"input",void 0),N([(0,g.query)(".md-code-editor-code-block")],e.prototype,"codeBlock",void 0),N([(0,g.query)(".md-code-editor-url")],e.prototype,"codeUrl",void 0),N([(0,g.state)()],e.prototype,"disableCopyButton",void 0),N([(0,g.state)()],e.prototype,"acceptTypes",void 0),N([(0,g.state)()],e.prototype,"copied",void 0),N([(0,g.queryAssignedNodes)({slot:"code-block"})],e.prototype,"slotNodes",void 0),N([(0,g.queryAssignedNodes)({slot:"code-url"})],e.prototype,"slotUrl",void 0),e=N([(0,m.wW)("md-code-editor")],e),t.ELEMENT=e}(V||(V={}));var j=i(4928),U=i(18224),q=i(69494),H=i(85416),W=i(38654),K=i(63208),G=i(16754),Y=i(17814),X=i(10984),Z=i(80072),Q=i(24627),J=i(23184),tt=i(50565),et=i(99850),it=i(83192),st=i(20291);const ot=y.css`:host{display:inline-flex;align-items:center;height:1.75rem;border-radius:1.5625rem;background-color:var(--floating-button-bar-bg-color);box-shadow:var(--md-elevation-1);padding:.25rem .5rem;gap:.5rem}.button{display:inline-flex;align-items:center;justify-content:center}.button.pill::part(button){font-size:.875rem;padding-left:.75rem;padding-right:.75rem}.cancel{color:var(--floating-button-bar-secondary-color)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}.label.primary{font-family:var(--brand-font-medium);color:var(--floating-button-bar-primary-color);flex:1;min-width:0;justify-content:center}.label.secondary{color:var(--floating-button-bar-secondary-color);padding-right:4px}.separator{width:1px;height:.75rem;background-color:var(--floating-button-bar-secondary-color)}md-tooltip::part(tooltip_reference){display:flex;align-items:center}`;var rt=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let at=class extends y.LitElement{constructor(){super(...arguments),this.leadingLabel="",this.closeButtonAriaLabel="",this.showCloseButton=!0,this.actions=[]}static get styles(){return[ot]}onCancelButttonAction(){this.dispatchEvent(new CustomEvent("cancel-button-action",{composed:!0,bubbles:!0}))}get closeButtonTemplate(){return y.html`
|
|
1947
|
+
<md-tooltip
|
|
1948
|
+
message="${(0,st.ifDefined)(this.closeButtonAriaLabel)}"
|
|
1949
|
+
?disabled=${!this.closeButtonAriaLabel}
|
|
1950
|
+
placement="top"
|
|
1951
|
+
>
|
|
1952
|
+
<md-button
|
|
1953
|
+
class="button cancel"
|
|
1954
|
+
circle
|
|
1955
|
+
size="20"
|
|
1956
|
+
variant="ghostInheritTextColor"
|
|
1957
|
+
ariaLabel=${(0,st.ifDefined)(this.closeButtonAriaLabel)}
|
|
1958
|
+
@button-click=${()=>this.onCancelButttonAction()}
|
|
1959
|
+
>
|
|
1960
|
+
<md-icon slot="icon" iconSet="momentumDesign" name="cancel-bold" size="16"></md-icon>
|
|
1961
|
+
</md-button>
|
|
1962
|
+
</md-tooltip>
|
|
1963
|
+
`}getPrimaryLabelTemplate(t){return y.html` <span class="label primary">${t}</span> `}getSecondaryLabelTemplate(t){return y.html` <span class="label secondary">${t}</span> `}get separatorTemplate(){return y.html` <div class="separator"></div> `}getIconTemplate(t){return y.html`${t.icon?y.html`<md-icon slot="icon" iconSet="momentumDesign" name=${t.icon} size="16"></md-icon>`:y.nothing}`}getPillButtonTemplate(t){return y.html`
|
|
1964
|
+
<md-button class="button pill" size="24" variant="inverted-ghost" @button-click=${()=>t.action()}>
|
|
1965
|
+
${this.getIconTemplate(t)} ${this.getPrimaryLabelTemplate(t.label)}
|
|
1966
|
+
</md-button>
|
|
1967
|
+
`}getCircleButtonTemplate(t){return y.html`
|
|
1968
|
+
<md-button class="button" circle size="24" variant="inverted-secondary" @button-click=${()=>t.action()}>
|
|
1969
|
+
${this.getIconTemplate(t)}
|
|
1970
|
+
</md-button>
|
|
1971
|
+
`}getTooltipCircleButtonTemplate(t){return y.html`
|
|
1972
|
+
<md-tooltip message="${t.label}" placement="top"> ${this.getCircleButtonTemplate(t)} </md-tooltip>
|
|
1973
|
+
`}getActionAndLabelTemplate(t){var e;const i=null!==(e=t.iconAlign)&&void 0!==e?e:"right";return y.html`
|
|
1974
|
+
${"left"===i?y.html`${this.getCircleButtonTemplate(t)} ${this.getPrimaryLabelTemplate(t.label)}`:y.html`${this.getPrimaryLabelTemplate(t.label)} ${this.getCircleButtonTemplate(t)}`}
|
|
1975
|
+
`}getActionTemplate(t){return t.isIconOnly?this.getTooltipCircleButtonTemplate(t):this.getPillButtonTemplate(t)}getActionGroupTemplate(t){return y.html` ${this.separatorTemplate} ${t.actions.map(t=>this.getActionTemplate(t))} `}render(){return y.html`
|
|
1976
|
+
${this.showCloseButton?this.closeButtonTemplate:y.nothing} ${this.getSecondaryLabelTemplate(this.leadingLabel)}
|
|
1977
|
+
${this.actions.map(t=>this.getActionGroupTemplate(t))}
|
|
1978
|
+
`}};rt([(0,g.property)({type:String})],at.prototype,"leadingLabel",void 0),rt([(0,g.property)({type:String})],at.prototype,"closeButtonAriaLabel",void 0),rt([(0,g.property)({type:Boolean})],at.prototype,"showCloseButton",void 0),rt([(0,g.property)({type:Array})],at.prototype,"actions",void 0),at=rt([(0,g.customElement)("md-floating-button-bar")],at);var nt=i(58871),lt=i(73093);class dt{constructor(){this.listeners=new Set}onChange(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}emitChange(){for(const t of Array.from(this.listeners))t(this)}}class ht extends dt{constructor(t){var e;super(),this.controls=t;for(const t of this.controls)null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange())}at(t){return this.controls[t]}push(t){var e;this.controls.push(t),null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange()),this.emitChange()}removeAt(t){this.controls.splice(t,1),this.emitChange()}get value(){return this.controls.map(t=>t.value)}get valid(){return this.controls.every(t=>t.valid)}get length(){return this.controls.length}getControls(){return this.controls}validate(){this.controls.forEach(t=>t.validate()),this.emitChange()}markAllAsTouched(){this.controls.forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}class ct extends dt{constructor(t,e=[]){super(),this.validationErrors=[],this.touched=!1,this.currentValue=t,this.validators=e,this.validate()}get value(){return this.currentValue}markAsTouched(){this.touched=!0,this.validate()}get valid(){return 0===this.validationErrors.length}get errors(){return this.touched?this.validationErrors:[]}setValue(t){this.currentValue=t,this.markAsTouched()}validate(){this.emitChange(),this.validationErrors=this.validators.map(t=>t(this.currentValue)).filter(t=>null!==t)}}class pt extends dt{constructor(t){var e;super(),this.controls=t;for(const t of Object.keys(this.controls)){const i=this.controls[t];null===(e=i.onChange)||void 0===e||e.call(i,()=>this.emitChange())}}get(t){return this.controls[t]}get value(){const t={};for(const e in this.controls)t[e]=this.controls[e].value;return t}get valid(){return Object.values(this.controls).every(t=>t.valid)}validate(){for(const t of Object.values(this.controls))t.validate();this.emitChange()}markAllAsTouched(){Object.values(this.controls).forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}const ut={required:()=>t=>null==t||"string"==typeof t&&""===t.trim()?{type:"required"}:null,minLength:t=>e=>e.length<t?{type:"minLength",count:t}:null,maxLength:t=>e=>e.length>t?{type:"maxLength",count:t}:null};var mt=i(97866),yt=i(69112),bt=i(20109),vt=i(52619),gt=i(96408),ft=i(6396),wt=i(19026),Ct=i(68490),xt=i(66245),St=i(69788),Et=i(61997),$t=i(11323),Tt=i(84032),kt=i(48171),At=i(32252),It=i(23026),Lt=i(84205),Ot=i(71128),Mt=i(15300),Dt=i(58287),Pt=i(81144),Rt=i(32217);const _t=y.css`:host{width:100%;height:100%;display:block;background-color:var(--md-textColor-primary);opacity:.5}:host([variant=circle]){border-radius:50%}:host([variant=rectangular]){border-radius:0}:host([variant=rounded]){border-radius:.5rem}:host([animation=none]){animation:none}:host([animation=pulse]){animation:skeleton-pulse 2s ease-in-out infinite}@keyframes skeleton-pulse{0%{opacity:.5}50%{opacity:.25}100%{opacity:.5}}`;var Bt,zt=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.variant="rounded",this.animation="pulse"}render(){var t,e;return this.style.width=null!==(t=this.width)&&void 0!==t?t:this.style.width,this.style.height=null!==(e=this.height)&&void 0!==e?e:this.style.height,y.html`<slot></slot>`}static get styles(){return[_t]}};zt([(0,g.property)({type:String})],e.prototype,"width",void 0),zt([(0,g.property)({type:String})],e.prototype,"height",void 0),zt([(0,g.property)({reflect:!0})],e.prototype,"variant",void 0),zt([(0,g.property)({reflect:!0})],e.prototype,"animation",void 0),e=zt([(0,g.customElement)("md-skeleton")],e),t.ELEMENT=e}(Bt||(Bt={}));var Ft=i(25428),Vt=i(12176),Nt=i(77935),jt=i(40428),Ut=i(16643),qt=i(97737),Ht=i(50226),Wt=i(86610),Kt=i(1072),Gt=i(49256),Yt=i(20331),Xt=i(81786),Zt=i(37719)},73093:(t,e,i)=>{i.d(e,{FloatingModal:()=>s}),i(96798),i(61200);var s,o=i(3001),r=i(31890),a=i(4313),n=(i(58088),i(57346),i(69e3),i(20727)),l=i.n(n),d=(i(3288),i(87161)),h=i(70429),c=i(20291),p=(i(58871),i(34659)),u=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends((0,o.yC)((0,o.TS)(d.LitElement))){constructor(){super(...arguments),this.heading="",this.label="",this.show=!1,this.aspectRatio=!1,this.centered=!1,this.fixed=!1,this.full=!1,this.closeAriaLabel="Close Modal",this.resizeAriaLabel="Resize Modal",this.maximizeScreenLabel="Maximize Modal",this.minimizeAriaLabel="Minimize Modal",this.maximizable=!0,this.resizable=!0,this.minimize=!1,this.minimizable=!1,this.containerRect=null,this.dragOccured=!1,this.containerTransform="",this.applyInitialPosition=!0,this.resizeMoveListener=t=>{const{target:e}=t;let i=parseFloat(e.getAttribute("data-x"))||0,s=parseFloat(e.getAttribute("data-y"))||0;e.style.setProperty("width",`${t.rect.width}px`,"important"),e.style.setProperty("height",`${t.rect.height}px`,"important");const{initialX:o,initialY:r}=this.getInitialPosition();i+=t.deltaRect.left+o,s+=t.deltaRect.top+r,this.setTargetPosition(e,i,s),this.applyInitialPosition=!1},this.resizeEndListener=()=>{this.setContainerRect()},this.getInitialPosition=()=>{var t,e;return this.applyInitialPosition&&this.position?{initialX:Number(null===(t=this.position)||void 0===t?void 0:t.x),initialY:Number(null===(e=this.position)||void 0===e?void 0:e.y)}:{initialX:0,initialY:0}},this.dragMoveListener=t=>{const{target:e}=t,{x:i,y:s}=this.getTransformValues(t);this.setTargetPosition(e,i,s),this.applyInitialPosition=!1},this.dragEndListener=()=>{this.dragOccured=!0,this.setContainerRect()}}static get styles(){return[a.A,p.A]}updated(t){super.updated(t),t.has("show")&&(this.container&&this.show?(this.applyInitialPosition=!0,this.setContainerRect(),this.setInteractInstance()):(this.cleanContainerStyles(),this.destroyInteractInstance())),this.container&&t.has("position")&&!t.has("show")&&this.setInitialTargetPosition()}isNewPositionNotSame(){var t,e,i,s;if(this.container)return Number(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-x"))!==(null===(e=this.position)||void 0===e?void 0:e.x)||Number(null===(i=this.container)||void 0===i?void 0:i.getAttribute("data-y"))!==(null===(s=this.position)||void 0===s?void 0:s.y)}setInitialTargetPosition(){var t,e;this.container&&this.isNewPositionNotSame()&&this.setTargetPosition(this.container,Number(null===(t=this.position)||void 0===t?void 0:t.x),Number(null===(e=this.position)||void 0===e?void 0:e.y))}cleanContainerStyles(){this.containerTransform=""}getContainerTransform(){const t=this.container.getAttribute("data-x"),e=this.container.getAttribute("data-y");return t&&e?(this.dispatchEvent(new CustomEvent("floating-modal-location",{composed:!0,bubbles:!0,detail:{transform:{x:t,y:e}}})),`translate(${t}px, ${e}px)`):this.container.style.transform}setContainerRect(){requestAnimationFrame(()=>{return t=this,e=void 0,s=function*(){yield this.updateComplete,this.containerRect=this.container.getBoundingClientRect(),this.dispatchEvent(new CustomEvent("floating-modal-resize",{composed:!0,bubbles:!0,detail:{size:this.containerRect}})),this.containerTransform=this.getContainerTransform()},new((i=void 0)||(i=Promise))(function(o,r){function a(t){try{l(s.next(t))}catch(t){r(t)}}function n(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((s=s.apply(t,e||[])).next())});var t,e,i,s})}setInteractInstance(){requestAnimationFrame(()=>{this.container&&(l()(this.container).draggable({autoScroll:!0,allowFrom:this.header,ignoreFrom:this.body,listeners:{move:this.dragMoveListener,end:this.dragEndListener}}),this.resizable&&l()(this.container).resizable({edges:{left:!0,right:!0,bottom:!0,top:!0},listeners:{end:this.resizeEndListener,move:this.resizeMoveListener},modifiers:this.aspectRatio?[l().modifiers.aspectRatio({ratio:"preserve",equalDelta:!0,modifiers:[l().modifiers.restrictSize({max:"parent"})]})]:void 0}))})}handleClose(t){this.show=!1,this.full=!1,this.dispatchEvent(new CustomEvent("floating-modal-close",{composed:!0,bubbles:!0,detail:{srcEvent:t}}))}handleMinimize(){this.minimizable&&(this.dragOccured||(this.minimize=!this.minimize,this.dispatchEvent(new CustomEvent("floating-modal-minimize",{composed:!0,bubbles:!0,detail:{minimize:this.minimize}}))),this.dragOccured=!1)}handleToggleExpandCollapse(){this.full=!this.full}getTransformValues(t){const{target:e,dx:i,dy:s}=t,{initialX:o,initialY:r}=this.getInitialPosition();return{x:(parseFloat(e.getAttribute("data-x"))||0)+i+o,y:(parseFloat(e.getAttribute("data-y"))||0)+s+r}}setTargetPosition(t,e,i){t.style.transform=`translate(${e}px, ${i}px)`,t.setAttribute("data-x",`${e}`),t.setAttribute("data-y",`${i}`)}destroyInteractInstance(){this.container&&l().isSet(this.container)&&l()(this.container).unset()}disconnectedCallback(){super.disconnectedCallback(),this.destroyInteractInstance()}renderedCallback(){this.containerTransform=this.position?`translate(${this.position.x}px, ${this.position.y}px)`:""}render(){return d.html`
|
|
1979
1979
|
${this.show?d.html`
|
|
1980
1980
|
<div
|
|
1981
1981
|
class="md-floating ${this.fixed?"fixed":""} ${this.minimize?"hide":""}"
|
|
@@ -2513,7 +2513,7 @@
|
|
|
2513
2513
|
${(0,c.Um)(this.quantity,this.isRestyle,this)}
|
|
2514
2514
|
</div>
|
|
2515
2515
|
</div>
|
|
2516
|
-
`}};u([(0,l.property)({type:String})],e.prototype,"mediaType",void 0),u([(0,l.property)({type:String})],e.prototype,"status",void 0),u([(0,l.property)({type:String})],e.prototype,"popovertitle",void 0),u([(0,l.property)({type:String})],e.prototype,"queue",void 0),u([(0,l.property)({type:String,attribute:"queue-time-label"})],e.prototype,"queueTimeLabel",void 0),u([(0,l.property)({type:Boolean})],e.prototype,"accepted",void 0),u([(0,l.property)({type:Boolean,attribute:"display-only-title"})],e.prototype,"displayOnlyTitle",void 0),u([(0,l.property)({type:Number})],e.prototype,"quantity",void 0),u([(0,l.property)({type:String})],e.prototype,"lastmessage",void 0),u([(0,l.property)({type:Boolean})],e.prototype,"selected",void 0),u([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,l.property)({type:String})],e.prototype,"customAriaLabel",void 0),u([(0,l.property)({type:String})],e.prototype,"iconSrc",void 0),u([(0,l.property)({type:String})],e.prototype,"tabIndexForContainer",void 0),u([(0,l.property)({type:Boolean,attribute:"is-restyle"})],e.prototype,"isRestyle",void 0),u([(0,l.property)({type:String,reflect:!0})],e.prototype,"title",null),u([(0,l.property)({type:String,reflect:!0,attribute:"item-title"})],e.prototype,"itemTitle",null),u([(0,l.state)()],e.prototype,"additionEmptyMargin",void 0),e=u([(0,o.w)("md-task-item")],e),t.ELEMENT=e}(s||(s={}))},87161:e=>{e.exports=t},89756:t=>{t.exports=d},90195:(t,e,i)=>{var s,o,r,a;i.d(e,{R5:()=>o,Uz:()=>s,iw:()=>a}),function(t){t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.Backspace="Backspace",t.Delete="Delete",t.End="End",t.Enter="Enter",t.Escape="Escape",t.Home="Home",t.Space="Space",t.Tab="Tab",t.Digit1="Digit1",t.Digit2="Digit2",t.Digit3="Digit3",t.Digit4="Digit4",t.Digit5="Digit5",t.Digit6="Digit6",t.Digit7="Digit7",t.Digit8="Digit8",t.Digit9="Digit9",t.NumpadEnter="NumpadEnter"}(s||(s={})),function(t){t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.AM_PM="am_pm"}(o||(o={})),function(t){t.GRAMMAR="grammar",t.FALSE="false",t.SPELLING="spelling",t.TRUE="true"}(r||(r={})),function(t){t.AriaActivedescendant="aria-activedescendant"}(a||(a={}))},90827:(t,e,i)=>{i.d(e,{CardV2:()=>
|
|
2516
|
+
`}};u([(0,l.property)({type:String})],e.prototype,"mediaType",void 0),u([(0,l.property)({type:String})],e.prototype,"status",void 0),u([(0,l.property)({type:String})],e.prototype,"popovertitle",void 0),u([(0,l.property)({type:String})],e.prototype,"queue",void 0),u([(0,l.property)({type:String,attribute:"queue-time-label"})],e.prototype,"queueTimeLabel",void 0),u([(0,l.property)({type:Boolean})],e.prototype,"accepted",void 0),u([(0,l.property)({type:Boolean,attribute:"display-only-title"})],e.prototype,"displayOnlyTitle",void 0),u([(0,l.property)({type:Number})],e.prototype,"quantity",void 0),u([(0,l.property)({type:String})],e.prototype,"lastmessage",void 0),u([(0,l.property)({type:Boolean})],e.prototype,"selected",void 0),u([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,l.property)({type:String})],e.prototype,"customAriaLabel",void 0),u([(0,l.property)({type:String})],e.prototype,"iconSrc",void 0),u([(0,l.property)({type:String})],e.prototype,"tabIndexForContainer",void 0),u([(0,l.property)({type:Boolean,attribute:"is-restyle"})],e.prototype,"isRestyle",void 0),u([(0,l.property)({type:String,reflect:!0})],e.prototype,"title",null),u([(0,l.property)({type:String,reflect:!0,attribute:"item-title"})],e.prototype,"itemTitle",null),u([(0,l.state)()],e.prototype,"additionEmptyMargin",void 0),e=u([(0,o.w)("md-task-item")],e),t.ELEMENT=e}(s||(s={}))},87161:e=>{e.exports=t},89756:t=>{t.exports=d},90195:(t,e,i)=>{var s,o,r,a;i.d(e,{R5:()=>o,Uz:()=>s,iw:()=>a}),function(t){t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.Backspace="Backspace",t.Delete="Delete",t.End="End",t.Enter="Enter",t.Escape="Escape",t.Home="Home",t.Space="Space",t.Tab="Tab",t.Digit1="Digit1",t.Digit2="Digit2",t.Digit3="Digit3",t.Digit4="Digit4",t.Digit5="Digit5",t.Digit6="Digit6",t.Digit7="Digit7",t.Digit8="Digit8",t.Digit9="Digit9",t.NumpadEnter="NumpadEnter"}(s||(s={})),function(t){t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.AM_PM="am_pm"}(o||(o={})),function(t){t.GRAMMAR="grammar",t.FALSE="false",t.SPELLING="spelling",t.TRUE="true"}(r||(r={})),function(t){t.AriaActivedescendant="aria-activedescendant"}(a||(a={}))},90827:(t,e,i)=>{i.d(e,{CardV2:()=>u}),i(96798),i(61200),i(83192);var s=i(31890),o=i(4313),r=i(87161),a=i(70429),n=i(85125),l=i(65796),d=i(80622),h=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const c="hh:mm:ss";var p,u;!function(t){t.DEFAULT="default",t.ACTIVE="active",t.INACTIVE="inactive"}(p||(p={})),function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.state=p.DEFAULT,this.identifier=void 0,this.header=void 0,this.info=void 0,this.data=void 0,this.createdTime=0,this.active=!1,this.expandable=!1,this.expandAriaLabel="Expand for more details",this.renderedData=""}connectedCallback(){super.connectedCallback(),this.checkForExtraInfoSlot()}disconnectedCallback(){super.disconnectedCallback(),this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=void 0)}static get styles(){return[o.A,d.A]}get isCardActive(){return this.state===p.ACTIVE}update(t){super.update(t),(t.has("active")||t.has("data")||t.has("createdTime"))&&this.calculateRenderedData()}expandCardToggled(){var t;this.state=this.isCardActive?p.DEFAULT:p.ACTIVE,this.dispatchEvent(new CustomEvent("expand-card-toggled",{detail:{identifier:null!==(t=this.identifier)&&void 0!==t?t:"",active:this.isCardActive},bubbles:!0,composed:!0}))}checkForExtraInfoSlot(){var t;(null===(t=this.extraInfoSlot)||void 0===t?void 0:t.assignedNodes().length)>0?this.setAttribute("has-extra-info",""):this.removeAttribute("has-extra-info")}handleExtraInfoSlotChange(t){this.checkForExtraInfoSlot()}get cardClassMap(){return{"md-card-v2":!0,[`md-card--${this.state}`]:!0}}get contentClassMap(){return{"md-card-v2-content":!0,inactive:this.state===p.INACTIVE}}get footerExpandClassMap(){return{"md-card-v2-footer-expand":!0,hidden:!this.expandable}}get expandCardHandler(){return this.expandable?this.expandCardToggled:null}renderHeader(){return r.html`
|
|
2517
2517
|
<div class="md-card-v2-header-title">
|
|
2518
2518
|
<h3>${this.header}</h3>
|
|
2519
2519
|
${this.info?r.html`
|
|
@@ -2522,10 +2522,10 @@
|
|
|
2522
2522
|
<md-icon slot="icon" name="info-badge-filled" iconSet="momentumDesign"></md-icon>
|
|
2523
2523
|
</md-button>
|
|
2524
2524
|
</md-tooltip>
|
|
2525
|
-
`:
|
|
2525
|
+
`:r.nothing}
|
|
2526
2526
|
</div>
|
|
2527
2527
|
`}renderExpandButton(){return r.html`
|
|
2528
|
-
<div class="${(0,n.
|
|
2528
|
+
<div class="${(0,n.classMap)(this.footerExpandClassMap)}">
|
|
2529
2529
|
<md-button ariaLabel="${this.expandAriaLabel}" circle size="28">
|
|
2530
2530
|
<md-icon
|
|
2531
2531
|
slot="icon"
|
|
@@ -2542,10 +2542,10 @@
|
|
|
2542
2542
|
</div>
|
|
2543
2543
|
${this.renderExpandButton()}
|
|
2544
2544
|
</div>
|
|
2545
|
-
`}calculateRenderedData(){this.clearInterval(),!this.active&&this.data?this.renderedData=this.data:this.active&&this.createdTime>0&&(this.renderedData=
|
|
2546
|
-
<div class="${(0,n.
|
|
2545
|
+
`}calculateRenderedData(){this.clearInterval(),!this.active&&this.data?this.renderedData=this.data:this.active&&this.createdTime>0&&(this.renderedData=l.Duration.fromMillis(Date.now()-this.createdTime).toFormat(c),this.interval=window.setInterval(()=>{this.renderedData=l.Duration.fromMillis(Date.now()-this.createdTime).toFormat(c)},1e3))}render(){return r.html`
|
|
2546
|
+
<div class="${(0,n.classMap)(this.cardClassMap)}" @click=${this.expandCardHandler}>
|
|
2547
2547
|
<div class="md-card-v2-header">${this.renderHeader()}</div>
|
|
2548
|
-
<div class="${(0,n.
|
|
2548
|
+
<div class="${(0,n.classMap)(this.contentClassMap)}">
|
|
2549
2549
|
<h2>${this.renderedData}</h2>
|
|
2550
2550
|
<div class="md-card-v2-content-extra-info">
|
|
2551
2551
|
<slot name="card-extra-info" @slotchange=${this.handleExtraInfoSlotChange}></slot>
|
|
@@ -2553,7 +2553,7 @@
|
|
|
2553
2553
|
</div>
|
|
2554
2554
|
${this.renderFooter()}
|
|
2555
2555
|
</div>
|
|
2556
|
-
`}};
|
|
2556
|
+
`}};h([(0,a.property)({type:String})],e.prototype,"state",void 0),h([(0,a.property)({type:String})],e.prototype,"identifier",void 0),h([(0,a.property)({type:String})],e.prototype,"header",void 0),h([(0,a.property)({type:String})],e.prototype,"info",void 0),h([(0,a.property)({type:String})],e.prototype,"data",void 0),h([(0,a.property)({type:Number})],e.prototype,"createdTime",void 0),h([(0,a.property)({type:Boolean})],e.prototype,"active",void 0),h([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"expandable",void 0),h([(0,a.property)({type:String,attribute:"expand-aria-label"})],e.prototype,"expandAriaLabel",void 0),h([(0,a.query)('slot[name="card-extra-info"]')],e.prototype,"extraInfoSlot",void 0),h([(0,a.state)()],e.prototype,"interval",void 0),h([(0,a.state)()],e.prototype,"renderedData",void 0),e=h([(0,s.w)("md-card-v2")],e),t.ELEMENT=e}(u||(u={}))},92992:(t,e,i)=>{i.d(e,{Breadcrumb:()=>s});var s,o=i(31890),r=i(4313),a=i(87161),n=i(70429),l=i(20291),d=i(58175),h=i(85524),c=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.label="Breadcrumb",this.navCrumbs=[]}static get styles(){return[r.A,h.A]}setLastAnchorCurrent(){var t;(null===(t=this.anchors)||void 0===t?void 0:t.length)&&this.anchors[this.anchors.length-1].setAttribute("aria-current","page")}firstUpdated(t){super.firstUpdated(t),this.setLastAnchorCurrent()}update(t){super.update(t),t.has("navCrumbs")&&this.setLastAnchorCurrent()}handleClick(t){var e;const i=t.target;if(null===(e=this.anchors)||void 0===e?void 0:e.length){const t=Array.from(this.anchors).indexOf(i);-1!==t&&(this.navCrumbs=[...this.navCrumbs.splice(0,t+1)])}}render(){return a.html`
|
|
2557
2557
|
<nav aria-label="${(0,l.ifDefined)(this.label?this.label:void 0)}" class="md-breadcrumb">
|
|
2558
2558
|
<ul @click=${t=>this.handleClick(t)}>
|
|
2559
2559
|
${(0,d.repeat)(this.navCrumbs,t=>t.link,t=>a.html`
|
|
@@ -2865,4 +2865,4 @@
|
|
|
2865
2865
|
size="16"
|
|
2866
2866
|
></md-icon>
|
|
2867
2867
|
</label>
|
|
2868
|
-
`}};u([(0,d.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"checked",void 0),u([(0,d.property)({type:String})],e.prototype,"value",void 0),u([(0,d.property)({type:String})],e.prototype,"id",void 0),u([(0,d.property)({type:String})],e.prototype,"label",void 0),e=u([(0,a.w)("md-favorite")],e),t.ELEMENT=e}(s||(s={}))}},z={};function F(t){var e=z[t];if(void 0!==e)return e.exports;var i=z[t]={exports:{}};return B[t].call(i.exports,i,i.exports,F),i.exports}F.m=B,M=[],F.O=(t,e,i,s)=>{if(!e){var o=1/0;for(l=0;l<M.length;l++){for(var[e,i,s]=M[l],r=!0,a=0;a<e.length;a++)(!1&s||o>=s)&&Object.keys(F.O).every(t=>F.O[t](e[a]))?e.splice(a--,1):(r=!1,s<o&&(o=s));if(r){M.splice(l--,1);var n=i();void 0!==n&&(t=n)}}return t}s=s||0;for(var l=M.length;l>0&&M[l-1][2]>s;l--)M[l]=M[l-1];M[l]=[e,i,s]},F.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return F.d(e,{a:e}),e},P=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,F.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var i=Object.create(null);F.r(i);var s={};D=D||[null,P({}),P([]),P(P)];for(var o=2&e&&t;("object"==typeof o||"function"==typeof o)&&!~D.indexOf(o);o=P(o))Object.getOwnPropertyNames(o).forEach(e=>s[e]=()=>t[e]);return s.default=()=>t,F.d(i,s),i},F.d=(t,e)=>{for(var i in e)F.o(e,i)&&!F.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},F.f={},F.e=t=>Promise.all(Object.keys(F.f).reduce((e,i)=>(F.f[i](t,e),e),[])),F.u=t=>"chunks/md-"+t+".js",F.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),F.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),R={},_="@momentum-ui/web-components:",F.l=(t,e,i,s)=>{if(R[t])R[t].push(e);else{var o,r;if(void 0!==i)for(var a=document.getElementsByTagName("script"),n=0;n<a.length;n++){var l=a[n];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==_+i){o=l;break}}o||(r=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,F.nc&&o.setAttribute("nonce",F.nc),o.setAttribute("data-webpack",_+i),o.src=t),R[t]=[e];var d=(e,i)=>{o.onerror=o.onload=null,clearTimeout(h);var s=R[t];if(delete R[t],o.parentNode&&o.parentNode.removeChild(o),s&&s.forEach(t=>t(i)),e)return e(i)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),r&&document.head.appendChild(o)}},F.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},F.p="/",(()=>{var t={109:0,144:0,195:0,445:0,502:0,555:0,671:0,762:0,984:0,1037:0,1200:0,1266:0,1323:0,1439:0,1459:0,1462:0,1521:0,1528:0,1682:0,1745:0,1788:0,1807:0,2105:0,2139:0,2169:0,2176:0,2330:0,2434:0,2547:0,2555:0,2576:0,2779:0,2781:0,2909:0,3001:0,3079:0,3192:0,3413:0,3477:0,3539:0,3747:0,3820:0,3938:0,3943:0,4131:0,4139:0,4259:0,4545:0,4908:0,4928:0,4971:0,5156:0,5310:0,5369:0,5382:0,5427:0,5433:0,5517:0,6029:0,6060:0,6085:0,6132:0,6220:0,6396:0,6408:0,6433:0,6494:0,6587:0,6677:0,6724:0,6753:0,6754:0,6798:0,6834:0,6920:0,7119:0,7145:0,7219:0,7455:0,7684:0,7711:0,7719:0,7763:0,7814:0,7927:0,8028:0,8111:0,8115:0,8220:0,8334:0,8339:0,8442:0,8510:0,8654:0,8894:0,9058:0,9237:0};F.f.j=(e,i)=>{var s=F.o(t,e)?t[e]:void 0;if(0!==s)if(s)i.push(s[2]);else{var o=new Promise((i,o)=>s=t[e]=[i,o]);i.push(s[2]=o);var r=F.p+F.u(e),a=new Error;F.l(r,i=>{if(F.o(t,e)&&(0!==(s=t[e])&&(t[e]=void 0),s)){var o=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+r+")",a.name="ChunkLoadError",a.type=o,a.request=r,s[1](a)}},"chunk-"+e,e)}},F.O.j=e=>0===t[e];var e=(e,i)=>{var s,o,[r,a,n]=i,l=0;if(r.some(e=>0!==t[e])){for(s in a)F.o(a,s)&&(F.m[s]=a[s]);if(n)var d=n(F)}for(e&&e(i);l<r.length;l++)o=r[l],F.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return F.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var V=F.O(void 0,[6633,
|
|
2868
|
+
`}};u([(0,d.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"checked",void 0),u([(0,d.property)({type:String})],e.prototype,"value",void 0),u([(0,d.property)({type:String})],e.prototype,"id",void 0),u([(0,d.property)({type:String})],e.prototype,"label",void 0),e=u([(0,a.w)("md-favorite")],e),t.ELEMENT=e}(s||(s={}))}},z={};function F(t){var e=z[t];if(void 0!==e)return e.exports;var i=z[t]={exports:{}};return B[t].call(i.exports,i,i.exports,F),i.exports}F.m=B,M=[],F.O=(t,e,i,s)=>{if(!e){var o=1/0;for(l=0;l<M.length;l++){for(var[e,i,s]=M[l],r=!0,a=0;a<e.length;a++)(!1&s||o>=s)&&Object.keys(F.O).every(t=>F.O[t](e[a]))?e.splice(a--,1):(r=!1,s<o&&(o=s));if(r){M.splice(l--,1);var n=i();void 0!==n&&(t=n)}}return t}s=s||0;for(var l=M.length;l>0&&M[l-1][2]>s;l--)M[l]=M[l-1];M[l]=[e,i,s]},F.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return F.d(e,{a:e}),e},P=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,F.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var i=Object.create(null);F.r(i);var s={};D=D||[null,P({}),P([]),P(P)];for(var o=2&e&&t;("object"==typeof o||"function"==typeof o)&&!~D.indexOf(o);o=P(o))Object.getOwnPropertyNames(o).forEach(e=>s[e]=()=>t[e]);return s.default=()=>t,F.d(i,s),i},F.d=(t,e)=>{for(var i in e)F.o(e,i)&&!F.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},F.f={},F.e=t=>Promise.all(Object.keys(F.f).reduce((e,i)=>(F.f[i](t,e),e),[])),F.u=t=>"chunks/md-"+t+".js",F.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),F.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),R={},_="@momentum-ui/web-components:",F.l=(t,e,i,s)=>{if(R[t])R[t].push(e);else{var o,r;if(void 0!==i)for(var a=document.getElementsByTagName("script"),n=0;n<a.length;n++){var l=a[n];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==_+i){o=l;break}}o||(r=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,F.nc&&o.setAttribute("nonce",F.nc),o.setAttribute("data-webpack",_+i),o.src=t),R[t]=[e];var d=(e,i)=>{o.onerror=o.onload=null,clearTimeout(h);var s=R[t];if(delete R[t],o.parentNode&&o.parentNode.removeChild(o),s&&s.forEach(t=>t(i)),e)return e(i)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),r&&document.head.appendChild(o)}},F.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},F.p="/",(()=>{var t={109:0,144:0,195:0,445:0,502:0,555:0,671:0,762:0,984:0,1037:0,1200:0,1266:0,1323:0,1439:0,1459:0,1462:0,1521:0,1528:0,1682:0,1745:0,1788:0,1807:0,2105:0,2139:0,2169:0,2176:0,2330:0,2434:0,2547:0,2555:0,2576:0,2779:0,2781:0,2909:0,3001:0,3079:0,3192:0,3413:0,3477:0,3539:0,3747:0,3820:0,3938:0,3943:0,4131:0,4139:0,4259:0,4545:0,4908:0,4928:0,4971:0,5156:0,5310:0,5369:0,5382:0,5427:0,5433:0,5517:0,6029:0,6060:0,6085:0,6132:0,6220:0,6396:0,6408:0,6433:0,6494:0,6587:0,6677:0,6724:0,6753:0,6754:0,6798:0,6834:0,6920:0,7119:0,7145:0,7219:0,7455:0,7684:0,7711:0,7719:0,7763:0,7814:0,7927:0,8028:0,8111:0,8115:0,8220:0,8334:0,8339:0,8442:0,8510:0,8654:0,8894:0,9058:0,9237:0};F.f.j=(e,i)=>{var s=F.o(t,e)?t[e]:void 0;if(0!==s)if(s)i.push(s[2]);else{var o=new Promise((i,o)=>s=t[e]=[i,o]);i.push(s[2]=o);var r=F.p+F.u(e),a=new Error;F.l(r,i=>{if(F.o(t,e)&&(0!==(s=t[e])&&(t[e]=void 0),s)){var o=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+r+")",a.name="ChunkLoadError",a.type=o,a.request=r,s[1](a)}},"chunk-"+e,e)}},F.O.j=e=>0===t[e];var e=(e,i)=>{var s,o,[r,a,n]=i,l=0;if(r.some(e=>0!==t[e])){for(s in a)F.o(a,s)&&(F.m[s]=a[s]);if(n)var d=n(F)}for(e&&e(i);l<r.length;l++)o=r[l],F.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return F.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var V=F.O(void 0,[6633,7103,4765,1873,1890,4313,510,6283,5087,6865,8889,8210,5630,3135,1013,3739,7819,2848,4363,2243,7919,7292,6188,15,8345,9270,8923,4548,2669,1729,9164,9480,1625,836,3625,2056,4889,9409,9654,4659,5838,6765,1626,3852,8161,6273,8391,679,8033,1564,4462,4744,8576,1092,8171,2201,2186,9425,8588,3212,622,5809,9455,759,2093,8148,5799,9312,2714,9238,7833,2924,5524,674,2314],()=>F(72655));return F.O(V)})());
|