adaptivecards-controls
Advanced tools
Comparing version 0.9.0 to 0.10.0
@@ -39,2 +39,5 @@ declare module 'adaptivecards-controls/constants' { | ||
readonly delete: "Delete"; | ||
readonly backspace: "Backspace"; | ||
readonly left: "ArrowLeft"; | ||
readonly right: "ArrowRight"; | ||
}; | ||
@@ -82,2 +85,3 @@ } | ||
export function getAttributeValueAsInt(element: HTMLElement, attributeName: string, defaultValue: number): number; | ||
export function clearElement(element: HTMLElement): void; | ||
@@ -129,4 +133,6 @@ } | ||
private _value; | ||
private _isEnabled; | ||
protected keyDown(e: KeyboardEvent): void; | ||
private updateLabel; | ||
private updateLayout; | ||
protected get popupControl(): TPopupControl; | ||
@@ -148,2 +154,3 @@ protected abstract createPopupControl(): TPopupControl; | ||
set value(newValue: TValue); | ||
set isEnabled(value: boolean); | ||
} | ||
@@ -150,0 +157,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("ACControls",[],t):"object"==typeof exports?exports.ACControls=t():e.ACControls=t()}(this,(function(){return e={320:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(601),t),r(n(900),t),r(n(593),t),r(n(351),t),r(n(236),t),r(n(830),t),r(n(722),t),r(n(123),t),r(n(457),t),r(n(941),t),r(n(423),t),r(n(454),t),r(n(921),t)},722:function(e,t,n){"use strict";var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Calendar=t.DayCell=void 0;var i=n(593),s=n(601),l=n(236),a=function(){function e(e){this._isSubdued=!1,this._isSelected=!1,this.date=e}return e.prototype.selected=function(){this.onSelected&&this.onSelected(this)},e.prototype.render=function(){var e=this;return this._element=document.createElement("div"),this._element.className="ms-ctrl ms-ctrl-calendarDay",this._element.innerText=this.date.getDate().toString(),this._element.tabIndex=0,this._element.onclick=function(t){e.selected()},this._element.onkeydown=function(t){if(t.key==s.Constants.keys.enter)return e.selected(),!1},this._element},e.prototype.focus=function(){this._element.focus()},Object.defineProperty(e.prototype,"isSubdued",{get:function(){return this._isSubdued},set:function(e){this._isSubdued=e,this._isSubdued?this._element.classList.add("subdued"):this._element.classList.remove("subdued")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},set:function(e){this._isSelected=e,this._isSelected?this._element.classList.add("selected"):this._element.classList.remove("selected")},enumerable:!1,configurable:!0}),e}();t.DayCell=a;var c=function(e){function t(){var t=e.call(this)||this;t._selectedDay=null,t._miniCalendarElement=document.createElement("table"),t._miniCalendarElement.className="ms-ctrl ms-ctrl-slide",t._miniCalendarElement.cellPadding="0px",t._miniCalendarElement.cellSpacing="0px";var n=document.createElement("div");n.className="ms-ctrl ms-ctrl-calendarHeader",n.style.display="flex",t._monthYearLabelElement=document.createElement("div"),t._monthYearLabelElement.style.flex="1 1 100%",n.appendChild(t._monthYearLabelElement);var o=document.createElement("div");o.style.flex="0 0 auto";var r=document.createElement("i");return r.className="ms-icon ms-ctrl-calendarNavButton ms-icon-chevronLeft",r.tabIndex=0,r.onclick=function(e){t.date=i.addMonths(t.date,-1)},r.onkeydown=function(e){if(e.key==s.Constants.keys.enter)return t.date=i.addMonths(t.date,-1),!1},o.appendChild(r),(r=document.createElement("i")).className="ms-icon ms-ctrl-calendarNavButton ms-icon-chevronRight",r.tabIndex=0,r.onclick=function(e){t.date=i.addMonths(t.date,1)},r.onkeydown=function(e){if(e.key==s.Constants.keys.enter)return t.date=i.addMonths(t.date,1),!1},o.appendChild(r),n.appendChild(o),t._rootContainerElement=document.createElement("div"),t._rootContainerElement.className="ms-ctrl ms-ctrl-calendar",t._rootContainerElement.appendChild(n),t._rootContainerElement.appendChild(t._miniCalendarElement),t.date=new Date,t}return r(t,e),t.prototype.generateDayCells=function(e){var t=this;this._days=[];var n=e.getMonth(),o=e.getFullYear(),r=new Date(o,n,1),s=new Date(o,n,i.daysInMonth(o,n)),l=r.getDay();l-i.CalendarSettings.firstDayOfWeek>0&&(r=i.addDays(r,i.CalendarSettings.firstDayOfWeek-l));var c=s.getDay(),u=i.CalendarSettings.firstDayOfWeek+6;u-c>0&&(s=i.addDays(s,u-c));var p=s.getDate(),h=s.getMonth(),d=s.getFullYear();do{var m=new a(r);m.onSelected=function(e){t.selectedDayCell=e,t.onDateChanged&&t.onDateChanged(t)},this._days.push(m);var f=r.getDate()==p&&r.getMonth()==h&&r.getFullYear()==d;r=i.addDays(r,1)}while(!f)},Object.defineProperty(t.prototype,"selectedDayCell",{get:function(){return this._selectedDay},set:function(e){this._selectedDay&&(this._selectedDay.isSelected=!1),this._selectedDay=e,this._selectedDay&&(this._selectedDay.isSelected=!0,this._date=this._selectedDay.date)},enumerable:!1,configurable:!0}),t.prototype.initializeSelection=function(){if(this._date)for(var e=0;e<this._days.length;e++)if(i.areDatesEqual(this._days[e].date,this.date)){this.selectedDayCell=this._days[e];break}},t.prototype.rebuildMiniCalendar=function(e,t){this.generateDayCells(e);var n=e.getMonth();this._miniCalendarElement.innerHTML="",this._miniCalendarElement.classList.remove("ms-ctrl-slide","ms-ctrl-slideLeftToRight","ms-ctrl-slideRightToLeft");for(var o=document.createElement("tr"),r=i.CalendarSettings.firstDayOfWeek,s=0;s<i.CalendarSettings.daysInWeek;s++){var l=document.createElement("td");l.className="ms-ctrl ms-ctrl-calendarDayHeader",l.innerText=i.CalendarSettings.getInitialDayName(r),o.appendChild(l),++r>=i.CalendarSettings.daysInWeek&&(r=0)}for(this._miniCalendarElement.appendChild(o),s=0;s<this._days.length;s++){s%7==0&&(o=document.createElement("tr"),this._miniCalendarElement.appendChild(o));var a=document.createElement("td");a.appendChild(this._days[s].render()),this._days[s].date.getMonth()!=n&&(this._days[s].isSubdued=!0),o.appendChild(a)}if(t){var c=e.getTime()-t.getTime();c>0?this._miniCalendarElement.classList.add("ms-ctrl-slide","ms-ctrl-slideRightToLeft"):c<0&&this._miniCalendarElement.classList.add("ms-ctrl-slide","ms-ctrl-slideLeftToRight")}},t.prototype.attach=function(t){e.prototype.attach.call(this,t),t.innerHTML="",t.appendChild(this._rootContainerElement)},t.prototype.focus=function(){this._selectedDay&&this._selectedDay.focus()},Object.defineProperty(t.prototype,"date",{get:function(){return this._date},set:function(e){var t=!0,n=e||new Date;this._date&&(t=!this._days||n.getFullYear()!=this._date.getFullYear()||n.getMonth()!=this._date.getMonth()),t&&this.rebuildMiniCalendar(n,this._date),this._date=n,this.initializeSelection(),this._monthYearLabelElement.innerText=i.CalendarSettings.getLongMonthName(this._date.getMonth())+" "+this._date.getFullYear()},enumerable:!1,configurable:!0}),t}(l.InputControl);t.Calendar=c},941:function(e,t,n){"use strict";var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CheckBox=void 0;var i=n(601),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._label="",t._checkboxElement=null,t._spanElement=null,t}return r(t,e),t.createId=function(){var e=t.creationIndex;return t.creationIndex++,e},t.prototype.changed=function(){this.onChange&&this.onChange(this)},t.prototype.keyDown=function(e){switch(e.key){case i.Constants.keys.enter:this.isChecked=!this.isChecked}},t.prototype.attach=function(n){var o=this;e.prototype.attach.call(this,n),n.className="ms-ctrl ms-ctrl-checkbox",n.tabIndex=0;var r=n.attributes.label;r&&(this._label=r.value);var i=n.attributes.ischecked;i&&(this._isChecked="true"===i.value),this._checkboxElement=document.createElement("input"),this._checkboxElement.id="ms-ctrl-checkbox-"+t.createId(),this._checkboxElement.type="checkbox",this._checkboxElement.style.position="absolute",this._checkboxElement.checked=this.isChecked,this._checkboxElement.onchange=function(e){o.changed()};var s=document.createElement("label");s.htmlFor=this._checkboxElement.id,this._spanElement=document.createElement("span"),this._spanElement.innerText=this._label,s.appendChild(this._spanElement),n.innerHTML="",n.appendChild(this._checkboxElement),n.appendChild(s)},Object.defineProperty(t.prototype,"label",{get:function(){return this._label},set:function(e){this._label=e,this._spanElement&&(this._spanElement.innerText=this._label)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChecked",{get:function(){return this._isChecked},set:function(e){this._isChecked!=e&&(this._isChecked=e,this._checkboxElement&&(this._checkboxElement.checked=this._isChecked),this.changed())},enumerable:!1,configurable:!0}),t.creationIndex=0,t}(n(236).InputControl);t.CheckBox=s},351:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0;var n=function(){function e(){this._items=[],this.onItemAdded=null,this.onItemRemoved=null}return e.prototype.get=function(e){return this._items[e]},e.prototype.add=function(e){this._items.push(e),this.onItemAdded&&this.onItemAdded(e)},e.prototype.remove=function(e){var t=this._items.indexOf(e);t>=0&&(this._items=this._items.splice(t,1),this.onItemRemoved&&this.onItemRemoved(e))},e.prototype.indexOf=function(e){return this._items.indexOf(e)},Object.defineProperty(e.prototype,"length",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),e}();t.Collection=n},601:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Constants=t.KEY_DELETE=t.KEY_DOWN=t.KEY_UP=t.KEY_SPACE=t.KEY_ESCAPE=t.KEY_ENTER=t.KEY_TAB=void 0,t.KEY_TAB=9,t.KEY_ENTER=13,t.KEY_ESCAPE=27,t.KEY_SPACE=32,t.KEY_UP=38,t.KEY_DOWN=40,t.KEY_DELETE=46;var n=function(){function e(){}return e.keys={tab:"Tab",enter:"Enter",escape:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",delete:"Delete"},e}();t.Constants=n},457:function(e,t,n){"use strict";var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DatePicker=t.CalendarPopupControl=void 0;var i=n(830),s=n(722),l=function(e){function t(t){var n=e.call(this)||this;return n._owner=t,n}return r(t,e),t.prototype.renderContent=function(){var e=this,t=document.createElement("div");return t.className="ms-ctrl ms-calendarPopup",this._calendar=new s.Calendar,this._calendar.date=this._owner.value,this._calendar.onDateChanged=function(t){e._owner.value=t.date,e.closePopup(!1)},this._calendar.attach(t),t},t.prototype.focus=function(){this._calendar&&this._calendar.focus()},t}(i.PopupControl);t.CalendarPopupControl=l;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.validateRootElement=function(e){if(!(e instanceof HTMLDivElement))throw new Error("DatePicker requires a DIV element as its root.")},t.prototype.createPopupControl=function(){return new l(this)},t.prototype.getValueAsString=function(){return this.value.toLocaleDateString()},t.prototype.getCssClassName=function(){return"ms-ctrl ms-ctrl-datePicker"},t.prototype.getButtonIconCssClassName=function(){return"ms-icon-calendar"},t.prototype.popup=function(){e.prototype.popup.call(this),this.isOpen&&this.popupControl.focus()},t}(i.InputWithPopup);t.DatePicker=a},123:function(e,t,n){"use strict";var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DropDown=t.DropDownPopupControl=t.DropDownItem=void 0;var i=n(601),s=n(351),l=n(830),a=function(){function e(e,t){this.key=e,this._value=t}return e.prototype.click=function(){this.onClick&&this.onClick(this)},e.prototype.toString=function(){return this.value},e.prototype.render=function(){var e=this;return this._element||(this._element=document.createElement("span"),this._element.className="ms-ctrl ms-ctrl-dropdown-item",this._element.innerText=this.value,this._element.setAttribute("role","menuitem"),this._element.setAttribute("aria-selected","false"),this._element.onmouseup=function(t){e.click()},this._element.onkeydown=function(t){t.key===i.Constants.keys.enter&&(e.click(),t.cancelBubble=!0)}),this._element},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e,this._element&&(this._element.innerText=e)},enumerable:!1,configurable:!0}),e}();t.DropDownItem=a;var c=function(e){function t(t){var n=e.call(this)||this;return n._renderedItems=[],n._selectedIndex=-1,n._owner=t,n}return r(t,e),t.prototype.renderContent=function(){var e=document.createElement("div");e.className="ms-ctrl ms-popup",e.setAttribute("role","menu");for(var t=this._owner.selectedIndex,n=0;n<this._owner.items.length;n++){var o=this._owner.items.get(n).render();o.tabIndex=0,e.appendChild(o),n==t&&o.focus(),this._renderedItems.push(o)}return e},t.prototype.keyDown=function(t){e.prototype.keyDown.call(this,t);var n=this._selectedIndex;switch(t.key){case i.Constants.keys.tab:this.closePopup(!0);break;case i.Constants.keys.enter:this.selectedIndex>=0&&(this._owner.selectedIndex=this.selectedIndex,this.closePopup(!1));break;case i.Constants.keys.up:(n<=0||--n<0)&&(n=this._renderedItems.length-1),this.selectedIndex=n,t.cancelBubble=!0;break;case i.Constants.keys.down:(n<0||++n>=this._renderedItems.length)&&(n=0),this.selectedIndex=n,t.cancelBubble=!0}},t.prototype.render=function(t){var n=e.prototype.render.call(this,t);return n.style.minWidth=t.width/2+"px",n},Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){e>=0&&e<this._renderedItems.length&&(this._selectedIndex>=0&&this._selectedIndex<this._renderedItems.length&&this._renderedItems[this._selectedIndex].setAttribute("aria-selected","false"),this._renderedItems[e].focus(),this._renderedItems[e].setAttribute("aria-selected","true"),this._selectedIndex=e)},enumerable:!1,configurable:!0}),t}(l.PopupControl);t.DropDownPopupControl=c;var u=function(e){function t(){var t=e.call(this)||this;return t._items=new s.Collection,t._items.onItemAdded=function(e){e.onClick=function(e){t.itemClicked(e)}},t._items.onItemRemoved=function(e){e.onClick=null},t}return r(t,e),t.prototype.itemClicked=function(e){this.selectedItem=e,this.closePopup(!1),this.rootElement.focus()},t.prototype.validateRootElement=function(e){if(!(e instanceof HTMLDivElement))throw new Error("DropDown requires a DIV element as its root.")},t.prototype.createPopupControl=function(){return new c(this)},t.prototype.getCssClassName=function(){return"ms-ctrl ms-ctrl-dropdown"},t.prototype.attach=function(t){e.prototype.attach.call(this,t);for(var n=0;n<this.rootElement.children.length;n++){var o=this.rootElement.children[n];if("ms-dropdown-item"==o.tagName.toLowerCase()){var r=new a(o.attributes.getNamedItem("key").value,o.attributes.getNamedItem("value").value);this._items.add(r)}}var i=[];this.parentLabelId&&i.push(this.parentLabelId),this.labelId&&i.push(this.labelId),i.length>0&&this.rootElement.setAttribute("aria-labelledby",i.join(" ")),this.rootElement.setAttribute("role","button"),this.rootElement.setAttribute("aria-haspopup","menu")},t.prototype.popup=function(){e.prototype.popup.call(this),this.popupControl.selectedIndex=this.selectedIndex},Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedItem",{get:function(){return this.value},set:function(e){this.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.items.indexOf(this.value)},set:function(e){e>=0&&this.items.length>e&&(this.selectedItem=this.items.get(e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentLabelId",{get:function(){return this._parentLabelId},set:function(e){this._parentLabelId=e},enumerable:!1,configurable:!0}),t}(l.InputWithPopup);t.DropDown=u},900:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DayOfWeek=void 0,(n=t.DayOfWeek||(t.DayOfWeek={}))[n.Sunday=0]="Sunday",n[n.Monday=1]="Monday",n[n.Tuesday=2]="Tuesday",n[n.Wednesday=3]="Wednesday",n[n.Thursday=4]="Thursday",n[n.Friday=5]="Friday",n[n.Saturday=6]="Saturday"},236:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputControl=void 0;var n=function(){function e(){}return e.prototype.validateRootElement=function(e){},e.prototype.keyDown=function(e){},Object.defineProperty(e.prototype,"rootElement",{get:function(){return this._rootElement},enumerable:!1,configurable:!0}),e.prototype.attach=function(e){var t=this;this.validateRootElement(e),this._rootElement=e,this._rootElement.onkeydown=function(e){t.keyDown(e)}},e}();t.InputControl=n},830:function(e,t,n){"use strict";var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.InputWithPopup=t.PopupControl=void 0;var i=n(601),s=n(593),l=n(236),a=n(877),c=function(){function e(){this._isOpen=!1}return e.prototype.keyDown=function(e){switch(e.key){case i.Constants.keys.escape:this.closePopup(!0)}},e.prototype.render=function(e){var t=this,n=document.createElement("div");return n.tabIndex=0,n.className="ms-ctrl ms-ctrl-popup-container",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.onkeydown=function(e){return t.keyDown(e),!e.cancelBubble},n.appendChild(this.renderContent()),n},e.prototype.focus=function(){this._popupElement&&this._popupElement.firstElementChild.focus()},e.prototype.popup=function(e){var t=this;if(!this._isOpen){this._overlayElement=document.createElement("div"),this._overlayElement.className="ms-ctrl-overlay",this._overlayElement.tabIndex=0,this._overlayElement.style.width=document.documentElement.scrollWidth+"px",this._overlayElement.style.height=document.documentElement.scrollHeight+"px",this._overlayElement.onfocus=function(e){t.closePopup(!0)},document.body.appendChild(this._overlayElement);var n=e.getBoundingClientRect();this._popupElement=this.render(n),this._popupElement.classList.remove("ms-ctrl-slide","ms-ctrl-slideLeftToRight","ms-ctrl-slideRightToLeft","ms-ctrl-slideTopToBottom","ms-ctrl-slideRightToLeft"),window.addEventListener("resize",(function(e){t.closePopup(!0)}));var o=e.getAttribute("aria-label");o&&this._popupElement.setAttribute("aria-label",o),this._overlayElement.appendChild(this._popupElement);var r,i=this._popupElement.getBoundingClientRect(),l=window.innerHeight-n.bottom,a=n.top,c=(window.innerWidth,n.left),u=(c=window.innerWidth-n.right,n.left),p=n.left+s.getScrollX();if(a<i.height&&l<i.height){var h=Math.min(i.height,window.innerHeight);if(this._popupElement.style.maxHeight=h+"px",r=h<i.height?s.getScrollY():s.getScrollY()+n.top+(n.height-h)/2,u<i.width&&c<i.width){var d=Math.min(i.width,window.innerWidth);this._popupElement.style.maxWidth=d+"px",p=d<i.width?s.getScrollX():s.getScrollX()+n.left+(n.width-d)/2}else c>=i.width?(p=s.getScrollX()+n.right,this._popupElement.classList.add("ms-ctrl-slide","ms-ctrl-slideLeftToRight")):(p=s.getScrollX()+n.left-i.width,this._popupElement.classList.add("ms-ctrl-slide","ms-ctrl-slideRightToLeft"))}else l>=i.height?(r=s.getScrollY()+n.bottom,this._popupElement.classList.add("ms-ctrl-slide","ms-ctrl-slideTopToBottom")):(r=s.getScrollY()+n.top-i.height,this._popupElement.classList.add("ms-ctrl-slide","ms-ctrl-slideBottomToTop")),c<i.width&&(p=s.getScrollX()+n.right-i.width);this._popupElement.style.left=p+"px",this._popupElement.style.top=r+"px",this.focus(),this._isOpen=!0}},e.prototype.closePopup=function(e){this._isOpen&&(document.body.removeChild(this._overlayElement),this._isOpen=!1,this.onClose&&this.onClose(this,e))},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),e}();t.PopupControl=c;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.keyDown=function(e){switch(e.key){case i.Constants.keys.enter:this.popup()}},t.prototype.updateLabel=function(){this._labelElement&&(this._value?(this._labelElement.innerHTML=this.getValueAsString(),this._labelElement.classList.remove("placeholder")):(this._labelElement.innerText=this._placeholderText?this._placeholderText:"",this._labelElement.classList.add("placeholder")))},Object.defineProperty(t.prototype,"popupControl",{get:function(){return this._popupControl},enumerable:!1,configurable:!0}),t.prototype.getButtonIconCssClassName=function(){return"ms-icon-chevronDown"},t.prototype.getValueAsString=function(){return this._value.toString()},t.prototype.valueChanged=function(){this.onValueChanged&&this.onValueChanged(this)},t.prototype.attach=function(t){var n=this;e.prototype.attach.call(this,t),t.tabIndex=0,t.className=this.getCssClassName(),window.addEventListener("resize",(function(e){n.closePopup(!0)})),this.rootElement.onclick=function(e){n.isOpen?n.closePopup(!0):n.popup()};var o=this.rootElement.attributes.getNamedItem("placeholder");o&&(this._placeholderText=o.value),this._labelElement=document.createElement("span"),this._labelElement.className="ms-ctrl ms-dropdown-label",this._labelElement.id=a.v4(),this._dropDownButtonElement=document.createElement("i"),this._dropDownButtonElement.className="ms-icon ms-ctrl-dropdown-button "+this.getButtonIconCssClassName(),this.rootElement.appendChild(this._labelElement),this.rootElement.appendChild(this._dropDownButtonElement),this.updateLabel()},t.prototype.popup=function(){var e=this;this._popupControl=this.createPopupControl(),this._popupControl.onClose=function(t,n){e.closePopup(n),e.rootElement.focus()},this._popupControl.popup(this.rootElement)},t.prototype.closePopup=function(e){this.popupControl&&this.popupControl.closePopup(e)},Object.defineProperty(t.prototype,"labelId",{get:function(){if(this._labelElement)return this._labelElement.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return!!this._popupControl&&this._popupControl.isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this._placeholderText},set:function(e){this._placeholderText=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){this._value!=e&&(this._value=e,this.updateLabel(),this.valueChanged())},enumerable:!1,configurable:!0}),t}(l.InputControl);t.InputWithPopup=u},921:function(e,t,n){"use strict";var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PopupMenu=void 0;var i=n(601),s=n(351),l=function(e){function t(){var t=e.call(this)||this;return t._items=new s.Collection,t._renderedItems=[],t._selectedIndex=-1,t}return r(t,e),t.prototype.renderContent=function(){var e=document.createElement("div");e.className="ms-ctrl ms-popup",e.setAttribute("role","listbox");for(var t=0;t<this._items.length;t++){var n=this._items.get(t).render();n.tabIndex=0,e.appendChild(n),t==this.selectedIndex&&n.focus(),this._renderedItems.push(n)}return e},t.prototype.keyDown=function(t){e.prototype.keyDown.call(this,t);var n=this._selectedIndex;switch(t.key){case i.Constants.keys.tab:this.closePopup(!0);break;case i.Constants.keys.up:(n<=0||--n<0)&&(n=this._renderedItems.length-1),this.selectedIndex=n,t.cancelBubble=!0;break;case i.Constants.keys.down:(n<0||++n>=this._renderedItems.length)&&(n=0),this.selectedIndex=n,t.cancelBubble=!0}},Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){e>=0&&e<this._renderedItems.length&&(this._renderedItems[e].focus(),this._selectedIndex=e)},enumerable:!1,configurable:!0}),t}(n(830).PopupControl);t.PopupMenu=l},423:function(e,t,n){"use strict";var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RadioButton=void 0;var i=n(601),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._label="",t._checkboxElement=null,t._spanElement=null,t}return r(t,e),t.createId=function(){var e=t.creationIndex;return t.creationIndex++,e},t.prototype.changed=function(){this.onChange&&this.onChange(this)},t.prototype.keyDown=function(e){switch(e.key){case i.Constants.keys.enter:this.isChecked=!this.isChecked}},t.prototype.attach=function(n){var o=this;e.prototype.attach.call(this,n),n.className="ms-ctrl ms-ctrl-radiobutton",n.tabIndex=0;var r=n.attributes.label;r&&(this._label=r.value);var i=n.attributes.ischecked;i&&(this._isChecked="true"===i.value),this._checkboxElement=document.createElement("input"),this._checkboxElement.id="ms-ctrl-radio-"+t.createId(),this._checkboxElement.type="radio",this._checkboxElement.style.position="absolute",this._checkboxElement.checked=this.isChecked,this._checkboxElement.onchange=function(e){o.changed()};var s=n.attributes.groupname;s&&(this._checkboxElement.name=s.value);var l=document.createElement("label");l.htmlFor=this._checkboxElement.id,this._spanElement=document.createElement("span"),this._spanElement.innerText=this._label,l.appendChild(this._spanElement),n.innerHTML="",n.appendChild(this._checkboxElement),n.appendChild(l)},Object.defineProperty(t.prototype,"label",{get:function(){return this._label},set:function(e){this._label=e,this._spanElement&&(this._spanElement.innerText=this._label)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChecked",{get:function(){return this._isChecked},set:function(e){this._isChecked!=e&&(this._isChecked=e,this._checkboxElement&&(this._checkboxElement.checked=this._isChecked),this.changed())},enumerable:!1,configurable:!0}),t.creationIndex=0,t}(n(236).InputControl);t.RadioButton=s},454:function(e,t,n){"use strict";var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TextBox=void 0;var i=n(593),s=n(236),l=function(){function e(){}return e.prototype.changed=function(){this.onChange&&this.onChange()},e}(),a=function(e){function t(){var t=e.call(this)||this;return t._inputElement=document.createElement("input"),t._inputElement.className="ms-ctrl ms-ctrl-textbox",t._inputElement.type="text",t._inputElement.oninput=function(e){t.changed()},t}return r(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._inputElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{set:function(e){this._inputElement.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineCount",{set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{set:function(e){this._inputElement.maxLength!=e&&(this._inputElement.maxLength=e,this.value=this.value.substr(0,e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._inputElement.value},set:function(e){this._inputElement.value=e},enumerable:!1,configurable:!0}),t}(l),c=function(e){function t(){var t=e.call(this)||this;return t._textareaElement=document.createElement("textarea"),t._textareaElement.className="ms-ctrl ms-ctrl-textbox ms-ctrl-textbox-multiline",t._textareaElement.oninput=function(e){t.changed()},t}return r(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._textareaElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{set:function(e){this._textareaElement.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineCount",{set:function(e){this._textareaElement.rows=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{set:function(e){this._textareaElement.maxLength!=e&&(this._textareaElement.maxLength=e,this.value=this.value.substr(0,e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._textareaElement.value},set:function(e){this._textareaElement.value=e},enumerable:!1,configurable:!0}),t}(l),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isMultiline=!1,t._lineCount=3,t}return r(t,e),t.prototype.editBoxChanged=function(){this.onChange&&this.onChange(this)},t.prototype.recreateEditBox=function(){var e,t=this;e=this._editBox?this._editBox.value:this.rootElement.innerText,this._isMultiline?this._editBox=new c:this._editBox=new a,e&&(this._editBox.value=e),this._editBox.lineCount=this._lineCount,this._editBox.maxLength=this._maxLength,this._editBox.placeholder=this._placeholder,this._editBox.onChange=function(){t.editBoxChanged()},this.rootElement.innerHTML="",this.rootElement.appendChild(this._editBox.element)},Object.defineProperty(t.prototype,"editBox",{get:function(){return this._editBox||this.recreateEditBox(),this._editBox},enumerable:!1,configurable:!0}),t.prototype.attach=function(t){e.prototype.attach.call(this,t),this._isMultiline=i.getAttributeValueAsBool(t,"ismultiline",!1),this._lineCount=i.getAttributeValueAsInt(t,"lines",3),this._maxLength=i.getAttributeValueAsInt(t,"maxlength",5e4),this._placeholder=i.getAttributeValueAsString(t,"placeholder",null),this.recreateEditBox()},Object.defineProperty(t.prototype,"value",{get:function(){return this.editBox.value},set:function(e){this.editBox.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.editBox.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMultiline",{get:function(){return this._isMultiline},set:function(e){this._isMultiline!=e&&(this._isMultiline=e,this.recreateEditBox())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineCount",{get:function(){return this._lineCount},set:function(e){e>0&&(this._lineCount=e,this.editBox.lineCount=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this._maxLength},set:function(e){e>0&&(this._maxLength=e,this.editBox.maxLength=e)},enumerable:!1,configurable:!0}),t}(s.InputControl);t.TextBox=u},593:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAttributeValueAsInt=t.getAttributeValueAsString=t.getAttributeValueAsBool=t.getScrollY=t.getScrollX=t.areDatesEqual=t.addMonths=t.addDays=t.daysInMonth=t.CalendarSettings=void 0;var o=n(900),r=function(){function e(){}return e.getLongDayName=function(t){if(t>=0&&t<e.longDayNames.length)return e.longDayNames[t];throw new Error("Day index out of range: "+t)},e.getShortDayName=function(t){if(t>=0&&t<e.shortDayNames.length)return e.shortDayNames[t];throw new Error("Day index out of range: "+t)},e.getInitialDayName=function(t){if(t>=0&&t<e.minimalDayNames.length)return e.minimalDayNames[t];throw new Error("Day index out of range: "+t)},e.getLongMonthName=function(t){if(t>=0&&t<e.longMonthNames.length)return e.longMonthNames[t];throw new Error("Month index out of range: "+t)},e.getShortMonthName=function(t){if(t>=0&&t<e.shortMonthNames.length)return e.shortMonthNames[t];throw new Error("Month index out of range: "+t)},e.monthsInYear=12,e.daysInWeek=7,e.firstDayOfWeek=o.DayOfWeek.Sunday,e.longDayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],e.shortDayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e.minimalDayNames=["Su","Mo","Tu","We","Th","Fr","Sa"],e.longMonthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],e.shortMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e}();function i(e,t){var n=new Date(e.getTime());return n.setDate(n.getDate()+t),n}t.CalendarSettings=r,t.daysInMonth=function(e,t){switch(t){case 1:return e%4==0&&e%100||e%400==0?29:28;case 3:case 5:case 8:case 10:return 30;default:return 31}},t.addDays=i,t.addMonths=function(e,t){var n=new Date(e.getTime()),o=n.getMonth()+t;return n.setMonth(o),n.getMonth()!==(o%r.monthsInYear+r.monthsInYear)%r.monthsInYear&&(n=i(n,-n.getDate())),n},t.areDatesEqual=function(e,t){return e.getFullYear()==t.getFullYear()&&e.getMonth()==t.getMonth()&&e.getDate()==t.getDate()},t.getScrollX=function(){return window.pageXOffset},t.getScrollY=function(){return window.pageYOffset},t.getAttributeValueAsBool=function(e,t,n){var o=e.attributes[t];return o?"true"===o.value:n},t.getAttributeValueAsString=function(e,t,n){var o=e.attributes[t];return o?o.value:n},t.getAttributeValueAsInt=function(e,t,n){var o=e.attributes[t];if(o){var r=parseInt(o.value);if(!isNaN(r))return r}return n}},877:(e,t,n)=>{var o=n(570),r=n(171),i=r;i.v1=o,i.v4=r,e.exports=i},327:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},217:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},570:(e,t,n)=>{var o,r,i=n(217),s=n(327),l=0,a=0;e.exports=function(e,t,n){var c=t&&n||0,u=t||[],p=(e=e||{}).node||o,h=void 0!==e.clockseq?e.clockseq:r;if(null==p||null==h){var d=i();null==p&&(p=o=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==h&&(h=r=16383&(d[6]<<8|d[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:a+1,_=m-l+(f-a)/1e4;if(_<0&&void 0===e.clockseq&&(h=h+1&16383),(_<0||m>l)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=m,a=f,r=h;var y=(1e4*(268435455&(m+=122192928e5))+f)%4294967296;u[c++]=y>>>24&255,u[c++]=y>>>16&255,u[c++]=y>>>8&255,u[c++]=255&y;var b=m/4294967296*1e4&268435455;u[c++]=b>>>8&255,u[c++]=255&b,u[c++]=b>>>24&15|16,u[c++]=b>>>16&255,u[c++]=h>>>8|128,u[c++]=255&h;for(var g=0;g<6;++g)u[c+g]=p[g];return t||s(u)}},171:(e,t,n)=>{var o=n(217),r=n(327);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||o)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var l=0;l<16;++l)t[i+l]=s[l];return t||r(s)}}},t={},function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}(320);var e,t})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("ACControls",[],t):"object"==typeof exports?exports.ACControls=t():e.ACControls=t()}(this,(function(){return(()=>{"use strict";var e={178:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(780),t),r(n(10),t),r(n(755),t),r(n(41),t),r(n(587),t),r(n(571),t),r(n(964),t),r(n(518),t),r(n(213),t),r(n(598),t),r(n(411),t),r(n(35),t),r(n(660),t)},964:function(e,t,n){var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Calendar=t.DayCell=void 0;var i=n(755),s=n(780),a=n(587),l=function(){function e(e){this._isSubdued=!1,this._isSelected=!1,this.date=e}return e.prototype.selected=function(){this.onSelected&&this.onSelected(this)},e.prototype.render=function(){var e=this;return this._element=document.createElement("div"),this._element.className="ms-ctrl ms-ctrl-calendarDay",this._element.innerText=this.date.getDate().toString(),this._element.tabIndex=0,this._element.onclick=function(t){e.selected()},this._element.onkeydown=function(t){if(t.key==s.Constants.keys.enter)return e.selected(),!1},this._element},e.prototype.focus=function(){this._element.focus()},Object.defineProperty(e.prototype,"isSubdued",{get:function(){return this._isSubdued},set:function(e){this._isSubdued=e,this._isSubdued?this._element.classList.add("subdued"):this._element.classList.remove("subdued")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},set:function(e){this._isSelected=e,this._isSelected?this._element.classList.add("selected"):this._element.classList.remove("selected")},enumerable:!1,configurable:!0}),e}();t.DayCell=l;var c=function(e){function t(){var t=e.call(this)||this;t._selectedDay=null,t._miniCalendarElement=document.createElement("table"),t._miniCalendarElement.className="ms-ctrl ms-ctrl-slide",t._miniCalendarElement.cellPadding="0px",t._miniCalendarElement.cellSpacing="0px";var n=document.createElement("div");n.className="ms-ctrl ms-ctrl-calendarHeader",n.style.display="flex",t._monthYearLabelElement=document.createElement("div"),t._monthYearLabelElement.style.flex="1 1 100%",n.appendChild(t._monthYearLabelElement);var o=document.createElement("div");o.style.flex="0 0 auto";var r=document.createElement("i");return r.className="ms-icon ms-ctrl-calendarNavButton ms-icon-chevronLeft",r.tabIndex=0,r.onclick=function(e){t.date=i.addMonths(t.date,-1)},r.onkeydown=function(e){if(e.key==s.Constants.keys.enter)return t.date=i.addMonths(t.date,-1),!1},o.appendChild(r),(r=document.createElement("i")).className="ms-icon ms-ctrl-calendarNavButton ms-icon-chevronRight",r.tabIndex=0,r.onclick=function(e){t.date=i.addMonths(t.date,1)},r.onkeydown=function(e){if(e.key==s.Constants.keys.enter)return t.date=i.addMonths(t.date,1),!1},o.appendChild(r),n.appendChild(o),t._rootContainerElement=document.createElement("div"),t._rootContainerElement.className="ms-ctrl ms-ctrl-calendar",t._rootContainerElement.appendChild(n),t._rootContainerElement.appendChild(t._miniCalendarElement),t.date=new Date,t}return r(t,e),t.prototype.generateDayCells=function(e){var t=this;this._days=[];var n=e.getMonth(),o=e.getFullYear(),r=new Date(o,n,1),s=new Date(o,n,i.daysInMonth(o,n)),a=r.getDay();a-i.CalendarSettings.firstDayOfWeek>0&&(r=i.addDays(r,i.CalendarSettings.firstDayOfWeek-a));var c=s.getDay(),u=i.CalendarSettings.firstDayOfWeek+6;u-c>0&&(s=i.addDays(s,u-c));var p=s.getDate(),h=s.getMonth(),d=s.getFullYear();do{var f=new l(r);f.onSelected=function(e){t.selectedDayCell=e,t.onDateChanged&&t.onDateChanged(t)},this._days.push(f);var m=r.getDate()==p&&r.getMonth()==h&&r.getFullYear()==d;r=i.addDays(r,1)}while(!m)},Object.defineProperty(t.prototype,"selectedDayCell",{get:function(){return this._selectedDay},set:function(e){this._selectedDay&&(this._selectedDay.isSelected=!1),this._selectedDay=e,this._selectedDay&&(this._selectedDay.isSelected=!0,this._date=this._selectedDay.date)},enumerable:!1,configurable:!0}),t.prototype.initializeSelection=function(){if(this._date)for(var e=0;e<this._days.length;e++)if(i.areDatesEqual(this._days[e].date,this.date)){this.selectedDayCell=this._days[e];break}},t.prototype.rebuildMiniCalendar=function(e,t){this.generateDayCells(e);var n=e.getMonth();i.clearElement(this._miniCalendarElement),this._miniCalendarElement.classList.remove("ms-ctrl-slide","ms-ctrl-slideLeftToRight","ms-ctrl-slideRightToLeft");for(var o=document.createElement("tr"),r=i.CalendarSettings.firstDayOfWeek,s=0;s<i.CalendarSettings.daysInWeek;s++){var a=document.createElement("td");a.className="ms-ctrl ms-ctrl-calendarDayHeader",a.innerText=i.CalendarSettings.getInitialDayName(r),o.appendChild(a),++r>=i.CalendarSettings.daysInWeek&&(r=0)}for(this._miniCalendarElement.appendChild(o),s=0;s<this._days.length;s++){s%7==0&&(o=document.createElement("tr"),this._miniCalendarElement.appendChild(o));var l=document.createElement("td");l.appendChild(this._days[s].render()),this._days[s].date.getMonth()!=n&&(this._days[s].isSubdued=!0),o.appendChild(l)}if(t){var c=e.getTime()-t.getTime();c>0?this._miniCalendarElement.classList.add("ms-ctrl-slide","ms-ctrl-slideRightToLeft"):c<0&&this._miniCalendarElement.classList.add("ms-ctrl-slide","ms-ctrl-slideLeftToRight")}},t.prototype.attach=function(t){e.prototype.attach.call(this,t),i.clearElement(t),t.appendChild(this._rootContainerElement)},t.prototype.focus=function(){this._selectedDay&&this._selectedDay.focus()},Object.defineProperty(t.prototype,"date",{get:function(){return this._date},set:function(e){var t=!0,n=e||new Date;this._date&&(t=!this._days||n.getFullYear()!=this._date.getFullYear()||n.getMonth()!=this._date.getMonth()),t&&this.rebuildMiniCalendar(n,this._date),this._date=n,this.initializeSelection(),this._monthYearLabelElement.innerText=i.CalendarSettings.getLongMonthName(this._date.getMonth())+" "+this._date.getFullYear()},enumerable:!1,configurable:!0}),t}(a.InputControl);t.Calendar=c},598:function(e,t,n){var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CheckBox=void 0;var i=n(780),s=n(587),a=n(755),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._label="",t._checkboxElement=null,t._spanElement=null,t}return r(t,e),t.createId=function(){var e=t.creationIndex;return t.creationIndex++,e},t.prototype.changed=function(){this.onChange&&this.onChange(this)},t.prototype.keyDown=function(e){e.key===i.Constants.keys.enter&&(this.isChecked=!this.isChecked)},t.prototype.attach=function(n){var o=this;e.prototype.attach.call(this,n),n.className="ms-ctrl ms-ctrl-checkbox",n.tabIndex=0;var r=n.attributes.label;r&&(this._label=r.value);var i=n.attributes.ischecked;i&&(this._isChecked="true"===i.value),this._checkboxElement=document.createElement("input"),this._checkboxElement.id="ms-ctrl-checkbox-"+t.createId(),this._checkboxElement.type="checkbox",this._checkboxElement.style.position="absolute",this._checkboxElement.checked=this.isChecked,this._checkboxElement.onchange=function(e){o.changed()};var s=document.createElement("label");s.htmlFor=this._checkboxElement.id,this._spanElement=document.createElement("span"),this._spanElement.innerText=this._label,s.appendChild(this._spanElement),(0,a.clearElement)(n),n.appendChild(this._checkboxElement),n.appendChild(s)},Object.defineProperty(t.prototype,"label",{get:function(){return this._label},set:function(e){this._label=e,this._spanElement&&(this._spanElement.innerText=this._label)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChecked",{get:function(){return this._isChecked},set:function(e){this._isChecked!=e&&(this._isChecked=e,this._checkboxElement&&(this._checkboxElement.checked=this._isChecked),this.changed())},enumerable:!1,configurable:!0}),t.creationIndex=0,t}(s.InputControl);t.CheckBox=l},41:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0;var n=function(){function e(){this._items=[],this.onItemAdded=null,this.onItemRemoved=null}return e.prototype.get=function(e){return this._items[e]},e.prototype.add=function(e){this._items.push(e),this.onItemAdded&&this.onItemAdded(e)},e.prototype.remove=function(e){var t=this._items.indexOf(e);t>=0&&(this._items=this._items.splice(t,1),this.onItemRemoved&&this.onItemRemoved(e))},e.prototype.indexOf=function(e){return this._items.indexOf(e)},Object.defineProperty(e.prototype,"length",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),e}();t.Collection=n},780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Constants=t.KEY_DELETE=t.KEY_DOWN=t.KEY_UP=t.KEY_SPACE=t.KEY_ESCAPE=t.KEY_ENTER=t.KEY_TAB=void 0,t.KEY_TAB=9,t.KEY_ENTER=13,t.KEY_ESCAPE=27,t.KEY_SPACE=32,t.KEY_UP=38,t.KEY_DOWN=40,t.KEY_DELETE=46;var n=function(){function e(){}return e.keys={tab:"Tab",enter:"Enter",escape:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",delete:"Delete",backspace:"Backspace",left:"ArrowLeft",right:"ArrowRight"},e}();t.Constants=n},213:function(e,t,n){var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DatePicker=t.CalendarPopupControl=void 0;var i=n(571),s=n(964),a=function(e){function t(t){var n=e.call(this)||this;return n._owner=t,n}return r(t,e),t.prototype.renderContent=function(){var e=this,t=document.createElement("div");return t.className="ms-ctrl ms-calendarPopup",this._calendar=new s.Calendar,this._calendar.date=this._owner.value,this._calendar.onDateChanged=function(t){e._owner.value=t.date,e.closePopup(!1)},this._calendar.attach(t),t},t.prototype.focus=function(){this._calendar&&this._calendar.focus()},t}(i.PopupControl);t.CalendarPopupControl=a;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.validateRootElement=function(e){if(!(e instanceof HTMLDivElement))throw new Error("DatePicker requires a DIV element as its root.")},t.prototype.createPopupControl=function(){return new a(this)},t.prototype.getValueAsString=function(){return this.value.toLocaleDateString()},t.prototype.getCssClassName=function(){return"ms-ctrl ms-ctrl-datePicker"},t.prototype.getButtonIconCssClassName=function(){return"ms-icon-calendar"},t.prototype.popup=function(){e.prototype.popup.call(this),this.isOpen&&this.popupControl.focus()},t}(i.InputWithPopup);t.DatePicker=l},518:function(e,t,n){var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DropDown=t.DropDownPopupControl=t.DropDownItem=void 0;var i=n(780),s=n(41),a=n(571),l=function(){function e(e,t){this.key=e,this._value=t}return e.prototype.click=function(){this.onClick&&this.onClick(this)},e.prototype.toString=function(){return this.value},e.prototype.render=function(){var e=this;return this._element||(this._element=document.createElement("span"),this._element.className="ms-ctrl ms-ctrl-dropdown-item",this._element.innerText=this.value,this._element.setAttribute("role","menuitem"),this._element.setAttribute("aria-current","false"),this._element.onmouseup=function(t){e.click()},this._element.onkeydown=function(t){t.key===i.Constants.keys.enter&&(e.click(),t.cancelBubble=!0)}),this._element},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e,this._element&&(this._element.innerText=e)},enumerable:!1,configurable:!0}),e}();t.DropDownItem=l;var c=function(e){function t(t){var n=e.call(this)||this;return n._renderedItems=[],n._selectedIndex=-1,n._owner=t,n}return r(t,e),t.prototype.renderContent=function(){var e=document.createElement("div");e.className="ms-ctrl ms-popup",e.setAttribute("role","menu");for(var t=this._owner.selectedIndex,n=0;n<this._owner.items.length;n++){var o=this._owner.items.get(n).render();o.tabIndex=0,e.appendChild(o),n==t&&o.focus(),this._renderedItems.push(o)}return e},t.prototype.keyDown=function(t){e.prototype.keyDown.call(this,t);var n=this._selectedIndex;switch(t.key){case i.Constants.keys.tab:this.closePopup(!0);break;case i.Constants.keys.enter:this.selectedIndex>=0&&(this._owner.selectedIndex=this.selectedIndex,this.closePopup(!1));break;case i.Constants.keys.up:(n<=0||--n<0)&&(n=this._renderedItems.length-1),this.selectedIndex=n,t.cancelBubble=!0;break;case i.Constants.keys.down:(n<0||++n>=this._renderedItems.length)&&(n=0),this.selectedIndex=n,t.cancelBubble=!0}},t.prototype.render=function(t){var n=e.prototype.render.call(this,t);return n.style.minWidth=t.width/2+"px",n},Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){e>=0&&e<this._renderedItems.length&&(this._selectedIndex>=0&&this._selectedIndex<this._renderedItems.length&&this._renderedItems[this._selectedIndex].setAttribute("aria-current","false"),this._renderedItems[e].focus(),this._renderedItems[e].setAttribute("aria-current","true"),this._selectedIndex=e)},enumerable:!1,configurable:!0}),t}(a.PopupControl);t.DropDownPopupControl=c;var u=function(e){function t(){var t=e.call(this)||this;return t._items=new s.Collection,t._items.onItemAdded=function(e){e.onClick=function(e){t.itemClicked(e)}},t._items.onItemRemoved=function(e){e.onClick=null},t}return r(t,e),t.prototype.itemClicked=function(e){this.selectedItem=e,this.closePopup(!1),this.rootElement.focus()},t.prototype.validateRootElement=function(e){if(!(e instanceof HTMLDivElement))throw new Error("DropDown requires a DIV element as its root.")},t.prototype.createPopupControl=function(){return new c(this)},t.prototype.getCssClassName=function(){return"ms-ctrl ms-ctrl-dropdown"},t.prototype.attach=function(t){e.prototype.attach.call(this,t);for(var n=0;n<this.rootElement.children.length;n++){var o=this.rootElement.children[n];if("ms-dropdown-item"==o.tagName.toLowerCase()){var r=new l(o.attributes.getNamedItem("key").value,o.attributes.getNamedItem("value").value);this._items.add(r)}}var i=[];this.parentLabelId&&i.push(this.parentLabelId),this.labelId&&i.push(this.labelId),i.length>0&&this.rootElement.setAttribute("aria-labelledby",i.join(" ")),this.rootElement.setAttribute("role","combobox"),this.rootElement.setAttribute("aria-haspopup","menu")},t.prototype.popup=function(){e.prototype.popup.call(this),this.popupControl.selectedIndex=this.selectedIndex},Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedItem",{get:function(){return this.value},set:function(e){this.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.items.indexOf(this.value)},set:function(e){e>=0&&this.items.length>e&&(this.selectedItem=this.items.get(e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentLabelId",{get:function(){return this._parentLabelId},set:function(e){this._parentLabelId=e},enumerable:!1,configurable:!0}),t}(a.InputWithPopup);t.DropDown=u},10:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DayOfWeek=void 0,(n=t.DayOfWeek||(t.DayOfWeek={}))[n.Sunday=0]="Sunday",n[n.Monday=1]="Monday",n[n.Tuesday=2]="Tuesday",n[n.Wednesday=3]="Wednesday",n[n.Thursday=4]="Thursday",n[n.Friday=5]="Friday",n[n.Saturday=6]="Saturday"},587:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InputControl=void 0;var n=function(){function e(){}return e.prototype.validateRootElement=function(e){},e.prototype.keyDown=function(e){},Object.defineProperty(e.prototype,"rootElement",{get:function(){return this._rootElement},enumerable:!1,configurable:!0}),e.prototype.attach=function(e){var t=this;this.validateRootElement(e),this._rootElement=e,this._rootElement.onkeydown=function(e){t.keyDown(e)}},e}();t.InputControl=n},571:function(e,t,n){var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.InputWithPopup=t.PopupControl=void 0;var i=n(780),s=n(755),a=n(587),l=n(286),c=function(){function e(){this._isOpen=!1}return e.prototype.keyDown=function(e){e.key===i.Constants.keys.escape&&this.closePopup(!0)},e.prototype.render=function(e){var t=this,n=document.createElement("div");return n.tabIndex=0,n.className="ms-ctrl ms-ctrl-popup-container",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.onkeydown=function(e){return t.keyDown(e),!e.cancelBubble},n.appendChild(this.renderContent()),n},e.prototype.focus=function(){this._popupElement&&this._popupElement.firstElementChild.focus()},e.prototype.popup=function(e){var t=this;if(!this._isOpen){this._overlayElement=document.createElement("div"),this._overlayElement.className="ms-ctrl-overlay",this._overlayElement.tabIndex=0,this._overlayElement.style.width=document.documentElement.scrollWidth+"px",this._overlayElement.style.height=document.documentElement.scrollHeight+"px",this._overlayElement.onfocus=function(e){t.closePopup(!0)},document.body.appendChild(this._overlayElement);var n=e.getBoundingClientRect();this._popupElement=this.render(n),this._popupElement.classList.remove("ms-ctrl-slide","ms-ctrl-slideLeftToRight","ms-ctrl-slideRightToLeft","ms-ctrl-slideTopToBottom","ms-ctrl-slideRightToLeft"),window.addEventListener("resize",(function(e){t.closePopup(!0)}));var o=e.getAttribute("aria-label");o&&this._popupElement.setAttribute("aria-label",o),this._overlayElement.appendChild(this._popupElement);var r,i=this._popupElement.getBoundingClientRect(),a=window.innerHeight-n.bottom,l=n.top,c=(window.innerWidth,n.left),u=(c=window.innerWidth-n.right,n.left),p=n.left+s.getScrollX();if(l<i.height&&a<i.height){var h=Math.min(i.height,window.innerHeight);if(this._popupElement.style.maxHeight=h+"px",r=h<i.height?s.getScrollY():s.getScrollY()+n.top+(n.height-h)/2,u<i.width&&c<i.width){var d=Math.min(i.width,window.innerWidth);this._popupElement.style.maxWidth=d+"px",p=d<i.width?s.getScrollX():s.getScrollX()+n.left+(n.width-d)/2}else c>=i.width?(p=s.getScrollX()+n.right,this._popupElement.classList.add("ms-ctrl-slide","ms-ctrl-slideLeftToRight")):(p=s.getScrollX()+n.left-i.width,this._popupElement.classList.add("ms-ctrl-slide","ms-ctrl-slideRightToLeft"))}else a>=i.height?(r=s.getScrollY()+n.bottom,this._popupElement.classList.add("ms-ctrl-slide","ms-ctrl-slideTopToBottom")):(r=s.getScrollY()+n.top-i.height,this._popupElement.classList.add("ms-ctrl-slide","ms-ctrl-slideBottomToTop")),c<i.width&&(p=s.getScrollX()+n.right-i.width);this._popupElement.style.left=p+"px",this._popupElement.style.top=r+"px",this.focus(),this._isOpen=!0}},e.prototype.closePopup=function(e){this._isOpen&&(document.body.removeChild(this._overlayElement),this._isOpen=!1,this.onClose&&this.onClose(this,e))},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),e}();t.PopupControl=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isEnabled=!0,t}return r(t,e),t.prototype.keyDown=function(e){e.key===i.Constants.keys.enter&&this._isEnabled&&this.popup()},t.prototype.updateLabel=function(){this._labelElement&&(this._value?(this._labelElement.innerText=this.getValueAsString(),this._labelElement.classList.remove("placeholder")):(this._labelElement.innerText=this._placeholderText?this._placeholderText:"",this._labelElement.classList.add("placeholder")))},t.prototype.updateLayout=function(){this._isEnabled?(this.rootElement.classList.remove("disabled"),this.rootElement.removeAttribute("aria-disabled"),this.rootElement.tabIndex=0):(this.rootElement.classList.add("disabled"),this.rootElement.setAttribute("aria-disabled","true"),this.rootElement.tabIndex=-1)},Object.defineProperty(t.prototype,"popupControl",{get:function(){return this._popupControl},enumerable:!1,configurable:!0}),t.prototype.getButtonIconCssClassName=function(){return"ms-icon-chevronDown"},t.prototype.getValueAsString=function(){return this._value.toString()},t.prototype.valueChanged=function(){this.onValueChanged&&this.onValueChanged(this)},t.prototype.attach=function(t){var n=this;e.prototype.attach.call(this,t),t.tabIndex=0,t.className=this.getCssClassName(),window.addEventListener("resize",(function(e){n.closePopup(!0)})),this.rootElement.onclick=function(e){n._isEnabled&&(n.isOpen?n.closePopup(!0):n.popup())};var o=this.rootElement.attributes.getNamedItem("placeholder");o&&(this._placeholderText=o.value),this._labelElement=document.createElement("span"),this._labelElement.className="ms-ctrl ms-dropdown-label",this._labelElement.id=(0,l.v4)(),this._dropDownButtonElement=document.createElement("i"),this._dropDownButtonElement.className="ms-icon ms-ctrl-dropdown-button "+this.getButtonIconCssClassName(),this.rootElement.appendChild(this._labelElement),this.rootElement.appendChild(this._dropDownButtonElement),this.updateLabel()},t.prototype.popup=function(){var e=this;this._popupControl=this.createPopupControl(),this._popupControl.onClose=function(t,n){e.closePopup(n),e.rootElement.focus()},this._popupControl.popup(this.rootElement)},t.prototype.closePopup=function(e){this.popupControl&&this.popupControl.closePopup(e)},Object.defineProperty(t.prototype,"labelId",{get:function(){if(this._labelElement)return this._labelElement.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return!!this._popupControl&&this._popupControl.isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this._placeholderText},set:function(e){this._placeholderText=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){this._value!=e&&(this._value=e,this.updateLabel(),this.valueChanged())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{set:function(e){this._isEnabled!==e&&(this._isEnabled=e,this.updateLayout())},enumerable:!1,configurable:!0}),t}(a.InputControl);t.InputWithPopup=u},660:function(e,t,n){var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PopupMenu=void 0;var i=n(780),s=n(41),a=function(e){function t(){var t=e.call(this)||this;return t._items=new s.Collection,t._renderedItems=[],t._selectedIndex=-1,t}return r(t,e),t.prototype.renderContent=function(){var e=document.createElement("div");e.className="ms-ctrl ms-popup",e.setAttribute("role","listbox");for(var t=0;t<this._items.length;t++){var n=this._items.get(t).render();n.tabIndex=0,e.appendChild(n),t==this.selectedIndex&&n.focus(),this._renderedItems.push(n)}return e},t.prototype.keyDown=function(t){e.prototype.keyDown.call(this,t);var n=this._selectedIndex;switch(t.key){case i.Constants.keys.tab:this.closePopup(!0);break;case i.Constants.keys.up:(n<=0||--n<0)&&(n=this._renderedItems.length-1),this.selectedIndex=n,t.cancelBubble=!0;break;case i.Constants.keys.down:(n<0||++n>=this._renderedItems.length)&&(n=0),this.selectedIndex=n,t.cancelBubble=!0}},Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){e>=0&&e<this._renderedItems.length&&(this._renderedItems[e].focus(),this._selectedIndex=e)},enumerable:!1,configurable:!0}),t}(n(571).PopupControl);t.PopupMenu=a},411:function(e,t,n){var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RadioButton=void 0;var i=n(780),s=n(587),a=n(755),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._label="",t._checkboxElement=null,t._spanElement=null,t}return r(t,e),t.createId=function(){var e=t.creationIndex;return t.creationIndex++,e},t.prototype.changed=function(){this.onChange&&this.onChange(this)},t.prototype.keyDown=function(e){e.key===i.Constants.keys.enter&&(this.isChecked=!this.isChecked)},t.prototype.attach=function(n){var o=this;e.prototype.attach.call(this,n),n.className="ms-ctrl ms-ctrl-radiobutton",n.tabIndex=0;var r=n.attributes.label;r&&(this._label=r.value);var i=n.attributes.ischecked;i&&(this._isChecked="true"===i.value),this._checkboxElement=document.createElement("input"),this._checkboxElement.id="ms-ctrl-radio-"+t.createId(),this._checkboxElement.type="radio",this._checkboxElement.style.position="absolute",this._checkboxElement.checked=this.isChecked,this._checkboxElement.onchange=function(e){o.changed()};var s=n.attributes.groupname;s&&(this._checkboxElement.name=s.value);var l=document.createElement("label");l.htmlFor=this._checkboxElement.id,this._spanElement=document.createElement("span"),this._spanElement.innerText=this._label,l.appendChild(this._spanElement),(0,a.clearElement)(n),n.appendChild(this._checkboxElement),n.appendChild(l)},Object.defineProperty(t.prototype,"label",{get:function(){return this._label},set:function(e){this._label=e,this._spanElement&&(this._spanElement.innerText=this._label)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChecked",{get:function(){return this._isChecked},set:function(e){this._isChecked!=e&&(this._isChecked=e,this._checkboxElement&&(this._checkboxElement.checked=this._isChecked),this.changed())},enumerable:!1,configurable:!0}),t.creationIndex=0,t}(s.InputControl);t.RadioButton=l},35:function(e,t,n){var o,r=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TextBox=void 0;var i=n(755),s=n(587),a=function(){function e(){}return e.prototype.changed=function(){this.onChange&&this.onChange()},e}(),l=function(e){function t(){var t=e.call(this)||this;return t._inputElement=document.createElement("input"),t._inputElement.className="ms-ctrl ms-ctrl-textbox",t._inputElement.type="text",t._inputElement.oninput=function(e){t.changed()},t}return r(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._inputElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{set:function(e){this._inputElement.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineCount",{set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{set:function(e){this._inputElement.maxLength!=e&&(this._inputElement.maxLength=e,this.value=this.value.substr(0,e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._inputElement.value},set:function(e){this._inputElement.value=e},enumerable:!1,configurable:!0}),t}(a),c=function(e){function t(){var t=e.call(this)||this;return t._textareaElement=document.createElement("textarea"),t._textareaElement.className="ms-ctrl ms-ctrl-textbox ms-ctrl-textbox-multiline",t._textareaElement.oninput=function(e){t.changed()},t}return r(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._textareaElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{set:function(e){this._textareaElement.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineCount",{set:function(e){this._textareaElement.rows=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{set:function(e){this._textareaElement.maxLength!=e&&(this._textareaElement.maxLength=e,this.value=this.value.substr(0,e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._textareaElement.value},set:function(e){this._textareaElement.value=e},enumerable:!1,configurable:!0}),t}(a),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isMultiline=!1,t._lineCount=3,t}return r(t,e),t.prototype.editBoxChanged=function(){this.onChange&&this.onChange(this)},t.prototype.recreateEditBox=function(){var e,t=this;e=this._editBox?this._editBox.value:this.rootElement.innerText,this._isMultiline?this._editBox=new c:this._editBox=new l,e&&(this._editBox.value=e),this._editBox.lineCount=this._lineCount,this._editBox.maxLength=this._maxLength,this._editBox.placeholder=this._placeholder,this._editBox.onChange=function(){t.editBoxChanged()},i.clearElement(this.rootElement),this.rootElement.appendChild(this._editBox.element)},Object.defineProperty(t.prototype,"editBox",{get:function(){return this._editBox||this.recreateEditBox(),this._editBox},enumerable:!1,configurable:!0}),t.prototype.attach=function(t){e.prototype.attach.call(this,t),this._isMultiline=i.getAttributeValueAsBool(t,"ismultiline",!1),this._lineCount=i.getAttributeValueAsInt(t,"lines",3),this._maxLength=i.getAttributeValueAsInt(t,"maxlength",5e4),this._placeholder=i.getAttributeValueAsString(t,"placeholder",null),this.recreateEditBox()},Object.defineProperty(t.prototype,"value",{get:function(){return this.editBox.value},set:function(e){this.editBox.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.editBox.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMultiline",{get:function(){return this._isMultiline},set:function(e){this._isMultiline!=e&&(this._isMultiline=e,this.recreateEditBox())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineCount",{get:function(){return this._lineCount},set:function(e){e>0&&(this._lineCount=e,this.editBox.lineCount=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this._maxLength},set:function(e){e>0&&(this._maxLength=e,this.editBox.maxLength=e)},enumerable:!1,configurable:!0}),t}(s.InputControl);t.TextBox=u},755:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clearElement=t.getAttributeValueAsInt=t.getAttributeValueAsString=t.getAttributeValueAsBool=t.getScrollY=t.getScrollX=t.areDatesEqual=t.addMonths=t.addDays=t.daysInMonth=t.CalendarSettings=void 0;var o=n(10),r=function(){function e(){}return e.getLongDayName=function(t){if(t>=0&&t<e.longDayNames.length)return e.longDayNames[t];throw new Error("Day index out of range: "+t)},e.getShortDayName=function(t){if(t>=0&&t<e.shortDayNames.length)return e.shortDayNames[t];throw new Error("Day index out of range: "+t)},e.getInitialDayName=function(t){if(t>=0&&t<e.minimalDayNames.length)return e.minimalDayNames[t];throw new Error("Day index out of range: "+t)},e.getLongMonthName=function(t){if(t>=0&&t<e.longMonthNames.length)return e.longMonthNames[t];throw new Error("Month index out of range: "+t)},e.getShortMonthName=function(t){if(t>=0&&t<e.shortMonthNames.length)return e.shortMonthNames[t];throw new Error("Month index out of range: "+t)},e.monthsInYear=12,e.daysInWeek=7,e.firstDayOfWeek=o.DayOfWeek.Sunday,e.longDayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],e.shortDayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e.minimalDayNames=["Su","Mo","Tu","We","Th","Fr","Sa"],e.longMonthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],e.shortMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e}();function i(e,t){var n=new Date(e.getTime());return n.setDate(n.getDate()+t),n}t.CalendarSettings=r,t.daysInMonth=function(e,t){switch(t){case 1:return e%4==0&&e%100||e%400==0?29:28;case 3:case 5:case 8:case 10:return 30;default:return 31}},t.addDays=i,t.addMonths=function(e,t){var n=new Date(e.getTime()),o=n.getMonth()+t;return n.setMonth(o),n.getMonth()!==(o%r.monthsInYear+r.monthsInYear)%r.monthsInYear&&(n=i(n,-n.getDate())),n},t.areDatesEqual=function(e,t){return e.getFullYear()==t.getFullYear()&&e.getMonth()==t.getMonth()&&e.getDate()==t.getDate()},t.getScrollX=function(){return window.pageXOffset},t.getScrollY=function(){return window.pageYOffset},t.getAttributeValueAsBool=function(e,t,n){var o=e.attributes[t];return o?"true"===o.value:n},t.getAttributeValueAsString=function(e,t,n){var o=e.attributes[t];return o?o.value:n},t.getAttributeValueAsInt=function(e,t,n){var o=e.attributes[t];if(o){var r=parseInt(o.value);if(!isNaN(r))return r}return n},t.clearElement=function(e){var t,n,o=null!==(n=null===(t=window.trustedTypes)||void 0===t?void 0:t.emptyHTML)&&void 0!==n?n:"";e.innerHTML=o}},286:(e,t,n)=>{var o;n.r(t),n.d(t,{NIL:()=>j,parse:()=>y,stringify:()=>u,v1:()=>m,v3:()=>k,v4:()=>I,v5:()=>P,validate:()=>a,version:()=>S});var r=new Uint8Array(16);function i(){if(!o&&!(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(r)}const s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,a=function(e){return"string"==typeof e&&s.test(e)};for(var l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));const u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n};var p,h,d=0,f=0;const m=function(e,t,n){var o=t&&n||0,r=t||new Array(16),s=(e=e||{}).node||p,a=void 0!==e.clockseq?e.clockseq:h;if(null==s||null==a){var l=e.random||(e.rng||i)();null==s&&(s=p=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==a&&(a=h=16383&(l[6]<<8|l[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:f+1,y=c-d+(m-f)/1e4;if(y<0&&void 0===e.clockseq&&(a=a+1&16383),(y<0||c>d)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=c,f=m,h=a;var _=(1e4*(268435455&(c+=122192928e5))+m)%4294967296;r[o++]=_>>>24&255,r[o++]=_>>>16&255,r[o++]=_>>>8&255,r[o++]=255&_;var b=c/4294967296*1e4&268435455;r[o++]=b>>>8&255,r[o++]=255&b,r[o++]=b>>>24&15|16,r[o++]=b>>>16&255,r[o++]=a>>>8|128,r[o++]=255&a;for(var g=0;g<6;++g)r[o+g]=s[g];return t||u(r)},y=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};function _(e,t,n){function o(e,o,r,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof o&&(o=y(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(o),s.set(e,o.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,r){i=i||0;for(var a=0;a<16;++a)r[i+a]=s[a];return r}return u(s)}try{o.name=e}catch(e){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}function b(e){return 14+(e+64>>>9<<4)+1}function g(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function v(e,t,n,o,r,i){return g((s=g(g(t,e),g(o,i)))<<(a=r)|s>>>32-a,n);var s,a}function E(e,t,n,o,r,i,s){return v(t&n|~t&o,e,t,r,i,s)}function C(e,t,n,o,r,i,s){return v(t&o|n&~o,e,t,r,i,s)}function x(e,t,n,o,r,i,s){return v(t^n^o,e,t,r,i,s)}function w(e,t,n,o,r,i,s){return v(n^(t|~o),e,t,r,i,s)}const k=_("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,o="0123456789abcdef",r=0;r<n;r+=8){var i=e[r>>5]>>>r%32&255,s=parseInt(o.charAt(i>>>4&15)+o.charAt(15&i),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[b(t)-1]=t;for(var n=1732584193,o=-271733879,r=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=n,l=o,c=r,u=i;n=E(n,o,r,i,e[s],7,-680876936),i=E(i,n,o,r,e[s+1],12,-389564586),r=E(r,i,n,o,e[s+2],17,606105819),o=E(o,r,i,n,e[s+3],22,-1044525330),n=E(n,o,r,i,e[s+4],7,-176418897),i=E(i,n,o,r,e[s+5],12,1200080426),r=E(r,i,n,o,e[s+6],17,-1473231341),o=E(o,r,i,n,e[s+7],22,-45705983),n=E(n,o,r,i,e[s+8],7,1770035416),i=E(i,n,o,r,e[s+9],12,-1958414417),r=E(r,i,n,o,e[s+10],17,-42063),o=E(o,r,i,n,e[s+11],22,-1990404162),n=E(n,o,r,i,e[s+12],7,1804603682),i=E(i,n,o,r,e[s+13],12,-40341101),r=E(r,i,n,o,e[s+14],17,-1502002290),n=C(n,o=E(o,r,i,n,e[s+15],22,1236535329),r,i,e[s+1],5,-165796510),i=C(i,n,o,r,e[s+6],9,-1069501632),r=C(r,i,n,o,e[s+11],14,643717713),o=C(o,r,i,n,e[s],20,-373897302),n=C(n,o,r,i,e[s+5],5,-701558691),i=C(i,n,o,r,e[s+10],9,38016083),r=C(r,i,n,o,e[s+15],14,-660478335),o=C(o,r,i,n,e[s+4],20,-405537848),n=C(n,o,r,i,e[s+9],5,568446438),i=C(i,n,o,r,e[s+14],9,-1019803690),r=C(r,i,n,o,e[s+3],14,-187363961),o=C(o,r,i,n,e[s+8],20,1163531501),n=C(n,o,r,i,e[s+13],5,-1444681467),i=C(i,n,o,r,e[s+2],9,-51403784),r=C(r,i,n,o,e[s+7],14,1735328473),n=x(n,o=C(o,r,i,n,e[s+12],20,-1926607734),r,i,e[s+5],4,-378558),i=x(i,n,o,r,e[s+8],11,-2022574463),r=x(r,i,n,o,e[s+11],16,1839030562),o=x(o,r,i,n,e[s+14],23,-35309556),n=x(n,o,r,i,e[s+1],4,-1530992060),i=x(i,n,o,r,e[s+4],11,1272893353),r=x(r,i,n,o,e[s+7],16,-155497632),o=x(o,r,i,n,e[s+10],23,-1094730640),n=x(n,o,r,i,e[s+13],4,681279174),i=x(i,n,o,r,e[s],11,-358537222),r=x(r,i,n,o,e[s+3],16,-722521979),o=x(o,r,i,n,e[s+6],23,76029189),n=x(n,o,r,i,e[s+9],4,-640364487),i=x(i,n,o,r,e[s+12],11,-421815835),r=x(r,i,n,o,e[s+15],16,530742520),n=w(n,o=x(o,r,i,n,e[s+2],23,-995338651),r,i,e[s],6,-198630844),i=w(i,n,o,r,e[s+7],10,1126891415),r=w(r,i,n,o,e[s+14],15,-1416354905),o=w(o,r,i,n,e[s+5],21,-57434055),n=w(n,o,r,i,e[s+12],6,1700485571),i=w(i,n,o,r,e[s+3],10,-1894986606),r=w(r,i,n,o,e[s+10],15,-1051523),o=w(o,r,i,n,e[s+1],21,-2054922799),n=w(n,o,r,i,e[s+8],6,1873313359),i=w(i,n,o,r,e[s+15],10,-30611744),r=w(r,i,n,o,e[s+6],15,-1560198380),o=w(o,r,i,n,e[s+13],21,1309151649),n=w(n,o,r,i,e[s+4],6,-145523070),i=w(i,n,o,r,e[s+11],10,-1120210379),r=w(r,i,n,o,e[s+2],15,718787259),o=w(o,r,i,n,e[s+9],21,-343485551),n=g(n,a),o=g(o,l),r=g(r,c),i=g(i,u)}return[n,o,r,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(b(t)),o=0;o<t;o+=8)n[o>>5]|=(255&e[o/8])<<o%32;return n}(e),8*e.length))})),I=function(e,t,n){var o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=o[r];return t}return u(o)};function O(e,t,n,o){switch(e){case 0:return t&n^~t&o;case 1:case 3:return t^n^o;case 2:return t&n^t&o^n&o}}function D(e,t){return e<<t|e>>>32-t}const P=_("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=[];for(var r=0;r<o.length;++r)e.push(o.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),l=0;l<s;++l){for(var c=new Uint32Array(16),u=0;u<16;++u)c[u]=e[64*l+4*u]<<24|e[64*l+4*u+1]<<16|e[64*l+4*u+2]<<8|e[64*l+4*u+3];a[l]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var p=0;p<s;++p){for(var h=new Uint32Array(80),d=0;d<16;++d)h[d]=a[p][d];for(var f=16;f<80;++f)h[f]=D(h[f-3]^h[f-8]^h[f-14]^h[f-16],1);for(var m=n[0],y=n[1],_=n[2],b=n[3],g=n[4],v=0;v<80;++v){var E=Math.floor(v/20),C=D(m,5)+O(E,y,_,b)+g+t[E]+h[v]>>>0;g=b,b=_,_=D(y,30)>>>0,y=m,m=C}n[0]=n[0]+m>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+_>>>0,n[3]=n[3]+b>>>0,n[4]=n[4]+g>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),j="00000000-0000-0000-0000-000000000000",S=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}return n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(178)})()})); | ||
//# sourceMappingURL=adaptivecards-controls.min.js.map |
@@ -0,0 +0,0 @@ export * from "./constants"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { InputControl } from "./inputcontrol"; |
@@ -201,3 +201,3 @@ "use strict"; | ||
var month = newDate.getMonth(); | ||
this._miniCalendarElement.innerHTML = ""; | ||
Utils.clearElement(this._miniCalendarElement); | ||
this._miniCalendarElement.classList.remove("ms-ctrl-slide", "ms-ctrl-slideLeftToRight", "ms-ctrl-slideRightToLeft"); | ||
@@ -241,3 +241,3 @@ var row = document.createElement("tr"); | ||
_super.prototype.attach.call(this, rootElement); | ||
rootElement.innerHTML = ""; | ||
Utils.clearElement(rootElement); | ||
rootElement.appendChild(this._rootContainerElement); | ||
@@ -244,0 +244,0 @@ }; |
@@ -0,0 +0,0 @@ import { InputControl } from "./inputcontrol"; |
@@ -23,2 +23,3 @@ "use strict"; | ||
var inputcontrol_1 = require("./inputcontrol"); | ||
var utils_1 = require("./utils"); | ||
var CheckBox = /** @class */ (function (_super) { | ||
@@ -74,3 +75,3 @@ __extends(CheckBox, _super); | ||
labelElement.appendChild(this._spanElement); | ||
rootElement.innerHTML = ""; | ||
(0, utils_1.clearElement)(rootElement); | ||
rootElement.appendChild(this._checkboxElement); | ||
@@ -77,0 +78,0 @@ rootElement.appendChild(labelElement); |
@@ -0,0 +0,0 @@ export declare class Collection<TItem> { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -38,3 +38,6 @@ /** | ||
readonly delete: "Delete"; | ||
readonly backspace: "Backspace"; | ||
readonly left: "ArrowLeft"; | ||
readonly right: "ArrowRight"; | ||
}; | ||
} |
@@ -44,3 +44,6 @@ "use strict"; | ||
down: "ArrowDown", | ||
delete: "Delete" | ||
delete: "Delete", | ||
backspace: "Backspace", | ||
left: "ArrowLeft", | ||
right: "ArrowRight" | ||
}; | ||
@@ -47,0 +50,0 @@ return Constants; |
@@ -0,0 +0,0 @@ import { InputWithPopup, PopupControl } from "./inputwithpopup"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { Collection } from "./collection"; |
@@ -44,3 +44,3 @@ "use strict"; | ||
this._element.setAttribute("role", "menuitem"); | ||
this._element.setAttribute("aria-selected", "false"); | ||
this._element.setAttribute("aria-current", "false"); | ||
this._element.onmouseup = function (e) { _this.click(); }; | ||
@@ -151,7 +151,7 @@ this._element.onkeydown = function (e) { | ||
if (this._selectedIndex >= 0 && this._selectedIndex < this._renderedItems.length) { | ||
this._renderedItems[this._selectedIndex].setAttribute("aria-selected", "false"); | ||
this._renderedItems[this._selectedIndex].setAttribute("aria-current", "false"); | ||
} | ||
// select new item | ||
this._renderedItems[index].focus(); | ||
this._renderedItems[index].setAttribute("aria-selected", "true"); | ||
this._renderedItems[index].setAttribute("aria-current", "true"); | ||
this._selectedIndex = index; | ||
@@ -211,3 +211,3 @@ } | ||
} | ||
this.rootElement.setAttribute("role", "button"); | ||
this.rootElement.setAttribute("role", "combobox"); | ||
this.rootElement.setAttribute("aria-haspopup", "menu"); | ||
@@ -214,0 +214,0 @@ }; |
@@ -0,0 +0,0 @@ export declare enum DayOfWeek { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare abstract class InputControl { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -21,4 +21,6 @@ import { InputControl } from "./inputcontrol"; | ||
private _value; | ||
private _isEnabled; | ||
protected keyDown(e: KeyboardEvent): void; | ||
private updateLabel; | ||
private updateLayout; | ||
protected get popupControl(): TPopupControl; | ||
@@ -40,2 +42,3 @@ protected abstract createPopupControl(): TPopupControl; | ||
set value(newValue: TValue); | ||
set isEnabled(value: boolean); | ||
} |
@@ -157,3 +157,5 @@ "use strict"; | ||
function InputWithPopup() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this._isEnabled = true; | ||
return _this; | ||
} | ||
@@ -163,3 +165,5 @@ InputWithPopup.prototype.keyDown = function (e) { | ||
case constants_1.Constants.keys.enter: | ||
this.popup(); | ||
if (this._isEnabled) { | ||
this.popup(); | ||
} | ||
break; | ||
@@ -171,3 +175,3 @@ } | ||
if (this._value) { | ||
this._labelElement.innerHTML = this.getValueAsString(); | ||
this._labelElement.innerText = this.getValueAsString(); | ||
this._labelElement.classList.remove("placeholder"); | ||
@@ -181,2 +185,14 @@ } | ||
}; | ||
InputWithPopup.prototype.updateLayout = function () { | ||
if (!this._isEnabled) { | ||
this.rootElement.classList.add("disabled"); | ||
this.rootElement.setAttribute("aria-disabled", "true"); | ||
this.rootElement.tabIndex = -1; | ||
} | ||
else { | ||
this.rootElement.classList.remove("disabled"); | ||
this.rootElement.removeAttribute("aria-disabled"); | ||
this.rootElement.tabIndex = 0; | ||
} | ||
}; | ||
Object.defineProperty(InputWithPopup.prototype, "popupControl", { | ||
@@ -207,8 +223,10 @@ get: function () { | ||
this.rootElement.onclick = function (e) { | ||
if (_this.isOpen) { | ||
_this.closePopup(true); | ||
if (_this._isEnabled) { | ||
if (_this.isOpen) { | ||
_this.closePopup(true); | ||
} | ||
else { | ||
_this.popup(); | ||
} | ||
} | ||
else { | ||
_this.popup(); | ||
} | ||
}; | ||
@@ -221,3 +239,3 @@ var placeHolderDomItem = this.rootElement.attributes.getNamedItem("placeholder"); | ||
this._labelElement.className = "ms-ctrl ms-dropdown-label"; | ||
this._labelElement.id = uuid_1.v4(); // generate unique id for our label element | ||
this._labelElement.id = (0, uuid_1.v4)(); // generate unique id for our label element | ||
this._dropDownButtonElement = document.createElement("i"); | ||
@@ -284,2 +302,12 @@ this._dropDownButtonElement.className = "ms-icon ms-ctrl-dropdown-button " + this.getButtonIconCssClassName(); | ||
}); | ||
Object.defineProperty(InputWithPopup.prototype, "isEnabled", { | ||
set: function (value) { | ||
if (this._isEnabled !== value) { | ||
this._isEnabled = value; | ||
this.updateLayout(); | ||
} | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return InputWithPopup; | ||
@@ -286,0 +314,0 @@ }(inputcontrol_1.InputControl)); |
@@ -0,0 +0,0 @@ import { Collection } from "./collection"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { InputControl } from "./inputcontrol"; |
@@ -23,2 +23,3 @@ "use strict"; | ||
var inputcontrol_1 = require("./inputcontrol"); | ||
var utils_1 = require("./utils"); | ||
var RadioButton = /** @class */ (function (_super) { | ||
@@ -78,3 +79,3 @@ __extends(RadioButton, _super); | ||
labelElement.appendChild(this._spanElement); | ||
rootElement.innerHTML = ""; | ||
(0, utils_1.clearElement)(rootElement); | ||
rootElement.appendChild(this._checkboxElement); | ||
@@ -81,0 +82,0 @@ rootElement.appendChild(labelElement); |
@@ -0,0 +0,0 @@ import { InputControl } from "./inputcontrol"; |
@@ -175,3 +175,3 @@ "use strict"; | ||
this._editBox.onChange = function () { _this.editBoxChanged(); }; | ||
this.rootElement.innerHTML = ""; | ||
Utils.clearElement(this.rootElement); | ||
this.rootElement.appendChild(this._editBox.element); | ||
@@ -178,0 +178,0 @@ }; |
@@ -26,1 +26,2 @@ import * as Enums from "./enums"; | ||
export declare function getAttributeValueAsInt(element: HTMLElement, attributeName: string, defaultValue: number): number; | ||
export declare function clearElement(element: HTMLElement): void; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAttributeValueAsInt = exports.getAttributeValueAsString = exports.getAttributeValueAsBool = exports.getScrollY = exports.getScrollX = exports.areDatesEqual = exports.addMonths = exports.addDays = exports.daysInMonth = exports.CalendarSettings = void 0; | ||
exports.clearElement = exports.getAttributeValueAsInt = exports.getAttributeValueAsString = exports.getAttributeValueAsBool = exports.getScrollY = exports.getScrollX = exports.areDatesEqual = exports.addMonths = exports.addDays = exports.daysInMonth = exports.CalendarSettings = void 0; | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
@@ -125,2 +125,8 @@ // Licensed under the MIT License. | ||
exports.getAttributeValueAsInt = getAttributeValueAsInt; | ||
function clearElement(element) { | ||
var _a, _b; | ||
var trustedHtml = (_b = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.emptyHTML) !== null && _b !== void 0 ? _b : ""; | ||
element.innerHTML = trustedHtml; | ||
} | ||
exports.clearElement = clearElement; | ||
//# sourceMappingURL=utils.js.map |
@@ -1,1 +0,1 @@ | ||
{"name":"adaptivecards-controls","version":"0.9.0","description":"A library of pure JS/HTML controls designed for use with Adaptive Cards.","author":"Microsoft","license":"MIT","main":"lib/adaptivecards-controls.js","types":"lib/adaptivecards-controls.d.ts","style":"dist/adaptivecards-controls.css","files":["lib","dist","src"],"scripts":{"clean":"rimraf lib dist","prebuild":"tsc","build":"webpack","watch":"webpack --watch","lint":"eslint src/*.ts","dts":"dts-generator --prefix adaptivecards-controls --project . --out dist/adaptivecards-controls.d.ts","release":"npm run clean && npm run build && webpack --mode=production && npm run dts"},"devDependencies":{"dts-generator":"^3.0.0","rimraf":"^3.0.2","ts-loader":"^7.0.5","typescript":"^4.2.3","webpack":"^5.47.0","webpack-cli":"^4.7.2","webpack-dev-server":"^3.11.2"}} | ||
{"name":"adaptivecards-controls","version":"0.10.0","description":"A library of pure JS/HTML controls designed for use with Adaptive Cards.","author":"Microsoft","license":"MIT","main":"lib/adaptivecards-controls.js","types":"lib/adaptivecards-controls.d.ts","style":"dist/adaptivecards-controls.css","files":["lib","dist","src"],"scripts":{"clean":"rimraf lib dist","prebuild":"tsc","build":"webpack","watch":"webpack --watch","lint":"eslint src/*.ts","dts":"dts-generator --prefix adaptivecards-controls --project . --out dist/adaptivecards-controls.d.ts","release":"npm run clean && npm run build && webpack --mode=production && npm run dts"}} |
# Adaptive Cards Controls | ||
This library is used primarily by the Adaptive Cards designer. |
@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Corporation. All rights reserved. |
@@ -165,3 +165,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
this._miniCalendarElement.innerHTML = ""; | ||
Utils.clearElement(this._miniCalendarElement); | ||
@@ -286,3 +286,3 @@ this._miniCalendarElement.classList.remove( | ||
rootElement.innerHTML = ""; | ||
Utils.clearElement(rootElement); | ||
rootElement.appendChild(this._rootContainerElement); | ||
@@ -289,0 +289,0 @@ } |
@@ -5,2 +5,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
import { InputControl } from "./inputcontrol"; | ||
import { clearElement } from "./utils"; | ||
@@ -73,3 +74,3 @@ export class CheckBox extends InputControl { | ||
rootElement.innerHTML = ""; | ||
clearElement(rootElement); | ||
rootElement.appendChild(this._checkboxElement); | ||
@@ -76,0 +77,0 @@ rootElement.appendChild(labelElement); |
@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Corporation. All rights reserved. |
@@ -40,4 +40,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
down: "ArrowDown", | ||
delete: "Delete" | ||
delete: "Delete", | ||
backspace: "Backspace", | ||
left: "ArrowLeft", | ||
right: "ArrowRight" | ||
} as const; | ||
} |
@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Corporation. All rights reserved. |
@@ -36,3 +36,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
this._element.setAttribute("role", "menuitem"); | ||
this._element.setAttribute("aria-selected", "false"); | ||
this._element.setAttribute("aria-current", "false"); | ||
this._element.onmouseup = (e) => { this.click(); }; | ||
@@ -168,3 +168,3 @@ this._element.onkeydown = (e) => { | ||
if (this._selectedIndex >= 0 && this._selectedIndex < this._renderedItems.length) { | ||
this._renderedItems[this._selectedIndex].setAttribute("aria-selected", "false"); | ||
this._renderedItems[this._selectedIndex].setAttribute("aria-current", "false"); | ||
} | ||
@@ -174,3 +174,3 @@ | ||
this._renderedItems[index].focus(); | ||
this._renderedItems[index].setAttribute("aria-selected", "true"); | ||
this._renderedItems[index].setAttribute("aria-current", "true"); | ||
@@ -245,3 +245,3 @@ this._selectedIndex = index; | ||
this.rootElement.setAttribute("role", "button"); | ||
this.rootElement.setAttribute("role", "combobox"); | ||
this.rootElement.setAttribute("aria-haspopup", "menu"); | ||
@@ -248,0 +248,0 @@ } |
@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Corporation. All rights reserved. |
@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Corporation. All rights reserved. |
@@ -180,2 +180,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
private _value: TValue; | ||
private _isEnabled: boolean = true; | ||
@@ -185,3 +186,5 @@ protected keyDown(e: KeyboardEvent) { | ||
case Constants.keys.enter: | ||
this.popup(); | ||
if (this._isEnabled) { | ||
this.popup(); | ||
} | ||
break; | ||
@@ -194,3 +197,3 @@ } | ||
if (this._value) { | ||
this._labelElement.innerHTML = this.getValueAsString(); | ||
this._labelElement.innerText = this.getValueAsString(); | ||
this._labelElement.classList.remove("placeholder"); | ||
@@ -205,2 +208,14 @@ } | ||
private updateLayout() { | ||
if (!this._isEnabled) { | ||
this.rootElement.classList.add("disabled"); | ||
this.rootElement.setAttribute("aria-disabled", "true"); | ||
this.rootElement.tabIndex = -1; | ||
} else { | ||
this.rootElement.classList.remove("disabled"); | ||
this.rootElement.removeAttribute("aria-disabled"); | ||
this.rootElement.tabIndex = 0; | ||
} | ||
} | ||
protected get popupControl(): TPopupControl { | ||
@@ -238,8 +253,10 @@ return this._popupControl; | ||
this.rootElement.onclick = (e) => { | ||
if (this.isOpen) { | ||
this.closePopup(true); | ||
if (this._isEnabled) { | ||
if (this.isOpen) { | ||
this.closePopup(true); | ||
} | ||
else { | ||
this.popup(); | ||
} | ||
} | ||
else { | ||
this.popup(); | ||
} | ||
}; | ||
@@ -316,2 +333,9 @@ | ||
} | ||
set isEnabled(value: boolean) { | ||
if (this._isEnabled !== value) { | ||
this._isEnabled = value; | ||
this.updateLayout(); | ||
} | ||
} | ||
} |
@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Corporation. All rights reserved. |
@@ -0,0 +0,0 @@ // Copyright (c) Microsoft Corporation. All rights reserved. |
@@ -5,2 +5,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
import { InputControl } from "./inputcontrol"; | ||
import { clearElement } from "./utils"; | ||
@@ -79,3 +80,3 @@ export class RadioButton extends InputControl { | ||
rootElement.innerHTML = ""; | ||
clearElement(rootElement); | ||
rootElement.appendChild(this._checkboxElement); | ||
@@ -82,0 +83,0 @@ rootElement.appendChild(labelElement); |
@@ -150,3 +150,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
this.rootElement.innerHTML = ""; | ||
Utils.clearElement(this.rootElement); | ||
this.rootElement.appendChild(this._editBox.element); | ||
@@ -153,0 +153,0 @@ } |
@@ -141,1 +141,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
} | ||
export function clearElement(element: HTMLElement) : void { | ||
const trustedHtml = window.trustedTypes?.emptyHTML ?? ""; | ||
element.innerHTML = trustedHtml as string; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
684280
0
7818