@progress/kendo-angular-conversational-ui 4.1.0-dev.202204051239 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,4 +17,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
17
17
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18
18
  PERFORMANCE OF THIS SOFTWARE.
19
19
  ***************************************************************************** */
20
- var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function a(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function i(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]])}return n}function s(e,t,n,o){var a,r=arguments.length,i=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(r<3?a(i):r>3?a(t,n,i):a(t,n))||i);return r>3&&i&&Object.defineProperty(t,n,i),i}function c(e,t){return function(n,o){t(n,o,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,o){return new(n||(n=Promise))((function(a,r){function i(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((o=o.apply(e,t||[])).next())}))}function d(e,t){var n,o,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,o=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e],o=0}finally{n=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function p(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}function m(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function g(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,a,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}function h(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),a=0;for(t=0;t<n;t++)for(var r=arguments[t],i=0,s=r.length;i<s;i++,a++)o[a]=r[i];return o}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function v(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,a=n.apply(e,t||[]),r=[];return o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o;function i(e){a[e]&&(o[e]=function(t){return new Promise((function(n,o){r.push([e,t,n,o])>1||s(e,t)}))})}function s(e,t){try{(n=a[e](t)).value instanceof y?Promise.resolve(n.value.v).then(c,u):l(r[0][2],n)}catch(e){l(r[0][3],e)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),r.shift(),r.length&&s(r[0][0],r[0][1])}}function b(e){var t,n;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,a){t[o]=e[o]?function(t){return(n=!n)?{value:y(e[o](t)),done:"return"===o}:a?a(t):t}:a}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=g(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,a){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,a,(t=e[n](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function M(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function O(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(15);t.ChatComponent=o.ChatComponent;var a=n(8);t.AttachmentTemplateDirective=a.AttachmentTemplateDirective;var r=n(4);t.MessageTemplateDirective=r.MessageTemplateDirective;var i=n(5);t.ChatMessageBoxTemplateDirective=i.ChatMessageBoxTemplateDirective},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=o.__decorate([a.Directive({selector:"[kendoChatMessageTemplate]"}),o.__param(0,a.Optional()),o.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.MessageTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=o.__decorate([a.Directive({selector:"[kendoChatMessageBoxTemplate]"}),o.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.ChatMessageBoxTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){};t.ChatItem=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){this.message=e};t.SendMessageEvent=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=o.__decorate([a.Directive({selector:"[kendoChatAttachmentTemplate]"}),o.__param(0,a.Optional()),o.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.AttachmentTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(7),i=n(3),s=n(10),c=n(5),u=function(){function e(){this.hostClasses="k-message-box k-input k-input-md k-rounded-md k-input-solid",this.sendMessage=new a.EventEmitter}return Object.defineProperty(e.prototype,"messageBoxValue",{get:function(){return"textarea"===this.type},enumerable:!0,configurable:!0}),e.prototype.sendClick=function(){var e=this.messageBoxInput.nativeElement,t=e.value;if(t){var n={author:this.user,text:t,timestamp:new Date};this.sendMessage.emit(new r.SendMessageEvent(n)),e.value=null,e.focus(),this.autoScroll=!0}},e.prototype.inputKeydown=function(e){e.keyCode===s.Keys.Enter&&this.sendClick()},e.prototype.textAreaKeydown=function(e){if(e.keyCode===s.Keys.Enter){var t=e.metaKey||e.ctrlKey;!(e.shiftKey||e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.sendClick()),t&&(this.messageBoxInput.nativeElement.value+="\r\n")}},e.prototype.textFor=function(e){return this.localization.get(e)},o.__decorate([a.HostBinding("class"),o.__metadata("design:type",String)],e.prototype,"hostClasses",void 0),o.__decorate([a.HostBinding("class.!k-align-items-end"),o.__metadata("design:type",Boolean),o.__metadata("design:paramtypes",[])],e.prototype,"messageBoxValue",null),o.__decorate([a.ViewChild("messageBoxInput",{static:!1}),o.__metadata("design:type",a.ElementRef)],e.prototype,"messageBoxInput",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Object)],e.prototype,"user",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],e.prototype,"autoScroll",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"type",void 0),o.__decorate([a.Input(),o.__metadata("design:type",i.LocalizationService)],e.prototype,"localization",void 0),o.__decorate([a.Input(),o.__metadata("design:type",c.ChatMessageBoxTemplateDirective)],e.prototype,"messageBoxTemplate",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"sendMessage",void 0),e=o.__decorate([a.Component({selector:"kendo-message-box",template:'\n <ng-container *ngIf="!messageBoxTemplate">\n <input\n *ngIf="type === \'textbox\'"\n #messageBoxInput\n kendoChatFocusedState\n type="text"\n class="k-textbox k-input k-input-md k-input-solid"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n />\n\n <textarea\n *ngIf="type === \'textarea\'"\n #messageBoxInput\n kendoChatFocusedState\n [rows]="3"\n class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="textAreaKeydown($event)"\n ></textarea>\n\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n [tabindex]="0"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n >\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg>\n </button>\n </ng-container>\n\n <ng-template *ngIf="messageBoxTemplate" [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>\n'})],e)}();t.MessageBoxComponent=u},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),o.__decorate([a.Input(),o.__metadata("design:type",String)],t.prototype,"messagePlaceholder",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],t.prototype,"send",void 0),t}(n(3).ComponentMessages);t.Messages=r},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=function(e){function t(t,n){var o=e.call(this)||this;return o.action=t,o.message=n,o}return o.__extends(t,e),t}(n(32).PreventableEvent);t.ExecuteActionEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);o.__exportStar(n(2),t),o.__exportStar(n(19),t),o.__exportStar(n(13),t),o.__exportStar(n(7),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(8),i=n(3),s=n(16),c=n(4),u=n(17),l=n(18),d=n(5),p=n(9),m=function(){function e(e,t){var n=this;this.localization=e,this.zone=t,this.messageBoxType="textbox",this.sendMessage=new a.EventEmitter,this.executeAction=new a.EventEmitter,this.autoScroll=!0,u.validatePackage(l.packageMetadata),this.direction=e.rtl?"rtl":"ltr",this.localizationChangeSubscription=e.changes.subscribe((function(e){var t=e.rtl;n.direction=t?"rtl":"ltr"}))}return Object.defineProperty(e.prototype,"className",{get:function(){return"k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localizationText",{get:function(){return this.localization},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(){var e=this;this.zone.runOutsideAngular((function(){return setTimeout((function(){e.messageList.nativeElement.style.flex="1 1 auto"}))}))},e.prototype.ngAfterViewInit=function(){if(a.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},e.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},e.prototype.dispatchAction=function(e){(this.executeAction.emit(e),e.isDefaultPrevented())||(s.makeHandler(e.action)(e.action,this),this.messageBoxTemplate||this.messageBox.messageBoxInput.nativeElement.focus())},e.prototype.textFor=function(e){return this.localization.get(e)},o.__decorate([a.Input(),o.__metadata("design:type",Array)],e.prototype,"messages",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Object)],e.prototype,"user",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"messageBoxType",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"sendMessage",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"executeAction",void 0),o.__decorate([a.HostBinding("class"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],e.prototype,"className",null),o.__decorate([a.HostBinding("attr.dir"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],e.prototype,"dirAttr",null),o.__decorate([a.ContentChild(r.AttachmentTemplateDirective,{static:!1}),o.__metadata("design:type",r.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),o.__decorate([a.ContentChild(c.MessageTemplateDirective,{static:!1}),o.__metadata("design:type",c.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),o.__decorate([a.ContentChild(d.ChatMessageBoxTemplateDirective,{static:!1}),o.__metadata("design:type",d.ChatMessageBoxTemplateDirective)],e.prototype,"messageBoxTemplate",void 0),o.__decorate([a.ViewChild("messageBox",{static:!1}),o.__metadata("design:type",p.MessageBoxComponent)],e.prototype,"messageBox",void 0),o.__decorate([a.ViewChild("messageList",{static:!0}),o.__metadata("design:type",a.ElementRef)],e.prototype,"messageList",void 0),e=o.__decorate([a.Component({providers:[i.LocalizationService,{provide:i.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n <kendo-message-box\n #messageBox\n [messageBoxTemplate]="messageBoxTemplate"\n [type]="messageBoxType"\n [user]="user"\n [autoScroll]="autoScroll"\n [localization]="localizationText"\n (sendMessage)="sendMessage.emit($event)"\n >\n </kendo-message-box>\n '}),o.__metadata("design:paramtypes",[i.LocalizationService,a.NgZone])],e)}();t.ChatComponent=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){},r={reply:function(e,t){t.sendMessage.emit(new o.SendMessageEvent({author:t.user,text:e.value,timestamp:new Date}))},call:function(e){window.open("tel:"+e.value)},openUrl:function(e){window.open(e.value)}};t.makeHandler=function(e){return r[e.type]||a}},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1649162313,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(20),r=n(2),i=n(21),s=n(22),c=n(10),u=n(23),l=n(24),d=n(25),p=n(26),m=n(27),g=n(30),f=n(31),_=n(1),h=n(35),y=n(36),v=n(9),b=n(5),k=[r.ChatComponent,u.CustomMessagesComponent,r.AttachmentTemplateDirective,r.MessageTemplateDirective,d.HeroCardComponent,b.ChatMessageBoxTemplateDirective],x=[a.AttachmentComponent,l.FocusedStateDirective,p.LocalizedMessagesDirective,m.MessageAttachmentsComponent,g.MessageComponent,f.MessageListComponent,r.MessageTemplateDirective,h.ScrollAnchorDirective,y.SuggestedActionsComponent,v.MessageBoxComponent],w=function(){function e(){}return e=o.__decorate([_.NgModule({declarations:k.concat(x),exports:[k],imports:[i.ButtonModule,s.CommonModule,c.ResizeSensorModule]})],e)}();t.ChatModule=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(2),i=function(){function e(){}return Object.defineProperty(e.prototype,"attachment",{get:function(){return this._attachment},set:function(e){this._attachment=e,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),o.__decorate([a.Input(),o.__metadata("design:type",Object),o.__metadata("design:paramtypes",[Object])],e.prototype,"attachment",null),o.__decorate([a.Input(),o.__metadata("design:type",r.AttachmentTemplateDirective)],e.prototype,"template",void 0),e=o.__decorate([a.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],e)}();t.AttachmentComponent=i},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(3),i=n(11),s=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return o.__extends(t,e),n=t,Object.defineProperty(t.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),t=n=o.__decorate([a.Component({providers:[{provide:i.Messages,useExisting:a.forwardRef((function(){return n}))}],selector:"kendo-chat-messages",template:""}),o.__metadata("design:paramtypes",[r.LocalizationService])],t)}(i.Messages);t.CustomMessagesComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(){this.focused=!1}return e.prototype.onFocus=function(){this.focused=!0},e.prototype.onBlur=function(){this.focused=!1},o.__decorate([a.HostBinding("class.k-focus"),o.__metadata("design:type",Boolean)],e.prototype,"focused",void 0),o.__decorate([a.HostListener("focusin"),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],e.prototype,"onFocus",null),o.__decorate([a.HostListener("focusout"),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=o.__decorate([a.Directive({selector:"[kendoChatFocusedState]"})],e)}();t.FocusedStateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(){this.cssClass=!0,this.executeAction=new a.EventEmitter}return e.prototype.onClick=function(e){this.executeAction.next(e)},o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"imageUrl",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"title",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"subtitle",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Array)],e.prototype,"actions",void 0),o.__decorate([a.HostBinding("class.k-card"),o.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"executeAction",void 0),e=o.__decorate([a.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)"\n >\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],e)}();t.HeroCardComponent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(3),i=n(11),s=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return o.__extends(t,e),n=t,t=n=o.__decorate([a.Directive({providers:[{provide:i.Messages,useExisting:a.forwardRef((function(){return n}))}],selector:"[kendoChatLocalizedMessages]"}),o.__metadata("design:paramtypes",[r.LocalizationService])],t)}(i.Messages);t.LocalizedMessagesDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(28),i=n(29),s=n(6),c=n(2),u=function(e){function t(t){var n,o,a=e.call(this)||this;return a.zone=t,a.scrollPosition=0,a.selectedIndex=0,a.carouselKeyHandlers=((n={})[37]=function(e){return a.navigateTo(e,-1)},n[39]=function(e){return a.navigateTo(e,1)},n),a.listKeyHandlers=((o={})[38]=function(e){return a.navigateTo(e,-1)},o[40]=function(e){return a.navigateTo(e,1)},o),a}var n;return o.__extends(t,e),n=t,Object.defineProperty(t.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.scrollSubscription=r.fromEvent(e.deck.nativeElement,"scroll").pipe(i.debounceTime(100)).subscribe((function(){return e.onScroll()}))}))},t.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},t.prototype.isSelected=function(e){return this.selectedIndex===e},t.prototype.itemKeydown=function(e,t){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[e.keyCode];n&&n(e,t)},t.prototype.itemClick=function(e){this.select(e)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.scrollTo=function(e){var t=this.deck.nativeElement,n=t.scrollWidth/this.items.length,o=t.scrollWidth-t.offsetWidth,a=t.scrollLeft+n*e;t.scrollLeft=Math.max(0,Math.min(o,a))},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,o=Math.max(0,Math.min(n+t,this.items.length-1));o!==n&&(this.select(o),e.preventDefault())},t.prototype.onScroll=function(){var e=this,t=this.deck.nativeElement;if(0!==t.scrollWidth){var n=t.scrollLeft/(t.scrollWidth-t.offsetWidth);n!==this.scrollPosition&&this.zone.run((function(){e.scrollPosition=n}))}},o.__decorate([a.Input(),o.__metadata("design:type",Array)],t.prototype,"attachments",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],t.prototype,"layout",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),o.__decorate([a.Input(),o.__metadata("design:type",c.AttachmentTemplateDirective)],t.prototype,"template",void 0),o.__decorate([a.HostBinding("class.k-card-deck-scrollwrap"),o.__metadata("design:type",Boolean),o.__metadata("design:paramtypes",[])],t.prototype,"carousel",null),o.__decorate([a.ViewChild("deck",{read:a.ElementRef,static:!0}),o.__metadata("design:type",a.ElementRef)],t.prototype,"deck",void 0),o.__decorate([a.ViewChildren("item",{read:a.ElementRef}),o.__metadata("design:type",a.QueryList)],t.prototype,"items",void 0),t=n=o.__decorate([a.Component({providers:[{provide:s.ChatItem,useExisting:a.forwardRef((function(){return n}))}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),o.__metadata("design:paramtypes",[a.NgZone])],t)}(s.ChatItem);t.MessageAttachmentsComponent=u},function(e,t){e.exports=s},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(6),i=n(4),s=n(12),c=function(e){function t(t,n){var o=e.call(this)||this;return o.element=t,o.intl=n,o.cssClass=!0,o}var n;return o.__extends(t,e),n=t,Object.defineProperty(t.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),t.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{datetime:"short"})},t.prototype.focus=function(){this.element.nativeElement.focus()},o.__decorate([a.Input(),o.__metadata("design:type",Object)],t.prototype,"message",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),o.__decorate([a.Input(),o.__metadata("design:type",i.MessageTemplateDirective)],t.prototype,"template",void 0),o.__decorate([a.HostBinding("class.k-message"),o.__metadata("design:type",Boolean)],t.prototype,"cssClass",void 0),o.__decorate([a.HostBinding("class.k-state-selected"),a.HostBinding("class.k-state-focused"),o.__metadata("design:type",Boolean)],t.prototype,"selected",void 0),o.__decorate([a.HostBinding("attr.tabIndex"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],t.prototype,"tabIndex",null),t=n=o.__decorate([a.Component({selector:"kendo-chat-message",providers:[{provide:r.ChatItem,useExisting:a.forwardRef((function(){return n}))}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),o.__metadata("design:paramtypes",[a.ElementRef,s.IntlService])],t)}(r.ChatItem);t.MessageComponent=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(13),i=n(33),s=n(6),c=n(34),u=n(2),l=n(4),d=n(12),p=function(){function e(e,t){var n,o=this;this.element=e,this.intl=t,this.executeAction=new a.EventEmitter,this.navigate=new a.EventEmitter,this.resize=new a.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((n={})[38]=function(e){return o.navigateTo(e,-1)},n[40]=function(e){return o.navigateTo(e,1)},n)}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._messages},set:function(e){var t=e||[];this.view=c.chatView(t),this._messages=t},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},e.prototype.onResize=function(){this.resize.emit()},e.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{date:"full"})},e.prototype.onKeydown=function(e){var t=this.keyActions[e.keyCode];t&&t(e)},e.prototype.onBlur=function(e){var t=this,n=e.relatedTarget||document.activeElement;!i.closest(n,(function(e){return e===t.element.nativeElement}))&&this.select(null)},e.prototype.isOwnMessage=function(e){return c.isAuthor(this.user,e)},e.prototype.dispatchAction=function(e,t){var n=new r.ExecuteActionEvent(e,t);this.executeAction.emit(n)},e.prototype.trackGroup=function(e,t){return t.trackBy},e.prototype.select=function(e){var t=this.selectedItem;t&&(t.selected=!1),e&&(e.selected=!0,this.selectedItem=e)},e.prototype.last=function(e){if(e&&0!==e.length)return e[e.length-1]},e.prototype.navigateTo=function(e,t){var n=this.items.toArray(),o=this.selectedItem,a=n.indexOf(o),r=n[Math.max(0,Math.min(a+t,this.items.length-1))];r!==o&&(this.select(r),r.focus(),this.navigate.emit(),e.preventDefault())},o.__decorate([a.Input(),o.__metadata("design:type",Array),o.__metadata("design:paramtypes",[Array])],e.prototype,"messages",null),o.__decorate([a.Input(),o.__metadata("design:type",u.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),o.__decorate([a.Input(),o.__metadata("design:type",l.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Object)],e.prototype,"user",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"executeAction",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"navigate",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"resize",void 0),o.__decorate([a.ViewChildren(s.ChatItem),o.__metadata("design:type",a.QueryList)],e.prototype,"items",void 0),o.__decorate([a.HostBinding("class.k-message-list-content"),o.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),o.__decorate([a.HostListener("keydown",["$event"]),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],e.prototype,"onKeydown",null),o.__decorate([a.HostListener("focusout",["$event"]),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[FocusEvent]),o.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=o.__decorate([a.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),o.__metadata("design:paramtypes",[a.ElementRef,d.IntlService])],e)}();t.MessageListComponent=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.prevented=!1}return e.prototype.preventDefault=function(){this.prevented=!0},e.prototype.isDefaultPrevented=function(){return this.prevented},e}();t.PreventableEvent=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);t.isAuthor=function(e,t){return e&&t.author&&e.id===t.author.id};var a=function(e){return e[e.length-1]},r=function(e){return function(n,r,i){var s=i===e-1;return function(e,t){var n,o,r=t.timestamp,i=a(e);if(r&&(!i||(n=r,o=i.timestamp,n&&o&&(o.getDate()!==n.getDate()||o.getMonth()!==n.getMonth()||o.getFullYear()!==n.getFullYear())))){var s={type:"date-marker",timestamp:r,trackBy:r.getTime()};e.push(s)}}(n,r),function(e,n,r){var i,s=a(e);if(o.isDevMode()&&!n.author)throw new Error("Author must be set for message: "+JSON.stringify(n));n.typing&&!r||(s&&"message-group"===s.type&&(i=s.messages),i&&t.isAuthor(n.author,a(i))?i.push(n):e.push({type:"message-group",messages:[n],author:n.author,timestamp:n.timestamp,trackBy:n}))}(n,r,s),r.attachments&&r.attachments.length>1&&n.push({type:"attachment-group",attachments:r.attachments,attachmentLayout:r.attachmentLayout,timestamp:r.timestamp,trackBy:r}),r.suggestedActions&&s&&n.push({type:"action-group",actions:r.suggestedActions,timestamp:r.timestamp,trackBy:r}),n}};t.chatView=function(e){return e.reduce(r(e.length),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(e,t,n){this.element=e,this.zone=t,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new a.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}return e.prototype.ngOnInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.unsubscribe=e.renderer.listen(e.element.nativeElement,"scroll",(function(){return e.onScroll()}))}))},e.prototype.ngAfterViewInit=function(){this.scrollToBottom()},e.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.onScroll=function(){var e=this;if(!this.scrolling){var t=this.element.nativeElement,n=t.scrollTop+t.offsetHeight,o=t.scrollHeight-n<2;this.autoScroll!==o&&this.zone.run((function(){e.autoScroll=o,e.autoScrollChange.emit(e.autoScroll)}))}},e.prototype.scrollToBottom=function(){var e=this;if(this.autoScroll){var t=this.element.nativeElement;t.scrollTop=t.scrollHeight-t.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular((function(){return setTimeout((function(){return e.scrolling=!1}),1e3)}))}},o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],e.prototype,"autoScroll",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"autoScrollChange",void 0),o.__decorate([a.HostBinding("style.overflow-anchor"),o.__metadata("design:type",String)],e.prototype,"overflowAnchor",void 0),e=o.__decorate([a.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),o.__metadata("design:paramtypes",[a.ElementRef,a.NgZone,a.Renderer2])],e)}();t.ScrollAnchorDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(6),i=function(e){function t(){var t,n=null!==e&&e.apply(this,arguments)||this;return n.dispatch=new a.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((t={})[37]=function(e){return n.navigateTo(e,-1)},t[39]=function(e){return n.navigateTo(e,1)},t[13]=function(e,t){return n.actionClick(t)},t),n}var n;return o.__extends(t,e),n=t,t.prototype.isSelected=function(e){return this.selected&&this.selectedIndex===e},t.prototype.actionClick=function(e){this.dispatch.next(e)},t.prototype.actionKeydown=function(e,t){var n=this.keyHandlers[e.keyCode];n&&n(e,t)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,o=Math.max(0,Math.min(n+t,this.items.length-1));o!==n&&(this.select(o),e.preventDefault())},o.__decorate([a.Input(),o.__metadata("design:type",Array)],t.prototype,"actions",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],t.prototype,"dispatch",void 0),o.__decorate([a.HostBinding("class.k-quick-replies"),o.__metadata("design:type",Boolean)],t.prototype,"defaultClass",void 0),o.__decorate([a.ViewChildren("item"),o.__metadata("design:type",a.QueryList)],t.prototype,"items",void 0),t=n=o.__decorate([a.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:r.ChatItem,useExisting:a.forwardRef((function(){return n}))}],template:'\n <span\n #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],t)}(r.ChatItem);t.SuggestedActionsComponent=i}])}));
20
+ var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function a(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function i(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]])}return n}function s(e,t,n,o){var a,r=arguments.length,i=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(r<3?a(i):r>3?a(t,n,i):a(t,n))||i);return r>3&&i&&Object.defineProperty(t,n,i),i}function c(e,t){return function(n,o){t(n,o,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,o){return new(n||(n=Promise))((function(a,r){function i(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((o=o.apply(e,t||[])).next())}))}function d(e,t){var n,o,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,o=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e],o=0}finally{n=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function p(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}function m(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function g(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,a,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}function h(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),a=0;for(t=0;t<n;t++)for(var r=arguments[t],i=0,s=r.length;i<s;i++,a++)o[a]=r[i];return o}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function v(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,a=n.apply(e,t||[]),r=[];return o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o;function i(e){a[e]&&(o[e]=function(t){return new Promise((function(n,o){r.push([e,t,n,o])>1||s(e,t)}))})}function s(e,t){try{(n=a[e](t)).value instanceof y?Promise.resolve(n.value.v).then(c,u):l(r[0][2],n)}catch(e){l(r[0][3],e)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),r.shift(),r.length&&s(r[0][0],r[0][1])}}function b(e){var t,n;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,a){t[o]=e[o]?function(t){return(n=!n)?{value:y(e[o](t)),done:"return"===o}:a?a(t):t}:a}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=g(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,a){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,a,(t=e[n](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function M(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function O(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(15);t.ChatComponent=o.ChatComponent;var a=n(8);t.AttachmentTemplateDirective=a.AttachmentTemplateDirective;var r=n(4);t.MessageTemplateDirective=r.MessageTemplateDirective;var i=n(5);t.ChatMessageBoxTemplateDirective=i.ChatMessageBoxTemplateDirective},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=o.__decorate([a.Directive({selector:"[kendoChatMessageTemplate]"}),o.__param(0,a.Optional()),o.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.MessageTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=o.__decorate([a.Directive({selector:"[kendoChatMessageBoxTemplate]"}),o.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.ChatMessageBoxTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){};t.ChatItem=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){this.message=e};t.SendMessageEvent=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=o.__decorate([a.Directive({selector:"[kendoChatAttachmentTemplate]"}),o.__param(0,a.Optional()),o.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.AttachmentTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(7),i=n(3),s=n(10),c=n(5),u=function(){function e(){this.hostClasses="k-message-box k-input k-input-md k-rounded-md k-input-solid",this.sendMessage=new a.EventEmitter}return Object.defineProperty(e.prototype,"messageBoxValue",{get:function(){return"textarea"===this.type},enumerable:!0,configurable:!0}),e.prototype.sendClick=function(){var e=this.messageBoxInput.nativeElement,t=e.value;if(t){var n={author:this.user,text:t,timestamp:new Date};this.sendMessage.emit(new r.SendMessageEvent(n)),e.value=null,e.focus(),this.autoScroll=!0}},e.prototype.inputKeydown=function(e){e.keyCode===s.Keys.Enter&&this.sendClick()},e.prototype.textAreaKeydown=function(e){if(e.keyCode===s.Keys.Enter){var t=e.metaKey||e.ctrlKey;!(e.shiftKey||e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.sendClick()),t&&(this.messageBoxInput.nativeElement.value+="\r\n")}},e.prototype.textFor=function(e){return this.localization.get(e)},o.__decorate([a.HostBinding("class"),o.__metadata("design:type",String)],e.prototype,"hostClasses",void 0),o.__decorate([a.HostBinding("class.!k-align-items-end"),o.__metadata("design:type",Boolean),o.__metadata("design:paramtypes",[])],e.prototype,"messageBoxValue",null),o.__decorate([a.ViewChild("messageBoxInput",{static:!1}),o.__metadata("design:type",a.ElementRef)],e.prototype,"messageBoxInput",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Object)],e.prototype,"user",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],e.prototype,"autoScroll",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"type",void 0),o.__decorate([a.Input(),o.__metadata("design:type",i.LocalizationService)],e.prototype,"localization",void 0),o.__decorate([a.Input(),o.__metadata("design:type",c.ChatMessageBoxTemplateDirective)],e.prototype,"messageBoxTemplate",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"sendMessage",void 0),e=o.__decorate([a.Component({selector:"kendo-message-box",template:'\n <ng-container *ngIf="!messageBoxTemplate">\n <input\n *ngIf="type === \'textbox\'"\n #messageBoxInput\n kendoChatFocusedState\n type="text"\n class="k-textbox k-input k-input-md k-input-solid"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n />\n\n <textarea\n *ngIf="type === \'textarea\'"\n #messageBoxInput\n kendoChatFocusedState\n [rows]="3"\n class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="textAreaKeydown($event)"\n ></textarea>\n\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n [tabindex]="0"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n >\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg>\n </button>\n </ng-container>\n\n <ng-template *ngIf="messageBoxTemplate" [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>\n'})],e)}();t.MessageBoxComponent=u},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),o.__decorate([a.Input(),o.__metadata("design:type",String)],t.prototype,"messagePlaceholder",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],t.prototype,"send",void 0),t}(n(3).ComponentMessages);t.Messages=r},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=function(e){function t(t,n){var o=e.call(this)||this;return o.action=t,o.message=n,o}return o.__extends(t,e),t}(n(32).PreventableEvent);t.ExecuteActionEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);o.__exportStar(n(2),t),o.__exportStar(n(19),t),o.__exportStar(n(13),t),o.__exportStar(n(7),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(8),i=n(3),s=n(16),c=n(4),u=n(17),l=n(18),d=n(5),p=n(9),m=function(){function e(e,t){var n=this;this.localization=e,this.zone=t,this.messageBoxType="textbox",this.sendMessage=new a.EventEmitter,this.executeAction=new a.EventEmitter,this.autoScroll=!0,u.validatePackage(l.packageMetadata),this.direction=e.rtl?"rtl":"ltr",this.localizationChangeSubscription=e.changes.subscribe((function(e){var t=e.rtl;n.direction=t?"rtl":"ltr"}))}return Object.defineProperty(e.prototype,"className",{get:function(){return"k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localizationText",{get:function(){return this.localization},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(){var e=this;this.zone.runOutsideAngular((function(){return setTimeout((function(){e.messageList.nativeElement.style.flex="1 1 auto"}))}))},e.prototype.ngAfterViewInit=function(){if(a.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},e.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},e.prototype.dispatchAction=function(e){(this.executeAction.emit(e),e.isDefaultPrevented())||(s.makeHandler(e.action)(e.action,this),this.messageBoxTemplate||this.messageBox.messageBoxInput.nativeElement.focus())},e.prototype.textFor=function(e){return this.localization.get(e)},o.__decorate([a.Input(),o.__metadata("design:type",Array)],e.prototype,"messages",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Object)],e.prototype,"user",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"messageBoxType",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"sendMessage",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"executeAction",void 0),o.__decorate([a.HostBinding("class"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],e.prototype,"className",null),o.__decorate([a.HostBinding("attr.dir"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],e.prototype,"dirAttr",null),o.__decorate([a.ContentChild(r.AttachmentTemplateDirective,{static:!1}),o.__metadata("design:type",r.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),o.__decorate([a.ContentChild(c.MessageTemplateDirective,{static:!1}),o.__metadata("design:type",c.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),o.__decorate([a.ContentChild(d.ChatMessageBoxTemplateDirective,{static:!1}),o.__metadata("design:type",d.ChatMessageBoxTemplateDirective)],e.prototype,"messageBoxTemplate",void 0),o.__decorate([a.ViewChild("messageBox",{static:!1}),o.__metadata("design:type",p.MessageBoxComponent)],e.prototype,"messageBox",void 0),o.__decorate([a.ViewChild("messageList",{static:!0}),o.__metadata("design:type",a.ElementRef)],e.prototype,"messageList",void 0),e=o.__decorate([a.Component({providers:[i.LocalizationService,{provide:i.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n <kendo-message-box\n #messageBox\n [messageBoxTemplate]="messageBoxTemplate"\n [type]="messageBoxType"\n [user]="user"\n [autoScroll]="autoScroll"\n [localization]="localizationText"\n (sendMessage)="sendMessage.emit($event)"\n >\n </kendo-message-box>\n '}),o.__metadata("design:paramtypes",[i.LocalizationService,a.NgZone])],e)}();t.ChatComponent=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=function(){},r={reply:function(e,t){t.sendMessage.emit(new o.SendMessageEvent({author:t.user,text:e.value,timestamp:new Date}))},call:function(e){window.open("tel:"+e.value)},openUrl:function(e){window.open(e.value)}};t.makeHandler=function(e){return r[e.type]||a}},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1649323827,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(20),r=n(2),i=n(21),s=n(22),c=n(10),u=n(23),l=n(24),d=n(25),p=n(26),m=n(27),g=n(30),f=n(31),_=n(1),h=n(35),y=n(36),v=n(9),b=n(5),k=[r.ChatComponent,u.CustomMessagesComponent,r.AttachmentTemplateDirective,r.MessageTemplateDirective,d.HeroCardComponent,b.ChatMessageBoxTemplateDirective],x=[a.AttachmentComponent,l.FocusedStateDirective,p.LocalizedMessagesDirective,m.MessageAttachmentsComponent,g.MessageComponent,f.MessageListComponent,r.MessageTemplateDirective,h.ScrollAnchorDirective,y.SuggestedActionsComponent,v.MessageBoxComponent],w=function(){function e(){}return e=o.__decorate([_.NgModule({declarations:k.concat(x),exports:[k],imports:[i.ButtonModule,s.CommonModule,c.ResizeSensorModule]})],e)}();t.ChatModule=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(2),i=function(){function e(){}return Object.defineProperty(e.prototype,"attachment",{get:function(){return this._attachment},set:function(e){this._attachment=e,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),o.__decorate([a.Input(),o.__metadata("design:type",Object),o.__metadata("design:paramtypes",[Object])],e.prototype,"attachment",null),o.__decorate([a.Input(),o.__metadata("design:type",r.AttachmentTemplateDirective)],e.prototype,"template",void 0),e=o.__decorate([a.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],e)}();t.AttachmentComponent=i},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(3),i=n(11),s=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return o.__extends(t,e),n=t,Object.defineProperty(t.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),t=n=o.__decorate([a.Component({providers:[{provide:i.Messages,useExisting:a.forwardRef((function(){return n}))}],selector:"kendo-chat-messages",template:""}),o.__metadata("design:paramtypes",[r.LocalizationService])],t)}(i.Messages);t.CustomMessagesComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(){this.focused=!1}return e.prototype.onFocus=function(){this.focused=!0},e.prototype.onBlur=function(){this.focused=!1},o.__decorate([a.HostBinding("class.k-focus"),o.__metadata("design:type",Boolean)],e.prototype,"focused",void 0),o.__decorate([a.HostListener("focusin"),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],e.prototype,"onFocus",null),o.__decorate([a.HostListener("focusout"),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=o.__decorate([a.Directive({selector:"[kendoChatFocusedState]"})],e)}();t.FocusedStateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(){this.cssClass=!0,this.executeAction=new a.EventEmitter}return e.prototype.onClick=function(e){this.executeAction.next(e)},o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"imageUrl",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"title",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"subtitle",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Array)],e.prototype,"actions",void 0),o.__decorate([a.HostBinding("class.k-card"),o.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"executeAction",void 0),e=o.__decorate([a.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)"\n >\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],e)}();t.HeroCardComponent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(3),i=n(11),s=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return o.__extends(t,e),n=t,t=n=o.__decorate([a.Directive({providers:[{provide:i.Messages,useExisting:a.forwardRef((function(){return n}))}],selector:"[kendoChatLocalizedMessages]"}),o.__metadata("design:paramtypes",[r.LocalizationService])],t)}(i.Messages);t.LocalizedMessagesDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(28),i=n(29),s=n(6),c=n(2),u=function(e){function t(t){var n,o,a=e.call(this)||this;return a.zone=t,a.scrollPosition=0,a.selectedIndex=0,a.carouselKeyHandlers=((n={})[37]=function(e){return a.navigateTo(e,-1)},n[39]=function(e){return a.navigateTo(e,1)},n),a.listKeyHandlers=((o={})[38]=function(e){return a.navigateTo(e,-1)},o[40]=function(e){return a.navigateTo(e,1)},o),a}var n;return o.__extends(t,e),n=t,Object.defineProperty(t.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.scrollSubscription=r.fromEvent(e.deck.nativeElement,"scroll").pipe(i.debounceTime(100)).subscribe((function(){return e.onScroll()}))}))},t.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},t.prototype.isSelected=function(e){return this.selectedIndex===e},t.prototype.itemKeydown=function(e,t){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[e.keyCode];n&&n(e,t)},t.prototype.itemClick=function(e){this.select(e)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.scrollTo=function(e){var t=this.deck.nativeElement,n=t.scrollWidth/this.items.length,o=t.scrollWidth-t.offsetWidth,a=t.scrollLeft+n*e;t.scrollLeft=Math.max(0,Math.min(o,a))},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,o=Math.max(0,Math.min(n+t,this.items.length-1));o!==n&&(this.select(o),e.preventDefault())},t.prototype.onScroll=function(){var e=this,t=this.deck.nativeElement;if(0!==t.scrollWidth){var n=t.scrollLeft/(t.scrollWidth-t.offsetWidth);n!==this.scrollPosition&&this.zone.run((function(){e.scrollPosition=n}))}},o.__decorate([a.Input(),o.__metadata("design:type",Array)],t.prototype,"attachments",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],t.prototype,"layout",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),o.__decorate([a.Input(),o.__metadata("design:type",c.AttachmentTemplateDirective)],t.prototype,"template",void 0),o.__decorate([a.HostBinding("class.k-card-deck-scrollwrap"),o.__metadata("design:type",Boolean),o.__metadata("design:paramtypes",[])],t.prototype,"carousel",null),o.__decorate([a.ViewChild("deck",{read:a.ElementRef,static:!0}),o.__metadata("design:type",a.ElementRef)],t.prototype,"deck",void 0),o.__decorate([a.ViewChildren("item",{read:a.ElementRef}),o.__metadata("design:type",a.QueryList)],t.prototype,"items",void 0),t=n=o.__decorate([a.Component({providers:[{provide:s.ChatItem,useExisting:a.forwardRef((function(){return n}))}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),o.__metadata("design:paramtypes",[a.NgZone])],t)}(s.ChatItem);t.MessageAttachmentsComponent=u},function(e,t){e.exports=s},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(6),i=n(4),s=n(12),c=function(e){function t(t,n){var o=e.call(this)||this;return o.element=t,o.intl=n,o.cssClass=!0,o}var n;return o.__extends(t,e),n=t,Object.defineProperty(t.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),t.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{datetime:"short"})},t.prototype.focus=function(){this.element.nativeElement.focus()},o.__decorate([a.Input(),o.__metadata("design:type",Object)],t.prototype,"message",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),o.__decorate([a.Input(),o.__metadata("design:type",i.MessageTemplateDirective)],t.prototype,"template",void 0),o.__decorate([a.HostBinding("class.k-message"),o.__metadata("design:type",Boolean)],t.prototype,"cssClass",void 0),o.__decorate([a.HostBinding("class.k-state-selected"),a.HostBinding("class.k-state-focused"),o.__metadata("design:type",Boolean)],t.prototype,"selected",void 0),o.__decorate([a.HostBinding("attr.tabIndex"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],t.prototype,"tabIndex",null),t=n=o.__decorate([a.Component({selector:"kendo-chat-message",providers:[{provide:r.ChatItem,useExisting:a.forwardRef((function(){return n}))}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),o.__metadata("design:paramtypes",[a.ElementRef,s.IntlService])],t)}(r.ChatItem);t.MessageComponent=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(13),i=n(33),s=n(6),c=n(34),u=n(2),l=n(4),d=n(12),p=function(){function e(e,t){var n,o=this;this.element=e,this.intl=t,this.executeAction=new a.EventEmitter,this.navigate=new a.EventEmitter,this.resize=new a.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((n={})[38]=function(e){return o.navigateTo(e,-1)},n[40]=function(e){return o.navigateTo(e,1)},n)}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._messages},set:function(e){var t=e||[];this.view=c.chatView(t),this._messages=t},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},e.prototype.onResize=function(){this.resize.emit()},e.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{date:"full"})},e.prototype.onKeydown=function(e){var t=this.keyActions[e.keyCode];t&&t(e)},e.prototype.onBlur=function(e){var t=this,n=e.relatedTarget||document.activeElement;!i.closest(n,(function(e){return e===t.element.nativeElement}))&&this.select(null)},e.prototype.isOwnMessage=function(e){return c.isAuthor(this.user,e)},e.prototype.dispatchAction=function(e,t){var n=new r.ExecuteActionEvent(e,t);this.executeAction.emit(n)},e.prototype.trackGroup=function(e,t){return t.trackBy},e.prototype.select=function(e){var t=this.selectedItem;t&&(t.selected=!1),e&&(e.selected=!0,this.selectedItem=e)},e.prototype.last=function(e){if(e&&0!==e.length)return e[e.length-1]},e.prototype.navigateTo=function(e,t){var n=this.items.toArray(),o=this.selectedItem,a=n.indexOf(o),r=n[Math.max(0,Math.min(a+t,this.items.length-1))];r!==o&&(this.select(r),r.focus(),this.navigate.emit(),e.preventDefault())},o.__decorate([a.Input(),o.__metadata("design:type",Array),o.__metadata("design:paramtypes",[Array])],e.prototype,"messages",null),o.__decorate([a.Input(),o.__metadata("design:type",u.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),o.__decorate([a.Input(),o.__metadata("design:type",l.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Object)],e.prototype,"user",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"executeAction",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"navigate",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"resize",void 0),o.__decorate([a.ViewChildren(s.ChatItem),o.__metadata("design:type",a.QueryList)],e.prototype,"items",void 0),o.__decorate([a.HostBinding("class.k-message-list-content"),o.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),o.__decorate([a.HostListener("keydown",["$event"]),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],e.prototype,"onKeydown",null),o.__decorate([a.HostListener("focusout",["$event"]),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[FocusEvent]),o.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=o.__decorate([a.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),o.__metadata("design:paramtypes",[a.ElementRef,d.IntlService])],e)}();t.MessageListComponent=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.prevented=!1}return e.prototype.preventDefault=function(){this.prevented=!0},e.prototype.isDefaultPrevented=function(){return this.prevented},e}();t.PreventableEvent=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);t.isAuthor=function(e,t){return e&&t.author&&e.id===t.author.id};var a=function(e){return e[e.length-1]},r=function(e){return function(n,r,i){var s=i===e-1;return function(e,t){var n,o,r=t.timestamp,i=a(e);if(r&&(!i||(n=r,o=i.timestamp,n&&o&&(o.getDate()!==n.getDate()||o.getMonth()!==n.getMonth()||o.getFullYear()!==n.getFullYear())))){var s={type:"date-marker",timestamp:r,trackBy:r.getTime()};e.push(s)}}(n,r),function(e,n,r){var i,s=a(e);if(o.isDevMode()&&!n.author)throw new Error("Author must be set for message: "+JSON.stringify(n));n.typing&&!r||(s&&"message-group"===s.type&&(i=s.messages),i&&t.isAuthor(n.author,a(i))?i.push(n):e.push({type:"message-group",messages:[n],author:n.author,timestamp:n.timestamp,trackBy:n}))}(n,r,s),r.attachments&&r.attachments.length>1&&n.push({type:"attachment-group",attachments:r.attachments,attachmentLayout:r.attachmentLayout,timestamp:r.timestamp,trackBy:r}),r.suggestedActions&&s&&n.push({type:"action-group",actions:r.suggestedActions,timestamp:r.timestamp,trackBy:r}),n}};t.chatView=function(e){return e.reduce(r(e.length),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(e,t,n){this.element=e,this.zone=t,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new a.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}return e.prototype.ngOnInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.unsubscribe=e.renderer.listen(e.element.nativeElement,"scroll",(function(){return e.onScroll()}))}))},e.prototype.ngAfterViewInit=function(){this.scrollToBottom()},e.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.onScroll=function(){var e=this;if(!this.scrolling){var t=this.element.nativeElement,n=t.scrollTop+t.offsetHeight,o=t.scrollHeight-n<2;this.autoScroll!==o&&this.zone.run((function(){e.autoScroll=o,e.autoScrollChange.emit(e.autoScroll)}))}},e.prototype.scrollToBottom=function(){var e=this;if(this.autoScroll){var t=this.element.nativeElement;t.scrollTop=t.scrollHeight-t.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular((function(){return setTimeout((function(){return e.scrolling=!1}),1e3)}))}},o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],e.prototype,"autoScroll",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"autoScrollChange",void 0),o.__decorate([a.HostBinding("style.overflow-anchor"),o.__metadata("design:type",String)],e.prototype,"overflowAnchor",void 0),e=o.__decorate([a.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),o.__metadata("design:paramtypes",[a.ElementRef,a.NgZone,a.Renderer2])],e)}();t.ScrollAnchorDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(6),i=function(e){function t(){var t,n=null!==e&&e.apply(this,arguments)||this;return n.dispatch=new a.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((t={})[37]=function(e){return n.navigateTo(e,-1)},t[39]=function(e){return n.navigateTo(e,1)},t[13]=function(e,t){return n.actionClick(t)},t),n}var n;return o.__extends(t,e),n=t,t.prototype.isSelected=function(e){return this.selected&&this.selectedIndex===e},t.prototype.actionClick=function(e){this.dispatch.next(e)},t.prototype.actionKeydown=function(e,t){var n=this.keyHandlers[e.keyCode];n&&n(e,t)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,o=Math.max(0,Math.min(n+t,this.items.length-1));o!==n&&(this.select(o),e.preventDefault())},o.__decorate([a.Input(),o.__metadata("design:type",Array)],t.prototype,"actions",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],t.prototype,"dispatch",void 0),o.__decorate([a.HostBinding("class.k-quick-replies"),o.__metadata("design:type",Boolean)],t.prototype,"defaultClass",void 0),o.__decorate([a.ViewChildren("item"),o.__metadata("design:type",a.QueryList)],t.prototype,"items",void 0),t=n=o.__decorate([a.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:r.ChatItem,useExisting:a.forwardRef((function(){return n}))}],template:'\n <span\n #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],t)}(r.ChatItem);t.SuggestedActionsComponent=i}])}));
package/dist/cdn/main.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@progress/kendo-angular-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-buttons"),require("@angular/common"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define([,,,,,,,,,],t):"object"==typeof exports?exports.KendoAngularConversationalUi=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@progress/kendo-angular-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-buttons"),require("@angular/common"),require("rxjs"),require("rxjs/operators")):e.KendoAngularConversationalUi=t(e.self,e.ng.core,e.KendoAngularL10N,e.KendoAngularCommon,e.KendoAngularIntl,e.KendoLicensing,e.KendoAngularButtons,e.ng.common,e.rxjs,e.rxjs.operators)}(window,(function(e,t,n,a,o,s,i,r,c,l){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(15);t.ChatComponent=a.ChatComponent;var o=n(8);t.AttachmentTemplateDirective=o.AttachmentTemplateDirective;var s=n(4);t.MessageTemplateDirective=s.MessageTemplateDirective;var i=n(5);t.ChatMessageBoxTemplateDirective=i.ChatMessageBoxTemplateDirective},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(e){this.templateRef=e}return e=a.__decorate([o.Directive({selector:"[kendoChatMessageTemplate]"}),a.__param(0,o.Optional()),a.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.MessageTemplateDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(e){this.templateRef=e}return e=a.__decorate([o.Directive({selector:"[kendoChatMessageBoxTemplate]"}),a.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.ChatMessageBoxTemplateDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){};t.ChatItem=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){this.message=e};t.SendMessageEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(e){this.templateRef=e}return e=a.__decorate([o.Directive({selector:"[kendoChatAttachmentTemplate]"}),a.__param(0,o.Optional()),a.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.AttachmentTemplateDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(7),i=n(3),r=n(10),c=n(5),l=function(){function e(){this.hostClasses="k-message-box k-input k-input-md k-rounded-md k-input-solid",this.sendMessage=new o.EventEmitter}return Object.defineProperty(e.prototype,"messageBoxValue",{get:function(){return"textarea"===this.type},enumerable:!0,configurable:!0}),e.prototype.sendClick=function(){var e=this.messageBoxInput.nativeElement,t=e.value;if(t){var n={author:this.user,text:t,timestamp:new Date};this.sendMessage.emit(new s.SendMessageEvent(n)),e.value=null,e.focus(),this.autoScroll=!0}},e.prototype.inputKeydown=function(e){e.keyCode===r.Keys.Enter&&this.sendClick()},e.prototype.textAreaKeydown=function(e){if(e.keyCode===r.Keys.Enter){var t=e.metaKey||e.ctrlKey;!(e.shiftKey||e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.sendClick()),t&&(this.messageBoxInput.nativeElement.value+="\r\n")}},e.prototype.textFor=function(e){return this.localization.get(e)},a.__decorate([o.HostBinding("class"),a.__metadata("design:type",String)],e.prototype,"hostClasses",void 0),a.__decorate([o.HostBinding("class.!k-align-items-end"),a.__metadata("design:type",Boolean),a.__metadata("design:paramtypes",[])],e.prototype,"messageBoxValue",null),a.__decorate([o.ViewChild("messageBoxInput",{static:!1}),a.__metadata("design:type",o.ElementRef)],e.prototype,"messageBoxInput",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],e.prototype,"user",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],e.prototype,"autoScroll",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"type",void 0),a.__decorate([o.Input(),a.__metadata("design:type",i.LocalizationService)],e.prototype,"localization",void 0),a.__decorate([o.Input(),a.__metadata("design:type",c.ChatMessageBoxTemplateDirective)],e.prototype,"messageBoxTemplate",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"sendMessage",void 0),e=a.__decorate([o.Component({selector:"kendo-message-box",template:'\n <ng-container *ngIf="!messageBoxTemplate">\n <input\n *ngIf="type === \'textbox\'"\n #messageBoxInput\n kendoChatFocusedState\n type="text"\n class="k-textbox k-input k-input-md k-input-solid"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n />\n\n <textarea\n *ngIf="type === \'textarea\'"\n #messageBoxInput\n kendoChatFocusedState\n [rows]="3"\n class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="textAreaKeydown($event)"\n ></textarea>\n\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n [tabindex]="0"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n >\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg>\n </button>\n </ng-container>\n\n <ng-template *ngIf="messageBoxTemplate" [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>\n'})],e)}();t.MessageBoxComponent=l},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),a.__decorate([o.Input(),a.__metadata("design:type",String)],t.prototype,"messagePlaceholder",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],t.prototype,"send",void 0),t}(n(3).ComponentMessages);t.Messages=s},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=function(e){function t(t,n){var a=e.call(this)||this;return a.action=t,a.message=n,a}return a.__extends(t,e),t}(n(32).PreventableEvent);t.ExecuteActionEvent=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0);a.__exportStar(n(2),t),a.__exportStar(n(19),t),a.__exportStar(n(13),t),a.__exportStar(n(7),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(8),i=n(3),r=n(16),c=n(4),l=n(17),u=n(18),d=n(5),p=n(9),m=function(){function e(e,t){var n=this;this.localization=e,this.zone=t,this.messageBoxType="textbox",this.sendMessage=new o.EventEmitter,this.executeAction=new o.EventEmitter,this.autoScroll=!0,l.validatePackage(u.packageMetadata),this.direction=e.rtl?"rtl":"ltr",this.localizationChangeSubscription=e.changes.subscribe((function(e){var t=e.rtl;n.direction=t?"rtl":"ltr"}))}return Object.defineProperty(e.prototype,"className",{get:function(){return"k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localizationText",{get:function(){return this.localization},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(){var e=this;this.zone.runOutsideAngular((function(){return setTimeout((function(){e.messageList.nativeElement.style.flex="1 1 auto"}))}))},e.prototype.ngAfterViewInit=function(){if(o.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},e.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},e.prototype.dispatchAction=function(e){(this.executeAction.emit(e),e.isDefaultPrevented())||(r.makeHandler(e.action)(e.action,this),this.messageBoxTemplate||this.messageBox.messageBoxInput.nativeElement.focus())},e.prototype.textFor=function(e){return this.localization.get(e)},a.__decorate([o.Input(),a.__metadata("design:type",Array)],e.prototype,"messages",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],e.prototype,"user",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"messageBoxType",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"sendMessage",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"executeAction",void 0),a.__decorate([o.HostBinding("class"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],e.prototype,"className",null),a.__decorate([o.HostBinding("attr.dir"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],e.prototype,"dirAttr",null),a.__decorate([o.ContentChild(s.AttachmentTemplateDirective,{static:!1}),a.__metadata("design:type",s.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),a.__decorate([o.ContentChild(c.MessageTemplateDirective,{static:!1}),a.__metadata("design:type",c.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),a.__decorate([o.ContentChild(d.ChatMessageBoxTemplateDirective,{static:!1}),a.__metadata("design:type",d.ChatMessageBoxTemplateDirective)],e.prototype,"messageBoxTemplate",void 0),a.__decorate([o.ViewChild("messageBox",{static:!1}),a.__metadata("design:type",p.MessageBoxComponent)],e.prototype,"messageBox",void 0),a.__decorate([o.ViewChild("messageList",{static:!0}),a.__metadata("design:type",o.ElementRef)],e.prototype,"messageList",void 0),e=a.__decorate([o.Component({providers:[i.LocalizationService,{provide:i.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n <kendo-message-box\n #messageBox\n [messageBoxTemplate]="messageBoxTemplate"\n [type]="messageBoxType"\n [user]="user"\n [autoScroll]="autoScroll"\n [localization]="localizationText"\n (sendMessage)="sendMessage.emit($event)"\n >\n </kendo-message-box>\n '}),a.__metadata("design:paramtypes",[i.LocalizationService,o.NgZone])],e)}();t.ChatComponent=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),o=function(){},s={reply:function(e,t){t.sendMessage.emit(new a.SendMessageEvent({author:t.user,text:e.value,timestamp:new Date}))},call:function(e){window.open("tel:"+e.value)},openUrl:function(e){window.open(e.value)}};t.makeHandler=function(e){return s[e.type]||o}},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1649162313,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(20),s=n(2),i=n(21),r=n(22),c=n(10),l=n(23),u=n(24),d=n(25),p=n(26),m=n(27),g=n(30),_=n(31),f=n(1),h=n(35),y=n(36),v=n(9),k=n(5),b=[s.ChatComponent,l.CustomMessagesComponent,s.AttachmentTemplateDirective,s.MessageTemplateDirective,d.HeroCardComponent,k.ChatMessageBoxTemplateDirective],x=[o.AttachmentComponent,u.FocusedStateDirective,p.LocalizedMessagesDirective,m.MessageAttachmentsComponent,g.MessageComponent,_.MessageListComponent,s.MessageTemplateDirective,h.ScrollAnchorDirective,y.SuggestedActionsComponent,v.MessageBoxComponent],C=function(){function e(){}return e=a.__decorate([f.NgModule({declarations:b.concat(x),exports:[b],imports:[i.ButtonModule,r.CommonModule,c.ResizeSensorModule]})],e)}();t.ChatModule=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(2),i=function(){function e(){}return Object.defineProperty(e.prototype,"attachment",{get:function(){return this._attachment},set:function(e){this._attachment=e,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),a.__decorate([o.Input(),a.__metadata("design:type",Object),a.__metadata("design:paramtypes",[Object])],e.prototype,"attachment",null),a.__decorate([o.Input(),a.__metadata("design:type",s.AttachmentTemplateDirective)],e.prototype,"template",void 0),e=a.__decorate([o.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],e)}();t.AttachmentComponent=i},function(e,t){e.exports=i},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(3),i=n(11),r=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return a.__extends(t,e),n=t,Object.defineProperty(t.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),t=n=a.__decorate([o.Component({providers:[{provide:i.Messages,useExisting:o.forwardRef((function(){return n}))}],selector:"kendo-chat-messages",template:""}),a.__metadata("design:paramtypes",[s.LocalizationService])],t)}(i.Messages);t.CustomMessagesComponent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(){this.focused=!1}return e.prototype.onFocus=function(){this.focused=!0},e.prototype.onBlur=function(){this.focused=!1},a.__decorate([o.HostBinding("class.k-focus"),a.__metadata("design:type",Boolean)],e.prototype,"focused",void 0),a.__decorate([o.HostListener("focusin"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"onFocus",null),a.__decorate([o.HostListener("focusout"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=a.__decorate([o.Directive({selector:"[kendoChatFocusedState]"})],e)}();t.FocusedStateDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(){this.cssClass=!0,this.executeAction=new o.EventEmitter}return e.prototype.onClick=function(e){this.executeAction.next(e)},a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"imageUrl",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"title",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"subtitle",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Array)],e.prototype,"actions",void 0),a.__decorate([o.HostBinding("class.k-card"),a.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"executeAction",void 0),e=a.__decorate([o.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)"\n >\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],e)}();t.HeroCardComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(3),i=n(11),r=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return a.__extends(t,e),n=t,t=n=a.__decorate([o.Directive({providers:[{provide:i.Messages,useExisting:o.forwardRef((function(){return n}))}],selector:"[kendoChatLocalizedMessages]"}),a.__metadata("design:paramtypes",[s.LocalizationService])],t)}(i.Messages);t.LocalizedMessagesDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(28),i=n(29),r=n(6),c=n(2),l=function(e){function t(t){var n,a,o=e.call(this)||this;return o.zone=t,o.scrollPosition=0,o.selectedIndex=0,o.carouselKeyHandlers=((n={})[37]=function(e){return o.navigateTo(e,-1)},n[39]=function(e){return o.navigateTo(e,1)},n),o.listKeyHandlers=((a={})[38]=function(e){return o.navigateTo(e,-1)},a[40]=function(e){return o.navigateTo(e,1)},a),o}var n;return a.__extends(t,e),n=t,Object.defineProperty(t.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.scrollSubscription=s.fromEvent(e.deck.nativeElement,"scroll").pipe(i.debounceTime(100)).subscribe((function(){return e.onScroll()}))}))},t.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},t.prototype.isSelected=function(e){return this.selectedIndex===e},t.prototype.itemKeydown=function(e,t){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[e.keyCode];n&&n(e,t)},t.prototype.itemClick=function(e){this.select(e)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.scrollTo=function(e){var t=this.deck.nativeElement,n=t.scrollWidth/this.items.length,a=t.scrollWidth-t.offsetWidth,o=t.scrollLeft+n*e;t.scrollLeft=Math.max(0,Math.min(a,o))},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,a=Math.max(0,Math.min(n+t,this.items.length-1));a!==n&&(this.select(a),e.preventDefault())},t.prototype.onScroll=function(){var e=this,t=this.deck.nativeElement;if(0!==t.scrollWidth){var n=t.scrollLeft/(t.scrollWidth-t.offsetWidth);n!==this.scrollPosition&&this.zone.run((function(){e.scrollPosition=n}))}},a.__decorate([o.Input(),a.__metadata("design:type",Array)],t.prototype,"attachments",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],t.prototype,"layout",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),a.__decorate([o.Input(),a.__metadata("design:type",c.AttachmentTemplateDirective)],t.prototype,"template",void 0),a.__decorate([o.HostBinding("class.k-card-deck-scrollwrap"),a.__metadata("design:type",Boolean),a.__metadata("design:paramtypes",[])],t.prototype,"carousel",null),a.__decorate([o.ViewChild("deck",{read:o.ElementRef,static:!0}),a.__metadata("design:type",o.ElementRef)],t.prototype,"deck",void 0),a.__decorate([o.ViewChildren("item",{read:o.ElementRef}),a.__metadata("design:type",o.QueryList)],t.prototype,"items",void 0),t=n=a.__decorate([o.Component({providers:[{provide:r.ChatItem,useExisting:o.forwardRef((function(){return n}))}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),a.__metadata("design:paramtypes",[o.NgZone])],t)}(r.ChatItem);t.MessageAttachmentsComponent=l},function(e,t){e.exports=c},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(6),i=n(4),r=n(12),c=function(e){function t(t,n){var a=e.call(this)||this;return a.element=t,a.intl=n,a.cssClass=!0,a}var n;return a.__extends(t,e),n=t,Object.defineProperty(t.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),t.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{datetime:"short"})},t.prototype.focus=function(){this.element.nativeElement.focus()},a.__decorate([o.Input(),a.__metadata("design:type",Object)],t.prototype,"message",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),a.__decorate([o.Input(),a.__metadata("design:type",i.MessageTemplateDirective)],t.prototype,"template",void 0),a.__decorate([o.HostBinding("class.k-message"),a.__metadata("design:type",Boolean)],t.prototype,"cssClass",void 0),a.__decorate([o.HostBinding("class.k-state-selected"),o.HostBinding("class.k-state-focused"),a.__metadata("design:type",Boolean)],t.prototype,"selected",void 0),a.__decorate([o.HostBinding("attr.tabIndex"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],t.prototype,"tabIndex",null),t=n=a.__decorate([o.Component({selector:"kendo-chat-message",providers:[{provide:s.ChatItem,useExisting:o.forwardRef((function(){return n}))}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),a.__metadata("design:paramtypes",[o.ElementRef,r.IntlService])],t)}(s.ChatItem);t.MessageComponent=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(13),i=n(33),r=n(6),c=n(34),l=n(2),u=n(4),d=n(12),p=function(){function e(e,t){var n,a=this;this.element=e,this.intl=t,this.executeAction=new o.EventEmitter,this.navigate=new o.EventEmitter,this.resize=new o.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((n={})[38]=function(e){return a.navigateTo(e,-1)},n[40]=function(e){return a.navigateTo(e,1)},n)}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._messages},set:function(e){var t=e||[];this.view=c.chatView(t),this._messages=t},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},e.prototype.onResize=function(){this.resize.emit()},e.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{date:"full"})},e.prototype.onKeydown=function(e){var t=this.keyActions[e.keyCode];t&&t(e)},e.prototype.onBlur=function(e){var t=this,n=e.relatedTarget||document.activeElement;!i.closest(n,(function(e){return e===t.element.nativeElement}))&&this.select(null)},e.prototype.isOwnMessage=function(e){return c.isAuthor(this.user,e)},e.prototype.dispatchAction=function(e,t){var n=new s.ExecuteActionEvent(e,t);this.executeAction.emit(n)},e.prototype.trackGroup=function(e,t){return t.trackBy},e.prototype.select=function(e){var t=this.selectedItem;t&&(t.selected=!1),e&&(e.selected=!0,this.selectedItem=e)},e.prototype.last=function(e){if(e&&0!==e.length)return e[e.length-1]},e.prototype.navigateTo=function(e,t){var n=this.items.toArray(),a=this.selectedItem,o=n.indexOf(a),s=n[Math.max(0,Math.min(o+t,this.items.length-1))];s!==a&&(this.select(s),s.focus(),this.navigate.emit(),e.preventDefault())},a.__decorate([o.Input(),a.__metadata("design:type",Array),a.__metadata("design:paramtypes",[Array])],e.prototype,"messages",null),a.__decorate([o.Input(),a.__metadata("design:type",l.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",u.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],e.prototype,"user",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"executeAction",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"navigate",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"resize",void 0),a.__decorate([o.ViewChildren(r.ChatItem),a.__metadata("design:type",o.QueryList)],e.prototype,"items",void 0),a.__decorate([o.HostBinding("class.k-message-list-content"),a.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),a.__decorate([o.HostListener("keydown",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],e.prototype,"onKeydown",null),a.__decorate([o.HostListener("focusout",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[FocusEvent]),a.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=a.__decorate([o.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),a.__metadata("design:paramtypes",[o.ElementRef,d.IntlService])],e)}();t.MessageListComponent=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this.prevented=!1}return e.prototype.preventDefault=function(){this.prevented=!0},e.prototype.isDefaultPrevented=function(){return this.prevented},e}();t.PreventableEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(1);t.isAuthor=function(e,t){return e&&t.author&&e.id===t.author.id};var o=function(e){return e[e.length-1]},s=function(e){return function(n,s,i){var r=i===e-1;return function(e,t){var n,a,s=t.timestamp,i=o(e);if(s&&(!i||(n=s,a=i.timestamp,n&&a&&(a.getDate()!==n.getDate()||a.getMonth()!==n.getMonth()||a.getFullYear()!==n.getFullYear())))){var r={type:"date-marker",timestamp:s,trackBy:s.getTime()};e.push(r)}}(n,s),function(e,n,s){var i,r=o(e);if(a.isDevMode()&&!n.author)throw new Error("Author must be set for message: "+JSON.stringify(n));n.typing&&!s||(r&&"message-group"===r.type&&(i=r.messages),i&&t.isAuthor(n.author,o(i))?i.push(n):e.push({type:"message-group",messages:[n],author:n.author,timestamp:n.timestamp,trackBy:n}))}(n,s,r),s.attachments&&s.attachments.length>1&&n.push({type:"attachment-group",attachments:s.attachments,attachmentLayout:s.attachmentLayout,timestamp:s.timestamp,trackBy:s}),s.suggestedActions&&r&&n.push({type:"action-group",actions:s.suggestedActions,timestamp:s.timestamp,trackBy:s}),n}};t.chatView=function(e){return e.reduce(s(e.length),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(e,t,n){this.element=e,this.zone=t,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new o.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}return e.prototype.ngOnInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.unsubscribe=e.renderer.listen(e.element.nativeElement,"scroll",(function(){return e.onScroll()}))}))},e.prototype.ngAfterViewInit=function(){this.scrollToBottom()},e.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.onScroll=function(){var e=this;if(!this.scrolling){var t=this.element.nativeElement,n=t.scrollTop+t.offsetHeight,a=t.scrollHeight-n<2;this.autoScroll!==a&&this.zone.run((function(){e.autoScroll=a,e.autoScrollChange.emit(e.autoScroll)}))}},e.prototype.scrollToBottom=function(){var e=this;if(this.autoScroll){var t=this.element.nativeElement;t.scrollTop=t.scrollHeight-t.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular((function(){return setTimeout((function(){return e.scrolling=!1}),1e3)}))}},a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],e.prototype,"autoScroll",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"autoScrollChange",void 0),a.__decorate([o.HostBinding("style.overflow-anchor"),a.__metadata("design:type",String)],e.prototype,"overflowAnchor",void 0),e=a.__decorate([o.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),a.__metadata("design:paramtypes",[o.ElementRef,o.NgZone,o.Renderer2])],e)}();t.ScrollAnchorDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(6),i=function(e){function t(){var t,n=null!==e&&e.apply(this,arguments)||this;return n.dispatch=new o.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((t={})[37]=function(e){return n.navigateTo(e,-1)},t[39]=function(e){return n.navigateTo(e,1)},t[13]=function(e,t){return n.actionClick(t)},t),n}var n;return a.__extends(t,e),n=t,t.prototype.isSelected=function(e){return this.selected&&this.selectedIndex===e},t.prototype.actionClick=function(e){this.dispatch.next(e)},t.prototype.actionKeydown=function(e,t){var n=this.keyHandlers[e.keyCode];n&&n(e,t)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,a=Math.max(0,Math.min(n+t,this.items.length-1));a!==n&&(this.select(a),e.preventDefault())},a.__decorate([o.Input(),a.__metadata("design:type",Array)],t.prototype,"actions",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],t.prototype,"dispatch",void 0),a.__decorate([o.HostBinding("class.k-quick-replies"),a.__metadata("design:type",Boolean)],t.prototype,"defaultClass",void 0),a.__decorate([o.ViewChildren("item"),a.__metadata("design:type",o.QueryList)],t.prototype,"items",void 0),t=n=a.__decorate([o.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:s.ChatItem,useExisting:o.forwardRef((function(){return n}))}],template:'\n <span\n #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],t)}(s.ChatItem);t.SuggestedActionsComponent=i}])}));
5
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@progress/kendo-angular-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-buttons"),require("@angular/common"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define([,,,,,,,,,],t):"object"==typeof exports?exports.KendoAngularConversationalUi=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@progress/kendo-angular-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-buttons"),require("@angular/common"),require("rxjs"),require("rxjs/operators")):e.KendoAngularConversationalUi=t(e.self,e.ng.core,e.KendoAngularL10N,e.KendoAngularCommon,e.KendoAngularIntl,e.KendoLicensing,e.KendoAngularButtons,e.ng.common,e.rxjs,e.rxjs.operators)}(window,(function(e,t,n,a,o,s,i,r,c,l){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(15);t.ChatComponent=a.ChatComponent;var o=n(8);t.AttachmentTemplateDirective=o.AttachmentTemplateDirective;var s=n(4);t.MessageTemplateDirective=s.MessageTemplateDirective;var i=n(5);t.ChatMessageBoxTemplateDirective=i.ChatMessageBoxTemplateDirective},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(e){this.templateRef=e}return e=a.__decorate([o.Directive({selector:"[kendoChatMessageTemplate]"}),a.__param(0,o.Optional()),a.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.MessageTemplateDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(e){this.templateRef=e}return e=a.__decorate([o.Directive({selector:"[kendoChatMessageBoxTemplate]"}),a.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.ChatMessageBoxTemplateDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){};t.ChatItem=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){this.message=e};t.SendMessageEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(e){this.templateRef=e}return e=a.__decorate([o.Directive({selector:"[kendoChatAttachmentTemplate]"}),a.__param(0,o.Optional()),a.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.AttachmentTemplateDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(7),i=n(3),r=n(10),c=n(5),l=function(){function e(){this.hostClasses="k-message-box k-input k-input-md k-rounded-md k-input-solid",this.sendMessage=new o.EventEmitter}return Object.defineProperty(e.prototype,"messageBoxValue",{get:function(){return"textarea"===this.type},enumerable:!0,configurable:!0}),e.prototype.sendClick=function(){var e=this.messageBoxInput.nativeElement,t=e.value;if(t){var n={author:this.user,text:t,timestamp:new Date};this.sendMessage.emit(new s.SendMessageEvent(n)),e.value=null,e.focus(),this.autoScroll=!0}},e.prototype.inputKeydown=function(e){e.keyCode===r.Keys.Enter&&this.sendClick()},e.prototype.textAreaKeydown=function(e){if(e.keyCode===r.Keys.Enter){var t=e.metaKey||e.ctrlKey;!(e.shiftKey||e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.sendClick()),t&&(this.messageBoxInput.nativeElement.value+="\r\n")}},e.prototype.textFor=function(e){return this.localization.get(e)},a.__decorate([o.HostBinding("class"),a.__metadata("design:type",String)],e.prototype,"hostClasses",void 0),a.__decorate([o.HostBinding("class.!k-align-items-end"),a.__metadata("design:type",Boolean),a.__metadata("design:paramtypes",[])],e.prototype,"messageBoxValue",null),a.__decorate([o.ViewChild("messageBoxInput",{static:!1}),a.__metadata("design:type",o.ElementRef)],e.prototype,"messageBoxInput",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],e.prototype,"user",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],e.prototype,"autoScroll",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"type",void 0),a.__decorate([o.Input(),a.__metadata("design:type",i.LocalizationService)],e.prototype,"localization",void 0),a.__decorate([o.Input(),a.__metadata("design:type",c.ChatMessageBoxTemplateDirective)],e.prototype,"messageBoxTemplate",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"sendMessage",void 0),e=a.__decorate([o.Component({selector:"kendo-message-box",template:'\n <ng-container *ngIf="!messageBoxTemplate">\n <input\n *ngIf="type === \'textbox\'"\n #messageBoxInput\n kendoChatFocusedState\n type="text"\n class="k-textbox k-input k-input-md k-input-solid"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n />\n\n <textarea\n *ngIf="type === \'textarea\'"\n #messageBoxInput\n kendoChatFocusedState\n [rows]="3"\n class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="textAreaKeydown($event)"\n ></textarea>\n\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n [tabindex]="0"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n >\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg>\n </button>\n </ng-container>\n\n <ng-template *ngIf="messageBoxTemplate" [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>\n'})],e)}();t.MessageBoxComponent=l},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),a.__decorate([o.Input(),a.__metadata("design:type",String)],t.prototype,"messagePlaceholder",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],t.prototype,"send",void 0),t}(n(3).ComponentMessages);t.Messages=s},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=function(e){function t(t,n){var a=e.call(this)||this;return a.action=t,a.message=n,a}return a.__extends(t,e),t}(n(32).PreventableEvent);t.ExecuteActionEvent=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0);a.__exportStar(n(2),t),a.__exportStar(n(19),t),a.__exportStar(n(13),t),a.__exportStar(n(7),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(8),i=n(3),r=n(16),c=n(4),l=n(17),u=n(18),d=n(5),p=n(9),m=function(){function e(e,t){var n=this;this.localization=e,this.zone=t,this.messageBoxType="textbox",this.sendMessage=new o.EventEmitter,this.executeAction=new o.EventEmitter,this.autoScroll=!0,l.validatePackage(u.packageMetadata),this.direction=e.rtl?"rtl":"ltr",this.localizationChangeSubscription=e.changes.subscribe((function(e){var t=e.rtl;n.direction=t?"rtl":"ltr"}))}return Object.defineProperty(e.prototype,"className",{get:function(){return"k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localizationText",{get:function(){return this.localization},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(){var e=this;this.zone.runOutsideAngular((function(){return setTimeout((function(){e.messageList.nativeElement.style.flex="1 1 auto"}))}))},e.prototype.ngAfterViewInit=function(){if(o.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},e.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},e.prototype.dispatchAction=function(e){(this.executeAction.emit(e),e.isDefaultPrevented())||(r.makeHandler(e.action)(e.action,this),this.messageBoxTemplate||this.messageBox.messageBoxInput.nativeElement.focus())},e.prototype.textFor=function(e){return this.localization.get(e)},a.__decorate([o.Input(),a.__metadata("design:type",Array)],e.prototype,"messages",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],e.prototype,"user",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"messageBoxType",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"sendMessage",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"executeAction",void 0),a.__decorate([o.HostBinding("class"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],e.prototype,"className",null),a.__decorate([o.HostBinding("attr.dir"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],e.prototype,"dirAttr",null),a.__decorate([o.ContentChild(s.AttachmentTemplateDirective,{static:!1}),a.__metadata("design:type",s.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),a.__decorate([o.ContentChild(c.MessageTemplateDirective,{static:!1}),a.__metadata("design:type",c.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),a.__decorate([o.ContentChild(d.ChatMessageBoxTemplateDirective,{static:!1}),a.__metadata("design:type",d.ChatMessageBoxTemplateDirective)],e.prototype,"messageBoxTemplate",void 0),a.__decorate([o.ViewChild("messageBox",{static:!1}),a.__metadata("design:type",p.MessageBoxComponent)],e.prototype,"messageBox",void 0),a.__decorate([o.ViewChild("messageList",{static:!0}),a.__metadata("design:type",o.ElementRef)],e.prototype,"messageList",void 0),e=a.__decorate([o.Component({providers:[i.LocalizationService,{provide:i.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n <kendo-message-box\n #messageBox\n [messageBoxTemplate]="messageBoxTemplate"\n [type]="messageBoxType"\n [user]="user"\n [autoScroll]="autoScroll"\n [localization]="localizationText"\n (sendMessage)="sendMessage.emit($event)"\n >\n </kendo-message-box>\n '}),a.__metadata("design:paramtypes",[i.LocalizationService,o.NgZone])],e)}();t.ChatComponent=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),o=function(){},s={reply:function(e,t){t.sendMessage.emit(new a.SendMessageEvent({author:t.user,text:e.value,timestamp:new Date}))},call:function(e){window.open("tel:"+e.value)},openUrl:function(e){window.open(e.value)}};t.makeHandler=function(e){return s[e.type]||o}},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1649323827,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(20),s=n(2),i=n(21),r=n(22),c=n(10),l=n(23),u=n(24),d=n(25),p=n(26),m=n(27),g=n(30),_=n(31),f=n(1),h=n(35),y=n(36),v=n(9),k=n(5),b=[s.ChatComponent,l.CustomMessagesComponent,s.AttachmentTemplateDirective,s.MessageTemplateDirective,d.HeroCardComponent,k.ChatMessageBoxTemplateDirective],x=[o.AttachmentComponent,u.FocusedStateDirective,p.LocalizedMessagesDirective,m.MessageAttachmentsComponent,g.MessageComponent,_.MessageListComponent,s.MessageTemplateDirective,h.ScrollAnchorDirective,y.SuggestedActionsComponent,v.MessageBoxComponent],C=function(){function e(){}return e=a.__decorate([f.NgModule({declarations:b.concat(x),exports:[b],imports:[i.ButtonModule,r.CommonModule,c.ResizeSensorModule]})],e)}();t.ChatModule=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(2),i=function(){function e(){}return Object.defineProperty(e.prototype,"attachment",{get:function(){return this._attachment},set:function(e){this._attachment=e,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),a.__decorate([o.Input(),a.__metadata("design:type",Object),a.__metadata("design:paramtypes",[Object])],e.prototype,"attachment",null),a.__decorate([o.Input(),a.__metadata("design:type",s.AttachmentTemplateDirective)],e.prototype,"template",void 0),e=a.__decorate([o.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],e)}();t.AttachmentComponent=i},function(e,t){e.exports=i},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(3),i=n(11),r=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return a.__extends(t,e),n=t,Object.defineProperty(t.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),t=n=a.__decorate([o.Component({providers:[{provide:i.Messages,useExisting:o.forwardRef((function(){return n}))}],selector:"kendo-chat-messages",template:""}),a.__metadata("design:paramtypes",[s.LocalizationService])],t)}(i.Messages);t.CustomMessagesComponent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(){this.focused=!1}return e.prototype.onFocus=function(){this.focused=!0},e.prototype.onBlur=function(){this.focused=!1},a.__decorate([o.HostBinding("class.k-focus"),a.__metadata("design:type",Boolean)],e.prototype,"focused",void 0),a.__decorate([o.HostListener("focusin"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"onFocus",null),a.__decorate([o.HostListener("focusout"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=a.__decorate([o.Directive({selector:"[kendoChatFocusedState]"})],e)}();t.FocusedStateDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(){this.cssClass=!0,this.executeAction=new o.EventEmitter}return e.prototype.onClick=function(e){this.executeAction.next(e)},a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"imageUrl",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"title",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"subtitle",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Array)],e.prototype,"actions",void 0),a.__decorate([o.HostBinding("class.k-card"),a.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"executeAction",void 0),e=a.__decorate([o.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)"\n >\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],e)}();t.HeroCardComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(3),i=n(11),r=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return a.__extends(t,e),n=t,t=n=a.__decorate([o.Directive({providers:[{provide:i.Messages,useExisting:o.forwardRef((function(){return n}))}],selector:"[kendoChatLocalizedMessages]"}),a.__metadata("design:paramtypes",[s.LocalizationService])],t)}(i.Messages);t.LocalizedMessagesDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(28),i=n(29),r=n(6),c=n(2),l=function(e){function t(t){var n,a,o=e.call(this)||this;return o.zone=t,o.scrollPosition=0,o.selectedIndex=0,o.carouselKeyHandlers=((n={})[37]=function(e){return o.navigateTo(e,-1)},n[39]=function(e){return o.navigateTo(e,1)},n),o.listKeyHandlers=((a={})[38]=function(e){return o.navigateTo(e,-1)},a[40]=function(e){return o.navigateTo(e,1)},a),o}var n;return a.__extends(t,e),n=t,Object.defineProperty(t.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.scrollSubscription=s.fromEvent(e.deck.nativeElement,"scroll").pipe(i.debounceTime(100)).subscribe((function(){return e.onScroll()}))}))},t.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},t.prototype.isSelected=function(e){return this.selectedIndex===e},t.prototype.itemKeydown=function(e,t){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[e.keyCode];n&&n(e,t)},t.prototype.itemClick=function(e){this.select(e)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.scrollTo=function(e){var t=this.deck.nativeElement,n=t.scrollWidth/this.items.length,a=t.scrollWidth-t.offsetWidth,o=t.scrollLeft+n*e;t.scrollLeft=Math.max(0,Math.min(a,o))},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,a=Math.max(0,Math.min(n+t,this.items.length-1));a!==n&&(this.select(a),e.preventDefault())},t.prototype.onScroll=function(){var e=this,t=this.deck.nativeElement;if(0!==t.scrollWidth){var n=t.scrollLeft/(t.scrollWidth-t.offsetWidth);n!==this.scrollPosition&&this.zone.run((function(){e.scrollPosition=n}))}},a.__decorate([o.Input(),a.__metadata("design:type",Array)],t.prototype,"attachments",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],t.prototype,"layout",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),a.__decorate([o.Input(),a.__metadata("design:type",c.AttachmentTemplateDirective)],t.prototype,"template",void 0),a.__decorate([o.HostBinding("class.k-card-deck-scrollwrap"),a.__metadata("design:type",Boolean),a.__metadata("design:paramtypes",[])],t.prototype,"carousel",null),a.__decorate([o.ViewChild("deck",{read:o.ElementRef,static:!0}),a.__metadata("design:type",o.ElementRef)],t.prototype,"deck",void 0),a.__decorate([o.ViewChildren("item",{read:o.ElementRef}),a.__metadata("design:type",o.QueryList)],t.prototype,"items",void 0),t=n=a.__decorate([o.Component({providers:[{provide:r.ChatItem,useExisting:o.forwardRef((function(){return n}))}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),a.__metadata("design:paramtypes",[o.NgZone])],t)}(r.ChatItem);t.MessageAttachmentsComponent=l},function(e,t){e.exports=c},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(6),i=n(4),r=n(12),c=function(e){function t(t,n){var a=e.call(this)||this;return a.element=t,a.intl=n,a.cssClass=!0,a}var n;return a.__extends(t,e),n=t,Object.defineProperty(t.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),t.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{datetime:"short"})},t.prototype.focus=function(){this.element.nativeElement.focus()},a.__decorate([o.Input(),a.__metadata("design:type",Object)],t.prototype,"message",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),a.__decorate([o.Input(),a.__metadata("design:type",i.MessageTemplateDirective)],t.prototype,"template",void 0),a.__decorate([o.HostBinding("class.k-message"),a.__metadata("design:type",Boolean)],t.prototype,"cssClass",void 0),a.__decorate([o.HostBinding("class.k-state-selected"),o.HostBinding("class.k-state-focused"),a.__metadata("design:type",Boolean)],t.prototype,"selected",void 0),a.__decorate([o.HostBinding("attr.tabIndex"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],t.prototype,"tabIndex",null),t=n=a.__decorate([o.Component({selector:"kendo-chat-message",providers:[{provide:s.ChatItem,useExisting:o.forwardRef((function(){return n}))}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),a.__metadata("design:paramtypes",[o.ElementRef,r.IntlService])],t)}(s.ChatItem);t.MessageComponent=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(13),i=n(33),r=n(6),c=n(34),l=n(2),u=n(4),d=n(12),p=function(){function e(e,t){var n,a=this;this.element=e,this.intl=t,this.executeAction=new o.EventEmitter,this.navigate=new o.EventEmitter,this.resize=new o.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((n={})[38]=function(e){return a.navigateTo(e,-1)},n[40]=function(e){return a.navigateTo(e,1)},n)}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._messages},set:function(e){var t=e||[];this.view=c.chatView(t),this._messages=t},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},e.prototype.onResize=function(){this.resize.emit()},e.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{date:"full"})},e.prototype.onKeydown=function(e){var t=this.keyActions[e.keyCode];t&&t(e)},e.prototype.onBlur=function(e){var t=this,n=e.relatedTarget||document.activeElement;!i.closest(n,(function(e){return e===t.element.nativeElement}))&&this.select(null)},e.prototype.isOwnMessage=function(e){return c.isAuthor(this.user,e)},e.prototype.dispatchAction=function(e,t){var n=new s.ExecuteActionEvent(e,t);this.executeAction.emit(n)},e.prototype.trackGroup=function(e,t){return t.trackBy},e.prototype.select=function(e){var t=this.selectedItem;t&&(t.selected=!1),e&&(e.selected=!0,this.selectedItem=e)},e.prototype.last=function(e){if(e&&0!==e.length)return e[e.length-1]},e.prototype.navigateTo=function(e,t){var n=this.items.toArray(),a=this.selectedItem,o=n.indexOf(a),s=n[Math.max(0,Math.min(o+t,this.items.length-1))];s!==a&&(this.select(s),s.focus(),this.navigate.emit(),e.preventDefault())},a.__decorate([o.Input(),a.__metadata("design:type",Array),a.__metadata("design:paramtypes",[Array])],e.prototype,"messages",null),a.__decorate([o.Input(),a.__metadata("design:type",l.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",u.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],e.prototype,"user",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"executeAction",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"navigate",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"resize",void 0),a.__decorate([o.ViewChildren(r.ChatItem),a.__metadata("design:type",o.QueryList)],e.prototype,"items",void 0),a.__decorate([o.HostBinding("class.k-message-list-content"),a.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),a.__decorate([o.HostListener("keydown",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],e.prototype,"onKeydown",null),a.__decorate([o.HostListener("focusout",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[FocusEvent]),a.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=a.__decorate([o.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),a.__metadata("design:paramtypes",[o.ElementRef,d.IntlService])],e)}();t.MessageListComponent=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this.prevented=!1}return e.prototype.preventDefault=function(){this.prevented=!0},e.prototype.isDefaultPrevented=function(){return this.prevented},e}();t.PreventableEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(1);t.isAuthor=function(e,t){return e&&t.author&&e.id===t.author.id};var o=function(e){return e[e.length-1]},s=function(e){return function(n,s,i){var r=i===e-1;return function(e,t){var n,a,s=t.timestamp,i=o(e);if(s&&(!i||(n=s,a=i.timestamp,n&&a&&(a.getDate()!==n.getDate()||a.getMonth()!==n.getMonth()||a.getFullYear()!==n.getFullYear())))){var r={type:"date-marker",timestamp:s,trackBy:s.getTime()};e.push(r)}}(n,s),function(e,n,s){var i,r=o(e);if(a.isDevMode()&&!n.author)throw new Error("Author must be set for message: "+JSON.stringify(n));n.typing&&!s||(r&&"message-group"===r.type&&(i=r.messages),i&&t.isAuthor(n.author,o(i))?i.push(n):e.push({type:"message-group",messages:[n],author:n.author,timestamp:n.timestamp,trackBy:n}))}(n,s,r),s.attachments&&s.attachments.length>1&&n.push({type:"attachment-group",attachments:s.attachments,attachmentLayout:s.attachmentLayout,timestamp:s.timestamp,trackBy:s}),s.suggestedActions&&r&&n.push({type:"action-group",actions:s.suggestedActions,timestamp:s.timestamp,trackBy:s}),n}};t.chatView=function(e){return e.reduce(s(e.length),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(e,t,n){this.element=e,this.zone=t,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new o.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}return e.prototype.ngOnInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.unsubscribe=e.renderer.listen(e.element.nativeElement,"scroll",(function(){return e.onScroll()}))}))},e.prototype.ngAfterViewInit=function(){this.scrollToBottom()},e.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.onScroll=function(){var e=this;if(!this.scrolling){var t=this.element.nativeElement,n=t.scrollTop+t.offsetHeight,a=t.scrollHeight-n<2;this.autoScroll!==a&&this.zone.run((function(){e.autoScroll=a,e.autoScrollChange.emit(e.autoScroll)}))}},e.prototype.scrollToBottom=function(){var e=this;if(this.autoScroll){var t=this.element.nativeElement;t.scrollTop=t.scrollHeight-t.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular((function(){return setTimeout((function(){return e.scrolling=!1}),1e3)}))}},a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],e.prototype,"autoScroll",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"autoScrollChange",void 0),a.__decorate([o.HostBinding("style.overflow-anchor"),a.__metadata("design:type",String)],e.prototype,"overflowAnchor",void 0),e=a.__decorate([o.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),a.__metadata("design:paramtypes",[o.ElementRef,o.NgZone,o.Renderer2])],e)}();t.ScrollAnchorDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(6),i=function(e){function t(){var t,n=null!==e&&e.apply(this,arguments)||this;return n.dispatch=new o.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((t={})[37]=function(e){return n.navigateTo(e,-1)},t[39]=function(e){return n.navigateTo(e,1)},t[13]=function(e,t){return n.actionClick(t)},t),n}var n;return a.__extends(t,e),n=t,t.prototype.isSelected=function(e){return this.selected&&this.selectedIndex===e},t.prototype.actionClick=function(e){this.dispatch.next(e)},t.prototype.actionKeydown=function(e,t){var n=this.keyHandlers[e.keyCode];n&&n(e,t)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,a=Math.max(0,Math.min(n+t,this.items.length-1));a!==n&&(this.select(a),e.preventDefault())},a.__decorate([o.Input(),a.__metadata("design:type",Array)],t.prototype,"actions",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],t.prototype,"dispatch",void 0),a.__decorate([o.HostBinding("class.k-quick-replies"),a.__metadata("design:type",Boolean)],t.prototype,"defaultClass",void 0),a.__decorate([o.ViewChildren("item"),a.__metadata("design:type",o.QueryList)],t.prototype,"items",void 0),t=n=a.__decorate([o.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:s.ChatItem,useExisting:o.forwardRef((function(){return n}))}],template:'\n <span\n #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],t)}(s.ChatItem);t.SuggestedActionsComponent=i}])}));
@@ -9,7 +9,7 @@ export var packageMetadata = {
9
9
  name: '@progress/kendo-angular-conversational-ui',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1649162313,
12
+ publishDate: 1649323827,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-conversational-ui',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1649162313,
12
+ publishDate: 1649323827,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -105,7 +105,7 @@ const packageMetadata = {
105
105
  name: '@progress/kendo-angular-conversational-ui',
106
106
  productName: 'Kendo UI for Angular',
107
107
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
108
- publishDate: 1649162313,
108
+ publishDate: 1649323827,
109
109
  version: '',
110
110
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
111
111
  };
@@ -108,7 +108,7 @@ var packageMetadata = {
108
108
  name: '@progress/kendo-angular-conversational-ui',
109
109
  productName: 'Kendo UI for Angular',
110
110
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
111
- publishDate: 1649162313,
111
+ publishDate: 1649323827,
112
112
  version: '',
113
113
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
114
114
  };
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-conversational-ui',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1649162313,
14
+ publishDate: 1649323827,
15
15
  version: '',
16
16
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
17
17
  };
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- System.register("@progress/kendo-angular-conversational-ui",["tslib","@progress/kendo-angular-common","@angular/common","@angular/core","@progress/kendo-angular-buttons","@progress/kendo-angular-l10n","@progress/kendo-licensing","rxjs","rxjs/operators","@progress/kendo-angular-intl"],function(i){var s,r,c,l,d,p,u,m,g,_;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){s=t(e)},function(e){r=t(e)},function(e){c=t(e)},function(e){l=t(e)},function(e){d=t(e)},function(e){p=t(e)},function(e){u=t(e)},function(e){m=t(e)},function(e){g=t(e)},function(e){_=t(e)}],execute:function(){function a(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}var n,o;n=[function(e,t){e.exports=s},function(e,t){e.exports=l},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(35),a=(t.ChatComponent=a.ChatComponent,n(13)),a=(t.AttachmentTemplateDirective=a.AttachmentTemplateDirective,n(6)),a=(t.MessageTemplateDirective=a.MessageTemplateDirective,n(5));t.ChatMessageBoxTemplateDirective=a.ChatMessageBoxTemplateDirective},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatItem=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=a.__decorate([n.Directive({selector:"[kendoChatMessageBoxTemplate]"}),a.__metadata("design:paramtypes",[n.TemplateRef])],o);function o(e){this.templateRef=e}t.ChatMessageBoxTemplateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=a.__decorate([n.Directive({selector:"[kendoChatMessageTemplate]"}),a.__param(0,n.Optional()),a.__metadata("design:paramtypes",[n.TemplateRef])],o);function o(e){this.templateRef=e}t.MessageTemplateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendMessageEvent=function(e){this.message=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),n=(a=n(18).PreventableEvent,o.__extends(s,a),s);function s(e,t){var n=a.call(this)||this;return n.action=e,n.message=t,n}t.ExecuteActionEvent=n},function(e,t){e.exports=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),s=n(1),n=(a=n(2).ComponentMessages,o.__extends(i,a),o.__decorate([s.Input(),o.__metadata("design:type",String)],i.prototype,"messagePlaceholder",void 0),o.__decorate([s.Input(),o.__metadata("design:type",String)],i.prototype,"send",void 0),i);function i(){return null!==a&&a.apply(this,arguments)||this}t.Messages=n},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(7),i=n(2),r=n(11),n=n(5),i=(Object.defineProperty(c.prototype,"messageBoxValue",{get:function(){return"textarea"===this.type},enumerable:!0,configurable:!0}),c.prototype.sendClick=function(){var e=this.messageBoxInput.nativeElement,t=e.value;t&&(t={author:this.user,text:t,timestamp:new Date},this.sendMessage.emit(new s.SendMessageEvent(t)),e.value=null,e.focus(),this.autoScroll=!0)},c.prototype.inputKeydown=function(e){e.keyCode===r.Keys.Enter&&this.sendClick()},c.prototype.textAreaKeydown=function(e){var t;e.keyCode===r.Keys.Enter&&(t=e.metaKey||e.ctrlKey,e.shiftKey||e.metaKey||e.ctrlKey||(e.preventDefault(),this.sendClick()),t&&(this.messageBoxInput.nativeElement.value+="\r\n"))},c.prototype.textFor=function(e){return this.localization.get(e)},a.__decorate([o.HostBinding("class"),a.__metadata("design:type",String)],c.prototype,"hostClasses",void 0),a.__decorate([o.HostBinding("class.!k-align-items-end"),a.__metadata("design:type",Boolean),a.__metadata("design:paramtypes",[])],c.prototype,"messageBoxValue",null),a.__decorate([o.ViewChild("messageBoxInput",{static:!1}),a.__metadata("design:type",o.ElementRef)],c.prototype,"messageBoxInput",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],c.prototype,"user",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],c.prototype,"autoScroll",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],c.prototype,"type",void 0),a.__decorate([o.Input(),a.__metadata("design:type",i.LocalizationService)],c.prototype,"localization",void 0),a.__decorate([o.Input(),a.__metadata("design:type",n.ChatMessageBoxTemplateDirective)],c.prototype,"messageBoxTemplate",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],c.prototype,"sendMessage",void 0),a.__decorate([o.Component({selector:"kendo-message-box",template:'\n <ng-container *ngIf="!messageBoxTemplate">\n <input\n *ngIf="type === \'textbox\'"\n #messageBoxInput\n kendoChatFocusedState\n type="text"\n class="k-textbox k-input k-input-md k-input-solid"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n />\n\n <textarea\n *ngIf="type === \'textarea\'"\n #messageBoxInput\n kendoChatFocusedState\n [rows]="3"\n class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="textAreaKeydown($event)"\n ></textarea>\n\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n [tabindex]="0"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n >\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg>\n </button>\n </ng-container>\n\n <ng-template *ngIf="messageBoxTemplate" [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>\n'})],c));function c(){this.hostClasses="k-message-box k-input k-input-md k-rounded-md k-input-solid",this.sendMessage=new o.EventEmitter}t.MessageBoxComponent=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=a.__decorate([n.Directive({selector:"[kendoChatAttachmentTemplate]"}),a.__param(0,n.Optional()),a.__metadata("design:paramtypes",[n.TemplateRef])],o);function o(e){this.templateRef=e}t.AttachmentTemplateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),n=n(4),s=(a=n.ChatItem,s.__extends(r,a),(o=r).prototype.isSelected=function(e){return this.selected&&this.selectedIndex===e},r.prototype.actionClick=function(e){this.dispatch.next(e)},r.prototype.actionKeydown=function(e,t){var n=this.keyHandlers[e.keyCode];n&&n(e,t)},r.prototype.focus=function(){this.select(this.selectedIndex)},r.prototype.select=function(e){this.selectedIndex=e;e=this.items.toArray()[e];e&&e.nativeElement.focus()},r.prototype.navigateTo=function(e,t){var n=this.selectedIndex,t=Math.max(0,Math.min(n+t,this.items.length-1));t!==n&&(this.select(t),e.preventDefault())},s.__decorate([i.Input(),s.__metadata("design:type",Array)],r.prototype,"actions",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],r.prototype,"tabbable",void 0),s.__decorate([i.Output(),s.__metadata("design:type",i.EventEmitter)],r.prototype,"dispatch",void 0),s.__decorate([i.HostBinding("class.k-quick-replies"),s.__metadata("design:type",Boolean)],r.prototype,"defaultClass",void 0),s.__decorate([i.ViewChildren("item"),s.__metadata("design:type",i.QueryList)],r.prototype,"items",void 0),o=s.__decorate([i.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:n.ChatItem,useExisting:i.forwardRef(function(){return o})}],template:'\n <span\n #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],r));function r(){var e,n=null!==a&&a.apply(this,arguments)||this;return n.dispatch=new i.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((e={})[37]=function(e){return n.navigateTo(e,-1)},e[39]=function(e){return n.navigateTo(e,1)},e[13]=function(e,t){return n.actionClick(t)},e),n}t.SuggestedActionsComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=(s.prototype.ngOnInit=function(){var e=this;this.zone.runOutsideAngular(function(){e.unsubscribe=e.renderer.listen(e.element.nativeElement,"scroll",function(){return e.onScroll()})})},s.prototype.ngAfterViewInit=function(){this.scrollToBottom()},s.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},s.prototype.onScroll=function(){var e,t,n,a=this;this.scrolling||(t=(e=this.element.nativeElement).scrollTop+e.offsetHeight,n=e.scrollHeight-t<2,this.autoScroll!==n&&this.zone.run(function(){a.autoScroll=n,a.autoScrollChange.emit(a.autoScroll)}))},s.prototype.scrollToBottom=function(){var e,t=this;this.autoScroll&&((e=this.element.nativeElement).scrollTop=e.scrollHeight-e.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular(function(){return setTimeout(function(){return t.scrolling=!1},1e3)}))},a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],s.prototype,"autoScroll",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],s.prototype,"autoScrollChange",void 0),a.__decorate([o.HostBinding("style.overflow-anchor"),a.__metadata("design:type",String)],s.prototype,"overflowAnchor",void 0),a.__decorate([o.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),a.__metadata("design:paramtypes",[o.ElementRef,o.NgZone,o.Renderer2])],s));function s(e,t,n){this.element=e,this.zone=t,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new o.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}t.ScrollAnchorDirective=n},function(e,l,t){"use strict";Object.defineProperty(l,"__esModule",{value:!0});function d(e){return e[e.length-1]}function n(c){return function(e,t,n){var a,n=n===c-1,o=(i=e,s=t.timestamp,r=d(i),!s||r&&(o=s,r=r.timestamp,!o||!r||r.getDate()===o.getDate()&&r.getMonth()===o.getMonth()&&r.getFullYear()===o.getFullYear())||(r={type:"date-marker",timestamp:s,trackBy:s.getTime()},i.push(r)),e),s=t,i=n,r=d(o);if(p.isDevMode()&&!s.author)throw new Error("Author must be set for message: "+JSON.stringify(s));return s.typing&&!i||((a=r&&"message-group"===r.type?r.messages:a)&&l.isAuthor(s.author,d(a))?a.push(s):o.push({type:"message-group",messages:[s],author:s.author,timestamp:s.timestamp,trackBy:s})),t.attachments&&1<t.attachments.length&&e.push({type:"attachment-group",attachments:t.attachments,attachmentLayout:t.attachmentLayout,timestamp:t.timestamp,trackBy:t}),t.suggestedActions&&n&&e.push({type:"action-group",actions:t.suggestedActions,timestamp:t.timestamp,trackBy:t}),e}}var p=t(1);l.isAuthor=function(e,t){return e&&t.author&&e.id===t.author.id};l.chatView=function(e){return e.reduce(n(e.length),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}},function(e,t,n){"use strict";function a(){this.prevented=!1}Object.defineProperty(t,"__esModule",{value:!0}),a.prototype.preventDefault=function(){this.prevented=!0},a.prototype.isDefaultPrevented=function(){return this.prevented},t.PreventableEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(8),i=n(17),r=n(4),c=n(16),l=n(3),d=n(6),n=n(9),l=(Object.defineProperty(p.prototype,"messages",{get:function(){return this._messages},set:function(e){e=e||[];this.view=c.chatView(e),this._messages=e},enumerable:!0,configurable:!0}),p.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},p.prototype.onResize=function(){this.resize.emit()},p.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{date:"full"})},p.prototype.onKeydown=function(e){var t=this.keyActions[e.keyCode];t&&t(e)},p.prototype.onBlur=function(e){var t=this,e=e.relatedTarget||document.activeElement;i.closest(e,function(e){return e===t.element.nativeElement})||this.select(null)},p.prototype.isOwnMessage=function(e){return c.isAuthor(this.user,e)},p.prototype.dispatchAction=function(e,t){e=new s.ExecuteActionEvent(e,t);this.executeAction.emit(e)},p.prototype.trackGroup=function(e,t){return t.trackBy},p.prototype.select=function(e){var t=this.selectedItem;t&&(t.selected=!1),e&&(e.selected=!0,this.selectedItem=e)},p.prototype.last=function(e){if(e&&0!==e.length)return e[e.length-1]},p.prototype.navigateTo=function(e,t){var n=this.items.toArray(),a=this.selectedItem,o=n.indexOf(a),n=n[Math.max(0,Math.min(o+t,this.items.length-1))];n!==a&&(this.select(n),n.focus(),this.navigate.emit(),e.preventDefault())},a.__decorate([o.Input(),a.__metadata("design:type",Array),a.__metadata("design:paramtypes",[Array])],p.prototype,"messages",null),a.__decorate([o.Input(),a.__metadata("design:type",l.AttachmentTemplateDirective)],p.prototype,"attachmentTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",d.MessageTemplateDirective)],p.prototype,"messageTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],p.prototype,"user",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],p.prototype,"executeAction",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],p.prototype,"navigate",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],p.prototype,"resize",void 0),a.__decorate([o.ViewChildren(r.ChatItem),a.__metadata("design:type",o.QueryList)],p.prototype,"items",void 0),a.__decorate([o.HostBinding("class.k-message-list-content"),a.__metadata("design:type",Boolean)],p.prototype,"cssClass",void 0),a.__decorate([o.HostListener("keydown",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],p.prototype,"onKeydown",null),a.__decorate([o.HostListener("focusout",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[FocusEvent]),a.__metadata("design:returntype",void 0)],p.prototype,"onBlur",null),a.__decorate([o.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),a.__metadata("design:paramtypes",[o.ElementRef,n.IntlService])],p));function p(e,t){var n=this;this.element=e,this.intl=t,this.executeAction=new o.EventEmitter,this.navigate=new o.EventEmitter,this.resize=new o.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((e={})[38]=function(e){return n.navigateTo(e,-1)},e[40]=function(e){return n.navigateTo(e,1)},e)}t.MessageListComponent=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(4),c=n(6),n=n(9),c=(a=r.ChatItem,s.__extends(l,a),o=l,Object.defineProperty(l.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),l.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{datetime:"short"})},l.prototype.focus=function(){this.element.nativeElement.focus()},s.__decorate([i.Input(),s.__metadata("design:type",Object)],l.prototype,"message",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],l.prototype,"tabbable",void 0),s.__decorate([i.Input(),s.__metadata("design:type",c.MessageTemplateDirective)],l.prototype,"template",void 0),s.__decorate([i.HostBinding("class.k-message"),s.__metadata("design:type",Boolean)],l.prototype,"cssClass",void 0),s.__decorate([i.HostBinding("class.k-state-selected"),i.HostBinding("class.k-state-focused"),s.__metadata("design:type",Boolean)],l.prototype,"selected",void 0),s.__decorate([i.HostBinding("attr.tabIndex"),s.__metadata("design:type",String),s.__metadata("design:paramtypes",[])],l.prototype,"tabIndex",null),o=s.__decorate([i.Component({selector:"kendo-chat-message",providers:[{provide:r.ChatItem,useExisting:i.forwardRef(function(){return o})}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),s.__metadata("design:paramtypes",[i.ElementRef,n.IntlService])],l));function l(e,t){var n=a.call(this)||this;return n.element=e,n.intl=t,n.cssClass=!0,n}t.MessageComponent=c},function(e,t){e.exports=g},function(e,t){e.exports=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(22),c=n(21),l=n(4),n=n(3),n=(a=l.ChatItem,s.__extends(d,a),o=d,Object.defineProperty(d.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),d.prototype.ngAfterViewInit=function(){var e=this;this.zone.runOutsideAngular(function(){e.scrollSubscription=r.fromEvent(e.deck.nativeElement,"scroll").pipe(c.debounceTime(100)).subscribe(function(){return e.onScroll()})})},d.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},d.prototype.isSelected=function(e){return this.selectedIndex===e},d.prototype.itemKeydown=function(e,t){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[e.keyCode];n&&n(e,t)},d.prototype.itemClick=function(e){this.select(e)},d.prototype.focus=function(){this.select(this.selectedIndex)},d.prototype.scrollTo=function(e){var t=this.deck.nativeElement,n=t.scrollWidth/this.items.length,a=t.scrollWidth-t.offsetWidth,n=t.scrollLeft+n*e;t.scrollLeft=Math.max(0,Math.min(a,n))},d.prototype.select=function(e){this.selectedIndex=e;e=this.items.toArray()[e];e&&e.nativeElement.focus()},d.prototype.navigateTo=function(e,t){var n=this.selectedIndex,t=Math.max(0,Math.min(n+t,this.items.length-1));t!==n&&(this.select(t),e.preventDefault())},d.prototype.onScroll=function(){var e,t=this,n=this.deck.nativeElement;0!==n.scrollWidth&&(e=n.scrollLeft/(n.scrollWidth-n.offsetWidth))!==this.scrollPosition&&this.zone.run(function(){t.scrollPosition=e})},s.__decorate([i.Input(),s.__metadata("design:type",Array)],d.prototype,"attachments",void 0),s.__decorate([i.Input(),s.__metadata("design:type",String)],d.prototype,"layout",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],d.prototype,"tabbable",void 0),s.__decorate([i.Input(),s.__metadata("design:type",n.AttachmentTemplateDirective)],d.prototype,"template",void 0),s.__decorate([i.HostBinding("class.k-card-deck-scrollwrap"),s.__metadata("design:type",Boolean),s.__metadata("design:paramtypes",[])],d.prototype,"carousel",null),s.__decorate([i.ViewChild("deck",{read:i.ElementRef,static:!0}),s.__metadata("design:type",i.ElementRef)],d.prototype,"deck",void 0),s.__decorate([i.ViewChildren("item",{read:i.ElementRef}),s.__metadata("design:type",i.QueryList)],d.prototype,"items",void 0),o=s.__decorate([i.Component({providers:[{provide:l.ChatItem,useExisting:i.forwardRef(function(){return o})}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),s.__metadata("design:paramtypes",[i.NgZone])],d));function d(e){var t=a.call(this)||this;return t.zone=e,t.scrollPosition=0,t.selectedIndex=0,t.carouselKeyHandlers=((e={})[37]=function(e){return t.navigateTo(e,-1)},e[39]=function(e){return t.navigateTo(e,1)},e),t.listKeyHandlers=((e={})[38]=function(e){return t.navigateTo(e,-1)},e[40]=function(e){return t.navigateTo(e,1)},e),t}t.MessageAttachmentsComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(2),n=n(10),n=(a=n.Messages,s.__extends(c,a),o=c,o=s.__decorate([i.Directive({providers:[{provide:n.Messages,useExisting:i.forwardRef(function(){return o})}],selector:"[kendoChatLocalizedMessages]"}),s.__metadata("design:paramtypes",[r.LocalizationService])],c));function c(e){var t=a.call(this)||this;return t.service=e,t}t.LocalizedMessagesDirective=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=(s.prototype.onClick=function(e){this.executeAction.next(e)},a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"imageUrl",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"title",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"subtitle",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Array)],s.prototype,"actions",void 0),a.__decorate([o.HostBinding("class.k-card"),a.__metadata("design:type",Boolean)],s.prototype,"cssClass",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],s.prototype,"executeAction",void 0),a.__decorate([o.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)"\n >\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],s));function s(){this.cssClass=!0,this.executeAction=new o.EventEmitter}t.HeroCardComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=(o.prototype.onFocus=function(){this.focused=!0},o.prototype.onBlur=function(){this.focused=!1},a.__decorate([n.HostBinding("class.k-focus"),a.__metadata("design:type",Boolean)],o.prototype,"focused",void 0),a.__decorate([n.HostListener("focusin"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],o.prototype,"onFocus",null),a.__decorate([n.HostListener("focusout"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],o.prototype,"onBlur",null),a.__decorate([n.Directive({selector:"[kendoChatFocusedState]"})],o));function o(){this.focused=!1}t.FocusedStateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(2),n=n(10),n=(a=n.Messages,s.__extends(c,a),o=c,Object.defineProperty(c.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),o=s.__decorate([i.Component({providers:[{provide:n.Messages,useExisting:i.forwardRef(function(){return o})}],selector:"kendo-chat-messages",template:""}),s.__metadata("design:paramtypes",[r.LocalizationService])],c));function c(e){var t=a.call(this)||this;return t.service=e,t}t.CustomMessagesComponent=n},function(e,t){e.exports=c},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=n(3),n=(Object.defineProperty(s.prototype,"attachment",{get:function(){return this._attachment},set:function(e){this._attachment=e,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),a.__decorate([o.Input(),a.__metadata("design:type",Object),a.__metadata("design:paramtypes",[Object])],s.prototype,"attachment",null),a.__decorate([o.Input(),a.__metadata("design:type",n.AttachmentTemplateDirective)],s.prototype,"template",void 0),a.__decorate([o.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],s));function s(){}t.AttachmentComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(30),s=n(3),i=n(29),r=n(28),c=n(11),l=n(27),d=n(26),p=n(25),u=n(24),m=n(23),g=n(20),_=n(19),h=n(1),f=n(15),y=n(14),v=n(12),n=n(5),l=[s.ChatComponent,l.CustomMessagesComponent,s.AttachmentTemplateDirective,s.MessageTemplateDirective,p.HeroCardComponent,n.ChatMessageBoxTemplateDirective],p=[o.AttachmentComponent,d.FocusedStateDirective,u.LocalizedMessagesDirective,m.MessageAttachmentsComponent,g.MessageComponent,_.MessageListComponent,s.MessageTemplateDirective,f.ScrollAnchorDirective,y.SuggestedActionsComponent,v.MessageBoxComponent],n=a.__decorate([h.NgModule({declarations:l.concat(p),exports:[l],imports:[i.ButtonModule,r.CommonModule,c.ResizeSensorModule]})],k);function k(){}t.ChatModule=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1649162313,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t){e.exports=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function a(){}var o=n(7),s={reply:function(e,t){t.sendMessage.emit(new o.SendMessageEvent({author:t.user,text:e.value,timestamp:new Date}))},call:function(e){window.open("tel:"+e.value)},openUrl:function(e){window.open(e.value)}};t.makeHandler=function(e){return s[e.type]||a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(13),i=n(2),r=n(34),c=n(6),l=n(33),d=n(32),p=n(5),n=n(12),s=(Object.defineProperty(u.prototype,"className",{get:function(){return"k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"localizationText",{get:function(){return this.localization},enumerable:!0,configurable:!0}),u.prototype.ngOnChanges=function(){var e=this;this.zone.runOutsideAngular(function(){return setTimeout(function(){e.messageList.nativeElement.style.flex="1 1 auto"})})},u.prototype.ngAfterViewInit=function(){if(o.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},u.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},u.prototype.dispatchAction=function(e){this.executeAction.emit(e),e.isDefaultPrevented()||(r.makeHandler(e.action)(e.action,this),this.messageBoxTemplate||this.messageBox.messageBoxInput.nativeElement.focus())},u.prototype.textFor=function(e){return this.localization.get(e)},a.__decorate([o.Input(),a.__metadata("design:type",Array)],u.prototype,"messages",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],u.prototype,"user",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],u.prototype,"messageBoxType",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],u.prototype,"sendMessage",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],u.prototype,"executeAction",void 0),a.__decorate([o.HostBinding("class"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],u.prototype,"className",null),a.__decorate([o.HostBinding("attr.dir"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],u.prototype,"dirAttr",null),a.__decorate([o.ContentChild(s.AttachmentTemplateDirective,{static:!1}),a.__metadata("design:type",s.AttachmentTemplateDirective)],u.prototype,"attachmentTemplate",void 0),a.__decorate([o.ContentChild(c.MessageTemplateDirective,{static:!1}),a.__metadata("design:type",c.MessageTemplateDirective)],u.prototype,"messageTemplate",void 0),a.__decorate([o.ContentChild(p.ChatMessageBoxTemplateDirective,{static:!1}),a.__metadata("design:type",p.ChatMessageBoxTemplateDirective)],u.prototype,"messageBoxTemplate",void 0),a.__decorate([o.ViewChild("messageBox",{static:!1}),a.__metadata("design:type",n.MessageBoxComponent)],u.prototype,"messageBox",void 0),a.__decorate([o.ViewChild("messageList",{static:!0}),a.__metadata("design:type",o.ElementRef)],u.prototype,"messageList",void 0),a.__decorate([o.Component({providers:[i.LocalizationService,{provide:i.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n <kendo-message-box\n #messageBox\n [messageBoxTemplate]="messageBoxTemplate"\n [type]="messageBoxType"\n [user]="user"\n [autoScroll]="autoScroll"\n [localization]="localizationText"\n (sendMessage)="sendMessage.emit($event)"\n >\n </kendo-message-box>\n '}),a.__metadata("design:paramtypes",[i.LocalizationService,o.NgZone])],u));function u(e,t){var n=this;this.localization=e,this.zone=t,this.messageBoxType="textbox",this.sendMessage=new o.EventEmitter,this.executeAction=new o.EventEmitter,this.autoScroll=!0,l.validatePackage(d.packageMetadata),this.direction=e.rtl?"rtl":"ltr",this.localizationChangeSubscription=e.changes.subscribe(function(e){e=e.rtl;n.direction=e?"rtl":"ltr"})}t.ChatComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),s=(o.__exportStar(n(3),t),o.__exportStar(n(31),t),o.__exportStar(n(8),t),o.__exportStar(n(7),t),t);for(a in s)i(a,s[a])}],o={},a.m=n,a.c=o,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},a.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=36)}}});
5
+ System.register("@progress/kendo-angular-conversational-ui",["tslib","@progress/kendo-angular-buttons","@angular/common","@progress/kendo-angular-common","@angular/core","@progress/kendo-angular-l10n","@progress/kendo-licensing","rxjs","rxjs/operators","@progress/kendo-angular-intl"],function(i){var s,r,c,l,d,p,u,m,g,_;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){s=t(e)},function(e){r=t(e)},function(e){c=t(e)},function(e){l=t(e)},function(e){d=t(e)},function(e){p=t(e)},function(e){u=t(e)},function(e){m=t(e)},function(e){g=t(e)},function(e){_=t(e)}],execute:function(){function a(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}var n,o;n=[function(e,t){e.exports=s},function(e,t){e.exports=d},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(35),a=(t.ChatComponent=a.ChatComponent,n(13)),a=(t.AttachmentTemplateDirective=a.AttachmentTemplateDirective,n(6)),a=(t.MessageTemplateDirective=a.MessageTemplateDirective,n(5));t.ChatMessageBoxTemplateDirective=a.ChatMessageBoxTemplateDirective},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatItem=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=a.__decorate([n.Directive({selector:"[kendoChatMessageBoxTemplate]"}),a.__metadata("design:paramtypes",[n.TemplateRef])],o);function o(e){this.templateRef=e}t.ChatMessageBoxTemplateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=a.__decorate([n.Directive({selector:"[kendoChatMessageTemplate]"}),a.__param(0,n.Optional()),a.__metadata("design:paramtypes",[n.TemplateRef])],o);function o(e){this.templateRef=e}t.MessageTemplateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendMessageEvent=function(e){this.message=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),n=(a=n(18).PreventableEvent,o.__extends(s,a),s);function s(e,t){var n=a.call(this)||this;return n.action=e,n.message=t,n}t.ExecuteActionEvent=n},function(e,t){e.exports=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),s=n(1),n=(a=n(2).ComponentMessages,o.__extends(i,a),o.__decorate([s.Input(),o.__metadata("design:type",String)],i.prototype,"messagePlaceholder",void 0),o.__decorate([s.Input(),o.__metadata("design:type",String)],i.prototype,"send",void 0),i);function i(){return null!==a&&a.apply(this,arguments)||this}t.Messages=n},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(7),i=n(2),r=n(11),n=n(5),i=(Object.defineProperty(c.prototype,"messageBoxValue",{get:function(){return"textarea"===this.type},enumerable:!0,configurable:!0}),c.prototype.sendClick=function(){var e=this.messageBoxInput.nativeElement,t=e.value;t&&(t={author:this.user,text:t,timestamp:new Date},this.sendMessage.emit(new s.SendMessageEvent(t)),e.value=null,e.focus(),this.autoScroll=!0)},c.prototype.inputKeydown=function(e){e.keyCode===r.Keys.Enter&&this.sendClick()},c.prototype.textAreaKeydown=function(e){var t;e.keyCode===r.Keys.Enter&&(t=e.metaKey||e.ctrlKey,e.shiftKey||e.metaKey||e.ctrlKey||(e.preventDefault(),this.sendClick()),t&&(this.messageBoxInput.nativeElement.value+="\r\n"))},c.prototype.textFor=function(e){return this.localization.get(e)},a.__decorate([o.HostBinding("class"),a.__metadata("design:type",String)],c.prototype,"hostClasses",void 0),a.__decorate([o.HostBinding("class.!k-align-items-end"),a.__metadata("design:type",Boolean),a.__metadata("design:paramtypes",[])],c.prototype,"messageBoxValue",null),a.__decorate([o.ViewChild("messageBoxInput",{static:!1}),a.__metadata("design:type",o.ElementRef)],c.prototype,"messageBoxInput",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],c.prototype,"user",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],c.prototype,"autoScroll",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],c.prototype,"type",void 0),a.__decorate([o.Input(),a.__metadata("design:type",i.LocalizationService)],c.prototype,"localization",void 0),a.__decorate([o.Input(),a.__metadata("design:type",n.ChatMessageBoxTemplateDirective)],c.prototype,"messageBoxTemplate",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],c.prototype,"sendMessage",void 0),a.__decorate([o.Component({selector:"kendo-message-box",template:'\n <ng-container *ngIf="!messageBoxTemplate">\n <input\n *ngIf="type === \'textbox\'"\n #messageBoxInput\n kendoChatFocusedState\n type="text"\n class="k-textbox k-input k-input-md k-input-solid"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n />\n\n <textarea\n *ngIf="type === \'textarea\'"\n #messageBoxInput\n kendoChatFocusedState\n [rows]="3"\n class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="textAreaKeydown($event)"\n ></textarea>\n\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n [tabindex]="0"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n >\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg>\n </button>\n </ng-container>\n\n <ng-template *ngIf="messageBoxTemplate" [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>\n'})],c));function c(){this.hostClasses="k-message-box k-input k-input-md k-rounded-md k-input-solid",this.sendMessage=new o.EventEmitter}t.MessageBoxComponent=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=a.__decorate([n.Directive({selector:"[kendoChatAttachmentTemplate]"}),a.__param(0,n.Optional()),a.__metadata("design:paramtypes",[n.TemplateRef])],o);function o(e){this.templateRef=e}t.AttachmentTemplateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),n=n(4),s=(a=n.ChatItem,s.__extends(r,a),(o=r).prototype.isSelected=function(e){return this.selected&&this.selectedIndex===e},r.prototype.actionClick=function(e){this.dispatch.next(e)},r.prototype.actionKeydown=function(e,t){var n=this.keyHandlers[e.keyCode];n&&n(e,t)},r.prototype.focus=function(){this.select(this.selectedIndex)},r.prototype.select=function(e){this.selectedIndex=e;e=this.items.toArray()[e];e&&e.nativeElement.focus()},r.prototype.navigateTo=function(e,t){var n=this.selectedIndex,t=Math.max(0,Math.min(n+t,this.items.length-1));t!==n&&(this.select(t),e.preventDefault())},s.__decorate([i.Input(),s.__metadata("design:type",Array)],r.prototype,"actions",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],r.prototype,"tabbable",void 0),s.__decorate([i.Output(),s.__metadata("design:type",i.EventEmitter)],r.prototype,"dispatch",void 0),s.__decorate([i.HostBinding("class.k-quick-replies"),s.__metadata("design:type",Boolean)],r.prototype,"defaultClass",void 0),s.__decorate([i.ViewChildren("item"),s.__metadata("design:type",i.QueryList)],r.prototype,"items",void 0),o=s.__decorate([i.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:n.ChatItem,useExisting:i.forwardRef(function(){return o})}],template:'\n <span\n #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],r));function r(){var e,n=null!==a&&a.apply(this,arguments)||this;return n.dispatch=new i.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((e={})[37]=function(e){return n.navigateTo(e,-1)},e[39]=function(e){return n.navigateTo(e,1)},e[13]=function(e,t){return n.actionClick(t)},e),n}t.SuggestedActionsComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=(s.prototype.ngOnInit=function(){var e=this;this.zone.runOutsideAngular(function(){e.unsubscribe=e.renderer.listen(e.element.nativeElement,"scroll",function(){return e.onScroll()})})},s.prototype.ngAfterViewInit=function(){this.scrollToBottom()},s.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},s.prototype.onScroll=function(){var e,t,n,a=this;this.scrolling||(t=(e=this.element.nativeElement).scrollTop+e.offsetHeight,n=e.scrollHeight-t<2,this.autoScroll!==n&&this.zone.run(function(){a.autoScroll=n,a.autoScrollChange.emit(a.autoScroll)}))},s.prototype.scrollToBottom=function(){var e,t=this;this.autoScroll&&((e=this.element.nativeElement).scrollTop=e.scrollHeight-e.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular(function(){return setTimeout(function(){return t.scrolling=!1},1e3)}))},a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],s.prototype,"autoScroll",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],s.prototype,"autoScrollChange",void 0),a.__decorate([o.HostBinding("style.overflow-anchor"),a.__metadata("design:type",String)],s.prototype,"overflowAnchor",void 0),a.__decorate([o.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),a.__metadata("design:paramtypes",[o.ElementRef,o.NgZone,o.Renderer2])],s));function s(e,t,n){this.element=e,this.zone=t,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new o.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}t.ScrollAnchorDirective=n},function(e,l,t){"use strict";Object.defineProperty(l,"__esModule",{value:!0});function d(e){return e[e.length-1]}function n(c){return function(e,t,n){var a,n=n===c-1,o=(i=e,s=t.timestamp,r=d(i),!s||r&&(o=s,r=r.timestamp,!o||!r||r.getDate()===o.getDate()&&r.getMonth()===o.getMonth()&&r.getFullYear()===o.getFullYear())||(r={type:"date-marker",timestamp:s,trackBy:s.getTime()},i.push(r)),e),s=t,i=n,r=d(o);if(p.isDevMode()&&!s.author)throw new Error("Author must be set for message: "+JSON.stringify(s));return s.typing&&!i||((a=r&&"message-group"===r.type?r.messages:a)&&l.isAuthor(s.author,d(a))?a.push(s):o.push({type:"message-group",messages:[s],author:s.author,timestamp:s.timestamp,trackBy:s})),t.attachments&&1<t.attachments.length&&e.push({type:"attachment-group",attachments:t.attachments,attachmentLayout:t.attachmentLayout,timestamp:t.timestamp,trackBy:t}),t.suggestedActions&&n&&e.push({type:"action-group",actions:t.suggestedActions,timestamp:t.timestamp,trackBy:t}),e}}var p=t(1);l.isAuthor=function(e,t){return e&&t.author&&e.id===t.author.id};l.chatView=function(e){return e.reduce(n(e.length),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}},function(e,t,n){"use strict";function a(){this.prevented=!1}Object.defineProperty(t,"__esModule",{value:!0}),a.prototype.preventDefault=function(){this.prevented=!0},a.prototype.isDefaultPrevented=function(){return this.prevented},t.PreventableEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(8),i=n(17),r=n(4),c=n(16),l=n(3),d=n(6),n=n(9),l=(Object.defineProperty(p.prototype,"messages",{get:function(){return this._messages},set:function(e){e=e||[];this.view=c.chatView(e),this._messages=e},enumerable:!0,configurable:!0}),p.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},p.prototype.onResize=function(){this.resize.emit()},p.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{date:"full"})},p.prototype.onKeydown=function(e){var t=this.keyActions[e.keyCode];t&&t(e)},p.prototype.onBlur=function(e){var t=this,e=e.relatedTarget||document.activeElement;i.closest(e,function(e){return e===t.element.nativeElement})||this.select(null)},p.prototype.isOwnMessage=function(e){return c.isAuthor(this.user,e)},p.prototype.dispatchAction=function(e,t){e=new s.ExecuteActionEvent(e,t);this.executeAction.emit(e)},p.prototype.trackGroup=function(e,t){return t.trackBy},p.prototype.select=function(e){var t=this.selectedItem;t&&(t.selected=!1),e&&(e.selected=!0,this.selectedItem=e)},p.prototype.last=function(e){if(e&&0!==e.length)return e[e.length-1]},p.prototype.navigateTo=function(e,t){var n=this.items.toArray(),a=this.selectedItem,o=n.indexOf(a),n=n[Math.max(0,Math.min(o+t,this.items.length-1))];n!==a&&(this.select(n),n.focus(),this.navigate.emit(),e.preventDefault())},a.__decorate([o.Input(),a.__metadata("design:type",Array),a.__metadata("design:paramtypes",[Array])],p.prototype,"messages",null),a.__decorate([o.Input(),a.__metadata("design:type",l.AttachmentTemplateDirective)],p.prototype,"attachmentTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",d.MessageTemplateDirective)],p.prototype,"messageTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],p.prototype,"user",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],p.prototype,"executeAction",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],p.prototype,"navigate",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],p.prototype,"resize",void 0),a.__decorate([o.ViewChildren(r.ChatItem),a.__metadata("design:type",o.QueryList)],p.prototype,"items",void 0),a.__decorate([o.HostBinding("class.k-message-list-content"),a.__metadata("design:type",Boolean)],p.prototype,"cssClass",void 0),a.__decorate([o.HostListener("keydown",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],p.prototype,"onKeydown",null),a.__decorate([o.HostListener("focusout",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[FocusEvent]),a.__metadata("design:returntype",void 0)],p.prototype,"onBlur",null),a.__decorate([o.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),a.__metadata("design:paramtypes",[o.ElementRef,n.IntlService])],p));function p(e,t){var n=this;this.element=e,this.intl=t,this.executeAction=new o.EventEmitter,this.navigate=new o.EventEmitter,this.resize=new o.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((e={})[38]=function(e){return n.navigateTo(e,-1)},e[40]=function(e){return n.navigateTo(e,1)},e)}t.MessageListComponent=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(4),c=n(6),n=n(9),c=(a=r.ChatItem,s.__extends(l,a),o=l,Object.defineProperty(l.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),l.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{datetime:"short"})},l.prototype.focus=function(){this.element.nativeElement.focus()},s.__decorate([i.Input(),s.__metadata("design:type",Object)],l.prototype,"message",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],l.prototype,"tabbable",void 0),s.__decorate([i.Input(),s.__metadata("design:type",c.MessageTemplateDirective)],l.prototype,"template",void 0),s.__decorate([i.HostBinding("class.k-message"),s.__metadata("design:type",Boolean)],l.prototype,"cssClass",void 0),s.__decorate([i.HostBinding("class.k-state-selected"),i.HostBinding("class.k-state-focused"),s.__metadata("design:type",Boolean)],l.prototype,"selected",void 0),s.__decorate([i.HostBinding("attr.tabIndex"),s.__metadata("design:type",String),s.__metadata("design:paramtypes",[])],l.prototype,"tabIndex",null),o=s.__decorate([i.Component({selector:"kendo-chat-message",providers:[{provide:r.ChatItem,useExisting:i.forwardRef(function(){return o})}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),s.__metadata("design:paramtypes",[i.ElementRef,n.IntlService])],l));function l(e,t){var n=a.call(this)||this;return n.element=e,n.intl=t,n.cssClass=!0,n}t.MessageComponent=c},function(e,t){e.exports=g},function(e,t){e.exports=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(22),c=n(21),l=n(4),n=n(3),n=(a=l.ChatItem,s.__extends(d,a),o=d,Object.defineProperty(d.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),d.prototype.ngAfterViewInit=function(){var e=this;this.zone.runOutsideAngular(function(){e.scrollSubscription=r.fromEvent(e.deck.nativeElement,"scroll").pipe(c.debounceTime(100)).subscribe(function(){return e.onScroll()})})},d.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},d.prototype.isSelected=function(e){return this.selectedIndex===e},d.prototype.itemKeydown=function(e,t){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[e.keyCode];n&&n(e,t)},d.prototype.itemClick=function(e){this.select(e)},d.prototype.focus=function(){this.select(this.selectedIndex)},d.prototype.scrollTo=function(e){var t=this.deck.nativeElement,n=t.scrollWidth/this.items.length,a=t.scrollWidth-t.offsetWidth,n=t.scrollLeft+n*e;t.scrollLeft=Math.max(0,Math.min(a,n))},d.prototype.select=function(e){this.selectedIndex=e;e=this.items.toArray()[e];e&&e.nativeElement.focus()},d.prototype.navigateTo=function(e,t){var n=this.selectedIndex,t=Math.max(0,Math.min(n+t,this.items.length-1));t!==n&&(this.select(t),e.preventDefault())},d.prototype.onScroll=function(){var e,t=this,n=this.deck.nativeElement;0!==n.scrollWidth&&(e=n.scrollLeft/(n.scrollWidth-n.offsetWidth))!==this.scrollPosition&&this.zone.run(function(){t.scrollPosition=e})},s.__decorate([i.Input(),s.__metadata("design:type",Array)],d.prototype,"attachments",void 0),s.__decorate([i.Input(),s.__metadata("design:type",String)],d.prototype,"layout",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],d.prototype,"tabbable",void 0),s.__decorate([i.Input(),s.__metadata("design:type",n.AttachmentTemplateDirective)],d.prototype,"template",void 0),s.__decorate([i.HostBinding("class.k-card-deck-scrollwrap"),s.__metadata("design:type",Boolean),s.__metadata("design:paramtypes",[])],d.prototype,"carousel",null),s.__decorate([i.ViewChild("deck",{read:i.ElementRef,static:!0}),s.__metadata("design:type",i.ElementRef)],d.prototype,"deck",void 0),s.__decorate([i.ViewChildren("item",{read:i.ElementRef}),s.__metadata("design:type",i.QueryList)],d.prototype,"items",void 0),o=s.__decorate([i.Component({providers:[{provide:l.ChatItem,useExisting:i.forwardRef(function(){return o})}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),s.__metadata("design:paramtypes",[i.NgZone])],d));function d(e){var t=a.call(this)||this;return t.zone=e,t.scrollPosition=0,t.selectedIndex=0,t.carouselKeyHandlers=((e={})[37]=function(e){return t.navigateTo(e,-1)},e[39]=function(e){return t.navigateTo(e,1)},e),t.listKeyHandlers=((e={})[38]=function(e){return t.navigateTo(e,-1)},e[40]=function(e){return t.navigateTo(e,1)},e),t}t.MessageAttachmentsComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(2),n=n(10),n=(a=n.Messages,s.__extends(c,a),o=c,o=s.__decorate([i.Directive({providers:[{provide:n.Messages,useExisting:i.forwardRef(function(){return o})}],selector:"[kendoChatLocalizedMessages]"}),s.__metadata("design:paramtypes",[r.LocalizationService])],c));function c(e){var t=a.call(this)||this;return t.service=e,t}t.LocalizedMessagesDirective=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=(s.prototype.onClick=function(e){this.executeAction.next(e)},a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"imageUrl",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"title",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"subtitle",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Array)],s.prototype,"actions",void 0),a.__decorate([o.HostBinding("class.k-card"),a.__metadata("design:type",Boolean)],s.prototype,"cssClass",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],s.prototype,"executeAction",void 0),a.__decorate([o.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)"\n >\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],s));function s(){this.cssClass=!0,this.executeAction=new o.EventEmitter}t.HeroCardComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=(o.prototype.onFocus=function(){this.focused=!0},o.prototype.onBlur=function(){this.focused=!1},a.__decorate([n.HostBinding("class.k-focus"),a.__metadata("design:type",Boolean)],o.prototype,"focused",void 0),a.__decorate([n.HostListener("focusin"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],o.prototype,"onFocus",null),a.__decorate([n.HostListener("focusout"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],o.prototype,"onBlur",null),a.__decorate([n.Directive({selector:"[kendoChatFocusedState]"})],o));function o(){this.focused=!1}t.FocusedStateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(2),n=n(10),n=(a=n.Messages,s.__extends(c,a),o=c,Object.defineProperty(c.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),o=s.__decorate([i.Component({providers:[{provide:n.Messages,useExisting:i.forwardRef(function(){return o})}],selector:"kendo-chat-messages",template:""}),s.__metadata("design:paramtypes",[r.LocalizationService])],c));function c(e){var t=a.call(this)||this;return t.service=e,t}t.CustomMessagesComponent=n},function(e,t){e.exports=c},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=n(3),n=(Object.defineProperty(s.prototype,"attachment",{get:function(){return this._attachment},set:function(e){this._attachment=e,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),a.__decorate([o.Input(),a.__metadata("design:type",Object),a.__metadata("design:paramtypes",[Object])],s.prototype,"attachment",null),a.__decorate([o.Input(),a.__metadata("design:type",n.AttachmentTemplateDirective)],s.prototype,"template",void 0),a.__decorate([o.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],s));function s(){}t.AttachmentComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(30),s=n(3),i=n(29),r=n(28),c=n(11),l=n(27),d=n(26),p=n(25),u=n(24),m=n(23),g=n(20),_=n(19),h=n(1),f=n(15),y=n(14),v=n(12),n=n(5),l=[s.ChatComponent,l.CustomMessagesComponent,s.AttachmentTemplateDirective,s.MessageTemplateDirective,p.HeroCardComponent,n.ChatMessageBoxTemplateDirective],p=[o.AttachmentComponent,d.FocusedStateDirective,u.LocalizedMessagesDirective,m.MessageAttachmentsComponent,g.MessageComponent,_.MessageListComponent,s.MessageTemplateDirective,f.ScrollAnchorDirective,y.SuggestedActionsComponent,v.MessageBoxComponent],n=a.__decorate([h.NgModule({declarations:l.concat(p),exports:[l],imports:[i.ButtonModule,r.CommonModule,c.ResizeSensorModule]})],k);function k(){}t.ChatModule=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1649323827,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t){e.exports=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function a(){}var o=n(7),s={reply:function(e,t){t.sendMessage.emit(new o.SendMessageEvent({author:t.user,text:e.value,timestamp:new Date}))},call:function(e){window.open("tel:"+e.value)},openUrl:function(e){window.open(e.value)}};t.makeHandler=function(e){return s[e.type]||a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(13),i=n(2),r=n(34),c=n(6),l=n(33),d=n(32),p=n(5),n=n(12),s=(Object.defineProperty(u.prototype,"className",{get:function(){return"k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"localizationText",{get:function(){return this.localization},enumerable:!0,configurable:!0}),u.prototype.ngOnChanges=function(){var e=this;this.zone.runOutsideAngular(function(){return setTimeout(function(){e.messageList.nativeElement.style.flex="1 1 auto"})})},u.prototype.ngAfterViewInit=function(){if(o.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},u.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},u.prototype.dispatchAction=function(e){this.executeAction.emit(e),e.isDefaultPrevented()||(r.makeHandler(e.action)(e.action,this),this.messageBoxTemplate||this.messageBox.messageBoxInput.nativeElement.focus())},u.prototype.textFor=function(e){return this.localization.get(e)},a.__decorate([o.Input(),a.__metadata("design:type",Array)],u.prototype,"messages",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],u.prototype,"user",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],u.prototype,"messageBoxType",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],u.prototype,"sendMessage",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],u.prototype,"executeAction",void 0),a.__decorate([o.HostBinding("class"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],u.prototype,"className",null),a.__decorate([o.HostBinding("attr.dir"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],u.prototype,"dirAttr",null),a.__decorate([o.ContentChild(s.AttachmentTemplateDirective,{static:!1}),a.__metadata("design:type",s.AttachmentTemplateDirective)],u.prototype,"attachmentTemplate",void 0),a.__decorate([o.ContentChild(c.MessageTemplateDirective,{static:!1}),a.__metadata("design:type",c.MessageTemplateDirective)],u.prototype,"messageTemplate",void 0),a.__decorate([o.ContentChild(p.ChatMessageBoxTemplateDirective,{static:!1}),a.__metadata("design:type",p.ChatMessageBoxTemplateDirective)],u.prototype,"messageBoxTemplate",void 0),a.__decorate([o.ViewChild("messageBox",{static:!1}),a.__metadata("design:type",n.MessageBoxComponent)],u.prototype,"messageBox",void 0),a.__decorate([o.ViewChild("messageList",{static:!0}),a.__metadata("design:type",o.ElementRef)],u.prototype,"messageList",void 0),a.__decorate([o.Component({providers:[i.LocalizationService,{provide:i.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n <kendo-message-box\n #messageBox\n [messageBoxTemplate]="messageBoxTemplate"\n [type]="messageBoxType"\n [user]="user"\n [autoScroll]="autoScroll"\n [localization]="localizationText"\n (sendMessage)="sendMessage.emit($event)"\n >\n </kendo-message-box>\n '}),a.__metadata("design:paramtypes",[i.LocalizationService,o.NgZone])],u));function u(e,t){var n=this;this.localization=e,this.zone=t,this.messageBoxType="textbox",this.sendMessage=new o.EventEmitter,this.executeAction=new o.EventEmitter,this.autoScroll=!0,l.validatePackage(d.packageMetadata),this.direction=e.rtl?"rtl":"ltr",this.localizationChangeSubscription=e.changes.subscribe(function(e){e=e.rtl;n.direction=e?"rtl":"ltr"})}t.ChatComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),s=(o.__exportStar(n(3),t),o.__exportStar(n(31),t),o.__exportStar(n(8),t),o.__exportStar(n(7),t),t);for(a in s)i(a,s[a])}],o={},a.m=n,a.c=o,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},a.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=36)}}});
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Kendo UI for Angular Conversational UI components",
4
4
  "author": "Progress",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
- "version": "4.1.0-dev.202204051239",
6
+ "version": "4.1.0",
7
7
  "main": "dist/npm/index.js",
8
8
  "module": "dist/fesm5/index.js",
9
9
  "es2015": "dist/fesm2015/index.js",