PageSourceSearch

https://1to1clico.com/wp-content/themes/mortensen/dist/scripts/main_c5a748c6.js

js 1to1clico.com collected 2026-10-09 05:12:29 UTC 203,642 bytes, 7 lines download raw bytes

vendor: 2,882 bytes, line 1
1!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/wp-content/themes/mortensen/dist/",e(e.s=3)}([function(t,e){t.exports=jQuery},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(module,exports,__webpack_require__){(function(setImmediate,jQuery){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(t){function e(){}function n(t,e){return function(){t.apply(e,arguments)}}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(t,this)}function o(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,i._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?r:s)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void s(e.promise,t)}r(e.promise,i)})}function r(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var o=e.then;if(e instanceof i)return t._state=3,t._value=e,void a(t);if("function"==typeof o)return void c(n(o,e),t)}t._state=1,t._value=e,a(t)}catch(e){s(t,e)}}function s(t,e){t._state=2,t._value=e,a(t)}function a(t){2===t._state&&0===t._deferreds.length&&i._immediateFn(function(){t._handled||i._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)o(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function c(t,e){var n=!1;try{t(function(t){n||(n=!0,r(e,t))},function(t){n||(n=!0,s(e,t))})}catch(t){if(n)return;n=!0,s(e,t)}}var u=setTimeout;i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,n){var i=new this.constructor(e);return o(this,new l(t,n,i)),i},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,n){function i(r,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,function(t){i(r,t)},n)}e[r]=s,0==--o&&t(e)}catch(t){n(t)}}if(0===e.length)return t([]);for(var o=e.length,r=0;r<e.length;r++)i(r,e[r])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})}
1,i.reject=function(t){return new i(function(e,n){n(t)})},i.race=function(t){return new i(function(e,n){for(var i=0,o=t.length;i<o;i++)t[i].then(e,n)})},i._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){u(t,0)},i._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},i._setImmediateFn=function(t){i._immediateFn=t},i._setUnhandledRejectionFn=function(t){i._unhandledRejectionFn=t},void 0!==module&&module.exports?module.exports=i:t.Promise||(t.Promise=i)}(this);try{var ce=new window.CustomEvent("test");if(ce.preventDefault(),!0!==ce.defaultPrevented)throw new Error("Could not prevent default")}catch(t){var CustomEvent=function(t,e){var n,i;return e=e||{bubbles:!1,cancelable:!1,detail:void 0},n=document.createEvent("CustomEvent"),n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i=n.preventDefault,n.preventDefault=function(){i.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(t){this.defaultPrevented=!0}},n};CustomEvent.prototype=window.Event.prototype,window.CustomEvent=CustomEvent}var cf;!function(t){var e=function(){function t(){}return t.lerp=function(t,e,n){return(n-e)*t+e},t.norm=function(t,e,n){return(t-e)/(n-e)},t.getXYFromMouseTouchEvent=function(t){var e=null;return t.originalEvent?e=t.originalEvent.touches||t.originalEvent.changedTouches:t.changedTouches&&(e=t.changedTouches),e?{x:e[0].pageX,y:e[0].pageY,touches:e[0]}:{x:t.pageX,y:t.pageY,touches:null}},t.getInnerTextOfElement=function(t){var e=document.createElement("DIV");e.innerHTML=t.innerHTML;var n=e.textContent||e.innerText||"";return n=String(n).replace(/^\s+|\s+$/g,"")},t.getMouseEvent=function(t){var e=[];return e.click="ontouchstart"in window?"touchstart":"click",e.mousedown="ontouchstart"in window?"touchstart":"mousedown",e.mouseup="ontouchstart"in window?"touchend":"mouseup",e.mousemove="ontouchstart"in window?"touchmove":"mousemove",e[t]},t.isInternetExlorer=function(){return window.navigator.userAgent.indexOf("MSIE ")>0||!!navigator.userAgent.match(/Trident.*rv\:11\./)},t.getValuesOfBars=function(t){var e=t.split("||");return e.length<=1&&(e=t.split("|")),e},t.setTransform=function(t,e){t.style["-webkit-transform"]=e,t.style["-moz-transform"]=e,t.style["-ms-transform"]=e,t.style.transform=e},t.extendObject=function(t,e){for(var n in e)e[n]&&e[n].constructor&&e[n].constructor===Object?(t[n]=t[n]||{},arguments.callee(t[n],e[n])):t[n]=e[n];return t},t.caniuse={fileReader:function(){return!!(window.File&&window.FileReader&&window.FileList&&window.Blob)}},t}();t.Helpers=e}(cf||(cf={}));var cf;!function(t){var e=function(){function t(t){void 0===t&&(t=null),this._cf=t,this.target=document.createDocumentFragment()}return Object.defineProperty(t.prototype,"cf",{get:function(){return this._cf},set:function(t){this._cf=t},enumerable:!0,configurable:!0}),t.prototype.addEventListener=function(t,e,n){return this.target.addEventListener(t,e,n)},t.prototype.dispatchEvent=function(t){return this.target.dispatchEvent(t)},t.prototype.removeEventListener=function(t,e,n){this.target.removeEventListener(t,e,n)},t}();t.EventDispatcher=e}(cf||(cf={}));var cf;!function(t){var e=function(){function t(){}return t.parseTag=function(t){var e=document.createElement(t.tag);e.setAttribute("cf-formless","");for(var n in t)"tag"!==n&&"children"!==n&&e.setAttribute(n,t[n]);return e},t.parseGroupTag=function(e){for(var n=t.parseTag(e),i=e.children,o=0;o<i.length;o++){var r=i[o],s=t.parseTag(r);n.appendChild(s)}return n},t.parseJSONIntoElements=function(e){for(var n=document.createElement("form"),i=0;i<e.length;i++){var o=e[i],r=t.parseTag(o);if(o.children&&o.children.length>0)for(var s=0;s<o.children.length;s++){var a=t.parseTag(o.children[s]);r.appendChild(a)}n.appendChild(r)}return n},t.isElementFormless=function(t){return!!t.hasAttribute("cf-formless")},t}();t.TagsParser=e}(cf||(cf={}));var cf;!function(t){t.UserInterfaceDefaultOptions={controlElementsInAnimationDelay:250,robot:{robotResponseTime:0,chainedResponseTime:500},user:{showThinking:!1,showThumb:!1}}}(cf||(cf={}));var cf;!function(t){var e=function(){function t(t){if(this.eventTarget=t.eventTarget,this.cfReference=t.cfReference,t.customTemplate&&(this.customTemplate=t.customTemplate),!this.eventTarget)throw new Error("this.eventTarget not set!! : "+this.constructor.name);this.setData(t),this.createElement(),this.onElementCreated()}return t.prototype.setData=function(t){},t.prototype.onElementCreated=function(){},t.prototype.createElement=function(){var t=document.createElement("template");return t.innerHTML=this.getTemplate(),this.el=t.firstChild||t.content.firstChild,this.el},t.prototype.getTemplate=function(){return this.customTemplate||"should be over
1written..."},t.prototype.dealloc=function(){this.el.parentNode.removeChild(this.el)},t}();t.BasicElement=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){t.ControlElementEvents={SUBMIT_VALUE:"cf-basic-element-submit",PROGRESS_CHANGE:"cf-basic-element-progress",ON_FOCUS:"cf-basic-element-on-focus",ON_LOADED:"cf-basic-element-on-loaded"},t.ControlElementProgressStates={BUSY:"cf-control-element-progress-BUSY",READY:"cf-control-element-progress-READY"};var e=function(e){function n(t){var n=e.call(this,t)||this;return n.animateInTimer=0,n._partOfSeveralChoices=!1,n._focus=!1,n.onFocusCallback=n.onFocus.bind(n),n.el.addEventListener("focus",n.onFocusCallback,!1),n.onBlurCallback=n.onBlur.bind(n),n.el.addEventListener("blur",n.onBlurCallback,!1),n.referenceTag.disabled&&n.el.setAttribute("disabled","disabled"),n}return __extends(n,e),Object.defineProperty(n.prototype,"type",{get:function(){return"ControlElement"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"partOfSeveralChoices",{get:function(){return this._partOfSeveralChoices},set:function(t){this._partOfSeveralChoices=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){var e,n=this.referenceTag.hasImage;if(n&&!this.partOfSeveralChoices){e=(n?'<img src="'+this.referenceTag.domElement.getAttribute("cf-image")+'"/>':"")+t.Helpers.getInnerTextOfElement(this.el)}else e=t.Helpers.getInnerTextOfElement(this.el);return e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"positionVector",{get:function(){return this._positionVector},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tabIndex",{set:function(t){this.el.tabIndex=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"highlight",{get:function(){return this.el.classList.contains("highlight")},set:function(t){t?this.el.classList.add("highlight"):this.el.classList.remove("highlight")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"focus",{get:function(){return this._focus},set:function(t){this._focus=t,this._focus?this.el.focus():this.el.blur()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"visible",{get:function(){return!this.el.classList.contains("hide")},set:function(t){t?this.el.classList.remove("hide"):(this.el.classList.add("hide"),this.tabIndex=-1,this.highlight=!1)},enumerable:!0,configurable:!0}),n.prototype.onBlur=function(t){this._focus=!1},n.prototype.onFocus=function(e){this._focus=!0,t.ConversationalForm.illustrateFlow(this,"dispatch",t.ControlElementEvents.ON_FOCUS,this.referenceTag),this.eventTarget.dispatchEvent(new CustomEvent(t.ControlElementEvents.ON_FOCUS,{detail:this.positionVector}))},n.prototype.hasImage=function(){return!1},n.prototype.calcPosition=function(){var t=parseInt(window.getComputedStyle(this.el).getPropertyValue("margin-right"),10);this._positionVector={height:this.el.offsetHeight,width:this.el.offsetWidth+t,x:this.el.offsetLeft,y:this.el.offsetTop,el:this},this._positionVector.centerX=this._positionVector.x+.5*this._positionVector.width,this._positionVector.centerY=this._positionVector.y+.5*this._positionVector.height},n.prototype.setData=function(t){this.referenceTag=t.referenceTag,e.prototype.setData.call(this,t)},n.prototype.animateIn=function(){clearTimeout(this.animateInTimer),this.el.classList.add("animate-in")},n.prototype.animateOut=function(){this.el.classList.add("animate-out")},n.prototype.onChoose=function(){t.ConversationalForm.illustrateFlow(this,"dispatch",t.ControlElementEvents.SUBMIT_VALUE,this.referenceTag),this.eventTarget.dispatchEvent(new CustomEvent(t.ControlElementEvents.SUBMIT_VALUE,{detail:this}))},n.prototype.dealloc=function(){this.el.removeEventListener("blur",this.onBlurCallback,!1),this.onBlurCallback=null,this.el.removeEventListener("focus",this.onFocusCallback,!1),this.onFocusCallback=null,e.prototype.dealloc.call(this)},n}(t.BasicElement);t.ControlElement=e}(cf||(cf={}));var cf;!function(t){t.ControlElementsEvents={ON_RESIZE:"cf-on-control-elements-resize",CHANGED:"cf-on-control-elements-changed"};var e=function(){function e(e){this.animateInFromReponseTimer=0,this.ignoreKeyboardInput=!1,this.rowIndex=-1,this.columnIndex=0,this.elementWidth=0,this.filterListNumberOfVisible=0,this.listWidth=0,this.el=e.el,this.eventTarget=e.eventTarget,this.cfReference=e.cfReference,this.list=this.el.getElementsByTagName("cf-list")[0],this.infoElement=e.infoEl,this.onScrollCallback=this.onScroll.bind(this),this.el.addEventListener("scroll",this.onScrollCallback,!1),this.onResizeCallback=this.onResize.bind(this),window.addEventListener("resize",this.onResizeCallback,!1),this.onElementFocusCallback=this.onElementFocus.bind(this),this.eventTarget.addEventListener(t.ControlElementEvents.ON_FOCUS,this.onElementFocusCallback,!1),this.onElementLoadedCallback=this.onElementLoaded.bind(this),this.eventTarget.addEventListener(t.ControlElementEvents.ON_LOADED,this.onElementLoadedCallback,!1),this.onChatReponsesUpdatedCallback=this.onChatReponsesUpdated.bind(this),this.eventTarget.addEventListener(t.ChatListEvents.CHATLIST_UPDATED,this.onChatReponsesUpdatedCallback,!1),this.onUserInputKeyChangeCallback=this.onUserInputKeyChange.bind(this),this.eventTarget.addEventListener(t.UserInputEvents.KEY_CHANGE,this.onUserInputKeyChangeCallback,!1),this.userInputUpdateCallback=this.onUserInputUpdate.bind(this),this.eventTarget.addEventListener(t.FlowEvents.USER_INPUT_UPDATE,this.userInputUpdateCallback,!1),this.listScrollController=new t.ScrollC
1ontroller({interactionListener:this.el,listToScroll:this.list,eventTarget:this.eventTarget,listNavButtons:this.el.getElementsByTagName("cf-list-button")})}return Object.defineProperty(e.prototype,"active",{get:function(){return this.elements&&this.elements.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focus",{get:function(){if(!this.elements)return!1;for(var t=this.getElements(),e=0;e<t.length;e++){if(t[e].focus)return!0}return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"highlighted",{get:function(){if(!this.elements)return!1;for(var t=this.getElements(),e=0;e<t.length;e++){if(t[e].highlight)return!0}return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{set:function(t){t?this.list.classList.add("disabled"):this.list.classList.remove("disabled")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.getElements().length},enumerable:!0,configurable:!0}),e.prototype.onScroll=function(t){this.el.scrollLeft=0},e.prototype.onElementLoaded=function(t){this.onResize(null)},e.prototype.onElementFocus=function(t){var e=t.detail,n=e.x+e.width<this.elementWidth?0:e.x-e.width;n*=-1,this.updateRowColIndexFromVector(e),this.listScrollController.setScroll(n,0)},e.prototype.updateRowColIndexFromVector=function(t){for(var e=0;e<this.tableableRows.length;e++)for(var n=this.tableableRows[e],i=0;i<n.length;i++){var o=n[i];if(o==t.el){this.rowIndex=e,this.columnIndex=i;break}}},e.prototype.onChatReponsesUpdated=function(t){var e=this;clearTimeout(this.animateInFromReponseTimer),t.detail.currentResponse.isRobotResponse||(this.animateInFromReponseTimer=setTimeout(function(){e.animateElementsIn()},this.cfReference.uiOptions.controlElementsInAnimationDelay))},e.prototype.onListChanged=function(){var e=this;this.list.offsetHeight,requestAnimationFrame(function(){t.ConversationalForm.illustrateFlow(e,"dispatch",t.ControlElementsEvents.CHANGED),e.eventTarget.dispatchEvent(new CustomEvent(t.ControlElementsEvents.CHANGED))})},e.prototype.onUserInputKeyChange=function(e){if(this.ignoreKeyboardInput)return void(this.ignoreKeyboardInput=!1);var n=e.detail,i=n.dto.input;if(this.active){var o=-1!=[t.Dictionary.keyCodes.left,t.Dictionary.keyCodes.right,t.Dictionary.keyCodes.down,t.Dictionary.keyCodes.up].indexOf(n.keyCode);if(n.inputFieldActive&&!o){var r=e.detail.dto,s=r.input.getInputValue();this.filterElementsFrom(s)}else n.keyCode==t.Dictionary.keyCodes.left?this.columnIndex--:n.keyCode==t.Dictionary.keyCodes.right?this.columnIndex++:n.keyCode==t.Dictionary.keyCodes.down?this.updateRowIndex(1):n.keyCode==t.Dictionary.keyCodes.up?this.updateRowIndex(-1):n.keyCode!=t.Dictionary.keyCodes.enter&&n.keyCode!=t.Dictionary.keyCodes.space||(this.tableableRows[this.rowIndex]&&this.tableableRows[this.rowIndex][this.columnIndex]?this.tableableRows[this.rowIndex][this.columnIndex].el.click():this.tableableRows[0]&&1==this.tableableRows[0].length&&this.tableableRows[0][0].el.click()),this.validateRowColIndexes()||i.setFocusOnInput()}i.active||!this.validateRowColIndexes()||!this.tableableRows||0!=this.rowIndex&&1!=this.rowIndex?i.active||i.setFocusOnInput():this.tableableRows[this.rowIndex][this.columnIndex].focus=!0},e.prototype.validateRowColIndexes=function(){this.el.classList.contains("two-row");return-1!=this.rowIndex&&this.tableableRows[this.rowIndex]?(this.columnIndex<0&&(this.columnIndex=this.tableableRows[this.rowIndex].length-1),this.columnIndex>this.tableableRows[this.rowIndex].length-1&&(this.columnIndex=0),!0):(this.resetTabList(),!1)},e.prototype.updateRowIndex=function(t){var e=this.rowIndex;if(this.rowIndex+=t,this.tableableRows[this.rowIndex])for(var n=this.tableableRows[e]?this.tableableRows[e][this.columnIndex].positionVector.centerX:0,i=this.tableableRows[this.rowIndex],o=1e13,r=0;r<i.length;r++){var s=i[r];o>Math.abs(n-s.positionVector.centerX)&&(o=Math.abs(n-s.positionVector.centerX),this.columnIndex=r)}},e.prototype.resetTabList=function(){this.rowIndex=-1,this.columnIndex=-1},e.prototype.onUserInputUpdate=function(t){if(this.el.classList.remove("animate-in"),this.infoElement.classList.remove("show"),this.elements)for(var e=this.getElements(),n=0;n<e.length;n++){var i=e[n];i.animateOut()}},e.prototype.filterElementsFrom=function(e){var n=e.toLowerCase().split(" ");-1!=n.indexOf("")&&n.splice(n.indexOf(""),1);var i=this.getElements();if(i.length>1){for(var o=[],r=0;r<i.length;r++){var s=i[r];s.highlight=!1;for(var a=!0,l=0;l<n.length;l++){var c=n[l];a&&(a=-1!=s.value.toLowerCase().indexOf(c))}s.visible=a,a&&s.visible&&o.push(s)}this.infoElement.innerHTML=0==o.length?t.Dictionary.get("input-no-filter").split("{input-value}").join(e):"",0==o.length?this.infoElement.classList.add("show"):this.infoElement.classList.remove("show");this.filterListNumberOfVisible!=o.length&&this.animateElementsIn(),this.filterListNumberOfVisible=o.length,""!=e&&this.filterListNumberOfVisible>0&&(o[0].highlight=!0)}},e.prototype.clickOnHighlighted=function(){for(var t=this.getElements(),e=0;e<t.length;e++){var n=t[e];if(n.highlight){n.el.click();break}}},e.prototype.animateElementsIn=function(){if(this.elements){this.resize();var t=this.getElements();if(t.length>0){this.el.classList.contains("animate-in")||this.el.classList.add("animate-in");for(var e=0;e<t.length;e++){t[e].animateIn()}}}},e.prototype.getElements=function(){return this.elements&&this.elements.length>0&&"OptionsList"==this.elements[0].type?this.elements[0].elements:this.elements},e.prototype.buildTabableRows=function(){this.tableableRows=[],this.resetTabList();var t=this.getElements();if(this.el.classList.contains("two-row")){this.tableableRows[0]=[],this.tableableRows[1]=[];for(var e=0;e<t.length;e++){var n=t[e];n.visible&&(n.positionVector.y<30?this.tableableRows[0].push(n):this.tableableRows[1].push(n))}}else{this.tableableRows[0]=[];for(var e=0;e<t.length;e++){var n=t[e];n.visible&&this.tableableRows[0].push(n)}}},e.prototype.resetAfterErrorMessage=function(){this.currentControlElement=null,this.disabled=!1}
1,e.prototype.focusFrom=function(t){this.tableableRows&&(this.columnIndex=0,"bottom"==t?this.rowIndex=this.el.classList.contains("two-row")?1:0:"top"==t&&(this.rowIndex=0),this.tableableRows[this.rowIndex]&&this.tableableRows[this.rowIndex][this.columnIndex]?(this.ignoreKeyboardInput=!0,this.tableableRows[this.rowIndex][this.columnIndex].focus=!0):this.resetTabList())},e.prototype.updateStateOnElementsFromTag=function(t){for(var e=0;e<this.elements.length;e++){var n=this.elements[e];if(n.referenceTag==t){this.updateStateOnElements(n);break}}},e.prototype.updateStateOnElements=function(t){if(this.currentControlElement=t,"RadioButton"==this.currentControlElement.type)for(var e=this.getElements(),n=0;n<e.length;n++){var i=e[n];i.checked=i==t}else if("CheckboxButton"==this.currentControlElement.type)for(var e=this.getElements(),n=0;n<e.length;n++){var i=e[n];if(i==t){var o=i.referenceTag.domElement.checked;i.checked=o}}},e.prototype.reset=function(){this.infoElement.classList.remove("show"),this.el.classList.remove("one-row"),this.el.classList.remove("two-row")},e.prototype.getElement=function(t){return this.elements[t]},e.prototype.getDTO=function(){var e={text:void 0,controlElements:[]};if(this.elements&&this.elements.length>0)switch(this.elements[0].type){case"CheckboxButton":for(var n=0,i=[],o=0;o<this.elements.length;o++){if(this.elements[o].checked&&n++>1)break}for(var o=0;o<this.elements.length;o++){var r=this.elements[o];r.checked&&(n>1&&(r.partOfSeveralChoices=!0),i.push(r.value)),e.controlElements.push(r)}e.text=t.Dictionary.parseAndGetMultiValueString(i);break;case"RadioButton":for(var o=0;o<this.elements.length;o++){var s=this.elements[o];s.checked&&(e.text=s.value),e.controlElements.push(s)}break;case"OptionsList":var a=this.elements[0];e.controlElements=a.getValue();var i=[];if(e.controlElements&&e.controlElements[0])for(var l=0;l<e.controlElements.length;l++){e.controlElements[l];i.push(e.controlElements[l].value)}e.controlElements=a.elements,e.text=t.Dictionary.parseAndGetMultiValueString(i);break;case"UploadFileUI":e.text=this.elements[0].getFilesAsString(),e.controlElements.push(this.elements[0])}return e},e.prototype.clearTagsAndReset=function(){if(this.reset(),this.elements)for(;this.elements.length>0;)this.elements.pop().dealloc();this.list.innerHTML="",this.onListChanged()},e.prototype.buildTags=function(e){var n=this;this.disabled=!1;this.el.parentNode.getElementsByTagName("ul")[0],this.el.parentNode.getElementsByTagName("ul")[1];this.clearTagsAndReset(),this.elements=[];for(var i=0;i<e.length;i++){var o=e[i];switch(o.type){case"radio":this.elements.push(new t.RadioButton({referenceTag:o,eventTarget:this.eventTarget}));break;case"checkbox":this.elements.push(new t.CheckboxButton({referenceTag:o,eventTarget:this.eventTarget}));break;case"select":this.elements.push(new t.OptionsList({referenceTag:o,context:this.list,eventTarget:this.eventTarget}));break;case"input":default:"file"==o.type&&this.elements.push(new t.UploadFileUI({referenceTag:o,eventTarget:this.eventTarget}))}if("select"!=o.type&&this.elements.length>0){var r=this.elements[this.elements.length-1];this.list.appendChild(r.el)}}var s=this.elements[0]&&"OptionsList"==this.elements[0].type;this.filterListNumberOfVisible=s?this.elements[0].elements.length:e.length,new Promise(function(t,e){return n.resize(t,e)}).then(function(){var e=n.list.offsetHeight,i={height:e};n.onListChanged(),t.ConversationalForm.illustrateFlow(n,"dispatch",t.UserInputEvents.CONTROL_ELEMENTS_ADDED,i),n.eventTarget.dispatchEvent(new CustomEvent(t.UserInputEvents.CONTROL_ELEMENTS_ADDED,{detail:i}))})},e.prototype.onResize=function(t){this.resize()},e.prototype.resize=function(e,n){this.list.style.width="100%",this.el.classList.remove("resized"),this.el.classList.remove("one-row"),this.el.classList.remove("two-row"),this.elementWidth=0,this.listWidth=0;var i=this.getElements();if(i&&i.length>0){for(var o=[],r=[],s=!1,a=0;a<i.length;a++){var l=i[a];l.visible&&(l.calcPosition(),this.listWidth+=l.positionVector.width,o.push(l.positionVector.x+l.positionVector.width),r.push(l)),l.hasImage()&&(s=!0)}var c=this.el.offsetWidth,u=this.listWidth>c;u&&!s?(this.el.classList.add("two-row"),this.listWidth=Math.max(c,Math.round(o[Math.floor(o.length/2)]+50)),this.list.style.width=this.listWidth+"px"):this.el.classList.add("one-row");for(var a=0;a<i.length;a++){var l=i[a];l.visible&&l.calcPosition()}c=this.el.offsetWidth,u=this.listWidth>c;for(var h=i.slice(),p=h.sort(function(t,e){var n=t.positionVector.y>e.positionVector.y;return t.positionVector.x==e.positionVector.x?n?1:-1:t.positionVector.x<e.positionVector.x?-1:1}),d=0,a=0;a<p.length;a++){var l=p[a];l.visible?l.tabIndex=2+d++:l.tabIndex=-1}u?this.el.classList.remove("hide-nav-buttons"):this.el.classList.add("hide-nav-buttons"),this.elementWidth=c,this.listScrollController.resize(this.listWidth,this.elementWidth),this.el.classList.add("resized"),this.eventTarget.dispatchEvent(new CustomEvent(t.ControlElementsEvents.ON_RESIZE)),e&&(this.buildTabableRows(),e())}},e.prototype.dealloc=function(){this.currentControlElement=null,this.tableableRows=null,window.removeEventListener("resize",this.onResizeCallback,!1),this.onResizeCallback=null,this.el.removeEventListener("scroll",this.onScrollCallback,!1),this.onScrollCallback=null,this.eventTarget.removeEventListener(t.ControlElementEvents.ON_FOCUS,this.onElementFocusCallback,!1),this.onElementFocusCallback=null,this.eventTarget.removeEventListener(t.ChatListEvents.CHATLIST_UPDATED,this.onChatReponsesUpdatedCallback,!1),this.onChatReponsesUpdatedCallback=null,this.eventTarget.removeEventListener(t.UserInputEvents.KEY_CHANGE,this.onUserInputKeyChangeCallback,!1),this.onUserInputKeyChangeCallback=null,this.eventTarget.removeEventListener(t.FlowEvents.USER_INPUT_UPDATE,this.userInputUpdateCallback,!1),this.userInputUpdateCallback=null,this.eventTarget.removeEventListener(t.ControlElementEvents.ON_LOADED,this.onElementLoadedCallback,!1),this.onElementLoadedCallback=null,this.listScrollController.dealloc()},e}();t.ControlElements=e}(cf||(cf={}));var cf;!function(t){var e=function(){function e(e){this.listWidth=0,this.visibleAreaWidth=0,this.max=0,this.interacting=!1,this.x=0,this.xTarget=0,this.startX=0,this.startXTarget=0,this.mouseSpeed=0,this.mouseSpeedTarget=0,this.direction=0,this.directionTarget=0,this.inputAccerlation=0,this.inputAccerlationTarget=0,this.interactionListener=e.interactionListener,this.eventTarget=e.eventTarget,this.listToScroll=e.listToScroll,this.prevButton=e.listNavButtons[0],this.nextButton=e.listNavButtons[1],this.onListNavButtonsClickCallback=this.onListNavButtonsClick.bind(this),this.prevButton.addEventListener("click",this.onListNavButtonsClickCallback,!1),this.nextButton.addEventListener("click",this.onListNavButtonsClickCallback,!1),this.documentLeaveCallback=this.documentLeave.bind(this),this.onInteractStartCallback=this.onInteractStart.bind(this),this.onInteractEndCallback=this.onInteractEnd.bind(this),this.onInteractMoveCallback=this.onInteractMove.bind(this),document.addEventListener("mouseleave",this.documentLeaveCallback,!1),document.addEventListener(t.Helpers.getMouseEvent("mouseup"),this.documentLeaveCallback,!1),this.interactionListener.addEventListener(t.Helpers.getMouseEvent("mousedown"),this.onInteractStartCallback,!1),this.interactionListener.addEventListener(t.Helpers.getMouseEvent("mouseup"),this.onInteractEndCallback,!1),this.interactionListener.addEventListener(t.Helpers.getMouseEvent("mousemove"),this.onInteractMoveCallback,!1)}return e.prototype.onListNavButtonsClick=function(t){var e=t.currentTarget.getAttribute("direction");this.pushDirection("next"==e?-1:1)},e.prototype.documentLeave=function(t){this.onInteractEnd(t)},e.prototype.onInteractStart=function(e){var n=t.Helpers.getXYFromMouseTouchEvent(e);this.interacting=!0,this.startX=n.x,this.startXTarget=this.startX,this.inputAccerlation=0,this.render()},e.prototype.onInteractEnd=function(t){this.interacting=!1},e.prototype.onInteractMove=function(e){if(this.interacting){var n=t.Helpers.getXYFromMouseTouchEvent(e),i=n.x-this.startX;this.inputAccerlationTarget=6.2*i,this.directionTarget=this.inputAccerlationTarget<0?-1:1,this.startXTarget=n.x}},e.prototype.render=function(){var n=this;this.rAF&&cancelAnimationFrame(this.rAF),this.startX+=.2*(this.startXTarget-this.startX),this.inputAccerlation+=(this.inputAccerlationTarget-this.inputAccerlation)*(this.interacting?Math.min(e.accerlation+.1,1):e.accerlation);this.inputAccerlationTarget*=.25,this.direction+=.2*(this.directionTarget-this.direction),this.mouseSpeed+=.2*(this.mouseSpeedTarget-this.mouseSpeed),this.direction+=this.mouseSpeed,this.xTarget+=.05*this.inputAccerlation,this.xTarget>0&&(this.xTarget+=(0-this.xTarget)*t.Helpers.lerp(e.accerlation,.3,.8)),this.xTarget<this.max&&(this.xTarget+=(this.max-this.xTarget)*t.Helpers.lerp(e.accerlation,.3,.8)),this.x+=.4*(this.xTarget-this.x);var i=Math.round(this.x);i<0&&(this.prevButton.classList.contains("active")||this.prevButton.classList.add("active"),this.prevButton.classList.contains("cf-gradient")||this.prevButton.classList.add("cf-gradient")),0==i&&(this.prevButton.classList.contains("active")&&this.prevButton.classList.remove("active"),this.prevButton.classList.contains("cf-gradient")&&this.prevButton.classList.remove("cf-gradient")),i>this.max&&(this.nextButton.classList.contains("active")||this.nextButton.classList.add("active"),this.nextButton.classList.contains("cf-gradient")||this.nextButton.classList.add("cf-gradient")),i<=this.max&&(this.nextButton.classList.contains("active")&&this.nextButton.classList.remove("active"),this.nextButton.classList.contains("cf-gradient")&&this.nextButton.classList.remove("cf-gradient"));var o=this.x;t.Helpers.setTransform(this.listToScroll,"translateX("+o+"px)"),(this.interacting||Math.abs(this.x-this.xTarget)>.02&&!this.interacting)&&(this.rAF=window.requestAnimationFrame(function(){return n.render()}))},e.prototype.setScroll=function(t,e){this.xTarget=this.visibleAreaWidth==this.listWidth?0:t,this.render()},e.prototype.pushDirection=function(t){this.inputAccerlationTarget+=5e3*t,this.render()},e.prototype.dealloc=function(){this.prevButton.removeEventListener("click",this.onListNavButtonsClickCallback,!1),this.nextButton.removeEventListener("click",this.onListNavButtonsClickCallback,!1),this.onListNavButtonsClickCallback=null,this.prevButton=null,this.nextButton=null,document.removeEventListener("mouseleave",this.documentLeaveCallback,!1),document.removeEventListener(t.Helpers.getMouseEvent("mouseup"),this.documentLeaveCallback,!1),this.interactionListener.removeEventListener(t.Helpers.getMouseEvent("mousedown"),this.onInteractStartCallback,!1),this.interactionListener.removeEventListener(t.Helpers.getMouseEvent("mouseup"),this.onInteractEndCallback,!1),this.interactionListener.removeEventListener(t.Helpers.getMouseEvent("mousemove"),this.onInteractMoveCallback,!1),this.documentLeaveCallback=null,this.onInteractStartCallback=null,this.onInteractEndCallback=null,this.onInteractMoveCallback=null},e.prototype.reset=function(){this.interacting=!1,this.startX=0,this.startXTarget=this.startX,this.inputAccerlation=0,this.x=0,this.xTarget=0,t.Helpers.setTransform(this.listToScroll,"translateX(0px)"),this.render(),this.prevButton.classList.remove("active"),this.nextButton.classList.remove("active")},e.prototype.resize=function(t,e){this.reset(),this.visibleAreaWidth=e,this.listWidth=Math.max(e,t),this.max=-1*(this.listWidth-this.visibleAreaWidth),this.render()},e.accerlation=.1,e}();
1t.ScrollController=e}(cf||(cf={}));var cf;!function(t){var e=function(){function e(t){this.data={"user-image":"https://cf-4053.kxcdn.com/conversational-form/human.png","entry-not-found":"Dictionary item not found.","awaiting-mic-permission":"Awaiting mic permission","user-audio-reponse-invalid":"I didn't get that, try again.","microphone-terminal-error":"Audio input not supported","input-placeholder":"Type your answer here ...","group-placeholder":"Type to filter list ...","input-placeholder-error":"Your input is not correct ...","input-placeholder-required":"Input is required ...","input-placeholder-file-error":"File upload failed ...","input-placeholder-file-size-error":"File size too big ...","input-no-filter":"No results found for <strong>{input-value}</strong>","user-reponse-and":" and ","user-reponse-missing":"Missing input ...","user-reponse-missing-group":"Nothing selected ...",general:"General type1||General type2","icon-type-file":"<svg class='cf-icon-file' viewBox='0 0 10 14' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><g stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><g transform='translate(-756.000000, -549.000000)' fill='#0D83FF'><g transform='translate(736.000000, 127.000000)'><g transform='translate(0.000000, 406.000000)'><polygon points='20 16 26.0030799 16 30 19.99994 30 30 20 30'></polygon></g></g></g></g></svg>"},this.robotData={"robot-image":"https://cf-4053.kxcdn.com/conversational-form/robot.png",input:"Please write some text.",text:"Please write some text.",checkbox:"Select as many as you want.",name:"What's your name?",email:"Need your e-mail.",password:"Please provide password",tel:"What's your phone number?",radio:"I need you to select one of these.",select:"Choose any of these options.",file:"Select a file to upload.",general:"General1||General2||General3.."},e.instance=this,t&&t.data&&(this.data=this.validateAndSetNewData(t.data,this.data)),t.userImage&&(this.data["user-image"]=t.userImage),t.robotImage&&(this.robotData["robot-image"]=t.robotImage),t&&t.robotData&&(this.robotData=this.validateAndSetNewData(t.robotData,this.robotData))}return e.get=function(n){var i=e.instance,o=i.data[n];if(o){var r=t.Helpers.getValuesOfBars(o);o=r[Math.floor(Math.random()*r.length)]}else o=i.data["entry-not-found"];return o},e.set=function(t,n,i){var o=e.instance,r="robot"==n?o.robotData:o.data;return r[t]=i,r[t]},e.getRobotResponse=function(n){var i=e.instance,o=i.robotData[n];if(o){var r=t.Helpers.getValuesOfBars(o);o=r[Math.floor(Math.random()*r.length)]}else{var s=t.Helpers.getValuesOfBars(i.robotData.general);o=s[Math.floor(Math.random()*s.length)]}return o},e.parseAndGetMultiValueString=function(t){for(var n="",i=0;i<t.length;i++){var o=t[i],r=t.length>1&&i==t.length-2?e.get("user-reponse-and"):", ";n+=o+(i<t.length-1?r:"")}return n},e.prototype.validateAndSetNewData=function(t,e){for(var n in e)t[n]||(console.warn("Conversational Form Dictionary warning, '"+n+"' value is undefined, mapping '"+n+"' to default value. See Dictionary.ts for keys."),t[n]=e[n]);return t},e.keyCodes={left:37,right:39,down:40,up:38,backspace:8,enter:13,space:32,shift:16,tab:9},e}();t.Dictionary=e}(cf||(cf={}));var cf;!function(cf){cf.TagEvents={ORIGINAL_ELEMENT_CHANGED:"cf-tag-dom-element-changed"};var Tag=function(){function Tag(options){this.domElement=options.domElement,this.initialDefaultValue=this.domElement.value||this.domElement.getAttribute("value")||"",this.changeCallback=this.onDomElementChange.bind(this),this.domElement.addEventListener("change",this.changeCallback,!1),this.domElement.tabIndex=-1,this.skipUserInput=!1,options.questions&&(this.questions=options.questions),this.domElement.getAttribute("cf-validation")&&(this.validationCallback=eval(this.domElement.getAttribute("cf-validation"))),this.domElement.getAttribute("pattern")&&(this.pattern=new RegExp(this.domElement.getAttribute("pattern"))),"group"!=this.type&&cf.ConversationalForm.illustrateAppFlow&&(cf.ConversationalForm.suppressLog||console.log("Conversational Form > Tag registered:",this.type,this)),this.refresh()}return Object.defineProperty(Tag.prototype,"type",{get:function(){return this.domElement.getAttribute("type")||this.domElement.tagName.toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"name",{get:function(){return this.domElement.getAttribute("name")},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"id",{get:function(){return this.domElement.getAttribute("id")},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"inputPlaceholder",{get:function(){return this._inputPlaceholder},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"formless",{get:function(){return cf.TagsParser.isElementFormless(this.domElement)},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"label",{get:function(){return this.getLabel()},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"value",{get:function(){return this.domElement.value||this.initialDefaultValue},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"hasImage",{get:function(){return this.domElement.hasAttribute("cf-image")},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"disabled",{get:function(){return!this.checkConditionalAndIsValid()||void 0!=this.domElement.getAttribute("disabled")&&null!=this.domElement.getAttribute("disabled")},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"required",{get:function(){return!!this.domElement.getAttribute("required")||""==this.domElement.getAttribute("required")},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"question",{get:function(){return this.questions&&0!=this.questions.length?this.questions[Math.floor(Math.random()*this.questions.length)]:cf.Dictionary.getRobotResponse(this.type)},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"eventTarget",{set:function(t){this._eventTarget=t},enumerable:!0,configurable:!0}),Object.defineProperty(Tag.prototype,"errorMessage",{get:function(){return this.errorMessages||(this.domElement.getAttribute("cf-error")?this.errorMessages=cf.Helpers.getValuesOfBars(this.domElement.getAttribute("cf-error")):this.domElement.parentNode&&this.domElement.parentNode.getAttribute("cf-error")?this.errorMessages=cf.Helpers.getValuesOfBars(this.domElement.parentNode.getAttribute("cf-error")):this.required?this.errorMessages=[cf.Dictionary.get("input-placeholder-required")]:"file"==this.type?this.errorMessages=[cf.Dictionary.get("input-placeholder-file-error")]:this.errorMessages=[cf.Dictionary.get("input-placeholder-error")]),this.errorMessages[Math.floor(Math.random()*this.errorMessages.length)]},enumerable:!0,configurable:!0}),Tag.prototype.dealloc=function(){this.domElement.removeEventListener("change",this.changeCallback,!1),this.changeCallback=null,this.domElement=null,this.defaultValue=null,this.errorMessages=null,this.pattern=null,this._label=null,this.validationCallback=null,this.questions=null},Tag.testConditions=function(t,e){var n=function(e,n){return"object"==typeof n?n.test(e):t===n};if("string"==typeof t){for(var i=t,o=!1,r=0;r<e.conditionals.length;r++){var s=e.conditionals[r];if(o=n(i,s))break}return o}if(t){for(var o=!1,r=0;r<e.conditionals.length;r++){var s=e.conditionals[r];if("string"!=typeof t)for(var a=0;a<t.length&&!(o=n(t[a],s));a++);else o=n(t.toString(),s);if(o)break}return o}return!1},Tag.isTagValid=function(t){if("hidden"===t.getAttribute("type"))return!1;if("submit"===t.getAttribute("type"))return!1;if("button"==t.getAttribute("type"))return!1;if(t.style){if("none"===t.style.display)return!1;if("hidden"===t.style.visibility)return!1}var e=cf.TagsParser.isElementFormless(t),n=cf.Helpers.getInnerTextOfElement(t);return!("option"==t.tagName.toLowerCase()&&(!e&&""==n||" "==n))&&("select"==t.tagName.toLowerCase()||"option"==t.tagName.toLowerCase()||(!!e||!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)))},Tag.createTag=function(t){if(Tag.isTagValid(t)){var e=void 0;return"input"==t.tagName.toLowerCase()?e=new cf.InputTag({domElement:t}):"textarea"==t.tagName.toLowerCase()?e=new cf.InputTag({domElement:t}):"select"==t.tagName.toLowerCase()?e=new cf.SelectTag({domElement:t}):"button"==t.tagName.toLowerCase()?e=new cf.ButtonTag({domElement:t}):"option"==t.tagName.toLowerCase()?e=new cf.OptionTag({domElement:t}):"cf-robot-message"==t.tagName.toLowerCase()&&(e=new cf.CfRobotMessageTag({domElement:t})),e}return null},Tag.prototype.reset=function(){this.refresh(),this.defaultValue=this.domElement.value=this.initialDefaultValue.toString()},Tag.prototype.refresh=function(){this.defaultValue=this.domElement.value||this.domElement.getAttribute("value")||"",this.questions=null,this.findAndSetQuestions(),this.findConditionalAttributes()},Tag.prototype.hasConditionsFor=function(t){if(!this.hasConditions())return!1;for(var e=0;e<this.conditionalTags.length;e++){var n=this.conditionalTags[e];if("cf-conditional-"+t.toLowerCase()===n.key.toLowerCase())return!0}return!1},Tag.prototype.hasConditions=function(){return this.conditionalTags&&this.conditionalTags.length>0},Tag.prototype.checkConditionalAndIsValid=function(){return!this.hasConditions()||this.flowManager.areConditionsInFlowFullfilled(this,this.conditionalTags)},Tag.prototype.setTagValueAndIsValid=function(t){var e=!0,n=t.text;this.pattern&&(e=this.pattern.test(n)),""==n&&this.required&&(e=!1);var i=parseInt(this.domElement.getAttribute("minlength"),10)||-1,o=parseInt(this.domElement.getAttribute("maxlength"),10)||-1;return-1!=i&&n.length<i&&(e=!1),-1!=o&&n.length>
1o&&(e=!1),e&&"file"!=this.type&&(this.domElement.value=n),e},Tag.prototype.getLabel=function(){return this._label||this.findAndSetLabel(),this._label?this._label:cf.Dictionary.getRobotResponse(this.type)},Tag.prototype.findConditionalAttributes=function(){var t=this.domElement.attributes;if(t.length>0){this.conditionalTags=[];for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];if(n&&n.name&&-1!==n.name.indexOf("cf-conditional")){for(var i=[],o=-1!==n.value.indexOf("||")?n.value.split("||"):n.value.split("&&"),r=0;r<o.length;r++){var s=o[r];try{i.push(new RegExp(s))}catch(t){}i.push(s)}this.conditionalTags.push({key:n.name,conditionals:i})}}}},Tag.prototype.findAndSetQuestions=function(){if(!this.questions){if(this.domElement.getAttribute("cf-questions"))this.questions=cf.Helpers.getValuesOfBars(this.domElement.getAttribute("cf-questions")),this.domElement.getAttribute("cf-input-placeholder")&&(this._inputPlaceholder=this.domElement.getAttribute("cf-input-placeholder"));else if(this.domElement.parentNode&&this.domElement.parentNode.getAttribute("cf-questions")){var t=this.domElement.parentNode;this.questions=cf.Helpers.getValuesOfBars(t.getAttribute("cf-questions")),t.getAttribute("cf-input-placeholder")&&(this._inputPlaceholder=t.getAttribute("cf-input-placeholder"))}else{var e=this.domElement.getAttribute("id"),n=document.querySelector("label[for='"+e+"']");n&&(this.questions=[cf.Helpers.getInnerTextOfElement(n)])}!this.questions&&this.domElement.getAttribute("placeholder")&&(this.questions=[this.domElement.getAttribute("placeholder")])}},Tag.prototype.findAndSetLabel=function(){if(this.domElement.getAttribute("cf-label"))this._label=this.domElement.getAttribute("cf-label");else{var t=this.domElement.parentNode;if(t){var e="label"==t.tagName.toLowerCase()?[t]:t.getElementsByTagName("label");if(0==e.length){var n=cf.Helpers.getInnerTextOfElement(t);n&&n.length>0&&(e=[t])}else if(e.length>0)for(var i=0;i<e.length;i++){var o=e[i];o.getAttribute("for")==this.id&&(this._label=cf.Helpers.getInnerTextOfElement(o))}!this._label&&e[0]&&(this._label=cf.Helpers.getInnerTextOfElement(e[0]))}}},Tag.prototype.onDomElementChange=function(){this._eventTarget.dispatchEvent(new CustomEvent(cf.TagEvents.ORIGINAL_ELEMENT_CHANGED,{detail:{value:this.value,tag:this}}))},Tag}();cf.Tag=Tag}(cf||(cf={}));var cf;!function(t){var e=function(){function e(e){this.elements=e.elements,this._fieldset=e.fieldset,this._fieldset&&this._fieldset.getAttribute("cf-questions")&&(this.questions=t.Helpers.getValuesOfBars(this._fieldset.getAttribute("cf-questions"))),this._fieldset&&this._fieldset.getAttribute("cf-input-placeholder")&&(this._inputPlaceholder=this._fieldset.getAttribute("cf-input-placeholder")),t.ConversationalForm.illustrateAppFlow&&(t.ConversationalForm.suppressLog||console.log("Conversational Form > TagGroup registered:",this.elements[0].type,this)),this.skipUserInput=!1}return Object.defineProperty(e.prototype,"required",{get:function(){for(var t=0;t<this.elements.length;t++){this.elements[t];if(this.elements[t].required)return!0}return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"eventTarget",{set:function(t){this._eventTarget=t;for(var e=0;e<this.elements.length;e++){this.elements[e].eventTarget=t}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"flowManager",{set:function(t){for(var e=0;e<this.elements.length;e++){this.elements[e].flowManager=t}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return"group"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._fieldset&&this._fieldset.hasAttribute("name")?this._fieldset.getAttribute("name"):this.elements[0].name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._fieldset&&this._fieldset.id?this._fieldset.id:this.elements[0].id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"question",{get:function(){if(this.questions&&this.questions.length>0)return this.questions[Math.floor(Math.random()*this.questions.length)];if(this.elements[0]&&this.elements[0].question){return this.elements[0].question}return t.Dictionary.getRobotResponse(this.getGroupTagType())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeElements",{get:function(){return this._activeElements},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._values?this._values:[""]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){for(var t=0,e=0;e<this.elements.length;e++){this.elements[e].disabled&&t++}return t===this.elements.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errorMessage",{get:function(){for(var e=t.Dictionary.get("input-placeholder-error"),n=0;n<this.elements.length;n++){e=this.elements[n].errorMessage}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputPlaceholder",{get:function(){return this._inputPlaceholder},enumerable:!0,configurable:!0}),e.prototype.dealloc=function(){for(var t=0;t<this.elements.length;t++){this.elements[t].dealloc()}this.elements=null},e.prototype.refresh=function(){for(var t=0;t<this.elements.length;t++){this.elements[t].refresh()}},e.prototype.reset=function(){this._values=[];for(var t=0;t<this.elements.length;t++){this.elements[t].reset()}},e.prototype.getGroupTagType=function(){return this.elements[0].type},e.prototype.hasConditionsFor=function(t){for(var e=0;e<this.elements.length;e++){if(this.elements[e].hasConditionsFor(t))return!0}return!1},e.prototype.hasConditions=function(){for(var t=0;t<this.elements.length;t++){if(this.elements[t].hasConditions())return!0}return!1},e.prototype.checkConditionalAndIsValid=function(){for(var t=0;t<this.elements.length;t++){this.elements[t].checkConditionalAndIsValid()}return!0},e.prototype.setTagValueAndIsValid=function(t){var e=!1,n=this.elements[0].type;switch(this._values=[],this._activeElements=[],n){case"radio":var i=!1,o=[];if(t.controlElements)for(var r=0;r<t.controlElements.length;r++){var s=t.controlElements[r],a=this.elements[this.elements.indexOf(s.referenceTag)];o.push(s),a==s.referenceTag&&(s.checked&&(this._values.push(a.value),this._activeElements.push(a)),!i&&s.checked&&(i=!0))}else for(var r=0;r<this.elements.length;r++){var a=this.elements[r],l=a.value.toString().toLowerCase(),c=t.text.toString().toLowerCase();-1===l.indexOf(c)&&-1===c.indexOf(l)||(this._activeElements.push(a),this._values.push(a.value),a.domElement.checked=!0,i=!0)}e=i;break;case"checkbox":if(e=!0,t.controlElements)for(var r=0;r<t.controlElements.length;r++){var s=t.controlElements[r],a=this.elements[this.elements.indexOf(s.referenceTag)];a.domElement.checked=s.checked,s.checked&&(this._values.push(a.value),this._activeElements.push(a))}this.required&&0==this._activeElements.length&&(e=!1)}return e},e}();t.TagGroup=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;return"text"==n.type||"email"==n.type||"tel"==n.type||"checkbox"==n.type||"radio"==n.type||"password"==n.type||n.type,n}return __extends(e,t),e.prototype.findAndSetQuestions=function(){t.prototype.findAndSetQuestions.call(this)},e.prototype.findAndSetLabel=function(){t.prototype.findAndSetLabel.call(this),this._label},e.prototype.setTagValueAndIsValid=function(e){return"checkbox"==this.type||t.prototype.setTagValueAndIsValid.call(this,e)},e.prototype.dealloc=function(){t.prototype.dealloc.call(this)},e}(t.Tag);
1t.InputTag=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){var e=function(e){function n(n){var i=e.call(this,n)||this;i.optionTags=[];for(var o=i.domElement.getElementsByTagName("option"),r=0;r<o.length;r++){var s=o[r],a=t.Tag.createTag(s);a?i.optionTags.push(a):console.warn(i.constructor.name,"option tag invalid:",a)}return i}return __extends(n,e),Object.defineProperty(n.prototype,"type",{get:function(){return"select"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this.domElement&&this.domElement.hasAttribute("name")?this.domElement.getAttribute("name"):this.optionTags[0].name},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._values},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"multipleChoice",{get:function(){return this.domElement.hasAttribute("multiple")},enumerable:!0,configurable:!0}),n.prototype.setTagValueAndIsValid=function(t){var e=!1,n=[];if(this._values=[],t.controlElements)for(var i=0;i<this.optionTags.length;i++)for(var o=this.optionTags[i],r=0;r<t.controlElements.length;r++){var s=t.controlElements[r];s.referenceTag==o&&(o.selected=s.selected,!e&&o.selected&&(e=!0),o.selected&&this._values.push(o.value),s.visible&&n.push(s))}else{for(var a=!1,i=0;i<this.optionTags.length;i++){var o=this.optionTags[i],l=o.value.toString().toLowerCase(),c=t.text.toString().toLowerCase();-1===l.indexOf(c)&&-1===c.indexOf(l)||(this._values.push(o.value),o.domElement.checked=!0,a=!0)}e=a}if(!e&&1==n.length){var u=n[0],o=this.optionTags[this.optionTags.indexOf(u.referenceTag)];u.selected=!0,o.selected=!0,e=!0,o.selected&&this._values.push(o.value)}return e},n}(t.Tag);t.SelectTag=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;return"submit"==n.domElement.getAttribute("type")||n.domElement.getAttribute("type"),n}return __extends(e,t),e}(t.Tag);t.ButtonTag=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){var e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return __extends(n,e),Object.defineProperty(n.prototype,"type",{get:function(){return"option"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"label",{get:function(){return this.formless?e.prototype.getLabel.call(this):t.Helpers.getInnerTextOfElement(this.domElement)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selected",{get:function(){return this.domElement.hasAttribute("selected")},set:function(t){this.domElement.selected=t,t?this.domElement.setAttribute("selected","selected"):this.domElement.removeAttribute("selected")},enumerable:!0,configurable:!0}),n.prototype.setTagValueAndIsValid=function(t){return!0},n}(t.Tag);t.OptionTag=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;return n.skipUserInput=!0,n}return __extends(e,t),e.prototype.dealloc=function(){t.prototype.dealloc.call(this)},e}(t.Tag);t.CfRobotMessageTag=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){var e=function(e){function n(t){var n=e.call(this,t)||this;return n.clickCallback=n.onClick.bind(n),n.el.addEventListener("click",n.clickCallback,!1),n.mouseDownCallback=n.onMouseDown.bind(n),n.el.addEventListener("mousedown",n.mouseDownCallback,!1),n.checkForImage(),n}return __extends(n,e),Object.defineProperty(n.prototype,"type",{get:function(){return"Button"},enumerable:!0,configurable:!0}),n.prototype.hasImage=function(){return this.referenceTag.hasImage},n.prototype.checkForImage=function(){this.hasImage()&&(this.el.classList.add("has-image"),this.img
1El=document.createElement("img"),this.imageLoadedCallback=this.onImageLoaded.bind(this),this.imgEl.classList.add("cf-image"),this.imgEl.addEventListener("load",this.imageLoadedCallback,!1),this.imgEl.src=this.referenceTag.domElement.getAttribute("cf-image"),this.el.insertBefore(this.imgEl,this.el.children[0]))},n.prototype.onImageLoaded=function(){this.imgEl.classList.add("loaded"),this.eventTarget.dispatchEvent(new CustomEvent(t.ControlElementEvents.ON_LOADED,{}))},n.prototype.onMouseDown=function(t){t.preventDefault()},n.prototype.onClick=function(t){this.onChoose()},n.prototype.dealloc=function(){this.el.removeEventListener("click",this.clickCallback,!1),this.clickCallback=null,this.imageLoadedCallback&&(this.imgEl.removeEventListener("load",this.imageLoadedCallback,!1),this.imageLoadedCallback=null),this.el.removeEventListener("mousedown",this.mouseDownCallback,!1),this.mouseDownCallback=null,e.prototype.dealloc.call(this)},n.prototype.getTemplate=function(){return'<cf-button class="cf-button">\n\t\t\t\t'+this.referenceTag.label+"\n\t\t\t</cf-button>\n\t\t\t"},n}(t.ControlElement);t.Button=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){var e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),Object.defineProperty(e.prototype,"type",{get:function(){return"RadioButton"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checked",{get:function(){return this.el.hasAttribute("checked")&&"checked"==this.el.getAttribute("checked")},set:function(t){t?(this.el.setAttribute("checked","checked"),this.referenceTag.domElement.setAttribute("checked","checked"),this.referenceTag.domElement.checked=!0):(this.el.removeAttribute("checked"),this.referenceTag.domElement.removeAttribute("checked"),this.referenceTag.domElement.checked=!1)},enumerable:!0,configurable:!0}),e.prototype.onClick=function(e){this.checked=!0,t.prototype.onClick.call(this,e)},e.prototype.getTemplate=function(){return'<cf-radio-button class="cf-button" '+(this.referenceTag.domElement.checked||this.referenceTag.domElement.hasAttribute("checked")?"checked=checked":"")+">\n\t\t\t\t<div>\n\t\t\t\t\t<cf-radio></cf-radio>\n\t\t\t\t\t<span>"+this.referenceTag.label+"</span>\n\t\t\t\t</div>\n\t\t\t</cf-radio-button>
1\n\t\t\t"},e}(t.Button);t.RadioButton=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){var e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),Object.defineProperty(e.prototype,"type",{get:function(){return"CheckboxButton"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checked",{get:function(){return"checked"==this.el.getAttribute("checked")},set:function(t){t?(this.el.setAttribute("checked","checked"),this.referenceTag.domElement.setAttribute("checked","checked"),this.referenceTag.domElement.checked=!0):(this.el.removeAttribute("checked"),this.referenceTag.domElement.removeAttribute("checked"),this.referenceTag.domElement.checked=!1)},enumerable:!0,configurable:!0}),e.prototype.onClick=function(t){this.checked=!this.checked},e.prototype.getTemplate=function(){var t=this.referenceTag.domElement.checked&&this.referenceTag.domElement.hasAttribute("checked");return'<cf-button class="cf-button cf-checkbox-button '+(0==this.referenceTag.label.trim().length?"no-text":"")+'" checked='+(t?"checked":"")+">\n\t\t\t\t<div>\n\t\t\t\t\t<cf-checkbox></cf-checkbox>\n\t\t\t\t\t<span>"+this.referenceTag.label+"</span>\n\t\t\t\t</div>\n\t\t\t</cf-button>\n\t\t\t"},e}(t.Button);t.CheckboxButton=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){t.OptionButtonEvents={CLICK:"cf-option-button-click"};var e=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.isMultiChoice=!1,t}return __extends(n,e),Object.defineProperty(n.prototype,"type",{get:function(){return"OptionButton"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selected",{get:function(){return this.el.hasAttribute("selected")},set:function(t){t?this.el.setAttribute("selected","selected"):this.el.removeAttribute("selected")},enumerable:!0,configurable:!0}),n.prototype.setData=function(t){this.isMultiChoice=t.isMultiChoice,e.prototype.setData.call(this,t)},n.prototype.onClick=function(e){t.ConversationalForm.illustrateFlow(this,"dispatch",t.OptionButtonEvents.CLICK,this),this.eventTarget.dispatchEvent(new CustomEvent(t.OptionButtonEvents.CLICK,{detail:this}))},n.prototype.getTemplate=function(){var t='<cf-button class="cf-button '+(this.isMultiChoice?"cf-checkbox-button":"")+'" '+(this.referenceTag.domElement.selected?"selected='selected'":"")+">";return t+="<div>",this.isMultiChoice&&(t+="<cf-checkbox></cf-checkbox>"),t+=this.referenceTag.label,t+="</div>",t+="</cf-button>"},n}(t.Button);t.OptionButton=e}(cf||(cf={}));var cf;!function(t){var e=function(){function e(e){this.context=e.context,this.eventTarget=e.eventTarget,this.referenceTag=e.referenceTag,this.multiChoice=this.referenceTag.domElement.hasAttribute("multiple"),this.onOptionButtonClickCallback=this.onOptionButtonClick.bind(this),this.eventTarget.addEventListener(t.OptionButtonEvents.CLICK,this.onOptionButtonClickCallback,!1),this.createElements()}return Object.defineProperty(e.prototype,"type",{get:function(){return"OptionsList"},enumerable:!0,configurable:!0}),e.prototype.getValue=function(){for(var t=[],e=0;e<this.elements.length;e++){var n=this.elements[e];if(!this.multiChoice&&n.selected)return t.push(n),t;this.multiChoice&&n.selected&&t.push(n)}return t},e.prototype.onOptionButtonClick=function(e){if(this.multiChoice)e.detail.selected=!e.detail.selected;else{for(var n=0;n<this.elements.length;n++){var i=this.elements[n];i!=e.detail?i.selected=!1:i.selected=!0}t.ConversationalForm.illustrateFlow(this,"dispatch",t.ControlElementEvents.SUBMIT_VALUE,this.referenceTag),this.eventTarget.dispatchEvent(new CustomEvent(t.ControlElementEvents.SUBMIT_VALUE,{detail:e.detail}))}},e.prototype.createElements=function(){this.elements=[];for(var e=this.referenceTag.optionTags,n=0;n<e.length;n++){var i=e[n],o=new t.OptionButton({referenceTag:i,isMultiChoice:this.referenceTag.multipleChoice,eventTarget:this.eventTarget});this.elements.push(o),this.context.appendChild(o.el)}},e.prototype.dealloc=function(){for(this.eventTarget.removeEventListener(t.OptionButtonEvents.CLICK,this.onOptionButtonClickCallback,!1),this.onOptionButtonClickCallback=null;this.elements.length>0;)this.elements.pop().dealloc();this.elements=null},e}();t.OptionsList=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){var e=function(e){function n(n){var i=e.call(this,n)||this;if(i.maxFileSize=1e11,i.loading=!1,i.submitTimer=0,i._fileName="",i._readerResult="",!t.Helpers.caniuse.fileReader())throw new Error("Conversational Form Error: No FileReader available for client.");var o=i.referenceTag.domElement.getAttribute("cf-max-size")||i.referenceTag.domElement.getAttribute("max-size");if(o){var r=parseInt(o,10);i.maxFileSize=r}return i.progressBar=i.el.getElementsByTagName("cf-upload-file-progress-bar")[0],i.onDomElementChangeCallback=i.onDomElementChange.bind(i),i.referenceTag.domElement.addEventListener("change",i.onDomElementChangeCallback,!1),i}return __extends(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.referenceTag.domElement.value},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"readerResult",{get:function(){return this._readerResult},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"files",{get:function(){return this._files},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fileName",{get:function(){return this._fileName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return"UploadFileUI"},enumerable:!0,configurable:!0}),n.prototype.getFilesAsString=function(){var e=document.createElement("span");return e.innerHTML=t.Dictionary.get("icon-type-file")+this.fileName,e.outerHTML},n.prototype.onDomElementChange=function(e){var n=this;t.ConversationalForm.suppressLog||console.log("...onDomElementChange");var i=new FileReader;this._files=this.referenceTag.domElement.files,i.onerror=function(e){t.ConversationalForm.suppressLog||console.log("onerror",e)},i.onprogress=function(e){t.ConversationalForm.suppressLog||console.log("onprogress",e),n.progressBar.style.width=e.loaded/e.total*100+"%"},i.onabort=function(e){t.ConversationalForm.suppressLog||console.log("onabort",e)},i.onloadstart=function(e){var o=n.files[0],r=o?o.size:n.maxFileSize+1;if(r>n.maxFileSize){i.abort();var s={errorText:t.Dictionary.get("input-placeholder-file-size-error")};
1t.ConversationalForm.illustrateFlow(n,"dispatch",t.FlowEvents.USER_INPUT_INVALID,s),n.eventTarget.dispatchEvent(new CustomEvent(t.FlowEvents.USER_INPUT_INVALID,{detail:s}))}else{n._fileName=o.name,n.loading=!0,n.animateIn();var a=Math.floor(Math.log(r)/Math.log(1024)),l=["b","kb","mb","gb"];a=Math.min(l.length-1,a);var c=1*Number((r/Math.pow(1024,a)).toFixed(2))+" "+l[a],u=o.name+" ("+c+")";n.el.getElementsByTagName("cf-upload-file-text")[0].innerHTML=u,n.eventTarget.dispatchEvent(new CustomEvent(t.ControlElementEvents.PROGRESS_CHANGE,{detail:t.ControlElementProgressStates.BUSY}))}},i.onload=function(e){n._readerResult=e.target.result,n.progressBar.classList.add("loaded"),n.submitTimer=setTimeout(function(){n.el.classList.remove("animate-in"),n.onChoose(),n.eventTarget.dispatchEvent(new CustomEvent(t.ControlElementEvents.PROGRESS_CHANGE,{detail:t.ControlElementProgressStates.READY}))},0)},i.readAsDataURL(this.files[0])},n.prototype.animateIn=function(){this.loading&&e.prototype.animateIn.call(this)},n.prototype.onClick=function(t){},n.prototype.triggerFileSelect=function(){this.referenceTag.domElement.click()},n.prototype.dealloc=function(){clearTimeout(this.submitTimer),this.progressBar=null,this.onDomElementChangeCallback&&(this.referenceTag.domElement.removeEventListener("change",this.onDomElementChangeCallback,!1),this.onDomElementChangeCallback=null),e.prototype.dealloc.call(this)},n.prototype.getTemplate=function(){"1"==this.referenceTag.value||this.referenceTag.domElement.hasAttribute("checked");return"<cf-upload-file-ui>\n\t\t\t\t<cf-upload-file-text></cf-upload-file-text>\n\t\t\t\t<cf-upload-file-progress>\n\t\t\t\t\t<cf-upload-file-progress-bar></cf-upload-file-progress-bar>\n\t\t\t\t</cf-upload-file-progress>\n\t\t\t</cf-upload-file-ui>\n\t\t\t"},n}(t.Button);t.UploadFileUI=e}(cf||(cf={}));var cf;!function(t){t.MicrophoneBridgeEvent={ERROR:"cf-microphone-bridge-error",TERMNIAL_ER
1ROR:"cf-microphone-bridge-terminal-error"};var e=function(){function e(e){this.currentTextResponse="",this._hasUserMedia=!1,this.inputErrorCount=0,this.inputCurrentError="",this.el=e.el,this.button=e.button,this.eventTarget=e.eventTarget,this.microphoneObj=e.microphoneObj,this.flowUpdateCallback=this.onFlowUpdate.bind(this),this.eventTarget.addEventListener(t.FlowEvents.FLOW_UPDATE,this.flowUpdateCallback,!1)}return Object.defineProperty(e.prototype,"hasUserMedia",{set:function(t){this._hasUserMedia=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{set:function(t){this.equalizer&&(this.equalizer.disabled=!t)},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this.button.loading=!1,this.microphoneObj.cancelInput&&this.microphoneObj.cancelInput()},e.prototype.onFlowUpdate=function(){var t=this;if(this.currentTextResponse=null,this._hasUserMedia)this.microphoneObj.awaitingCallback||this.callInput();else{var e=!1;window.navigator.mediaDevices&&window.navigator.mediaDevices.enumerateDevices().then(function(n){n.forEach(function(t){e||""===t.label||(e=!0)}),e&&t.getUserMedia()})}},e.prototype.getUserMedia=function(){var e=this;try{void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(t){var e=navigator.getUserMedia||window.navigator.webkitGetUserMedia||window.navigator.mozGetUserMedia;return e?new Promise(function(n,i){e.call(navigator,t,n,i)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),navigator.mediaDevices.getUserMedia({audio:!0}).then(function(t){e.currentStream=t,t.getAudioTracks().length>0?(e.hasUserMedia=!0,e.setupEqualizer(),e.microphoneObj.awaitingCallback||e.callInput()):e.hasUserMedia=!1}).catch(function(n){e.hasUserMedia=!1,e.eventTarget.dispatchEvent(new Event(t.MicrophoneBridgeEvent.TERMNIAL_ER
1ROR))})}catch(e){this.hasUserMedia=!1,this.eventTarget.dispatchEvent(new Event(t.MicrophoneBridgeEvent.TERMNIAL_ERROR))}},e.prototype.dealloc=function(){this.cancel(),this.promise=null,this.currentStream=null,this.equalizer&&this.equalizer.dealloc(),this.equalizer=null,this.eventTarget.removeEventListener(t.FlowEvents.FLOW_UPDATE,this.flowUpdateCallback,!1),this.flowUpdateCallback=null},e.prototype.callInput=function(e){var n=this;void 0===e&&(e=0),this.button.loading=!0,this.equalizer&&(this.equalizer.disabled=!1),this.promise=new Promise(function(t,e){return n.microphoneObj.input(t,e,n.currentStream)}).then(function(e){if(n.promise=null,n.currentTextResponse=e.toString(),!n.currentTextResponse||""==n.currentTextResponse)return n.showError(t.Dictionary.get("user-audio-reponse-invalid")),void n.callInput();n.inputErrorCount=0,n.inputCurrentError="",n.button.loading=!1;var i={text:n.currentTextResponse};t.ConversationalForm.illustrateFlow(n,"dispatch",t.UserInputEvents.SUBMIT,i),n.eventTarget.dispatchEvent(new CustomEvent(t.UserInputEvents.SUBMIT,{detail:i}))}).catch(function(e){n.isErrorTerminal(e)?(n.eventTarget.dispatchEvent(new CustomEvent(t.MicrophoneBridgeEvent.TERMNIAL_ER
1ROR,{detail:t.Dictionary.get("microphone-terminal-error")})),t.ConversationalForm.suppressLog||console.log("Conversational Form: Terminal error: ",e)):(n.inputCurrentError!=e&&(n.inputErrorCount=0,n.inputCurrentError=e),n.inputErrorCount++,n.inputErrorCount>2?n.showError(e):(n.eventTarget.dispatchEvent(new CustomEvent(t.MicrophoneBridgeEvent.TERMNIAL_ERROR,{detail:t.Dictionary.get("microphone-terminal-error")})),t.ConversationalForm.suppressLog||console.log("Conversational Form: Terminal error: ",e)))})},e.prototype.isErrorTerminal=function(t){return-1!==["network"].indexOf(t)},e.prototype.showError=function(e){var n={errorText:e};t.ConversationalForm.illustrateFlow(this,"dispatch",t.FlowEvents.USER_INPUT_INVALID,n),this.eventTarget.dispatchEvent(new CustomEvent(t.FlowEvents.USER_INPUT_INVALID,{detail:n})),this.callInput()},e.prototype.setupEqualizer=function(){var t=this.el.getElementsByTagName("cf-icon-audio-eq")[0];n.supported&&t&&(this.equalizer=new n({stream:this.currentStream,elementToScale:t}))},e}();t.MicrophoneBridge=e;var n=function(){function t(t){var e=this;this.maxBorderWidth=0,this._disabled=!1,this.elementToScale=t.elementToScale,this.context=new AudioContext,this.analyser=this.context.createAnalyser(),this.mic=this.context.createMediaStreamSource(t.stream),this.javascriptNode=this.context.createScriptProcessor(2048,1,1),this.analyser.smoothingTimeConstant=.3,this.analyser.fftSize=1024,this.mic.connect(this.analyser),this.analyser.connect(this.javascriptNode),this.javascriptNode.connect(this.context.destination),this.javascriptNode.onaudioprocess=function(){e.onAudioProcess()}}return Object.defineProperty(t.prototype,"disabled",{set:function(t){this._disabled=t,this.elementToScale.style.borderWidth="0px"},enumerable:!0,configurable:!0}),t.prototype.onAudioProcess=function(){if(!this._disabled){var t=new Uint8Array(this.analyser.frequencyBinCount);this.analyser.getByteFrequencyData(t);for(var e=0,n=t.length,i=0;i<n;i++)e+=t[i];var o=e/n,r=Math.min(1,Math.max(0,1-(50-o)/50));this.maxBorderWidth||(this.maxBorderWidth=.5*this.elementToScale.offsetWidth),this.elementToScale.style.borderWidth=this.maxBorderWidth*r+"px"}},t.prototype.dealloc=function(){this.javascriptNode.onaudioprocess=null,this.javascriptNode=null,this.analyser=null,this.mic=null,this.elementToScale=null,this.context=null},t.supported=function(){return window.AudioContext=window.AudioContext||window.webkitAudioContext,!!window.AudioContext},t}()}(cf||(cf={}));var cf;!function(t){t.UserInputSubmitButtonEvents={CHANGE:"userinput-submit-button-change-value"};var e=function(){function e(e){this._active=!0,this.eventTarget=e.eventTarget;var n=document.createElement("template");n.innerHTML=this.getTemplate(),this.el=n.firstChild||n.content.firstChild,this.onClickCallback=this.onClick.bind(this),this.el.addEventListener("click",this.onClickCallback,!1),this.onMicrophoneTerminalErrorCallback=this.onMicrophoneTerminalError.bind(this),this.eventTarget.addEventListener(t.MicrophoneBridgeEvent.TERMNIAL_ER
1ROR,this.onMicrophoneTerminalErrorCallback,!1)}return Object.defineProperty(e.prototype,"typing",{get:function(){return this.el.classList.contains("typing")},set:function(t){t?(this.el.classList.add("typing"),this.loading=!1,this.mic&&this.mic.cancel()):(this.el.classList.remove("typing"),this.mic&&this.mic.callInput())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._active},set:function(t){this._active=t,this.mic&&(this.mic.active=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{get:function(){return this.el.classList.contains("loading")},set:function(t){t?this.el.classList.add("loading"):this.el.classList.remove("loading")},enumerable:!0,configurable:!0}),e.prototype.addMicrophone=function(e){this.el.classList.add("microphone-interface");var n=document.createElement("template");n.innerHTML='<div class="cf-input-icons cf-microphone">\n\t\t\t\t<div class="cf-icon-audio"></div>\n\t\t\t\t<cf-icon-audio-eq></cf-icon-audio-eq>\n\t\t\t</div>';var i=n.firstChild||n.content.firstChild;this.mic=new t.MicrophoneBridge({el:i,button:this,eventTarget:this.eventTarget,microphoneObj:e}),this.el.appendChild(i)},e.prototype.reset=function(){this.mic&&!this.typing&&this.mic.callInput()},e.prototype.getTemplate=function(){return'<cf-input-button class="cf-input-button">\n\t\t\t\t\t\t<div class="cf-input-icons">\n\t\t\t\t\t\t\t<div class="cf-icon-progress"></div>\n\t\t\t\t\t\t\t<div class="cf-icon-attachment"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</cf-input-button>'},e.prototype.onMicrophoneTerminalError=function(e){this.mic&&(this.mic.dealloc(),this.mic=null,this.el.removeChild(this.el.getElementsByClassName("cf-microphone")[0]),this.el.classList.remove("microphone-interface"),this.loading=!1,this.eventTarget.dispatchEvent(new CustomEvent(t.FlowEvents.USER_INPUT_INVALID,{detail:{errorText:e.detail}})))},e.prototype.onClick=function(e){this.mic&&!this.typing?this.mic.callInput():this.eventTarget.dispatchEvent(new CustomEvent(t.UserInputSubmitButtonEvents.CHANGE))},e.prototype.click=function(){this.el.click()},e.prototype.dealloc=function(){this.eventTarget.removeEventListener(t.MicrophoneBridgeEvent.TERMNIAL_ER
1ROR,this.onMicrophoneTerminalErrorCallback,!1),this.onMicrophoneTerminalErrorCallback=null,this.mic&&this.mic.dealloc(),this.mic=null,this.el.removeEventListener("click",this.onClickCallback,!1),this.onClickCallback=null,this.el=null,this.eventTarget=null},e}();t.UserInputSubmitButton=e}(cf||(cf={}));var cf;!function(t){t.UserInputTypes={VOICE:"voice",VR_GESTURE:"vr-gesture",TEXT:"text"}}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){var e=function(e){function n(n){var i=e.call(this,n)||this;return i._disabled=!1,i._visible=!1,i.onChatReponsesUpdatedCallback=i.onChatReponsesUpdated.bind(i),i.eventTarget.addEventListener(t.ChatListEvents.CHATLIST_UPDATED,i.onChatReponsesUpdatedCallback,!1),i.windowFocusCallback=i.windowFocus.bind(i),window.addEventListener("focus",i.windowFocusCallback,!1),i.inputInvalidCallback=i.inputInvalid.bind(i),i.eventTarget.addEventListener(t.FlowEvents.USER_INPUT_INVALID,i.inputInvalidCallback,!1),i.flowUpdateCallback=i.onFlowUpdate.bind(i),i.eventTarget.addEventListener(t.FlowEvents.FLOW_UPDATE,i.flowUpdateCallback,!1),i}return __extends(n,e),Object.defineProperty(n.prototype,"currentTag",{get:function(){return this._currentTag},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"visible",{set:function(t){var e=this;this._visible=t,!this.el.classList.contains("animate-in")&&t?setTimeout(function(){e.el.classList.add("animate-in")},0):this.el.classList.contains("animate-in")&&!t&&this.el.classList.remove("animate-in")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled!=t&&(this._disabled=t,t?this.el.setAttribute("disabled","disabled"):(this.setFocusOnInput(),this.el.removeAttribute("disabled")))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){var e=0,n=0,i=this.el;return t.Helpers.isInternetExlorer()?(e=i.offsetHeight,n=parseInt(i.currentStyle.marginTop,10)+parseInt(i.currentStyle.marginBottom,10),n*=2):(e=parseInt(document.defaultView.getComputedStyle(i,"").getPropertyValue("height"),10),n=parseInt(document.defaultView.getComputedStyle(i,"").getPropertyValue("margin-top"))+parseInt(document.defaultView.getComputedStyle(i,"").getPropertyValue("margin-bottom"))),e+n},enumerable:!0,configurable:!0}),n.prototype.onEnterOrSubmitButtonSubmit=function(t){void 0===t&&(t=null)},n.prototype.inputInvalid=function(t){},n.prototype.deactivate=function(){this.disabled=!0},n.prototype.reactivate=function(){this.disabled=!1},n.prototype.getFlowDTO=function(){},n.prototype.setFocusOnInput=function(){},n.prototype.onFlowStopped=function(){},n.prototype.reset=function(){},n.prototype.dealloc=function(){this.eventTarget.removeEventListener(t.ChatListEvents.CHATLIST_UPDATED,this.onChatReponsesUpdatedCallback,!1),this.onChatReponsesUpdatedCallback=null,this.eventTarget.removeEventListener(t.FlowEvents.USER_INPUT_INVALID,this.inputInvalidCallback,!1),this.inputInvalidCallback=null,window.removeEventListener("focus",this.windowFocusCallback,!1),this.windowFocusCallback=null,this.eventTarget.removeEventListener(t.FlowEvents.FLOW_UPDATE,this.flowUpdateCallback,!1),this.flowUpdateCallback=null,e.prototype.dealloc.call(this)},n.prototype.onFlowUpdate=function(e){t.ConversationalForm.illustrateFlow(this,"receive",e.type,e.detail),this._currentTag=e.detail.tag},n.prototype.windowFocus=function(t){},n.prototype.onChatReponsesUpdated=function(t){t.detail.currentResponse.isRobotResponse||(this.visible=!0,this.disabled=!1,this.setFocusOnInput())},n.ERROR_TIME=2e3,n.preventAutoFocus=!1,n.hideUserInputOnNoneTextInput=!1,n}(t.BasicElement);t.UserInputElement=e,t.UserInputEvents={SUBMIT:"cf-input-user-input-submit",KEY_CHANGE:"cf-input-key-change",CONTROL_ELEMENTS_ADDED:"cf-input-control-elements-added",HEIGHT_CHANGE:"cf-input-height-change",FOCUS:"cf-input-focus",BLUR:"cf-input-blur"}}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){var e=function(e){function n(n){var i=e.call(this,n)||this;return i.errorTimer=0,i.initialInputHeight=0,i.shiftIsDown=!1,i._active=!1,i.cfReference=n.cfReference,i.eventTarget=n.eventTarget,i.inputElement=i.el.getElementsByTagName("textarea")[0],i.onInputFocusCallback=i.onInputFocus.bind(i),i.onInputBlurCallback=i.onInputBlur.bind(i),i.inputElement.addEventListener("focus",i.onInputFocusCallback,!1),i.inputElement.addEventListener("blur",i.onInputBlurCallback,!1),i.controlElements=new t.ControlElements({el:i.el.getElementsByTagName("cf-input-control-elements")[0],cfReference:i.cfReference,infoEl:i.el.getElementsByTagName("cf-info")[0],eventTarget:i.eventTarget}),i.keyUpCallback=i.onKeyUp.bind(i),document.addEventListener("keyup",i.keyUpCallback,!1),i.keyDownCallback=i.onKeyDown.bind(i),document.addEventListener("keydown",i.keyDownCallback,!1),i.onOriginalTagChangedCallback=i.onOriginalTagChanged.bind(i),i.eventTarget.addEventListener(t.TagEvents.ORIGINAL_ELEMENT_CHANGED,i.onOriginalTagChangedCallback,!1),i.onControlElementSubmitCallback=i.onControlElementSubmit.bind(i),i.eventTarget.addEventListener(t.ControlElementEvents.SUBMIT_VALUE,i.onControlElementSubmitCallback,!1),i.onControlElementProgressChangeCallback=i.onControlElementProgressChange.bind(i),i.eventTarget.addEventListener(t.ControlElementEvents.PROGRESS_CHANGE,i.onControlElementProgressChangeCallback,!1),i.onSubmitButtonChangeStateCallback=i.onSubmitButtonChangeState.bind(i),i.eventTarget.addEventListener(t.UserInputSubmitButtonEvents.CHANGE,i.onSubmitButtonChangeStateCallback,!1),i.submitButton=new t.UserInputSubmitButton({eventTarget:i.eventTarget}),i.el.appendChild(i.submitButton.el),n.microphoneInputObj&&(i.microphoneObj=n.microphoneInputObj,i.microphoneObj&&i.microphoneObj.init&&i.microphoneObj.init(),i.submitButton.addMicrophone(i.microphoneObj)),i}return __extends(n,e),Object.defineProperty(n.prototype,"active",{get:function(){return this.inputElement===document.activeElement||this._active},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{set:function(e){var n=this._disabled!=e;t.ConversationalForm.suppressLog||console.log("option hasChanged",e),n&&(this._disabled=e,e?(this.el.setAttribute("disabled","disabled"),this.inputElement.blur()):(this.setFocusOnInput(),this.el.removeAttribute("disabled")))},enumerable:!0,configurable:!0}),n.prototype.getInputValue=function(){var t=this.inputElement.value,e=document.createElement("div");return e.appendChild(document.createTextNode(t)),e.innerHTML},n.prototype.getFlowDTO=function(){var t;return t=this.controlElements&&this.controlElements.active?this.controlElements.getDTO():{text:this.getInputValue()},t.tag||(t.tag=this.currentTag),t.input=this,t.tag=this.currentTag,t},n.prototype.reset=function(){this.controlElements&&this.controlElements.clearTagsAndReset()},n.prototype.deactivate=function(){e.prototype.deactivate.call(this),this.microphoneObj&&(this.submitButton.active=!1)},n.prototype.reactivate=function(){e.prototype.reactivate.call(this),this.microphoneObj&&!this.submitButton.typing&&(this.submitButton.loading=!0,this.submitButton.typing=!1,this.submitButton.active=!0)},n.prototype.onFlowStopped=function(){this.submitButton.loading=!1,this.submitButton.typing&&(this.submitButton.typing=!1),this.controlElements&&this.controlElements.clearTagsAndReset(),this.disabled=!0},n.prototype.onOriginalTagChanged=function(t){this.currentTag==t.detail.tag&&this.onInputChange(),this.controlElements&&this.controlElements.active&&this.controlElements.updateStateOnElementsFromTag(t.detail.tag)},n.prototype.onInputChange=function(){if(this.active||this.controlElements.active){var e=Math.max(this.initialInputHeight,parseInt(this.inputElement.style.height,10));this.inputElement.style.height="0px",this.inputElement.style.height=(0===this.inputElement.scrollHeight?e:this.inputElement.scrollHeight)+"px",t.ConversationalForm.illustrateFlow(this,"dispatch",t.UserInputEvents.HEIGHT_CHANGE),this.eventTarget.dispatchEvent(new CustomEvent(t.UserInputEvents.HEIGHT_CHANGE,{detail:this.inputElement.scrollHeight}))}},n.prototype.inputInvalid=function(e){var n=this;t.ConversationalForm.illustrateFlow(this,"receive",e.type,e.detail);var i=e.detail;this.inputElement.setAttribute("data-value",this.inputElement.value),this.inputElement.value="",this.el.setAttribute("error",""),this.disabled=!0,this.inputElement.setAttribute("placeholder",i.errorText||(this._currentTag?this._currentTag.errorMessage:"")),clearTimeout(this.errorTimer),this.submitButton.loading=!1,this.errorTimer=setTimeout(function(){n.disabled=!1,t.ConversationalForm.suppressLog||console.log("option, disabled 1"),n.el.removeAttribute("error"),n.inputElement.value=n.inputElement.getAttribute("data-value"),n.inputElement.setAttribute("data-value",""),n.setPlaceholder(),n.setFocusOnInput(),n.submitButton.reset(),n.controlElements&&n.controlElements.resetAfterErrorMessage()}
1,t.UserInputElement.ERROR_TIME)},n.prototype.setPlaceholder=function(){this._currentTag?this._currentTag.inputPlaceholder?this.inputElement.setAttribute("placeholder",this._currentTag.inputPlaceholder):this.inputElement.setAttribute("placeholder","group"==this._currentTag.type?t.Dictionary.get("group-placeholder"):t.Dictionary.get("input-placeholder")):this.inputElement.setAttribute("placeholder",t.Dictionary.get("group-placeholder"))},n.prototype.checkForCorrectInputTag=function(){var t=this.inputElement.getAttribute("type"),e="password"==this._currentTag.type&&"password"!=t,n="password"!=this._currentTag.type&&"password"==t,i="email"==this._currentTag.type&&"email"!=t||"number"==this._currentTag.type&&"number"!=t;if(this.inputElement&&(e||n)&&(this.inputElement.removeEventListener("focus",this.onInputFocusCallback,!1),this.inputElement.removeEventListener("blur",this.onInputBlurCallback,!1)),e||i){var o=document.createElement("input");Array.prototype.slice.call(this.inputElement.attributes).forEach(function(t){o.setAttribute(t.name,t.value)}),o.setAttribute("autocomplete","new-password"),this.inputElement.parentNode.replaceChild(o,this.inputElement),this.inputElement=o,"number"!==this._currentTag.type&&"email"!==this._currentTag.type||(this.inputElement.type=this._currentTag.type,o.setAttribute("type",this._currentTag.type))}else if(n){var r=document.createElement("textarea");Array.prototype.slice.call(this.inputElement.attributes).forEach(function(t){r.setAttribute(t.name,t.value)}),this.inputElement.parentNode.replaceChild(r,this.inputElement),this.inputElement=r}this.inputElement&&(e||n)&&(this.inputElement.addEventListener("focus",this.onInputFocusCallback,!1),this.inputElement.addEventListener("blur",this.onInputBlurCallback,!1)),0==this.initialInputHeight&&(this.initialInputHeight=this.inputElement.offsetHeight),this.setFocusOnInput()},n.prototype.onFlowUpdate=function(n){var i=this;e.prototype.onFlowUpdate.call(this,n),this.submitButton.loading=!1,this.submitButton.typing&&(this.submitButton.typing=!1),this.el.setAttribute("tag-type",this._currentTag.type),this.checkForCorrectInputTag();var o=-1!==["password","number","email"].indexOf(this._currentTag.type);this.inputElement.setAttribute("type",o?this._currentTag.type:"input"),clearTimeout(this.errorTimer),this.el.removeAttribute("error"),this.inputElement.setAttribute("data-value",""),this.inputElement.value="",this.submitButton.loading=!1,this.setPlaceholder(),this.resetValue(),this.setFocusOnInput(),this.controlElements.reset(),"group"==this._currentTag.type?this.buildControlElements(this._currentTag.elements):this.buildControlElements([this._currentTag]),"text"!=this._currentTag.type&&"email"!=this._currentTag.type||(this.inputElement.value=this._currentTag.defaultValue.toString()),!0===this._currentTag.skipUserInput?this.el.classList.add("hide-input"):this.el.classList.remove("hide-input"),t.UserInputElement.hideUserInputOnNoneTextInput&&(this.controlElements.active?(this.el.classList.add("hide-input"),this.controlElements.focusFrom("bottom")):this.el.classList.remove("hide-input")),setTimeout(function(){i.onInputChange()},150)},n.prototype.onControlElementProgressChange=function(e){var n=e.detail;this.disabled=n==t.ControlElementProgressStates.BUSY,t.ConversationalForm.suppressLog||console.log("option, disabled 2")},n.prototype.buildControlElements=function(t){this.controlElements.buildTags(t)},n.prototype.onControlElementSubmit=function(e){t.ConversationalForm.illustrateFlow(this,"receive",e.type,e.detail);var n=e.detail;this.controlElements.updateStateOnElements(n),this.doSubmit()},n.prototype.onSubmitButtonChangeState=function(t){this.onEnterOrSubmitButtonSubmit(t)},n.prototype.isMetaKeyPressed=function(t){t.metaKey||[91,93].indexOf(t.keyCode)},n.prototype.onKeyDown=function(e){(this.active||this.controlElements.focus)&&(this.isControlElementsActiveAndUserInputHidden()||this.isMetaKeyPressed(e)||(e.keyCode==t.Dictionary.keyCodes.shift&&(this.shiftIsDown=!0),e.keyCode!=t.Dictionary.keyCodes.enter||e.shiftKey||e.preventDefault()))},n.prototype.isControlElementsActiveAndUserInputHidden=function(){return this.controlElements&&this.controlElements.active&&t.UserInputElement.hideUserInputOnNoneTextInput},n.prototype.onKeyUp=function(e){if((this.active||this.isControlElementsActiveAndUserInputHidden()||this.controlElements.focus)&&!this.isMetaKeyPressed(e)){if(e.keyCode==t.Dictionary.keyCodes.shift)this.shiftIsDown=!1;else if(e.keyCode==t.Dictionary.keyCodes.up)e.preventDefault(),this.active&&!this.controlElements.focus&&this.controlElements.focusFrom("bottom");else if(e.keyCode==t.Dictionary.keyCodes.down)e.preventDefault(),this.active&&!this.controlElements.focus&&this.controlElements.focusFrom("top");else if(e.keyCode==t.Dictionary.keyCodes.tab){for(var n=!1,i=e.target.parentNode;null!=i;){if(i===this.cfReference.el){n=!0;break}i=i.parentNode}n||(e.preventDefault(),this.controlElements.active||this.setFocusOnInput())}if(!this.el.hasAttribute("disabled")){var o=this.getFlowDTO();if(e.keyCode==t.Dictionary.keyCodes.enter&&!e.shiftKey||e.keyCode==t.Dictionary.keyCodes.space)if(e.keyCode==t.Dictionary.keyCodes.enter&&this.active)e.preventDefault(),this.onEnterOrSubmitButtonSubmit();else if(e.keyCode==t.Dictionary.keyCodes.enter||e.keyCode==t.Dictionary.keyCodes.space){e.preventDefault();var r="group"==this._currentTag.type?this._currentTag.getGroupTagType():this._currentTag.type;if("select"==r||"checkbox"==r){var s=this._currentTag;"checkbox"==r||s.multipleChoice?(this.active||this.isControlElementsActiveAndUserInputHidden())&&e.keyCode==t.Dictionary.keyCodes.enter?this.submitButton.click():(this.active||this.controlElements.active||this.isControlElementsActiveAndUserInputHidden()||(this.resetValue(),this.setFocusOnInput()),this.dispatchKeyChange(o,e.keyCode)):this.dispatchKeyChange(o,e.keyCode)}else"group"==this._currentTag.type&&this.dispatchKeyChange(o,e.keyCode)}else e.keyCode==t.Dictionary.keyCodes.space&&document.activeElement&&this.dispatchKeyChange(o,e.keyCode);else e.keyCode!=t.Dictionary.keyCodes.shift&&e.keyCode!=t.Dictionary.keyCodes.tab&&this.dispatchKeyChange(o,e.keyCode);this.onInputChange()}}},n.prototype.dispatchKeyChange=function(e,n){this.submitButton.typing=e.text&&e.text.length>0,t.ConversationalForm.illustrateFlow(this,"dispatch",t.UserInputEvents.KEY_CHANGE,e),this.eventTarget.dispatchEvent(new CustomEvent(t.UserInputEvents.KEY_CHANGE,{detail:{dto:e,keyCode:n,inputFieldActive:this.active}}))}
1,n.prototype.windowFocus=function(t){e.prototype.windowFocus.call(this,t),this.setFocusOnInput()},n.prototype.onInputBlur=function(e){this._active=!1,this.eventTarget.dispatchEvent(new CustomEvent(t.UserInputEvents.BLUR))},n.prototype.onInputFocus=function(e){this._active=!0,this.onInputChange(),this.eventTarget.dispatchEvent(new CustomEvent(t.UserInputEvents.FOCUS))},n.prototype.setFocusOnInput=function(){t.UserInputElement.preventAutoFocus||this.el.classList.contains("hide-input")||this.inputElement.focus()},n.prototype.onEnterOrSubmitButtonSubmit=function(e){void 0===e&&(e=null);var n=this.controlElements.active&&t.UserInputElement.hideUserInputOnNoneTextInput;(this.active||n)&&this.controlElements.highlighted?this.controlElements.clickOnHighlighted():this._currentTag?"file"==this._currentTag.type&&e?this.controlElements.getElement(0).triggerFileSelect():this.doSubmit():this.eventTarget.cf.addUserChatResponse(this.inputElement.value)},n.prototype.doSubmit=function(){var e=this.getFlowDTO();this.submitButton.loading=!0,this.disabled=!0,this.el.removeAttribute("error"),this.inputElement.setAttribute("data-value",""),t.ConversationalForm.illustrateFlow(this,"dispatch",t.UserInputEvents.SUBMIT,e),this.eventTarget.dispatchEvent(new CustomEvent(t.UserInputEvents.SUBMIT,{detail:e}))},n.prototype.resetValue=function(){this.inputElement.value="",this.onInputChange()},n.prototype.dealloc=function(){this.inputElement.removeEventListener("blur",this.onInputBlurCallback,!1),this.onInputBlurCallback=null,this.inputElement.removeEventListener("focus",this.onInputFocusCallback,!1),this.onInputFocusCallback=null,document.removeEventListener("keydown",this.keyDownCallback,!1),this.keyDownCallback=null,document.removeEventListener("keyup",this.keyUpCallback,!1),this.keyUpCallback=null,this.eventTarget.removeEventListener(t.ControlElementEvents.SUBMIT_VALUE,this.onControlElementSubmitCallback,!1),this.onControlElementSubmitCallback=null,this.submitButton.el.removeEventListener(t.UserInputSubmitButtonEvents.CHANGE,this.onSubmitButtonChangeStateCallback,!1),this.onSubmitButtonChangeStateCallback=null,this.submitButton.dealloc(),this.submitButton=null,e.prototype.dealloc.call(this)},n.prototype.getTemplate=function(){return this.customTemplate||'<cf-input>\n\t\t\t\t<cf-info></cf-info>\n\t\t\t\t<cf-input-control-elements>\n\t\t\t\t\t<cf-list-button direction="prev">\n\t\t\t\t\t</cf-list-button>\n\t\t\t\t\t<cf-list-button direction="next">\n\t\t\t\t\t</cf-list-button>\n\t\t\t\t\t<cf-list>\n\t\t\t\t\t</cf-list>\n\t\t\t\t</cf-input-control-elements>\n\n\t\t\t\t<textarea type=\'input\' tabindex="1" rows="1"></textarea>\n\n\t\t\t</cf-input>\n\t\t\t'},n}(t.UserInputElement);t.UserTextInput=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){t.ChatResponseEvents={USER_ANSWER_CLICKED:"cf-on-user-answer-clicked"};var e=function(e){function n(t){var n=e.call(this,t)||this;return n.readyTimer=0,n.container=t.container,n.uiOptions=t.cfReference.uiOptions,n._tag=t.tag,n}return __extends(n,e),Object.defineProperty(n.prototype,"tag",{get:function(){return this._tag},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"added",{get:function(){return!!this.el.parentNode.parentNode},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.el.classList.contains("disabled")},set:function(t){t?this.el.classList.add("disabled"):this.el.classList.remove("disabled")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"visible",{set:function(t){var e=this;this.el.offsetWidth,setTimeout(function(){return t?e.el.classList.add("show"):e.el.classList.remove("show")},100)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"strippedSesponse",{get:function(){var t=this.response,e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""},enumerable:!0,configurable:!0}),n.prototype.whenReady=function(t){this.onReadyCallback=t},n.prototype.setValue=function(e){void 0===e&&(e=null),this.visible||(this.visible=!0);this.el.hasAttribute("thinking");if(e){if(this.response=this.originalResponse=e.text,this.processResponseAndSetText(),this.responseLink&&!this.isRobotResponse&&this.responseLink.processResponseAndSetText(),e&&e.controlElements&&e.controlElements[0])switch(e.controlElements[0].type){case"UploadFileUI":this.textEl.classList.add("file-icon")}this.isRobotResponse||this.onClickCallback||(this.onClickCallback=this.onClick.bind(this),this.el.addEventListener(t.Helpers.getMouseEvent("click"),this.onClickCallback,!1))}else this.setToThinking()},n.prototype.show=function(){this.visible=!0,this.disabled=!1,this.response?this.checkForEditMode():this.setToThinking()},n.prototype.updateThumbnail=function(t){var e=this.el.getElementsByTagName("thumb")[0];if(0===t.indexOf("text:")){var n=e.getElementsByTagName("span")[0];n.innerHTML=t.split("text:")[1],n.setAttribute("length",t.length.toString())}else this.image=t,e.style.backgroundImage='url("'+this.image+'")'},n.prototype.setLinkToOtherReponse=function(t){this.responseLink=t},n.prototype.processResponseAndSetText=function(){var t=this;if(this.originalResponse){var e=this.originalResponse;if(this._tag&&"password"==this._tag.type&&!this.isRobotResponse){for(var i="",o=0;o<e.length;o++)i+="*";e=i}if(this.responseLink&&this.isRobotResponse&&(e=e.split("{previous-answer}").join(this.responseLink.parsedResponse)),this.isRobotResponse)for(var r=n.list.getResponses(),s=0;s<r.length;s++){var a=r[s];a!==this&&a.tag&&(a.tag.id&&(e=e.split("{"+a.tag.id+"}").join(a.tag.value)),a.tag.name&&(e=e.split("{"+a.tag.name+"}").join(a.tag.value)))}if(-1!=e.indexOf("contains-image")&&this.textEl.classList.add("contains-image"),this.isRobotResponse){this.textEl.innerHTML="";var l=this.uiOptions.robot.robotResponseTime;0!=l&&this.setToThinking();for(var c=e.split("&&"),u=this,h=0;h<c.length;h++)!function(e){var n=c[e];setTimeout(function(){t.tryClearThinking(),t.textEl.innerHTML+="<p>"+n+"</p>";var e=t.textEl.getElementsByTagName("p");e[e.length-1].offsetWidth,e[e.length-1].classList.add("show"),t.scrollTo()},l+(e+1)*u.uiOptions.robot.chainedResponseTime)}(h);this.readyTimer=setTimeout(function(){t.onReadyCallback&&t.onReadyCallback(),t.onReadyCallback=null,!0===t._tag.skipUserInput&&setTimeout(function(){t._tag.flowManager.nextStep()},t.uiOptions.robot.chainedResponseTime)},l+c.length*this.uiOptions.robot.chainedResponseTime)}else{this.tryClearThinking(),this.textEl.innerHTML="<p>"+e+"</p>";var p=this.textEl.getElementsByTagName("p");p[p.length-1].offsetWidth,p[p.length-1].classList.add("show"),this.scrollTo()}this.parsedResponse=e,this.addSelf(),this.textEl.removeAttribute("value-ad
1ded"),setTimeout(function(){t.textEl.setAttribute("value-added",""),t.el.classList.add("peak-thumb")},0),this.checkForEditMode(),this.response=e.split("&&").join(" ")}},n.prototype.scrollTo=function(){var t=this.el.offsetTop,e=this.el.offsetHeight;this.container.scrollTop=t+e+this.container.scrollTop},n.prototype.checkForEditMode=function(){this.isRobotResponse||this.el.hasAttribute("thinking")||(this.el.classList.add("can-edit"),this.disabled=!1)},n.prototype.tryClearThinking=function(){this.el.hasAttribute("thinking")&&(this.textEl.innerHTML="",this.el.removeAttribute("thinking"))},n.prototype.setToThinking=function(){(this.isRobotResponse&&0!==this.uiOptions.robot.robotResponseTime||!this.isRobotResponse&&this.cfReference.uiOptions.user.showThinking&&!this._tag.skipUserInput)&&(this.textEl.innerHTML=n.THINKING_MARKUP,this.el.classList.remove("can-edit"),this.el.setAttribute("thinking","")),(this.cfReference.uiOptions.user.showThinking||this.cfReference.uiOptions.user.showThumb)&&this.addSelf()},n.prototype.addSelf=function(){this.el.parentNode!=this.container&&this.container.appendChild(this.el)},n.prototype.onClick=function(e){this.setToThinking(),t.ConversationalForm.illustrateFlow(this,"dispatch",t.ChatResponseEvents.USER_ANSWER_CLICKED,e),this.eventTarget.dispatchEvent(new CustomEvent(t.ChatResponseEvents.USER_ANSWER_CLICKED,{detail:this._tag}))},n.prototype.setData=function(t){this.image=t.image,this.response=this.originalResponse=t.response,this.isRobotResponse=t.isRobotResponse,e.prototype.setData.call(this,t)},n.prototype.onElementCreated=function(){var t=this;this.textEl=this.el.getElementsByTagName("text")[0],this.updateThumbnail(this.image),this.isRobotResponse||null!=this.response?setTimeout(function(){t.setValue({text:t.response})},0):this.cfReference.uiOptions.user.showThumb&&this.el.classList.add("peak-thumb")},n.prototype.dealloc=function(){clearTimeout(this.readyTimer),this.container=null,this.uiOptions=null,this.onReadyCallback=null,this.onClickCallback&&(this.el.removeEventListener(t.Helpers.getMouseEvent("click"),this.onClickCallback,!1),this.onClickCallback=null),e.prototype.dealloc.call(this)},n.prototype.getTemplate=function(){return'<cf-chat-response class="'+(this.isRobotResponse?"robot":"user")+'">\n\t\t\t\t<thumb><span></span></thumb>\n\t\t\t\t<text></text>\n\t\t\t</cf-chat-response>'},n.THINKING_MARKUP="<p class='show'><thinking><span>.</span><span>.</span><span>.</span></thinking></p>",n}(t.BasicElement);t.ChatResponse=e}(cf||(cf={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cf;!function(t){t.ChatListEvents={CHATLIST_UPDATED:"cf-chatlist-updated"};var e=function(e){function n(n){var i=e.call(this,n)||this;return i.updateTimer=0,t.ChatResponse.list=i,i.responses=[],i.flowUpdateCallback=i.onFlowUpdate.bind(i),i.eventTarget.addEventListener(t.FlowEvents.FLOW_UPDATE,i.flowUpdateCallback,!1),i.userInputUpdateCallback=i.onUserInputUpdate.bind(i),i.eventTarget.addEventListener(t.FlowEvents.USER_INPUT_UPDATE,i.userInputUpdateCallback,!1),i.onInputKeyChangeCallback=i.onInputKeyChange.bind(i),i.eventTarget.addEventListener(t.UserInputEvents.KEY_CHANGE,i.onInputKeyChangeCallback,!1),i.onInputHeightChangeCallback=i.onInputHeightChange.bind(i),i.eventTarget.addEventListener(t.UserInputEvents.HEIGHT_CHANGE,i.onInputHeightChangeCallback,!1),i.onControlElementsResizedCallback=i.onControlElementsResized.bind(i),i.eventTarget.addEventListener(t.ControlElementsEvents.ON_RESIZE,i.onControlElementsResizedCallback,!1),i.onControlElementsChangedCallback=i.onControlElementsChanged.bind(i),i.eventTarget.addEventListener(t.ControlElementsEvents.CHANGED,i.onControlElementsChangedCallback,!1),i}return __extends(n,e),n.prototype.onInputHeightChange=function(e){var n=e.detail.dto;t.ConversationalForm.illustrateFlow(this,"receive",e.type,n),this.onInputElementChanged()},n.prototype.onInputKeyChange=function(e){var n=e.detail.dto;t.ConversationalForm.illustrateFlow(this,"receive",e.type,n)},n.prototype.onUserInputUpdate=function(e){if(t.ConversationalForm.illustrateFlow(this,"receive",e.type,e.detail),this.currentUserResponse){var n=e.detail;this.setCurrentUserResponse(n)}},n.prototype.addInput=function(t){this.input=t},n.prototype.onControlElementsChanged=function(t){this.onInputElementChanged()},n.prototype.onControlElementsResized=function(e){t.ConversationalForm.illustrateFlow(this,"receive",t.ControlElementsEvents.ON_RESIZE);var n=this.currentResponse;if(n){if(!n.added)for(var i=this.responses.indexOf(n);i>=0;i--){var o=this.responses[i];if(o.added){n=o;break}}n.scrollTo()}this.onInputElementChanged()},n.prototype.onInputElementChanged=function(){var t=this.cfReference.el.offsetHeight,e=this.input.height,n=t-e;this.el.style.height=n+"px"},n.prototype.onFlowUpdate=function(e){var n=this;t.ConversationalForm.illustrateFlow(this,"receive",e.type,e.detail);var i=e.detail.tag;this.currentResponse&&(this.currentResponse.disabled=!1),this.containsTagResponse(i)&&!e.detail.ignoreExistingTag?this.onUserWantsToEditTag(i):setTimeout(function(){var t=n.createResponse(!0,i,i.question);t.whenReady(function(){n.currentUserResponse=n.createResponse(!1,i),t.scrollTo()}),n.currentUserResponse&&(n.currentUserResponse.setLinkToOtherReponse(t),t.setLinkToOtherReponse(n.currentUserResponse))},0===this.responses.length?500:0)},n.prototype.containsTagResponse=function(t){for(var e=0;e<this.responses.length;e++){var n=this.responses[e];if(!n.isRobotResponse&&n.tag==t&&!t.hasConditions())return!0}return!1},n.prototype.onUserWantsToEditTag=function(t){for(var e,n=0;n<this.responses.length;n++){var i=this.responses[n];if(!i.isRobotResponse&&i.tag==t){e=i;break}}this.currentUserResponse.processResponseAndSetText(),e&&(this.responses.length>2&&(this.responses[this.responses.length-1].isRobotResponse||this.responses.pop().dealloc(),this.responses.pop().dealloc()),this.currentUserResponse=e,this.currentResponse=this.responses[this.responses.length-1],this.onListUpdate(this.currentUserResponse))},n.prototype.onListUpdate=function(e){var n=this;clearTimeout(this.updateTimer),this.updateTimer=setTimeout(function(){n.eventTarget.dispatchEvent(new CustomEvent(t.ChatListEvents.CHATLIST_UPDATED,{detail:n})),e.show()},0)},n.prototype.clearFrom=function(t){for(t*=2,t+=t%2;this.responses.length>t;)this.responses.pop().dealloc()},n.prototype.setCurrentUserResponse=function(e){this.flowDTOFromUserInputUpdate=e,!this.flowDTOFromUserInputUpdate.text&&e.tag&&("group"==e.tag.type?this.flowDTOFromUserInputUpdate.text=t.Dictionary.get("user-reponse-missing-group"):"password"!=e.tag.type&&(this.flowDTOFromUserInputUpdate.text=t.Dictionary.get("user-reponse-missing"))),this.currentUserResponse.setValue(this.flowDTOFromUserInputUpdate)},n.prototype.getResponses=function(){return this.responses},n.prototype.updateThumbnail=function(e,n){t.Dictionary.set(e?"robot-image":"user-image",e?"robot":"human",n);for(var i=e?t.Dictionary.getRobotResponse("robot-image"):t.Dictionary.get("user-image"),o=0;o<this.responses.length;o++){var r=this.responses[o];e&&r.isRobotResponse?r.updateThumbnail(i):e||r.isRobotResponse||r.updateThumbnail(i)}},n.prototype.createResponse=function(e,n,i){void 0===i&&(i=null);var o=this.el.querySelector("scrollable"),r=new t.ChatResponse({cfReference:this.cfReference,list:this,tag:n,eventTarget:this.eventTarget,isRobotResponse:e,response:i,image:e?t.Dictionary.getRobotResponse("robot-image"):t.Dictionary.get("user-image"),container:o});return this.responses.push(r),this.currentResponse=r,this.onListUpdate(r),r},n.prototype.getTemplate=function(){return"<cf-chat type='pluto'>\n\t\t\t\t\t\t<scrollable></scrollable>\n\t\t\t\t\t</cf-chat>"},n.prototype.dealloc=function(){this.eventTarget.removeEventListener(t.FlowEvents.FLOW_UPDATE,this.flowUpdateCallback,!1),this.flowUpdateCallback=null,this.eventTarget.removeEventListener(t.FlowEvents.USER_INPUT_UPDATE,this.userInputUpdateCallback,!1),this.userInputUpdateCallback=null,this.eventTarget.removeEventListener(t.UserInputEvents.KEY_CHANGE,this.onInputKeyChangeCallback,!1),this.onInputKeyChangeCallback=null,e.prototype.dealloc.call(this)},n}(t.BasicElement);t.ChatList=e}(cf||(cf={}));var cf;!function(t){t.FlowEvents={USER_INPUT_UPDATE:"cf-flow-user-input-update",USER_INPUT_INVALID:"cf-flow-user-input-invalid",FLOW_UPDATE:"cf-flow-update"};var e=function(){function e(e){this.stopped=!1,this.maxSteps=0,this.step=0,this.savedStep=-1,this.stepTimer=0,this.ignoreExistingTags=!1,this.cfReference=e.cfReference,this.eventTarget=e.eventTarget,this.flowStepCallback=e.flowStepCallback,this.setTags(e.tags),this.userInputSubmitCallback=this.userInputSubmit.bind(this),this.eventTarget.addEventListener(t.UserInputEvents.SUBMIT,this.userInputSubmitCallback,!1)}return Object.defineProperty(e.prototype,"currentTag",{get:function(){return this.tags[this.step]},enumerable:!0,configurable:!0}),e.prototype.userInputSubmit=function(e){var n=this;t.ConversationalForm.illustrateFlow(this,"receive",e.type,e.detail);var i=e.detail;i.tag||(i.tag=this.currentTag);var o=this.currentTag.setTagValueAndIsValid(i),r=!1,s=!1,a=function(){return n.currentTag.validationCallback&&"function"==typeof n.currentTag.validationCallback&&!r&&o?(r=!0,void n.currentTag.validationCallback(i,function(){o=!0,a()},function(t){o=!1,t&&(i.errorText=t),a()})):n.flowStepCallback&&"function"==typeof n.flowStepCallback&&!s&&o?(s=!0,void n.flowStepCallback(i,function(){o=!0,a()},function(t){o=!1,t&&(i.errorText=t),a()}
1)):void(o?(t.ConversationalForm.illustrateFlow(n,"dispatch",t.FlowEvents.USER_INPUT_UPDATE,i),i.input&&(i=i.input.getFlowDTO()),n.eventTarget.dispatchEvent(new CustomEvent(t.FlowEvents.USER_INPUT_UPDATE,{detail:i})),setTimeout(function(){return n.nextStep()},t.ConversationalForm.animationsEnabled?250:0)):(t.ConversationalForm.illustrateFlow(n,"dispatch",t.FlowEvents.USER_INPUT_INVALID,i),n.eventTarget.dispatchEvent(new CustomEvent(t.FlowEvents.USER_INPUT_INVALID,{detail:i}))))};a()},e.prototype.startFrom=function(t,e){void 0===e&&(e=!1),this.step="number"==typeof t?t:this.tags.indexOf(t),this.ignoreExistingTags=e,this.ignoreExistingTags?this.showStep():this.editTag(this.tags[this.step])},e.prototype.areConditionsInFlowFullfilled=function(e,n){this.activeConditions||(this.activeConditions=[]);for(var i=0,o=0;o<this.tags.length;o++){var r=this.tags[o];if(r!==e)for(var s=0;s<n.length;s++){var a=n[s],l=(r.name||r.id||"").toLowerCase();if(""!==l&&"cf-conditional-"+l===a.key.toLowerCase()){var c=(r.value,r.value),u=t.Tag.testConditions(c,a);if(u&&(this.activeConditions[l]=n,++i==n.length))return!0}}}return!1},e.prototype.start=function(){this.stopped=!1,this.validateStepAndUpdate()},e.prototype.stop=function(){this.stopped=!0},e.prototype.nextStep=function(){if(!this.stopped){if(-1!=this.savedStep){for(var t=!1,e=0;e<this.tags.length;e++){var n=this.tags[e];if(n!==this.currentTag&&n.hasConditions()&&n.hasConditionsFor(this.currentTag.name)){t=!0,this.step=this.tags.indexOf(this.currentTag);break}}t||(this.step=this.savedStep)}this.savedStep=-1,this.step++,this.validateStepAndUpdate()}},e.prototype.previousStep=function(){this.step--,this.validateStepAndUpdate()},e.prototype.getStep=function(){return this.step},e.prototype.addTags=function(t,e){if(void 0===e&&(e=-1),-1!==e&&e<this.tags.length){var n=(this.tags.slice(0,e),this.tags.slice(e,this.tags.length));this.tags=this.tags.slice(0,e).concat(t).concat(n)}else this.tags=this.tags.concat(t);return this.setTags(this.tags),this.tags},e.prototype.dealloc=function(){this.eventTarget.removeEventListener(t.UserInputEvents.SUBMIT,this.userInputSubmitCallback,!1),this.userInputSubmitCallback=null},e.prototype.editTag=function(t){if(this.ignoreExistingTags=!1,this.savedStep=this.step-1,this.step=this.tags.indexOf(t),this.validateStepAndUpdate(),this.activeConditions&&Object.keys(this.activeConditions).length>0){this.savedStep=-1,this.cfReference.chatList.clearFrom(this.step+1);for(var e=this.tags.indexOf(t),n=e+1;n<this.tags.length;n++){this.tags[n].reset()}}},e.prototype.setTags=function(t){this.tags=t;for(var e=0;e<this.tags.length;e++){var n=this.tags[e];n.eventTarget=this.eventTarget,n.flowManager=this}this.maxSteps=this.tags.length},e.prototype.skipStep=function(){this.nextStep()},e.prototype.validateStepAndUpdate=function(){this.maxSteps>0&&(this.step==this.maxSteps?this.cfReference.doSubmitForm():(this.step%=this.maxSteps,this.currentTag.disabled?this.skipStep():this.showStep()))},e.prototype.showStep=function(){var e=this;this.stopped||(t.ConversationalForm.illustrateFlow(this,"dispatch",t.FlowEvents.FLOW_UPDATE,this.currentTag),this.currentTag.refresh(),setTimeout(function(){e.eventTarget.dispatchEvent(new CustomEvent(t.FlowEvents.FLOW_UPDATE,{detail:{tag:e.currentTag,ignoreExistingTag:e.ignoreExistingTags}}))},0))},e.STEP_TIME=1e3,e}();t.FlowManager=e}(cf||(cf={}));var cf;!function(cf_1){var ConversationalForm=function(){function ConversationalForm(options){if(this.version="0.9.80",this.cdnPath="https://cdn.jsdelivr.net/gh/space10-community/conversational-form@{version}/dist/",this.isDevelopment=!1,this.loadExternalStyleSheet=!0,this.preventAutoAppend=!1,this.preventAutoStart=!1,window.ConversationalForm=this,this.cdnPath=this.cdnPath.split("{version}").join(this.version),"boolean"==typeof options.suppressLog&&(ConversationalForm.suppressLog=options.suppressLog),ConversationalForm.suppressLog||console.log("Conversational Form > version:",this.version),ConversationalForm.suppressLog||console.log("Conversational Form > options:",options),window.ConversationalForm[this.createId]=this,options.eventDispatcher&&(this._eventTarget=options.eventDispatcher),this.eventTarget.cf||(this.eventTarget.cf=this),options.flowStepCallback&&(this.flowStepCallback=options.flowStepCallback),this.isDevelopment=ConversationalForm.illustrateAppFlow=!!document.getElementById("conversational-form-development"),(this.isDevelopment||0==options.loadExternalStyleSheet)&&(this.loadExternalStyleSheet=!1),isNaN(options.scrollAccerlation)||(cf_1.ScrollController.accerlation=options.scrollAccerlation),this.preventAutoStart=options.preventAutoStart,this.preventAutoAppend=options.preventAutoAppend,!options.formEl)throw new Error("Conversational Form error, the formEl needs to be defined.");this.formEl=options.formEl,this.formEl.setAttribute("cf-create-id",this.createId),!0===options.hideUserInputOnNoneTextInput&&(cf_1.UserInputElement.hideUserInputOnNoneTextInput=!0),this.submitCallback=options.submitCallback,this.submitCallback&&"string"==typeof this.submitCallback&&(this.submitCallback=eval(this.submitCallback)),""==this.formEl.getAttribute("cf-no-animation")&&(ConversationalForm.animationsEnabled=!1),(
1options.preventAutoFocus||""==this.formEl.getAttribute("cf-prevent-autofocus"))&&(cf_1.UserInputElement.preventAutoFocus=!0),this.dictionary=new cf_1.Dictionary({data:options.dictionaryData,robotData:options.dictionaryRobot,userImage:options.userImage,robotImage:options.robotImage}),this.context=options.context?options.context:document.body,this.tags=options.tags,options.microphoneInput&&(options.microphoneInput.init&&options.microphoneInput.input||(console.warn("Conversational Form: microphoneInput is not correctly setup",options.microphoneInput),options.microphoneInput=null)),this.microphoneInputObj=options.microphoneInput,this.uiOptions=cf_1.Helpers.extendObject(cf_1.UserInterfaceDefaultOptions,options.userInterfaceOptions||{}),this.init()}return Object.defineProperty(ConversationalForm.prototype,"createId",{get:function(){return this._createId||(this._createId=(new Date).getTime().toString()),this._createId},enumerable:!0,configurable:!0}),Object.defineProperty(ConversationalForm.prototype,"eventTarget",{get:function(){return this._eventTarget||(this._eventTarget=new cf_1.EventDispatcher(this)),this._eventTarget},enumerable:!0,configurable:!0}),ConversationalForm.prototype.init=function(){if(this.loadExternalStyleSheet){var t=document.head||document.getElementsByTagName("head")[0],e=document.createElement("link"),n=this.cdnPath+"conversational-form.min.css";e.type="text/css",e.media="all",e.setAttribute("rel","stylesheet"),e.setAttribute("href",n),t.appendChild(e)}else this.isDevelopment=!0;if(-1==["fixed","absolute","relative"].indexOf(window.getComputedStyle(this.context).getPropertyValue("position").toLowerCase())&&(this.context.style.position="relative"),!this.tags||0==this.tags.length){this.tags=[];for(var i=[].slice.call(this.formEl.querySelectorAll("input, select, button, textarea, cf-robot-message"),0),o=0;o<i.length;o++){var r=i[o];cf_1.Tag.isTagValid(r)&&this.tags.push(cf_1.Tag.createTag(r))}}for(var s=[],o=0;o<this.tags.length;o++){var r=this.tags[o];r&&cf_1.Tag.isTagValid(r.domElement)||s.push(r)}for(var o=0;o<s.length;o++){var a=s[o];this.tags.splice(this.tags.indexOf(a),1)}return this.tags&&0!=this.tags.length||console.warn("Conversational Form: No tags found or registered."),this.tags=this.setupTagGroups(this.tags),this.setupUI(),this},ConversationalForm.prototype.updateDictionaryValue=function(t,e,n){cf_1.Dictionary.set(t,e,n),-1!=["robot-image","user-image"].indexOf(t)&&this.chatList.updateThumbnail("robot-image"==t,n)},ConversationalForm.prototype.getFormData=function(t){if(void 0===t&&(t=!1),t){for(var e={},n=0;n<this.tags.length;n++){var i=this.tags[n];i.value&&(e[i.name||"tag-"+n.toString()]=i.value)}return e}return new FormData(this.formEl)},ConversationalForm.prototype.addRobotChatResponse=function(t){this.chatList.createResponse(!0,null,t)},ConversationalForm.prototype.addUserChatResponse=function(t){this.chatList.createResponse(!1,null,t)},ConversationalForm.prototype.stop=function(t){void 0===t&&(t=""),this.flowManager.stop(),""!=t&&this.chatList.createResponse(!0,null,t),this.userInput.onFlowStopped()},ConversationalForm.prototype.start=function(){this.userInput.disabled=!1,ConversationalForm.suppressLog||console.log("option, disabled 3"),this.userInput.visible=!0,this.flowManager.start()},ConversationalForm.prototype.getTag=function(t){return"number"==typeof t?this.tags[t]:null},ConversationalForm.prototype.setupTagGroups=function(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];"radio"!=i.type&&"checkbox"!=i.type||(e[i.name]||(e[i.name]=[]),e[i.name].push(i))}if(Object.keys(e).length>0)for(var o in e)if(e[o].length>0){var r=e[o][0].domElement.parentNode;r&&"fieldset"!==r.tagName.toLowerCase()&&(r=r.parentNode,function(t){return t&&"fieldset"!==t.tagName.toLowerCase()&&!t.hasAttribute("cf-questions")}(r)&&(r=null));for(var s=new cf_1.TagGroup({fieldset:r,elements:e[o]}),n=0;n<e[o].length;n++){var a=e[o][n];0==n?t.splice(t.indexOf(a),1,s):t.splice(t.indexOf(a),1)}}return t},ConversationalForm.prototype.setupUI=function(){this.flowManager=new cf_1.FlowManager({cfReference:this,flowStepCallback:this.flowStepCallback,eventTarget:this.eventTarget,tags:this.tags}),this.el=document.createElement("div"),this.el.id="conversational-form",this.el.className="
1conversational-form",ConversationalForm.animationsEnabled&&this.el.classList.add("conversational-form--enable-animation"),this.preventAutoAppend||this.context.appendChild(this.el),this.el.style.visibility="hidden";var t=document.createElement("div");t.className="conversational-form-inner",this.el.appendChild(t),this.chatList=new cf_1.ChatList({eventTarget:this.eventTarget,cfReference:this}),t.appendChild(this.chatList.el),this.userInput=new cf_1.UserTextInput({microphoneInputObj:this.microphoneInputObj,eventTarget:this.eventTarget,cfReference:this}),this.chatList.addInput(this.userInput),t.appendChild(this.userInput.el),this.onUserAnswerClickedCallback=this.onUserAnswerClicked.bind(this),this.eventTarget.addEventListener(cf_1.ChatResponseEvents.USER_ANSWER_CLICKED,this.onUserAnswerClickedCallback,!1),this.el.classList.add("conversational-form--show"),this.preventAutoStart||this.flowManager.start(),this.tags&&0!=this.tags.length||(this.userInput.visible=!0)},ConversationalForm.prototype.onUserAnswerClicked=function(t){var e=t.detail;this.flowManager.editTag(e)},ConversationalForm.prototype.addTags=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=-1);for(var i=[],o=0;o<t.length;o++){var r=t[o];if("fieldset"===r.tag)for(var s=cf_1.TagsParser.parseGroupTag(r),a=0;a<s.children.length;a++){var l=s.children[a];if(cf_1.Tag.isTagValid(l)){var c=cf_1.Tag.createTag(l);c.name||(c.name="tag-ref-"+a.toString()),i.push(c)}}else{var l="select"===r.tag?cf_1.TagsParser.parseGroupTag(r):cf_1.TagsParser.parseTag(r);if(cf_1.Tag.isTagValid(l)){var c=cf_1.Tag.createTag(l);i.push(c)}}}i=this.setupTagGroups(i),this.tags=this.flowManager.addTags(i,e?this.flowManager.getStep()+1:n)},ConversationalForm.prototype.remapTagsAndStartFrom=function(t,e,n){void 0===t&&(t=0),void 0===e&&(e=!1),void 0===n&&(n=!1),e&&this.chatList.setCurrentUserResponse(this.userInput.getFlowDTO());for(var i=0;i<this.tags.length;i++){this.tags[i].refresh()}this.flowManager.startFrom(t,n)},ConversationalForm.prototype.focus=function(){this.userInput&&this.userInput.setFocusOnInput()},ConversationalForm.prototype.doSubmitForm=function(){if(this.el.classList.add("done"),this.userInput.reset(),this.submitCallback)this.submitCallback(this);else{var t=this.formEl.ownerDocument.createElement("input");t.style.display="none",t.type="submit",this.formEl.appendChild(t),t.click(),this.formEl.removeChild(t),this.remove()}},ConversationalForm.prototype.remove=function(){this.microphoneInputObj&&(this.microphoneInputObj=null),this.onUserAnswerClickedCallback&&(this.eventTarget.removeEventListener(cf_1.ChatResponseEvents.USER_ANSWER_CLICKED,this.onUserAnswerClickedCallback,!1),this.onUserAnswerClickedCallback=null),this.flowManager&&this.flowManager.dealloc(),this.userInput&&this.userInput.dealloc(),this.chatList&&this.chatList.dealloc(),this.dictionary=null,this.flowManager=null,this.userInput=null,this.chatList=null,this.context=null,this.formEl=null,this.tags=null,this.submitCallback=null,this.el.parentNode.removeChild(this.el),this.el=null,window.ConversationalForm[this.createId]=null},ConversationalForm.illustrateFlow=function(t,e,n,i){if(void 0===i&&(i=null),ConversationalForm.illustrateAppFlow){var o="font-weight: 900; background: "+("receive"==e?"#e6f3fe":"pink")+"; color: black; padding: 0px 5px;";ConversationalForm.suppressLog||console.log("%c** event flow: %c"+n+"%c flow type: %c"+e+"%c from: %c"+t.constructor.name,"font-weight: 900;",o,"font-weight: 400;",o,"font-weight: 400;",o),i&&(ConversationalForm.suppressLog||console.log("** event flow detail:",i))}},ConversationalForm.startTheConversation=function(t){var e,n,i=!1==!!t.formEl;if(i){if("string"==typeof t){i=!0;var o=JSON.parse(t);n=o.options,e=o.tags}else n=t.options,e=t.tags;var r=cf.TagsParser.parseJSONIntoElements(e);n.formEl=r}else n=t;return new cf.ConversationalForm(n)},ConversationalForm.autoStartTheConversation=function(){if(!cf.ConversationalForm.hasAutoInstantiated){var t=document.querySelectorAll("form[cf-form]");0===t.length&&(t=document.querySelectorAll("form[cf-form-element]"));var e=document.querySelectorAll("*[cf-context]");if(t&&t.length>0){for(var n=0;n<t.length;n++){var i=t[n],o=e[n];cf.ConversationalForm.startTheConversation({formEl:i,context:o})}cf.ConversationalForm.hasAutoInstantiated=!0}}},ConversationalForm.animationsEnabled=!0,ConversationalForm.illustrateAppFlow=!0,ConversationalForm.suppressLog=!0,ConversationalForm.hasAutoInstantiated=!1,ConversationalForm}();cf_1.ConversationalForm=ConversationalForm}(cf||(cf={})),"complete"==document.readyState?setTimeout(function(){return cf.ConversationalForm.autoStartTheConversation()},0):window.addEventListener("load",function(){cf.ConversationalForm.autoStartTheConversation()},!1),function(t){try{!function(t){t.fn.conversationalForm=function(t){if(t=t||{},t.formEl||(t.formEl=this[0]),!t.context){var e=document.querySelectorAll("*[cf-context]");e[0]&&(t.context=e[0])}return new cf.ConversationalForm(t)}}(jQuery)}catch(t){}}(),function(t,e){__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(2)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(n){return t.conversationalform=e(n)}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}(window,function(t){return cf.ConversationalForm||t})}).call(exports,__webpack_require__(14).setImmediate,__webpack_require__(0))}
1,function(t,e,n){n(4),t.exports=n(18)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){var e=n(0),i=(n.n(e),n(5),n(8)),o=n(10),r=n(12),s=n(13),a=n(17),l=new i.a({common:o.a,home:r.a,pageContact:s.a,postTypeArchiveTeam:a.a});t(document).ready(function(){return l.loadEvents()})}.call(e,n(0))},function(t,e,n){"use strict";var i=n(6);n.n(i)},function(t,e,n){/*!
2  * Bootstrap v4.0.0 (https://getbootstrap.com)
3  * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5  */
6!function(t,i){i(e,n(0),n(7))}(0,function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(){return r=Object.assign||function(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=e[n];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},r.apply(this,arguments)}function s(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var a=function(t){function e(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(){return{bindType:s.end,delegateType:s.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}}function i(){return("undefined"==typeof window||!window.QUnit)&&{end:"transitionend"}}function o(e){var n=this,i=!1;return t(this).one(a.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||a.triggerTransitionEnd(n)},e),this}function r(e){return e="function"==typeof t.escapeSelector?t.escapeSelector(e).substr(1):e.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1")}var s=!1,a={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(e){var n=e.getAttribute("data-target");n&&"#"!==n||(n=e.getAttribute("href")||""),"#"===n.charAt(0)&&(n=r(n));try{return t(document).find(n).length>0?n:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger(s.end)},supportsTransitionEnd:function(){return Boolean(s)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,n,i){for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)){var r=i[o],s=n[o],l=s&&a.isElement(s)?"element":e(s);if(!new RegExp(r).test(l))throw new Error(t.toUpperCase()+': Option "'+o+'" provided type "'+l+'" but expected type "'+r+'".')}}};return function(){s=i(),t.fn.emulateTransitionEnd=o,a.supportsTransitionEnd()&&(t.event.special[a.TRANSITION_END]=n())}(),a}(e),l=function(t){var e="alert",n=t.fn[e],i={DISMISS:'[data-dismiss="alert"]'},r={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},s={ALERT:"alert",FADE:"fade",SHOW:"show"},l=function(){function e(t){this._element=t}var n=e.prototype;return n.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){t.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(e){var n=a.getSelectorFromElement(e),i=!1;return n&&(i=t(n)[0]),i||(i=t(e).closest("."+s.ALERT)[0]),i},n._triggerCloseEvent=function(e){var n=t.Event(r.CLOSE);return t(e).trigger(n),n},n._removeElement=function(e){var n=this;if(t(e).removeClass(s.SHOW),!a.supportsTransitionEnd()||!t(e).hasClass(s.FADE))return void this._destroyElement(e);t(e).one(a.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(150)},n._destroyElement=function(e){t(e).detach().trigger(r.CLOSED).remove()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data("bs.alert");o||(o=new e(this),i.data("bs.alert",o)),"close"===n&&o[n](this)})},e._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(e,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),e}();return t(document).on(r.CLICK_DATA_API,i.DISMISS,l._handleDismiss(new l)),t.fn[e]=l._jQueryInterface,t.fn[e].Constructor=l,t.fn[e].noConflict=function(){return t.fn[e]=n,l._jQueryInterface},l}(e),c=function(t){var e="button",n=t.fn[e],i={ACTIVE:"active",BUTTON:"bt
6n",FOCUS:"focus"},r={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},s={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},a=function(){function e(t){this._element=t}var n=e.prototype;return n.toggle=function(){var e=!0,n=!0,o=t(this._element).closest(r.DATA_TOGGLE)[0];if(o){var s=t(this._element).find(r.INPUT)[0];if(s){if("radio"===s.type)if(s.checked&&t(this._element).hasClass(i.ACTIVE))e=!1;else{var a=t(o).find(r.ACTIVE)[0];a&&t(a).removeClass(i.ACTIVE)}if(e){if(s.hasAttribute("disabled")||o.hasAttribute("disabled")||s.classList.contains("disabled")||o.classList.contains("disabled"))return;s.checked=!t(this._element).hasClass(i.ACTIVE),t(s).trigger("change")}s.focus(),n=!1}}n&&this._element.setAttribute("aria-pressed",!t(this._element).hasClass(i.ACTIVE)),e&&t(this._element).toggleClass(i.ACTIVE)},n.dispose=function(){t.removeData(this._element,"bs.button"),this._element=null},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data("bs.button");i||(i=new e(this),t(this).data("bs.button",i)),"toggle"===n&&i[n]()})},o(e,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),e}();return t(document).on(s.CLICK_DATA_API,r.DATA_TOGGLE_CARROT,function(e){e.preventDefault();var n=e.target;t(n).hasClass(i.BUTTON)||(n=t(n).closest(r.BUTTON)),a._jQueryInterface.call(t(n),"toggle")}).on(s.FOCUS_BLUR_DATA_API,r.DATA_TOGGLE_CARROT,function(e){var n=t(e.target).closest(r.BUTTON)[0];t(n).toggleClass(i.FOCUS,/^focus(in)?$/.test(e.type))}),t.fn[e]=a._jQueryInterface,t.fn[e].Constructor=a,t.fn[e].noConflict=function(){return t.fn[e]=n,a._jQueryInterface},a}(e),u=function(t){var e="carousel",n="bs.carousel",i="."+n,s=t.fn[e],l={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},c={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},u={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},h={SLIDE:"slide"+i,SLID:"slid"+i,KEYDOWN:"keydown"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i,TOUCHEND:"touchend"+i,LOAD_DATA_API:"load.bs.carousel.data-api",CLICK_DATA_API:"click.bs.carousel.data-api"},p={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},d={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},f=function(){function s(e,n){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(d.INDICATORS)[0],this._addEventListeners()}var f=s.prototype;return f.next=function(){this._isSliding||this._slide(u.NEXT)},f.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},f.prev=function(){this._isSliding||this._slide(u.PREV)},f.pause=function(e){e||(this._isPaused=!0),t(this._element).find(d.NEXT_PREV)[0]&&a.supportsTransitionEnd()&&(a.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},f.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},f.to=function(e){var n=this;this._activeElement=t(this._element).find(d.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0)){if(this._isSliding)return void t(this._element).one(h.SLID,function(){return n.to(e)});if(i===e)return this.pause(),void this.cycle();var o=e>i?u.NEXT:u.PREV;this._slide(o,this._items[e])}},f.dispose=function(){t(this._element).off(i),t.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},f._getConfig=function(t){return t=r({},l,t),a.typeCheckConfig(e,t,c),t},f._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(h.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(h.MOUSEENTER,function(t){return e.pause(t)}).on(h.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(h.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},f._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},f._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(d.ITEM)),this._items.indexOf(e)},f._getItemByDirection=function(t,e){var n=t===u.NEXT,i=t===u.PREV,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=t===u.PREV?-1:1,a=(o+s)%this._items.length;return-1===a?this._items[this._items.length-1]:this._items[a]},f._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),o=this._getItemIndex(t(this._element).find(d.A
6CTIVE_ITEM)[0]),r=t.Event(h.SLIDE,{relatedTarget:e,direction:n,from:o,to:i});return t(this._element).trigger(r),r},f._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(d.ACTIVE).removeClass(p.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(p.ACTIVE)}},f._slide=function(e,n){var i,o,r,s=this,l=t(this._element).find(d.ACTIVE_ITEM)[0],c=this._getItemIndex(l),f=n||l&&this._getItemByDirection(e,l),m=this._getItemIndex(f),g=Boolean(this._interval);if(e===u.NEXT?(i=p.LEFT,o=p.NEXT,r=u.LEFT):(i=p.RIGHT,o=p.PREV,r=u.RIGHT),f&&t(f).hasClass(p.ACTIVE))return void(this._isSliding=!1);if(!this._triggerSlideEvent(f,r).isDefaultPrevented()&&l&&f){this._isSliding=!0,g&&this.pause(),this._setActiveIndicatorElement(f);var v=t.Event(h.SLID,{relatedTarget:f,direction:r,from:c,to:m});a.supportsTransitionEnd()&&t(this._element).hasClass(p.SLIDE)?(t(f).addClass(o),a.reflow(f),t(l).addClass(i),t(f).addClass(i),t(l).one(a.TRANSITION_END,function(){t(f).removeClass(i+" "+o).addClass(p.ACTIVE),t(l).removeClass(p.ACTIVE+" "+o+" "+i),s._isSliding=!1,setTimeout(function(){return t(s._element).trigger(v)},0)}).emulateTransitionEnd(600)):(t(l).removeClass(p.ACTIVE),t(f).addClass(p.ACTIVE),this._isSliding=!1,t(this._element).trigger(v)),g&&this.cycle()}},s._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),o=r({},l,t(this).data());"object"==typeof e&&(o=r({},o,e));var a="string"==typeof e?e:o.slide;if(i||(i=new s(this,o),t(this).data(n,i)),"number"==typeof e)i.to(e);else if("string"==typeof a){if(void 0===i[a])throw new TypeError('No method named "'+a+'"');i[a]()}else o.interval&&(i.pause(),i.cycle())})},s._dataApiClickHandler=function(e){var i=a.getSelectorFromElement(this);if(i){var o=t(i)[0];if(o&&t(o).hasClass(p.CAROUSEL)){var l=r({},t(o).data(),t(this).data()),c=this.getAttribute("data-slide-to");c&&(l.interval=!1),s._jQueryInterface.call(t(o),l),c&&t(o).data(n).to(c),e.preventDefault()}}},o(s,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return l}}]),s}();return t(document).on(h.CLICK_DATA_API,d.DATA_SLIDE,f._dataApiClickHandler),t(window).on(h.LOAD_DATA_API,function(){t(d.DATA_RIDE).each(function(){var e=t(this);f._jQueryInterface.call(e,e.data())})}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=s,f._jQueryInterface},f}(e),h=function(t){var e="collapse",n="bs.collapse",i=t.fn[e],s={toggle:!0,parent:""},l={toggle:"boolean",parent:"(string|element)"},c={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},u={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},h={WIDTH:"width",HEIGHT:"height"},p={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},d=function(){function i(e,n){var i=this;this._isTransitioning=!1,this._element=e,this._config=this._getConfig(n),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var o=t(p.DATA_TOGGLE),r=0;r<o.length;r++){var s=o[r],l=a.getSelectorFromElement(s);null!==l&&t(l).filter(e).length>0&&(i._selector=l,i._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var d=i.prototype;return d.toggle=function(){t(this._element).hasClass(u.SHOW)?this.hide():this.show()},d.show=function(){var e=this;if(!this._isTransitioning&&!t(this._element).hasClass(u.SHOW)){var o,r;if(this._parent&&(o=t.makeArray(t(this._parent).find(p.ACTIVES).filter('[data-parent="'+this._config.parent+'"]')),0===o.length&&(o=null)),!(o&&(r=t(o).not(this._selector).data(n))&&r._isTransitioning)){var s=t.Event(c.SHOW);if(t(this._element).trigger(s),!s.isDefaultPrevented()){o&&(i._jQueryInterface.call(t(o).not(this._selector),"hide"),r||t(o).data(n,null));var l=this._getDimension();t(this._element).removeClass(u.COLLAPSE).addClass(u.COLLAPSING),this._element.style[l]=0,this._triggerArray.length>0&&t(this._triggerArray).removeClass(u.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var h=function(){t(e._element).removeClass(u.COLLAPSING).addClass(u.COLLAPSE).addClass(u.
6SHOW),e._element.style[l]="",e.setTransitioning(!1),t(e._element).trigger(c.SHOWN)};if(!a.supportsTransitionEnd())return void h();var d=l[0].toUpperCase()+l.slice(1),f="scroll"+d;t(this._element).one(a.TRANSITION_END,h).emulateTransitionEnd(600),this._element.style[l]=this._element[f]+"px"}}}},d.hide=function(){var e=this,n=this;if(!this._isTransitioning&&t(this._element).hasClass(u.SHOW)){var i=t.Event(c.HIDE);if(t(this._element).trigger(i),!i.isDefaultPrevented()){var o=this._getDimension();if(this._element.style[o]=this._element.getBoundingClientRect()[o]+"px",a.reflow(this._element),t(this._element).addClass(u.COLLAPSING).removeClass(u.COLLAPSE).removeClass(u.SHOW),this._triggerArray.length>0)for(var r=0;r<this._triggerArray.length;r++){var s=e._triggerArray[r],l=a.getSelectorFromElement(s);if(null!==l){var h=t(l);h.hasClass(u.SHOW)||t(s).addClass(u.COLLAPSED).attr("aria-expanded",!1)}}this.setTransitioning(!0);var p=function(){n.setTransitioning(!1),t(n._element).removeClass(u.COLLAPSING).addClass(u.COLLAPSE).trigger(c.HIDDEN)};if(this._element.style[o]="",!a.supportsTransitionEnd())return void p();t(this._element).one(a.TRANSITION_END,p).emulateTransitionEnd(600)}}},d.setTransitioning=function(t){this._isTransitioning=t},d.dispose=function(){t.removeData(this._element,n),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},d._getConfig=function(t){return t=r({},s,t),t.toggle=Boolean(t.toggle),a.typeCheckConfig(e,t,l),t},d._getDimension=function(){return t(this._element).hasClass(h.WIDTH)?h.WIDTH:h.HEIGHT},d._getParent=function(){var e=this,n=null;a.isElement(this._config.parent)?(n=this._config.parent,void 0!==this._config.parent.jquery&&(n=this._config.parent[0])):n=t(this._config.parent)[0];var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(o).each(function(t,n){e._addAriaAndCollapsedClass(i._getTargetFromElement(n),[n])}),n},d._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(u.SHOW);n.length>0&&t(n).toggleClass(u.COLLAPSED,!i).attr("aria-expanded",i)}},i._getTargetFromElement=function(e){var n=a.getSelectorFromElement(e);return n?t(n)[0]:null},i._jQueryInterface=function(e){return this.each(function(){var o=t(this),a=o.data(n),l=r({},s,o.data(),"object"==typeof e&&e);if(!a&&l.toggle&&/show|hide/.test(e)&&(l.toggle=!1),a||(a=new i(this,l),o.data(n,a)),"string"==typeof e){if(void 0===a[e])throw new TypeError('No method named "'+e+'"');a[e]()}})},o(i,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return s}}]),i}();return t(document).on(c.CLICK_DATA_API,p.DATA_TOGGLE,function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var i=t(this),o=a.getSelectorFromElement(this);t(o).each(function(){var e=t(this),o=e.data(n),r=o?"toggle":i.data();d._jQueryInterface.call(e,r)})}),t.fn[e]=d._jQueryInterface,t.fn[e].Constructor=d,t.fn[e].noConflict=function(){return t.fn[e]=i,d._jQueryInterface},d}(e),p=function(t){var e="dropdown",i="bs.dropdown",s="."+i,l=t.fn[e],c=new RegExp("38|40|27"),u={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,CLICK:"click"+s,CLICK_DATA_API:"click.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api",KEYUP_DATA_API:"keyup.bs.dropdown.data-api"},h={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",DROPRIGHT:"dropright",DROPLEFT:"dropleft",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",POSITION_STATIC:"position-static"},p={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled)"},d={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end",RIGHT:"right-start",RIGHTEND:"right-end",LEFT:"left-start",LEFTEND:"left-end"},f={offset:0,flip:!0,boundary:"scrollParent"},m={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)"},g=function(){function l(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var g=l.prototype;return g.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(h.DISABLED)){var e=l._getParentFromElement(this._element),i=t(this._menu).hasClass(h.SHOW);if(l._clearMenus(),!i){var o={relatedTarget:this._element},r=t.Event(u.SHOW,o);
6if(t(e).trigger(r),!r.isDefaultPrevented()){if(!this._inNavbar){if(void 0===n)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var s=this._element;t(e).hasClass(h.DROPUP)&&(t(this._menu).hasClass(h.MENULEFT)||t(this._menu).hasClass(h.MENURIGHT))&&(s=e),"scrollParent"!==this._config.boundary&&t(e).addClass(h.POSITION_STATIC),this._popper=new n(s,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(e).closest(p.NAVBAR_NAV).length&&t("body").children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(h.SHOW),t(e).toggleClass(h.SHOW).trigger(t.Event(u.SHOWN,o))}}}},g.dispose=function(){t.removeData(this._element,i),t(this._element).off(s),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},g.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},g._addEventListeners=function(){var e=this;t(this._element).on(u.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},g._getConfig=function(n){return n=r({},this.constructor.Default,t(this._element).data(),n),a.typeCheckConfig(e,n,this.constructor.DefaultType),n},g._getMenuElement=function(){if(!this._menu){var e=l._getParentFromElement(this._element);this._menu=t(e).find(p.MENU)[0]}return this._menu},g._getPlacement=function(){var e=t(this._element).parent(),n=d.BOTTOM;return e.hasClass(h.DROPUP)?(n=d.TOP,t(this._menu).hasClass(h.MENURIGHT)&&(n=d.TOPEND)):e.hasClass(h.DROPRIGHT)?n=d.RIGHT:e.hasClass(h.DROPLEFT)?n=d.LEFT:t(this._menu).hasClass(h.MENURIGHT)&&(n=d.BOTTOMEND),n},g._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},g._getPopperConfig=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset,{placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i),o="object"==typeof e?e:null;if(n||(n=new l(this,o),t(this).data(i,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},l._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=t.makeArray(t(p.DATA_TOGGLE)),o=0;o<n.length;o++){var r=l._getParentFromElement(n[o]),s=t(n[o]).data(i),a={relatedTarget:n[o]};if(s){var c=s._menu;if(t(r).hasClass(h.SHOW)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&t.contains(r,e.target))){var d=t.Event(u.HIDE,a);t(r).trigger(d),d.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),n[o].setAttribute("aria-expanded","false"),t(c).removeClass(h.SHOW),t(r).removeClass(h.SHOW).trigger(t.Event(u.HIDDEN,a)))}}}},l._getParentFromElement=function(e){var n,i=a.getSelectorFromElement(e);return i&&(n=t(i)[0]),n||e.parentNode},l._dataApiKeydownHandler=function(e){if((/input|textarea/i.test(e.target.tagName)?!(32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||t(e.target).closest(p.MENU).length)):c.test(e.which))&&(e.preventDefault(),e.stopPropagation(),!this.disabled&&!t(this).hasClass(h.DISABLED))){var n=l._getParentFromElement(this),i=t(n).hasClass(h.SHOW);if(!i&&(27!==e.which||32!==e.which)||i&&(27===e.which||32===e.which)){if(27===e.which){var o=t(n).find(p.DATA_TOGGLE)[0];t(o).trigger("focus")}return void t(this).trigger("click")}var r=t(n).find(p.VISIBLE_ITEMS).get();if(0!==r.length){var s=r.indexOf(e.target);38===e.which&&s>0&&s--,40===e.which&&s<r.length-1&&s++,s<0&&(s=0),r[s].focus()}}},o(l,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return f}},{key:"DefaultType",get:function(){return m}}]),l}();return t(document).on(u.KEYDOWN_DATA_API,p.DATA_TOGGLE,g._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,p.MENU,g._dataApiKeydownHandler).on(u.CLICK_DATA_API+" "+u.KEYUP_DATA_API,g._clearMenus).on(u.CLICK_DATA_API,p.DATA_TOGGLE,function(e){e.preventDefault(),e.stopPropagation(),g._jQueryInterface.call(t(this),"toggle")}).on(u.CLICK_DATA_API,p.FORM_CHILD,function(t){t.stopPropagation()}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=l,g._jQueryInterface},g}(e),d=function(t){var e="modal",n=".bs.modal",i=t.fn[e],s={backdrop:!0,keyboard:!0,focus:!0,show:!0},l={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},c={HIDE:"hide.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},u={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},h={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},p=function(){function i(e,n){this._config=this._getConfig(n),this._element=e,this._dialog=t
vendor: 11,133 bytes, line 6
6(e).find(h.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}var p=i.prototype;return p.toggle=function(t){return this._isShown?this.hide():this.show(t)},p.show=function(e){var n=this;if(!this._isTransitioning&&!this._isShown){a.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE)&&(this._isTransitioning=!0);var i=t.Event(c.SHOW,{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),t(document.body).addClass(u.OPEN),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(c.CLICK_DISMISS,h.DATA_DISMISS,function(t){return n.hide(t)}),t(this._dialog).on(c.MOUSEDOWN_DISMISS,function(){t(n._element).one(c.MOUSEUP_DISMISS,function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(e)}))}},p.hide=function(e){var n=this;if(e&&e.preventDefault(),!this._isTransitioning&&this._isShown){var i=t.Event(c.HIDE);if(t(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var o=a.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE);o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off(c.FOCUSIN),t(this._element).removeClass(u.SHOW),t(this._element).off(c.CLICK_DISMISS),t(this._dialog).off(c.MOUSEDOWN_DISMISS),o?t(this._element).one(a.TRANSITION_END,function(t){return n._hideModal(t)}).emulateTransitionEnd(300):this._hideModal()}}},p.dispose=function(){t.removeData(this._element,"bs.modal"),t(window,document,this._element,this._backdrop).off(n),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},p.handleUpdate=function(){this._adjustDialog()},p._getConfig=function(t){return t=r({},s,t),a.typeCheckConfig(e,t,l),t},p._showElement=function(e){var n=this,i=a.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&a.reflow(this._element),t(this._element).addClass(u.SHOW),this._config.focus&&this._enforceFocus();var o=t.Event(c.SHOWN,{relatedTarget:e}),r=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,t(n._element).trigger(o)};i?t(this._dialog).one(a.TRANSITION_END,r).emulateTransitionEnd(300):r()},p._enforceFocus=function(){var e=this;t(document).off(c.FOCUSIN).on(c.FOCUSIN,function(n){document!==n.target&&e._element!==n.target&&0===t(e._element).has(n.target).length&&e._element.focus()})},p._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(c.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||t(this._element).off(c.KEYDOWN_DISMISS)},p._setResizeEvent=function(){var e=this;this._isShown?t(window).on(c.RESIZE,function(t){return e.handleUpdate(t)}):t(window).off(c.RESIZE)},p._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass(u.OPEN),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(c.HIDDEN)})},p._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},p._showBackdrop=function(e){var n=this,i=t(this._element).hasClass(u.FADE)?u.FADE:"";if(this._isShown&&this._config.backdrop){var o=a.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=u.BACKDROP,i&&t(this._backdrop).addClass(i),t(this._backdrop).appendTo(document.body),t(this._element).on(c.CLICK_DISMISS,function(t){if(n._ignoreBackdropClick)return void(n._ignoreBackdropClick=!1);t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide())}),o&&a.reflow(this._backdrop),t(this._backdrop).addClass(u.SHOW),!e)return;if(!o)return void e();t(this._backdrop).one(a.TRANSITION_END,e).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(u.SHOW);var r=function(){n._removeBackdrop(),e&&e()};a.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE)?t(this._backdrop).one(a.TRANSITION_END,r).emulateTransitionEnd(150):r()}else e&&e()},p._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},p._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},p._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},p._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){t(h.FIXED_CONTENT).each(function(n,i){var o=t(i)[0].style.paddingRight,r=t(i).css("padding-right");t(i).data("padding-right",o).css("padding-right",parseFloat(r)+e._scrollbarWidth+"px")}),t(h.STICKY_CONTENT).each(function(n,i){var o=t(i)[0].style.marginRight,r=t(i).css("margin-right");t(i).data("margin-right",o).css("margin-right",parseFloat(r)-e._scrollbarWidth+"px")}),t(h.NAVBAR_TOGGLER).each(function(n,i){var o=t(i)[0].style.marginRight,r=t(i).css("margin-right");t(i).data("margin-right",o).css("margin-right",parseFloat(r)+e._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=t("body").css("padding-right");t("body").data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},p._resetScrollbar=function(){t(h.FIXED_CONTENT).each(function(e,n){var i=t(n).data("padding-right");void 0!==i&&t(n).css("padding-right",i).removeData("padding-right")}),t(h.STICKY_CONTENT+", "+h.NAVBAR_TOGGLER).each(function(e,n){var i=t(n).data("margin-right");void 0!==i&&t(n).css("margin-right",i).removeData("margin-right")});var e=t("body").data("padding-right");void 0!==e&&t("body").css("padding-right",e).removeData("padding-right")},p._getScrollbarWidth=function(){var t=document.createElement("div");t.className=u.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},i._jQueryInterface=function(e,n){return this.each(function(){var o=t(this).data("bs.modal"),s=r({},i.Default,t(this).data(),"object"==typeof e&&e);if(o||(o=new i(this,s),t(this).data("bs.modal",o)),"string"==typeof e){if(void 0===o[e])throw new TypeError('No method named "'+e+'"');o[e](n)}else s.show&&o.show(n)})},o(i,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return s}}]),i}();return t(document).on(c.CLICK_DATA_API,h.DATA_TOGGLE,function(e){var n,i=this,o=a.getSelectorFromElement(this);o&&(n=t(o)[0]);var s=t(n).data("bs.modal")?"toggle":r({},t(n).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var l=t(n).one(c.SHOW,function(e){e.isDefaultPrevented()||l.one(c.HIDDEN,function(){t(i).is(":visible")&&i.focus()})});p._jQueryInterface.call(t(n),s,this)}),t.fn[e]=p._jQueryInterface,t.fn[e].Constructor=p,t.fn[e].noConflict=function(){return t.fn[e]=i,p._jQueryInterface},p}(e),f=function(t){var e="tooltip",i=".bs.tooltip",s=t.fn[e],l=new RegExp("(^|\\s)bs-tooltip\\S+","g"),c={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"},u={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},h={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},p={SHOW:"show",OUT:"out"},d={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},f={FADE:"fade",SHOW:"show"},m={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},g={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},v=function(){function s(t,e){if(void 0===n)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var v=s.prototype;return v.enable=function(){this._isEnabled=!0},v.disable=function(){this._isEnabled=!1},v.toggleEnabled=function(){this._isEnabled=!this._isEnabled},v.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(f.SHOW))return void this._leave(null,this);this._enter(null,this)}},v.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},v.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var i=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(i);var o=t.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!o)return;var r=this.getTipElement(),l=a.getUID(this.constructor.NAME);r.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&t(r).addClass(f.FADE);var c="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,u=this._getAttachment(c);this.addAttachmentClass(u);var h=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(h),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,{placement:u,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:m.ARROW}
6,preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(r).addClass(f.SHOW),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var d=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===p.OUT&&e._leave(null,e)};a.supportsTransitionEnd()&&t(this.tip).hasClass(f.FADE)?t(this.tip).one(a.TRANSITION_END,d).emulateTransitionEnd(s._TRANSITION_DURATION):d()}},v.hide=function(e){var n=this,i=this.getTipElement(),o=t.Event(this.constructor.Event.HIDE),r=function(){n._hoverState!==p.SHOW&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(o),o.isDefaultPrevented()||(t(i).removeClass(f.SHOW),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[g.CLICK]=!1,this._activeTrigger[g.FOCUS]=!1,this._activeTrigger[g.HOVER]=!1,a.supportsTransitionEnd()&&t(this.tip).hasClass(f.FADE)?t(i).one(a.TRANSITION_END,r).emulateTransitionEnd(150):r(),this._hoverState="")},v.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},v.isWithContent=function(){return Boolean(this.getTitle())},v.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},v.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},v.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m.TOOLTIP_INNER),this.getTitle()),e.removeClass(f.FADE+" "+f.SHOW)},v.setElementContent=function(e,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[i?"html":"text"](n)},v.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},v._getAttachment=function(t){return u[t.toUpperCase()]},v._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==g.MANUAL){var i=n===g.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,o=n===g.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(o,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},v._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},v._enter=function(e,n){var i=this.constructor.DATA_KEY;return n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?g.FOCUS:g.HOVER]=!0),t(n.getTipElement()).hasClass(f.SHOW)||n._hoverState===p.SHOW?void(n._hoverState=p.SHOW):(clearTimeout(n._timeout),n._hoverState=p.SHOW,n.config.delay&&n.config.delay.show?void(n._timeout=setTimeout(function(){n._hoverState===p.SHOW&&n.show()},n.config.delay.show)):void n.show())},v._leave=function(e,n){var i=this.constructor.DATA_KEY;if(n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?g.FOCUS:g.HOVER]=!1),!n._isWithActiveTrigger()){if(clearTimeout(n._timeout),n._hoverState=p.OUT,!n.config.delay||!n.config.delay.hide)return void n.hide();n._timeout=setTimeout(function(){n._hoverState===p.OUT&&n.hide()},n.config.delay.hide)}},v._isWithActiveTrigger=function(){var t=this;for(var e in t._activeTrigger)if(t._activeTrigger[e])return!0;return!1},v._getConfig=function(n){return n=r({},this.constructor.Default,t(this.element).data(),n),"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),a.typeCheckConfig(e,n,this.constructor.DefaultType),n},v._getDelegateConfig=function(){var t=this,e={};if(this.config)for(var n in t.config)t.constructor.Default[n]!==t.config[n]&&(e[n]=t.config[n]);return e},v._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(l);null!==n&&n.length>0&&e.removeClass(n.join(""))},v._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},v._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(f.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},s._jQueryInterface=function(e){return this.each(function(){var n=t(this).data("bs.tooltip"),i="object"==typeof e&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new s(this,i),t(this).data("bs.tooltip",n)),"string"==typeof e)){if(void 0===n[e])throw new TypeError('No method n
6amed "'+e+'"');n[e]()}})},o(s,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return h}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return d}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return c}}]),s}();return t.fn[e]=v._jQueryInterface,t.fn[e].Constructor=v,t.fn[e].noConflict=function(){return t.fn[e]=s,v._jQueryInterface},v}(e),m=function(t){var e="popover",n=".bs.popover",i=t.fn[e],a=new RegExp("(^|\\s)bs-popover\\S+","g"),l=r({},f.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),c=r({},f.DefaultType,{content:"(string|element|function)"}),u={FADE:"fade",SHOW:"show"},h={TITLE:".popover-header",CONTENT:".popover-body"},p={HIDE:"hide"+n,HIDDEN:"hidden"+n,SHOW:"show"+n,SHOWN:"shown"+n,INSERTED:"inserted"+n,CLICK:"click"+n,FOCUSIN:"focusin"+n,FOCUSOUT:"focusout"+n,MOUSEENTER:"mouseenter"+n,MOUSELEAVE:"mouseleave"+n},d=function(i){function r(){return i.apply(this,arguments)||this}s(r,i);var d=r.prototype;return d.isWithContent=function(){return this.getTitle()||this._getContent()},d.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},d.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},d.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(h.TITLE),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(h.CONTENT),n),e.removeClass(u.FADE+" "+u.SHOW)},d._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},d._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},r._jQueryInterface=function(e){return this.each(function(){var n=t(this).data("bs.popover"),i="object"==typeof e?e:null;if((n||!/destroy|hide/.test(e))&&(n||(n=new r(this,i),t(this).data("bs.popover",n)),"string"==typeof e)){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},o(r,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return n}},{key:"DefaultType",get:function(){return c}}]),r}(f);return t.fn[e]=d._jQueryInterface,t.fn[e].Constructor=d,t.fn[e].noConflict=function(){return t.fn[e]=i,d._jQueryInterface},d}(e),g=function(t){var e="scrollspy",n=t.fn[e],i={offset:10,method:"auto",target:""},s={offset:"number",method:"string",target:"(string|element)"},l={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},c={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},u={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},h={OFFSET:"offset",POSITION:"position"},p=function(){function n(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" "+u.NAV_LINKS+","+this._config.target+" "+u.LIST_ITEMS+","+this._config.target+" "+u.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(l.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var p=n.prototype;return p.refresh=function(){var e=this,n=this._scrollElement===this._scrollElement.window?h.OFFSET:h.POSITION,i="auto"===this._config.method?n:this._config.method,o=i===h.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n,r=a.getSelectorFromElement(e);
6if(r&&(n=t(r)[0]),n){var s=n.getBoundingClientRect();if(s.width||s.height)return[t(n)[i]().top+o,r]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},p.dispose=function(){t.removeData(this._element,"bs.scrollspy"),t(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},p._getConfig=function(n){if(n=r({},i,n),"string"!=typeof n.target){var o=t(n.target).attr("id");o||(o=a.getUID(e),t(n.target).attr("id",o)),n.target="#"+o}return a.typeCheckConfig(e,n,s),n},p._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},p._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},p._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},p._process=function(){var t=this,e=this._getScrollTop()+this._config.offset,n=this._getScrollHeight(),i=this._config.offset+n-this._getOffsetHeight();if(this._scrollHeight!==n&&this.refresh(),e>=i){var o=this._targets[this._targets.length-1];return void(this._activeTarget!==o&&this._activate(o))}if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){t._activeTarget!==t._targets[r]&&e>=t._offsets[r]&&(void 0===t._offsets[r+1]||e<t._offsets[r+1])&&t._activate(t._targets[r])}},p._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",");n=n.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var i=t(n.join(","));i.hasClass(c.DROPDOWN_ITEM)?(i.closest(u.DROPDOWN).find(u.DROPDOWN_TOGGLE).addClass(c.ACTIVE),i.addClass(c.ACTIVE)):(i.addClass(c.ACTIVE),i.parents(u.NAV_LIST_GROUP).prev(u.NAV_LINKS+", "+u.LIST_ITEMS).addClass(c.ACTIVE),i.parents(u.NAV_LIST_GROUP).prev(u.NAV_ITEMS).children(u.NAV_LINKS).addClass(c.ACTIVE)),t(this._scrollElement).trigger(l.ACTIVATE,{relatedTarget:e})},p._clear=function(){t(this._selector).filter(u.ACTIVE).removeClass(c.ACTIVE)},n._jQueryInterface=function(e){return this.each(function(){var i=t(this).data("bs.scrollspy"),o="object"==typeof e&&e;if(i||(i=new n(this,o),t(this).data("bs.scrollspy",i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},o(n,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return i}}]),n}();return t(window).on(l.LOAD_DATA_API,function(){for(var e=t.makeArray(t(u.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);p._jQueryInterface.call(i,i.data())}}),t.fn[e]=p._jQueryInterface,t.fn[e].Constructor=p,t.fn[e].noConflict=function(){return t.fn[e]=n,p._jQueryInterface},p}(e),v=function(t){var e=t.fn.tab,n={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},i={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},r={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},s=function(){function e(t){this._element=t}var s=e.prototype;return s.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(i.ACTIVE)||t(this._element).hasClass(i.DISABLED))){var o,s,l=t(this._element).closest(r.NAV_LIST_GROUP)[0],c=a.getSelectorFromElement(this._element);if(l){var u="UL"===l.nodeName?r.ACTIVE_UL:r.ACTIVE;s=t.makeArray(t(l).find(u)),s=s[s.length-1]}var h=t.Event(n.HIDE,{relatedTarget:this._element}),p=t.Event(n.SHOW,{relatedTarget:s});if(s&&t(s).trigger(h),t(this._element).trigger(p),!p.isDefaultPrevented()&&!h.isDefaultPrevented()){c&&(o=t(c)[0]),this._activate(this._element,l);var d=function(){var i=t.Event(n.HIDDEN,{relatedTarget:e._element}
6),o=t.Event(n.SHOWN,{relatedTarget:s});t(s).trigger(i),t(e._element).trigger(o)};o?this._activate(o,o.parentNode,d):d()}}},s.dispose=function(){t.removeData(this._element,"bs.tab"),this._element=null},s._activate=function(e,n,o){var s,l=this;s="UL"===n.nodeName?t(n).find(r.ACTIVE_UL):t(n).children(r.ACTIVE);var c=s[0],u=o&&a.supportsTransitionEnd()&&c&&t(c).hasClass(i.FADE),h=function(){return l._transitionComplete(e,c,o)};c&&u?t(c).one(a.TRANSITION_END,h).emulateTransitionEnd(150):h()},s._transitionComplete=function(e,n,o){if(n){t(n).removeClass(i.SHOW+" "+i.ACTIVE);var s=t(n.parentNode).find(r.DROPDOWN_ACTIVE_CHILD)[0];s&&t(s).removeClass(i.ACTIVE),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(t(e).addClass(i.ACTIVE),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),a.reflow(e),t(e).addClass(i.SHOW),e.parentNode&&t(e.parentNode).hasClass(i.DROPDOWN_MENU)){var l=t(e).closest(r.DROPDOWN)[0];l&&t(l).find(r.DROPDOWN_TOGGLE).addClass(i.ACTIVE),e.setAttribute("aria-expanded",!0)}o&&o()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data("bs.tab");if(o||(o=new e(this),i.data("bs.tab",o)),"string"==typeof n){if(void 0===o[n])throw new TypeError('No method named "'+n+'"');o[n]()}})},o(e,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),e}();return t(document).on(n.CLICK_DATA_API,r.DATA_TOGGLE,function(e){e.preventDefault(),s._jQueryInterface.call(t(this),"show")}),t.fn.tab=s._jQueryInterface,t.fn.tab.Constructor=s,t.fn.tab.noConflict=function(){return t.fn.tab=e,s._jQueryInterface},s}(e);!function(t){if(void 0===t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=a,t.Alert=l,t.Button=c,t.Carousel=u,t.Collapse=h,t.Dropdown=p,t.Modal=d,t.Popover=m,t.Scrollspy=g,t.Tab=v,t.Tooltip=f,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){function n(t){var e=!1,n=0,i=document.createElement("span");return new MutationObserver(function(){t(),e=!1}).observe(i,{attributes:!0}),function(){e||(e=!0,i.setAttribute("x-index",n),n+=1)}}function i(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},ct))}}function o(t){var e={};return t&&"[object Function]"===e.toString.call(t)}function r(t,e){if(1!==t.nodeType)return[];var n=window.getComputedStyle(t,null);return e?n[e]:n}function s(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function a(t){if(!t||-1!==["HTML","BODY","#document"].indexOf(t.nodeName))return window.document.body;var e=r(t),n=e.overflow,i=e.overflowX;return/(auto|scroll)/.test(n+e.overflowY+i)?t:a(s(t))}function l(t){var e=t&&t.offsetParent,n=e&&e.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(e.nodeName)&&"static"===r(e,"position")?l(e):e:window.document.documentElement}function c(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||l(t.firstElementChild)===t)}function u(t){return null!==t.parentNode?u(t.parentNode):t}function h(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return window.document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var s=r.commonAncestorContainer;if(t!==s&&e!==s||i.contains(o))return c(s)?s:l(s);var a=u(t);return a.host?h(a.host,e):h(t,u(e).host)}function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var o=window.document.documentElement;return(window.document.scrollingElement||o)[n]}return t[n]}function d(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=p(e,"top"),o=p(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}function f(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return+t["border"+n+"Width"].split("px")[0]+ +t["border"+i+"Width"].split("px")[0]}function m(t,e,n,i){return Math.max(e["offset"+t],n["client"+t],n["offset"+t],ft()?n["offset"+t]+i["margin"+("Height"===t?"Top":"Left")]+i["margin"+("Height"===t?"Bottom":"Right")]:0)}function g(){var t=window.document.body,e=window.document.documentElement,n=ft()&&window.getComputedStyle(e);return{height:m("Height",t,e,n),width:m("Width",t,e,n)}}function v(t){return bt({},t,{right:t.left+t.width,bottom:t.top+t.height})}function b(t){var e={};if(ft())try{e=t.getBoundingClientRect();var n=p(t,"top"),i=p(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}catch(t){}else e=t.getBoundingClientRect();var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},s="HTML"===t.nodeName?g():{},a=s.width||t.clientWidth||o.right-o.left,l=s.height||t.clientHeight||o.bottom-o.top,c=t.offsetWidth-a,u=t.offsetHeight-l;if(c||u){var h=r(t);
vendor: 4,906 bytes, line 6
6c-=f(h,"x"),u-=f(h,"y"),o.width-=c,o.height-=u}return v(o)}function E(t,e){var n=ft(),i="HTML"===e.nodeName,o=b(t),s=b(e),l=a(t),c=r(e),u=+c.borderTopWidth.split("px")[0],h=+c.borderLeftWidth.split("px")[0],p=v({top:o.top-s.top-u,left:o.left-s.left-h,width:o.width,height:o.height});if(p.marginTop=0,p.marginLeft=0,!n&&i){var f=+c.marginTop.split("px")[0],m=+c.marginLeft.split("px")[0];p.top-=u-f,p.bottom-=u-f,p.left-=h-m,p.right-=h-m,p.marginTop=f,p.marginLeft=m}return(n?e.contains(l):e===l&&"BODY"!==l.nodeName)&&(p=d(p,e)),p}function _(t){var e=window.document.documentElement,n=E(t,e),i=Math.max(e.clientWidth,window.innerWidth||0),o=Math.max(e.clientHeight,window.innerHeight||0),r=p(e),s=p(e,"left");return v({top:r-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:o})}function y(t){var e=t.nodeName;return"BODY"!==e&&"HTML"!==e&&("fixed"===r(t,"position")||y(s(t)))}function T(t,e,n,i){var o={top:0,left:0},r=h(t,e);if("viewport"===i)o=_(r);else{var l=void 0;"scrollParent"===i?(l=a(s(t)),"BODY"===l.nodeName&&(l=window.document.documentElement)):l="window"===i?window.document.documentElement:i;var c=E(l,r);if("HTML"!==l.nodeName||y(r))o=c;else{var u=g(),p=u.height,d=u.width;o.top+=c.top-c.marginTop,o.bottom=p+c.top,o.left+=c.left-c.marginLeft,o.right=d+c.left}}return o.left+=n,o.top+=n,o.right-=n,o.bottom-=n,o}function C(t){return t.width*t.height}function w(t,e,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=T(n,i,r,o),a={top:{width:s.width,height:e.top-s.top},right:{width:s.right-e.right,height:s.height},bottom:{width:s.width,height:s.bottom-e.bottom},left:{width:e.left-s.left,height:s.height}},l=Object.keys(a).map(function(t){return bt({key:t},a[t],{area:C(a[t])})}).sort(function(t,e){return e.area-t.area}),c=l.filter(function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight}),u=c.length>0?c[0].key:l[0].key,h=t.split("-")[1];return u+(h?"-"+h:"")}function I(t,e,n){return E(n,h(e,n))}function A(t){var e=window.getComputedStyle(t),n=parseFloat(e.marginTop)+parseFloat(e.marginBottom),i=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function O(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function k(t,e,n){n=n.split("-")[0];var i=A(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),s=r?"top":"left",a=r?"left":"top",l=r?"height":"width",c=r?"width":"height";return o[s]=e[s]+e[l]/2-i[l]/2,o[a]=n===a?e[a]-i[c]:e[O(a)],o}function S(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function L(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var i=S(t,function(t){return t[e]===n});return t.indexOf(i)}function D(t,e,n){return(void 0===n?t:t.slice(0,L(t,"name",n))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&o(n)&&(e.offsets.popper=v(e.offsets.popper),e.offsets.reference=v(e.offsets.reference),e=n(e,t))}),e}function R(){if(!this.state.isDestroyed){var t={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=I(this.state,this.popper,this.reference),t.placement=w(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.offsets.popper=k(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position="absolute",t=D(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function x(t,e){return t.some(function(t){var n=t.name;return t.enabled&&n===e})}function N(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length-1;i++){var o=e[i],r=o?""+o+n:t;if(void 0!==window.document.body.style[r])return r}return null}function F(){return this.state.isDestroyed=!0,x(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[N("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function P(t,e,n,i){var o="BODY"===t.nodeName,r=o?window:t;r.addEventListener(e,n,{passive:!0}),o||P(a(r.parentNode),e,n,i),i.push(r)}function U(t,e,n,i){n.updateBound=i,window.addEventListener("resize",n.updateBound,{passive:!0});var o=a(t);return P(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function M(){this.state.eventsEnabled||(this.state=U(this.reference,this.options,this.state,this.scheduleUpdate))}function B(t,e){return window.removeEventListener("resize",e.updateBound),e.scrollParents.forEac
vendor: 4,424 bytes, line 6
6h(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function H(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=B(this.reference,this.state))}function j(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function V(t,e){Object.keys(e).forEach(function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&j(e[n])&&(i="px"),t.style[n]=e[n]+i})}function W(t,e){Object.keys(e).forEach(function(n){!1!==e[n]?t.setAttribute(n,e[n]):t.removeAttribute(n)})}function G(t){return V(t.instance.popper,t.styles),W(t.instance.popper,t.attributes),t.offsets.arrow&&V(t.arrowElement,t.offsets.arrow),t}function K(t,e,n,i,o){var r=I(o,e,t),s=w(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",s),V(e,{position:"absolute"}),n}function q(t,e){var n=e.x,i=e.y,o=t.offsets.popper,r=S(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==r?r:e.gpuAcceleration,a=l(t.instance.popper),c=b(a),u={position:o.position},h={left:Math.floor(o.left),top:Math.floor(o.top),bottom:Math.floor(o.bottom),right:Math.floor(o.right)},p="bottom"===n?"top":"bottom",d="right"===i?"left":"right",f=N("transform"),m=void 0,g=void 0;if(g="bottom"===p?-c.height+h.bottom:h.top,m="right"===d?-c.width+h.right:h.left,s&&f)u[f]="translate3d("+m+"px, "+g+"px, 0)",u[p]=0,u[d]=0,u.willChange="transform";else{var v="bottom"===p?-1:1,E="right"===d?-1:1;u[p]=g*v,u[d]=m*E,u.willChange=p+", "+d}var _={"x-placement":t.placement};return t.attributes=bt({},_,t.attributes),t.styles=bt({},u,t.styles),t}function z(t,e,n){var i=S(t,function(t){return t.name===e}),o=!!i&&t.some(function(t){return t.name===n&&t.enabled&&t.order<i.order});if(!o){var r="`"+e+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}function Y(t,e){if(!z(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=t.offsets,r=o.popper,s=o.reference,a=-1!==["left","right"].indexOf(i),l=a?"height":"width",c=a?"top":"left",u=a?"left":"top",h=a?"bottom":"right",p=A(n)[l];s[h]-p<r[c]&&(t.offsets.popper[c]-=r[c]-(s[h]-p)),s[c]+p>r[h]&&(t.offsets.popper[c]+=s[c]+p-r[h]);var d=s[c]+s[l]/2-p/2,f=d-v(t.offsets.popper)[c];return f=Math.max(Math.min(r[l]-p,f),0),t.arrowElement=n,t.offsets.arrow={},t.offsets.arrow[c]=Math.round(f),t.offsets.arrow[u]="",t}function Q(t){return"end"===t?"start":"start"===t?"end":t}function X(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=_t.indexOf(t),i=_t.slice(n+1).concat(_t.slice(0,n));return e?i.reverse():i}function Z(t,e){if(x(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=T(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement),i=t.placement.split("-")[0],o=O(i),r=t.placement.split("-")[1]||"",s=[];switch(e.behavior){case yt.FLIP:s=[i,o];break;case yt.CLOCKWISE:s=X(i);break;case yt.COUNTERCLOCKWISE:s=X(i,!0);break;default:s=e.behavior}return s.forEach(function(a,l){if(i!==a||s.length===l+1)return t;i=t.placement.split("-")[0],o=O(i);var c=t.offsets.popper,u=t.offsets.reference,h=Math.floor,p="left"===i&&h(c.right)>h(u.left)||"right"===i&&h(c.left)<h(u.right)||"top"===i&&h(c.bottom)>h(u.top)||"bottom"===i&&h(c.top)<h(u.bottom),d=h(c.left)<h(n.left),f=h(c.right)>h(n.right),m=h(c.top)<h(n.top),g=h(c.bottom)>h(n.bottom),v="left"===i&&d||"right"===i&&f||"top"===i&&m||"bottom"===i&&g,b=-1!==["top","bottom"].indexOf(i),E=!!e.flipVariations&&(b&&"start"===r&&d||b&&"end"===r&&f||!b&&"start"===r&&m||!b&&"end"===r&&g);(p||v||E)&&(t.flipped=!0,(p||v)&&(i=s[l+1]),E&&(r=Q(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=bt({},t.offsets.popper,k(t.instance.popper,t.offsets.reference,t.placement)),t=D(t.instance.modifiers,t,"flip"))}),t}function J(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=M
vendor: 4,329 bytes, line 6
6ath.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]<r(i[l])&&(t.offsets.popper[l]=r(i[l])-n[c]),n[l]>r(i[a])&&(t.offsets.popper[l]=r(i[a])),t}function $(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],s=o[2];if(!r)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=i}return v(a)[e]/100*r}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r}return r}function tt(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),s=t.split(/(\+|\-)/).map(function(t){return t.trim()}),a=s.indexOf(S(s,function(t){return-1!==t.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==a?[s.slice(0,a).concat([s[a].split(l)[0]]),[s[a].split(l)[1]].concat(s.slice(a+1))]:[s];return c=c.map(function(t,i){var o=(1===i?!r:r)?"height":"width",s=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,s=!0,t):s?(t[t.length-1]+=e,s=!1,t):t.concat(e)},[]).map(function(t){return $(t,o,e,n)})}),c.forEach(function(t,e){t.forEach(function(n,i){j(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))})}),o}function et(t,e){var n=e.offset,i=t.placement,o=t.offsets,r=o.popper,s=o.reference,a=i.split("-")[0],l=void 0;return l=j(+n)?[+n,0]:tt(n,r,s,a),"left"===a?(r.top+=l[0],r.left-=l[1]):"right"===a?(r.top+=l[0],r.left+=l[1]):"top"===a?(r.left+=l[0],r.top-=l[1]):"bottom"===a&&(r.left+=l[0],r.top+=l[1]),t.popper=r,t}function nt(t,e){var n=e.boundariesElement||l(t.instance.popper);t.instance.reference===n&&(n=l(n));var i=T(t.instance.popper,t.instance.reference,e.padding,n);e.boundaries=i;var o=e.priority,r=t.offsets.popper,s={primary:function(t){var n=r[t];return r[t]<i[t]&&!e.escapeWithReference&&(n=Math.max(r[t],i[t])),vt({},t,n)},secondary:function(t){var n="right"===t?"left":"top",o=r[n];return r[t]>i[t]&&!e.escapeWithReference&&(o=Math.min(r[n],i[t]-("right"===t?r.width:r.height))),vt({},n,o)}};return o.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";r=bt({},r,s[e](t))}),t.offsets.popper=r,t}function it(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,s=o.popper,a=-1!==["bottom","top"].indexOf(n),l=a?"left":"top",c=a?"width":"height",u={start:vt({},l,r[l]),end:vt({},l,r[l]+r[c]-s[c])};t.offsets.popper=bt({},s,u[i])}return t}function ot(t){if(!z(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=S(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}function rt(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=r[e]-(a?o[s?"width":"height"]:0),t.placement=O(e),t.offsets.popper=v(o),t}for(var st=["native code","[object MutationObserverConstructor]"],at="undefined"!=typeof window,lt=["Edge","Trident","Firefox"],ct=0,ut=0;ut<lt.length;ut+=1)if(at&&navigator.userAgent.indexOf(lt[ut])>=0){ct=1;break}var ht=at&&function(t){return st.some(function(e){return(t||"").toString().indexOf(e)>-1})}(window.MutationObserver),pt=ht?n:i,dt=void 0,ft=function(){return void 0===dt&&(dt=-1!==navigator.appVersion.indexOf("MSIE 10")),dt},mt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},gt=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),vt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},bt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}
6,Et=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],_t=Et.slice(3),yt={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},Tt={shift:{order:100,enabled:!0,fn:it},offset:{order:200,enabled:!0,fn:et,offset:0},preventOverflow:{order:300,enabled:!0,fn:nt,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:J},arrow:{order:500,enabled:!0,fn:Y,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Z,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:rt},hide:{order:800,enabled:!0,fn:ot},computeStyle:{order:850,enabled:!0,fn:q,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:G,onLoad:K,gpuAcceleration:void 0}},Ct={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Tt},wt=function(){function t(e,n){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mt(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=pt(this.update.bind(this)),this.options=bt({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e.jquery?e[0]:e,this.popper=n.jquery?n[0]:n,this.options.modifiers={},Object.keys(bt({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){i.options.modifiers[e]=bt({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return bt({name:t},i.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&o(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return gt(t,[{key:"update",value:function(){return R.call(this)}},{key:"destroy",value:function(){return F.call(this)}},{key:"enableEventListeners",value:function(){return M.call(this)}},{key:"disableEventListeners",value:function(){return H.call(this)}}]),t}();wt.Utils=("undefined"!=typeof window?window:t).PopperUtils,wt.placements=Et,wt.Defaults=Ct,e.default=wt}.call(e,n(1))},function(t,e,n){"use strict";var i=n(9),o=function(t){this.routes=t};o.prototype.fire=function(t,e,n){void 0===e&&(e="init"),""!==t&&this.routes[t]&&"function"==typeof this.routes[t][e]&&this.routes[t][e](n)},o.prototype.loadEvents=function(){var t=this;this.fire("common"),document.body.className.toLowerCase().replace(/-/g,"_").split(/\s+/).map(i.a).forEach(function(e){t.fire(e),t.fire(e,"finalize")}),this.fire("common","finalize")},e.a=o},function(t,e,n){"use strict";e.a=function(t){return""+t.charAt(0).toLowerCase()+t.replace(/[\W_]/g,"|").split("|").map(function(t){return""+t.charAt(0).toUpperCase()+t.slice(1)}).join("").slice(1)}},function(t,e,n){"use strict";(function(t){var i=n(11),o=n.n(i),r=function(t,e,n){var i,o,r,s=null,a=0;n||(n={});var l=function(){a=!1===n.leading?0:Date.now(),s=null,r=t.apply(i,o),s||(i=o=null)};return function(){var c=Date.now();a||!1!==n.leading||(a=c);var u=e-(c-a);return i=this,o=arguments,u<=0||u>e?(s&&(clearTimeout(s),s=null),a=c,r=t.apply(i,o),s||(i=o=null)):s||!1===n.trailing||(s=setTimeout(l,u)),r}};e.a={init:function(){t.fn.isInViewport=function(){var e=t(this).offset().top,n=e+t(this).outerHeight(),i=t(window).scrollTop(),o=i+t(window).height();return n>i&&e<o},t(".appear").each(function(){var e=t(this);t(this).isInViewport()&&t(e).addClass("appeared")}),t(window).on("resize scroll",function(){t(".appear").each(function(){var e=t(this);t(this).isInViewport()&&t(e).addClass("appeared")})});var e=function(){(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0)>0?t(".header .navbar").addClass("floating"):t(".header .navbar").removeClass("floating")};window.addEventListener("scroll",r(e,500)),o()(),t(".dropdown").on("show.bs.dropdown",function(){t(this).find(".dropdown-menu").first().stop(!0,!0).slideDown(300)}),t(".dropdown").on("hide.bs.dropdown",function(){t(this).find(".dropdown-menu").first().stop(!0,!0).slideUp(200)}),t(".opacity-sibilings").hover(function(){t(this).addClass("not-opacity"),t(".opacity-sibilings").not(".not-opacity").addClass("opacity_element")},function(){t(".opacity-sibilings").removeClass("not-opacity opacity_element")})}}}).call(e,n(0))},function(t,e,n){"use strict";function i(t,e){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+t+"' height='"+e+"'%3E%3C/svg%3E"}function o(t){if(t.srcset&&!v&&window.picturefill){var e=window.picturefill._;t[e.ns]&&t[e.ns].evaled||e.fillImg(t,{reselect:!0}
vendor: 2,657 bytes, lines 6-7
6),t[e.ns].curSrc||(t[e.ns].supported=!1,e.fillImg(t,{reselect:!0})),t.currentSrc=t[e.ns].curSrc||t.src}}function r(t){for(var e,n=getComputedStyle(t).fontFamily,i={};null!==(e=p.exec(n));)i[e[1]]=e[2];return i}function s(t,e,n){var o=i(e||1,n||0);b.call(t,"src")!==o&&E.call(t,"src",o)}function a(t,e){t.naturalWidth?e(t):setTimeout(a,100,t,e)}function l(t){var e=r(t),n=t[h];if(e["object-fit"]=e["object-fit"]||"fill",!n.img){if("fill"===e["object-fit"])return;if(!n.skipTest&&f&&!e["object-position"])return}if(!n.img){n.img=new Image(t.width,t.height),n.img.srcset=b.call(t,"data-ofi-srcset")||t.srcset,n.img.src=b.call(t,"data-ofi-src")||t.src,E.call(t,"data-ofi-src",t.src),t.srcset&&E.call(t,"data-ofi-srcset",t.srcset),s(t,t.naturalWidth||t.width,t.naturalHeight||t.height),t.srcset&&(t.srcset="");try{c(t)}catch(t){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}o(n.img),t.style.backgroundImage='url("'+(n.img.currentSrc||n.img.src).replace(/"/g,'\\"')+'")',t.style.backgroundPosition=e["object-position"]||"center",t.style.backgroundRepeat="no-repeat",t.style.backgroundOrigin="content-box",/scale-down/.test(e["object-fit"])?a(n.img,function(){n.img.naturalWidth>t.width||n.img.naturalHeight>t.height?t.style.backgroundSize="contain":t.style.backgroundSize="auto"}):t.style.backgroundSize=e["object-fit"].replace("none","auto").replace("fill","100% 100%"),a(n.img,function(e){s(t,e.naturalWidth,e.naturalHeight)})}function c(t){var e={get:function(e){return t[h].img[e||"src"]},set:function(e,n){return t[h].img[n||"src"]=e,E.call(t,"data-ofi-"+n,e),l(t),e}};Object.defineProperty(t,"src",e),Object.defineProperty(t,"currentSrc",{get:function(){return e.get("currentSrc")}}),Object.defineProperty(t,"srcset",{get:function(){return e.get("srcset")},set:function(t){return e.set(t,"srcset")}})}function u(t,e){var n=!_&&!t;if(e=e||{},t=t||"img",m&&!e.skipTest||!g)return!1;"img"===t?t=document.getElementsByTagName("img"):"string"==typeof t?t=document.querySelectorAll(t):"length"in t||(t=[t]);for(var i=0;i<t.length;i++)t[i][h]=t[i][h]||{skipTest:e.skipTest},l(t[i]);n&&(document.body.addEventListener("load",function(t){"IMG"===t.target.tagName&&u(t.target,{skipTest:e.skipTest})},!0),_=!0,t="img"),e.watchMQ&&window.addEventListener("resize",u.bind(null,t,{skipTest:e.skipTest}))}/*! npm.im/object-fit-images 3.2.3 */
7var h="bfred-it:object-fit-images",p=/(object-fit|object-position)\s*:\s*([-\w\s%]+)/g,d="undefined"==typeof Image?{style:{"object-position":1}}:new Image,f="object-fit"in d.style,m="object-position"in d.style,g="background-size"in d.style,v="string"==typeof d.currentSrc,b=d.getAttribute,E=d.setAttribute,_=!1;
vendor: 6,287 bytes, line 7
7u.supportsObjectFit=f,u.supportsObjectPosition=m,function(){function t(t,e){return t[h]&&t[h].img&&("src"===e||"srcset"===e)?t[h].img:t}m||(HTMLImageElement.prototype.getAttribute=function(e){return b.call(t(this,e),e)},HTMLImageElement.prototype.setAttribute=function(e,n){return E.call(t(this,e),e,String(n))})}(),t.exports=u},function(t,e,n){"use strict";e.a={init:function(){},finalize:function(){}}},function(t,e,n){"use strict";(function(t){var i=n(2),o=n.n(i);e.a={init:function(){new o.a.startTheConversation({formEl:document.querySelector(".contact-form"),context:document.querySelector(".contact-form"),loadExternalStyleSheet:!1,robotImage:"https://pbs.twimg.com/profile_images/739773482578415617/g8ygr0yW_400x400.jpg",dictionaryData:window.Mortensen.cf_dictionary,submitCallback:function(){var e={action:"contact",name:encodeURIComponent(t("#ipt-name").val()),email:encodeURIComponent(t("#ipt-ae").val()),company:encodeURIComponent(t("#ipt-company").val()),help:encodeURIComponent(t("#ipt-help").val()),message:encodeURIComponent(t("#ipt-message").val()),security:t("#_wpnonce").val()};t.ajax({url:window.Mortensen.ajaxurl,method:"POST",data:e}).done(function(t){t=JSON.parse(t),"OK"===t.status?window.ConversationalForm.addRobotChatResponse(window.Mortensen.cf_success):window.ConversationalForm.addRobotChatResponse(window.Mortensen.cf_error)}).error(function(){window.ConversationalForm.addRobotChatResponse(window.Mortensen.cf_error)})}})}}}).call(e,n(0))},function(t,e,n){(function(t){function i(t,e){this._id=t,this._clearFn=e}var o=Function.prototype.apply;e.setTimeout=function(){return new i(o.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(15),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n(1))},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return c[l]=i,a(l),l++}function o(t){delete c[t]}function r(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(n,i)}}function s(t){if(u)setTimeout(s,0,t);else{var e=c[t];if(e){u=!0;try{r(e)}finally{o(t),u=!1}}}}if(!t.setImmediate){var a,l=1,c={},u=!1,h=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?function(){a=function(t){e.nextTick(function(){s(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&s(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),a=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){s(t.data)},a=function(e){t.port2.postMessage(e)}}():h&&"onreadystatechange"in h.createElement("script")?function(){var t=h.documentElement;a=function(e){var n=h.createElement("script");n.onreadystatechange=function(){s(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():function(){a=function(t){setTimeout(s,0,t)}}(),p.setImmediate=i,p.clearImmediate=o}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n(1),n(16))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function r(t){if(h===clearTimeout)return clearTimeout(t);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){m&&d&&(m=!1,d.length?f=d.concat(f):g=-1,f.length&&a())}function a(){if(!m){var t=o(s);m=!0;for(var e=f.length;e;){for(d=f,f=[];++g<e;)d&&d[g].run();g=-1,e=f.length}d=null,m=!1,r(t)}}function l(t,e){this.fun=t,this.array=e}function c(){}var u,h,p=t.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(t){u=n}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(t){h=i}}();var d,f=[],m=!1,g=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];f.push(new l(t,e)),1!==f.length||m||o(a)},l.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e,n){"use strict";(function(t){e.a={init:function(){t(".why-mortensen__another").click(function(e){e.preventDefault();for(var n=t("#whyMortensen .carousel-item").length,i=t("#whyMortensen .carousel-item.active"),o=t("#whyMortensen .carousel-item").index(i),r=o;r===o;)r=Math.floor(Math.random()*n);t("#whyMortensen").carousel(r)})}}}).call(e,n(0))},function(t,e){}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.