!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/directives/until.js"));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/directives/until.js"],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/directives/until.js")):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/directives/until.js"]);for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(self,(t,e,i,s,o,r,l,a,n)=>(()=>{"use strict";var p,d={7901(t,e,i){var s,o=i(9609),r=i(4084),l=i(7161),a=i(429),n=i(5125),p=i(291),d=i(4958),h=i(3543),m=function(t,e,i,s){var o,r=arguments.length,l=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(l=(r<3?o(l):r>3?o(e,i,l):o(e,i))||l);return r>3&&l&&Object.defineProperty(e,i,l),l};!function(t){let e=class extends l.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=d.zj[40],this.small=!1,this.split=!1,this.disabled=!1,this.tabIndexing="",this.ariaHiddenSplits="",this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:l.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:l.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:l.nothing,this.renderWidth=()=>this.width?`width: ${this.width};`:l.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height||this.width?l.html`
          <style>
            :host .md-badge {
              ${this.renderBgColor()};
              ${this.renderTextColor()};
              ${this.renderHeight()};
              ${this.renderWidth()};
            }
          </style>
        `:l.nothing}static get styles(){return[r.A,h.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 l.html`
        ${this.getStyles()}
        <span
          tabindex=${(0,p.ifDefined)(this.computedTabIndex)}
          part="badge"
          class="md-badge ${(0,n.classMap)(t)}"
          aria-label=${this.ariaLabel}
        >
          ${this.split?(()=>l.html`
          <slot
            aria-hidden=${(0,p.ifDefined)(this.computedAriaHiddenSplits)}
            name="split-left"
            class="split split-left"
          ></slot>
          <span aria-hidden="true" class="split-separator"> | </span>
          <slot
            aria-hidden=${(0,p.ifDefined)(this.computedAriaHiddenSplits)}
            name="split-right"
            class="split split-right"
          ></slot>
        `)():l.nothing}
          <slot></slot>
        </span>
      `}};m([(0,a.property)({type:String})],e.prototype,"ariaLabel",void 0),m([(0,a.property)({type:String})],e.prototype,"color",void 0),m([(0,a.property)({type:String})],e.prototype,"bgColor",void 0),m([(0,a.property)({type:String})],e.prototype,"textColor",void 0),m([(0,a.property)({type:String})],e.prototype,"height",void 0),m([(0,a.property)({type:String})],e.prototype,"width",void 0),m([(0,a.property)({type:Boolean})],e.prototype,"outlined",void 0),m([(0,a.property)({type:Boolean})],e.prototype,"compact",void 0),m([(0,a.property)({type:Boolean})],e.prototype,"circle",void 0),m([(0,a.property)({type:Number,attribute:"circle-size"})],e.prototype,"circleSize",void 0),m([(0,a.property)({type:Number})],e.prototype,"size",void 0),m([(0,a.property)({type:Boolean})],e.prototype,"small",void 0),m([(0,a.property)({type:Boolean})],e.prototype,"split",void 0),m([(0,a.property)({type:Boolean})],e.prototype,"disabled",void 0),m([(0,a.property)({type:String})],e.prototype,"tabIndexing",void 0),m([(0,a.property)({type:String})],e.prototype,"ariaHiddenSplits",void 0),e=m([(0,o.w)("md-badge")],e),t.ELEMENT=e}(s||(s={}))},1479(t,e,i){i.r(e),i.d(e,{TaskItem:()=>s}),i(2245),i(7901),i(1821);var s,o=i(9609),r=i(4084),l=i(7161),a=i(429),n=i(5125),p=i(291),d=i(9244),h=i(5076),m=i(8634),c=function(t,e,i,s){var o,r=arguments.length,l=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(l=(r<3?o(l):r>3?o(e,i,l):o(e,i))||l);return r>3&&l&&Object.defineProperty(e,i,l),l};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.mediaType=d.r.TELEPHONY,this.status="",this.popovertitle="",this.queue="",this.queueTimeLabel="",this.accepted=!1,this.displayOnlyTitle=!1,this.quantity=0,this.lastmessage="",this.selected=!1,this.disabled=!1,this.customAriaLabel="",this.iconSrc="",this.tabIndexForContainer="0",this.isRestyle=!1,this.displayTitle="",this.titleValue="",this.itemTitleValue="",this.additionEmptyMargin=!1}get title(){return this.displayTitle}set title(t){this.titleValue=t,this.updateTitle()}get itemTitle(){return this.displayTitle}set itemTitle(t){this.itemTitleValue=t,this.updateTitle()}updateTitle(){this.itemTitleValue?this.displayTitle=this.itemTitleValue:this.displayTitle=this.titleValue}handleClick(t){this.dispatchEvent(new CustomEvent("taskitem-click",{composed:!0,bubbles:!0,detail:{srcEvent:t}})),this.blur()}handleKeyDown(t){this.dispatchEvent(new CustomEvent("taskitem-keydown",{detail:{key:t.code},bubbles:!0,composed:!0}))}getAriaLabel(){var t,e,i,s;if(this.customAriaLabel)return this.customAriaLabel;let o=this.queue;if(!o){const i=this.querySelector('[slot="queue"]');if(i){o=null!==(e=null===(t=i.textContent)||void 0===t?void 0:t.trim())&&void 0!==e?e:i.innerText.trim();const s=/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/.exec(o);if(s){const[,t=0,e,i]=s.map(Number);(new Date).setHours(t,e,i),o=o.replace(/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/,`${t?t+" hours ":""}${e} minutes ${i} seconds`)}}}const r=this.querySelector('[slot="queue-time"]');let l=this.queueTimeLabel;return r&&(l+=`${null!==(s=null===(i=r.textContent)||void 0===i?void 0:i.trim())&&void 0!==s?s:r.innerText.trim()}`),`${this.mediaType} ${this.status} ${this.popovertitle} ${this.itemTitle} ${o} ${l} ${this.quantity?this.quantity:""} ${this.lastmessage}`}static get styles(){return[r.A,m.A]}get sanitizedTabIndexForContainer(){var t;return null!==(t=parseInt(this.tabIndexForContainer))&&void 0!==t?t:0}handleAdditionSlotChange(){var t;const e=(null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-taskitem__addition")).getBoundingClientRect();this.additionEmptyMargin=0===e.width&&0===e.height}render(){return l.html`
        <div
          part="task-item-container"
          class="md-taskitem ${(0,n.classMap)({selected:this.selected})}"
          tabindex=${this.sanitizedTabIndexForContainer}
          @click=${t=>this.handleClick(t)}
          @keydown=${t=>this.handleKeyDown(t)}
          aria-label=${this.getAriaLabel()}
          aria-disabled=${(0,p.ifDefined)(this.disabled||void 0)}
        >
          <div class="md-taskitem__mediatype">
            ${(0,h.i0)(this.isRestyle,this.mediaType,this.selected,this.status,this.iconSrc)}
            ${this.status&&!this.isRestyle?l.html` <span class=${`md-taskitem__status ${this.status}`}> ${(0,h.LG)(this.status)} </span> `:l.nothing}
          </div>
          <div class="md-taskitem__content" part="task-item-content">
            ${this.popovertitle?l.html`
                  <span class="md-taskitem__content_popover_title"
                    ><md-tooltip placement="bottom" slot-to-tooltip>${this.popovertitle}</md-tooltip></span
                  >
                `:l.nothing}
            ${this.itemTitle?l.html`
                  <span
                    class="md-taskitem__content_title ${(0,n.classMap)({mainTitle:!this.popovertitle,"display-only-title":this.displayOnlyTitle})}"
                    ><md-tooltip placement="bottom" slot-to-tooltip>${this.itemTitle}</md-tooltip></span
                  >
                `:l.html`
                  <span class="md-taskitem__content_popover_title popover-item-title"><slot name="title"></slot></span>
                `}
            <div class="md-taskitem__content_inner">
              ${this.displayOnlyTitle?l.nothing:l.html`
                    <span class="md-taskitem__content_queue">
                      <md-tooltip placement="bottom" slot-to-tooltip>
                        ${this.queue.length>0?this.queue:l.html` <slot name="queue"></slot> `}
                      </md-tooltip>
                    </span>
                  `}
              ${this.queueTimeLabel.length>0||this.querySelector('[slot="queue-time"]')?l.html`
                    <span class="md-taskitem__content_queue_time">
                      <div class="md-taskitem__content_queue_time_dot"></div>
                      ${this.queueTimeLabel}
                      <slot name="queue-time"></slot>
                    </span>
                  `:l.nothing}
            </div>
            ${this.lastmessage?l.html`
                  <span class="md-taskitem__content_chat">
                    <span class="new-chat_massages">
                      <md-tooltip placement="bottom" slot-to-tooltip> ${this.lastmessage} </md-tooltip></span
                    >
                  </span>
                `:l.nothing}
            ${this.lastmessage?l.nothing:l.html` <slot name="lastmessage"></slot> `}
          </div>
          <div class="md-taskitem__addition ${(0,n.classMap)({empty_addition:this.additionEmptyMargin})}">
            <slot @slotchange=${this.handleAdditionSlotChange}></slot>
            ${(0,h.Um)(this.quantity,this.isRestyle,this)}
          </div>
        </div>
      `}};c([(0,a.property)({type:String})],e.prototype,"mediaType",void 0),c([(0,a.property)({type:String})],e.prototype,"status",void 0),c([(0,a.property)({type:String})],e.prototype,"popovertitle",void 0),c([(0,a.property)({type:String})],e.prototype,"queue",void 0),c([(0,a.property)({type:String,attribute:"queue-time-label"})],e.prototype,"queueTimeLabel",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"accepted",void 0),c([(0,a.property)({type:Boolean,attribute:"display-only-title"})],e.prototype,"displayOnlyTitle",void 0),c([(0,a.property)({type:Number})],e.prototype,"quantity",void 0),c([(0,a.property)({type:String})],e.prototype,"lastmessage",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"selected",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,a.property)({type:String})],e.prototype,"customAriaLabel",void 0),c([(0,a.property)({type:String})],e.prototype,"iconSrc",void 0),c([(0,a.property)({type:String})],e.prototype,"tabIndexForContainer",void 0),c([(0,a.property)({type:Boolean,attribute:"is-restyle"})],e.prototype,"isRestyle",void 0),c([(0,a.property)({type:String,reflect:!0})],e.prototype,"title",null),c([(0,a.property)({type:String,reflect:!0,attribute:"item-title"})],e.prototype,"itemTitle",null),c([(0,a.state)()],e.prototype,"additionEmptyMargin",void 0),e=c([(0,o.w)("md-task-item")],e),t.ELEMENT=e}(s||(s={}))},2022(t){t.exports=r},554(t){t.exports=l},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=o},318(t){t.exports=s},9756(t){t.exports=n},5314(t){t.exports=a}},h={};function m(t){var e=h[t];if(void 0!==e)return e.exports;var i=h[t]={exports:{}};return d[t](i,i.exports,m),i.exports}m.m=d,p=[],m.O=(t,e,i,s)=>{if(!e){var o=1/0;for(n=0;n<p.length;n++){for(var[e,i,s]=p[n],r=!0,l=0;l<e.length;l++)(!1&s||o>=s)&&Object.keys(m.O).every(t=>m.O[t](e[l]))?e.splice(l--,1):(r=!1,s<o&&(o=s));if(r){p.splice(n--,1);var a=i();void 0!==a&&(t=a)}}return t}s=s||0;for(var n=p.length;n>0&&p[n-1][2]>s;n--)p[n]=p[n-1];p[n]=[e,i,s]},m.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return m.d(e,{a:e}),e},m.d=(t,e)=>{for(var i in e)m.o(e,i)&&!m.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},m.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),m.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={8111:0,8339:0};m.O.j=e=>0===t[e];var e=(e,i)=>{var s,o,[r,l,a]=i,n=0;if(r.some(e=>0!==t[e])){for(s in l)m.o(l,s)&&(m.m[s]=l[s]);if(a)var p=a(m)}for(e&&e(i);n<r.length;n++)o=r[n],m.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return m.O(p)},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 c=m.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,6325,4449,1392,1618,378,2245,3543,861,4958],()=>m(1479));return m.O(c)})());