diff --git a/build/js/flexcss.js b/build/js/flexcss.js index d401cfda..cdb4e8a2 100644 --- a/build/js/flexcss.js +++ b/build/js/flexcss.js @@ -4017,15 +4017,7 @@ return /******/ (function(modules) { // webpackBootstrap return false; } - if (!shouldNotMoveDown && isScrollingDown) { - e.stopImmediatePropagation(); - } - - if (shouldNotMoveDown && !isScrollingDown) { - e.stopImmediatePropagation(); - } - - if (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) { + if (!shouldNotMoveDown && isScrollingDown || shouldNotMoveDown && !isScrollingDown || !shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown || shouldNotMoveDown && shouldNotMoveUp && isScrollingDown) { e.stopImmediatePropagation(); } @@ -4606,6 +4598,7 @@ return /******/ (function(modules) { // webpackBootstrap var bounds = target.getBoundingClientRect(); var compare = factor > 0 ? calcX <= 0 : calcX >= 0; if (compare) { + e.preventDefault(); style.transition = 'transform 0s ease'; style.webkitTransition = '-webkit-transform 0s ease'; target.mustHide = factor > 0 ? calcX * -1 > bounds.width / HIDE_FACTOR : calcX > bounds.width / HIDE_FACTOR; diff --git a/build/js/flexcss.min.js b/build/js/flexcss.min.js index 34873cf0..336261a8 100644 --- a/build/js/flexcss.min.js +++ b/build/js/flexcss.min.js @@ -1,4 +1,4 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FlexCss=t():e.FlexCss=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="../",t(0)}([function(e,t,n){e.exports=n(17)},function(e,t){(function(e){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&e.offsetHeight>0}},{key:"dashToCamelCase",value:function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}},{key:"copy",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"applyOptionsFromElement",value:function(e,n){if(!e)return n;for(var i=e.attributes,r=0;rh.width,b=n.classList;b.remove(a),b.remove(o),b.remove(s);var C=void 0,T=void 0;if(y&&!_)T=c.left-h.left-d+"px",b.add(o);else{var w=p-f.width-h.left-d+"px",O=(E+c.width/2-f.width/2||0)-h.left,L=O+f.width>h.width;r&&!L?T=O+"px":(b.add(a),T=w)}return g||l&&!m?(C=v-f.height-h.top+"px",b.add(s)):C=v+c.height-h.top+"px",n.style.cssText="top:"+C+";left:"+T+";",n}},{key:"scrollToElement",value:function(e,t){e.scrollIntoView();var n=t;if(n&&("function"==typeof n&&(n=t()),n>0)){var i=window.pageYOffset;i&&window.scroll(0,i-n)}}}]),t}();t["default"]=l}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0?this.widgets[this.widgets.length-1]:null}},{key:"_checkFixedNeeded",value:function(){var e=this;if(0!==this.widgets.length){var t=new Set(this.widgets),n=Array.from(t).some(function(t){var n=t.widget;return e.fixedScreenConstraints[n]&&e.fixedScreenConstraints[n](e.windowWidth)});n?this._addFixedContainer():this._removeFixedContainer()}}},{key:"_addFixedContainer",value:function(){var t=this;if(!this.isFixedWindowActive){h["default"].dispatchAndFire(e.document,g,{detail:this.getCurrentWidget()}),u["default"].get().scrollbarUpdateNodes.map(function(t){var n="paddingRight",i=1,r=t;if(t instanceof Array){var o=a(t,3),s=o[0],l=o[1],d=o[2];n=l,r=s,i=d||1}return{node:r,property:n,value:parseInt(e.getComputedStyle(r)[n],10)+(r.__fixedWindowMod__?0:u["default"].getScrollbarWidth()*i)+"px"}}).forEach(function(e){e.node.__fixedWindowMod__=!0,e.node.style[e.property]=e.value}),this.touchListener=function(e){e.preventDefault()};var n=!1,i=!1,r=!1,o=0;this.touchStartListener=function(e){var a=t.getCurrentWidget(),s=a.element,l=p["default"].closestCallback(e.target,function(e){return e instanceof HTMLTextAreaElement||e.hasAttribute&&e.hasAttribute(E)});if(l&&l.scrollHeight!==l.offsetHeight&&(s=l),p["default"].isPartOfNode(e.target,s)){if(r=s.scrollHeight===s.offsetHeight,o=e.touches[0].clientY,r)return!1;0===s.scrollTop?(s.scrollTop=1,n=!0):s.scrollHeight===s.scrollTop+s.offsetHeight&&(i=!0,s.scrollTop-=1)}},e.addEventListener("touchmove",this.touchListener),e.document.body.addEventListener("touchstart",this.touchStartListener),this.touchMoveListener=function(e){var a=t.getCurrentWidget(),s=a.element;if(p["default"].isPartOfNode(e.target,s)){var l=e.touches[0].clientY,u=o-l>0;if(o=l,r)return r=!1,!1;!i&&u&&e.stopImmediatePropagation(),i&&!u&&e.stopImmediatePropagation(),i||n||u||e.stopImmediatePropagation(),n=!1,i=!1}},e.document.body.addEventListener("touchmove",this.touchMoveListener),e.document.documentElement.classList.add(m),this.isFixedWindowActive=!0}}},{key:"_removeFixedContainer",value:function(){this.isFixedWindowActive&&(e.removeEventListener("touchmove",this.touchListener),e.document.body.removeEventListener("touchstart",this.touchStartListener),e.document.body.removeEventListener("touchmove",this.touchMoveListener),u["default"].get().scrollbarUpdateNodes.forEach(function(e){if(e instanceof Array){var t=a(e,2),n=t[0],i=t[1];delete n.__fixedWindowMod__,n.style[i]=""}else delete e.__fixedWindowMod__,e.style.paddingRight=""}),e.document.documentElement.classList.remove(m),h["default"].dispatchAndFire(e.document,y),this.isFixedWindowActive=!1)}},{key:"resizeListener",value:function(){this.windowWidth=e.innerWidth,this._checkFixedNeeded()}},{key:"close",value:function(){this.widgets.pop(),0===this.widgets.length&&this._removeFixedContainer()}},{key:"open",value:function(e,t){var n=!1;if("object"===("undefined"==typeof e?"undefined":o(e))){var i=e.constructor,r=this.fixedScreenConstraints[e.constructor];i&&r&&(n=r(this.windowWidth));var a=this.widgets.length;this.widgets.push({widget:i,element:t}),0===a&&n&&this._addFixedContainer()}}}],[{key:"getInstance",value:function(){if(!_){_=new t,_.windowWidth=e.innerWidth;var n=_.resizeListener.bind(_);e.addEventListener("resize",(0,c["default"])(n,500)),e.addEventListener("orientationchange",n)}return _}}]),t}();t["default"]=b}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_MODAL_ASYNC_TARGET_LOADED=t.EVENT_MODAL_INIT=t.EVENT_MODAL_OPENED=t.EVENT_MODAL_BEFORE_CLOSED=t.EVENT_MODAL_CLOSED=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n-1&&(t._modalInstances.splice(n,1),m["default"].getInstance().close())}},{key:"getModalContainer",value:function(){return this.modalContainer}},{key:"close",value:function(e){var n=this,i=n.currentOpen?f["default"].applyOptionsFromElement(n.currentOpen,f["default"].copy(n.options)):n.options;if(!i.closeOnEscape&&e instanceof KeyboardEvent)return!1;if(!i.closeOnBackgroundClick&&e&&e.type===l["default"].getTabEvent()&&!e.target.hasAttribute(E))return!1;if(n.loading)return!1;if(e&&e.preventDefault(),n.currentOpen){var r=d["default"].dispatchAndFire(n.currentOpen,x);if(r.defaultPrevented)return!1;if(this._finishState(n.currentOpen),n.currentOpen.prevModal)return n.switchModals(n.currentOpen.prevModal,n.currentOpen.prevModal.prevModal||null);d["default"].dispatch(n.currentOpen,F).withOriginal(e).fire()}if(n._removeModalFromStack(n.currentOpen),n.currentOpen=null,n.modalContainer){var o=t._modalInstances[t._modalInstances.length-1],a=n.modalContainer.classList;a.remove(b),a.remove(A),a.remove(C);for(var s=0;si;i++)t[i]=arguments[i];n.createWidget.apply(n,t)},i.addEventListener(l["default"].getTabEvent(),this.eventFunction,!1),this.eventContainer=i,this}},{key:"fromWidget",value:function(e){return this.createWidget(e)}},{key:"fromEvent",value:function(e){return this.createWidget(e)}},{key:"setDestroyOnFinish",value:function(e){return this.destroyOnFinish=e,this}},{key:"destroy",value:function(){var t=this.modalContainer,n=0===t.childNodes.length;this.eventContainer&&this.eventContainer.removeEventListener(l["default"].getTabEvent(),this.eventFunction,!0),n&&t.parentNode&&t.parentNode.removeChild(t),e.MutationObserver?!function(){var e=new MutationObserver(function(n){n.forEach(function(){0===t.childNodes.length&&(t.parentNode.removeChild(t),e.disconnect())})});e.observe(t,{childList:!0})}():t.addEventListener("DOMNodeRemoved",function(e){e.target!==t&&t.childNodes.length-1===0&&t.parentNode.removeChild(t)})}}]),t}();M._modalInstances=[],e.addEventListener("keydown",function(e){if(e.keyCode===g){var t=M._modalInstances[M._modalInstances.length-1];t&&v["default"].findWidget(t).close(e)}}),t["default"]=M}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_FORM_AJAX_COMPLETED=t.EVENT_FORM_AFTER_AJAX_SUBMIT=t.EVENT_FORM_SUBMIT=t.EVENT_FORM_READY=void 0;var s=function(){function e(e,t){for(var n=0;n '+e},inputErrorClass:"invalid",containerErrorClass:"form-error",fetchOptions:{credentials:"include"},tooltipContainer:e,tooltipOptions:{containerClass:"error-tooltip"},scrollToElementDiff:0},Object.assign(i.options,t),v["default"].applyOptionsFromElement(e,i.options),e.hfWidgetInstance=i,i._validators=n.globalValidators,i._remoteValidationFunction=null,i.initFormValidation(),i}return a(n,t),s(n,[{key:"destroy",value:function(){l(Object.getPrototypeOf(n.prototype),"destroy",this).call(this),this.tooltips&&this.tooltips.destroy()}},{key:"_submitFunction",value:function(e,t){var i=e.getAttribute(b),r=e.getAttribute(C)||e.getAttribute("action")||window.location.href,o=x===i,a=this,s=f["default"].dispatch(e,P).withOriginal(t).fire();if(s.defaultPrevented)return a._formStopLoading(),!1;if(null===i)return e.submit();t.preventDefault();var l={"X-Requested-With":"XMLHttpRequest"};o&&Object.assign(l,{"Content-Type":this.options.ajaxJsonContentType});var u=Object.assign(this.options.fetchOptions,{headers:l,method:this.options.ajaxSubmitType}),d=o?fetch(r,Object.assign(u,{body:JSON.stringify(this.serialize())})):fetch(r,Object.assign(u,{body:new FormData(e)}));return f["default"].dispatch(e,V).withOriginal(t).fire(),d.then(function(i){(a._remoteValidationFunction||n.globalRemoteValidationFunction).apply(a,[i]),f["default"].dispatch(e,j).withOriginal(t).withDetail({response:i}).fire(),a._formStopLoading()})}},{key:"serialize",value:function(){var e=['input[name]:not([type="radio"]):enabled','input[type="radio"][name]:checked',"select[name]:enabled","textarea[name]:enabled"],t=this.form.querySelectorAll(e.join(",")),n={};return Array.prototype.forEach.call(t,function(e){var t=n[e.name],i=e.value;t instanceof Array?t.push(i):t?n[e.name]=[n[e.name],i]:n[e.name]=i}),n}},{key:"handleValidation",value:function(e,t){var n=this,i=e instanceof Array||e instanceof NodeList?e:[e];return this._handleValidation(i,t,!0).then(function(e){return e.foundAnyError||n.tooltips&&n.tooltips.removeTooltip(),e}.bind(this))}},{key:"_handleValidation",value:function(e,t,i){var r=this,o=n._createArrayFromInvalidFieldList(e),a=o.length>0; -a&&t&&r._focusElement(o[0]);var s=i?this._customValidationsForElements(e):r.validateCustomFields();return s.then(function(n){a&&(n.foundAnyError=!0);var s=i?e:Array.from(o).concat(n.checkedFields);n.checkedFields=s;var l=r.prepareErrors(s,!1),u=l[0];return u&&(t?(r._focusElement(u),document.activeElement!==u&&r._handleTooltipHideClickAfterChange()):r._handleTooltipHideClickAfterChange(),r.showAndOrCreateTooltip(u)),n})}},{key:"_setupErrorMessages",value:function(e,t){return n.globalErrorMessageHandler?n.globalErrorMessageHandler.apply(this,[e,t]):!1}},{key:"_handleLabels",value:function(e){Object.keys(e).forEach(function(t){var n=this.getForm().querySelectorAll('[for="'+t+'"]'),i=e[t];if(n.length)for(var r=0;ro;o++){var a=e[o],s=a.getAttribute(O),l=a.validity;if(this._validators[s]){if(n._shouldNotValidateField(a)||l&&!l.customError&&!l.valid)continue;r.push(a),t.push(this._runValidation(s,a))}else s&&console.warn("data-validate was set but no validator was found")}return Promise.all(t).then(function(e){for(var t=e.length,n={checkedFields:r,foundAnyError:!1},i=0;t>i;i++)if(!e[i]){n.foundAnyError=!0;break}return n})}},{key:"removeErrors",value:function(){return this._removeElementErrors(this.form),this.tooltips&&this.tooltips.removeTooltip(),this}},{key:"prepareErrors",value:function(e,t){function i(e,t,n){var i=n.getAttribute(k)||n.id,r=t[i];i&&(r=r?r:e,t[i]=r)}t&&this.removeErrors();for(var r={},o=[],a=0;a'+f+""),o.push(s),s.flexFormsSavedValidationMessage=f}else this._markElementValid(l),this._markElementValid(s),delete s.flexFormsSavedValidationMessage,this._removeElementErrors(u);s.setCustomValidity("")}}if(1===e.length){var h=e[0],v=h.getAttribute(k)||h.id;if(v){var p=Array.from(this.getForm().querySelectorAll("["+k+'="'+v+'"], #'+v));p.forEach(function(e){var t=e.validity,n=t&&!t.valid&&this._isElementInvalidElement(e);i(n,r,e)}.bind(this))}}return this._handleLabels(r),o}},{key:"validateCustomFields",value:function(){return this._customValidationsForElements(this.form.querySelectorAll("[data-validate]"))}},{key:"getForm",value:function(){return this.form}},{key:"registerRemoteValidation",value:function(e){return this._remoteValidationFunction=e,this}},{key:"_formatErrorTooltip",value:function(e){return this.options.formatErrorTooltip.apply(this,[e])}},{key:"showAndOrCreateTooltip",value:function(e,t){var i=this;if(!this.tooltips&&this.options.createTooltips&&(this.tooltips=new d["default"](this.options.tooltipContainer,this.options.tooltipOptions)),!this.options.createTooltips)return!1;if(!e.flexFormsSavedValidity)return!1;var r=n._findErrorTarget(e);return!e.flexFormsSavedValidity.valid&&i._isElementInvalidElement(r)?(i.tooltips.createTooltip(r,i._formatErrorTooltip(e.flexFormsSavedValidationMessage),!1),!0):(t&&i.tooltips.removeTooltip(),!1)}},{key:"_isElementInvalidElement",value:function(e){return e.hasAttribute(_)}},{key:"_checkIsInvalid",value:function(e){e.preventDefault();var t=this.getForm().querySelectorAll(":invalid");return this._handleValidation(t,!0,!1)}},{key:"_getDependentFields",value:function(e){var t=e.getAttribute(F),n=[e];return t&&n.push.apply(n,Array.prototype.slice.apply(this.getForm().querySelectorAll(t))),n}},{key:"_handleTooltipInline",value:function(e){this.tooltips&&this.tooltips.removeTooltip(e)}},{key:"initFormValidation",value:function(){function e(e){return!e.hasAttribute(w)&&!e.hasAttribute(T)}function t(){u=!1,clearTimeout(l)}function n(e){var t=e.getAttribute("type");return"radio"!==t&&"checkbox"!==t&&"submit"!==t}function i(e){return!e.hasAttribute(T)}var r=this,o=this.getForm(),a=this,s="invalid";o.addEventListener(s,function(e){e.preventDefault()},!0),v["default"].addEventOnce(s,o,function d(e){a._formLoading();var t=a._checkIsInvalid(e);t&&(a.currentValidationFuture=new Promise(function(n){t.then(function(t){setTimeout(function(){v["default"].addEventOnce(s,o,d,!0)},0),n(t),a._formStopLoading(),t.foundAnyError||(a._formLoading(),a._handleSubmit(e))})}))},!0),this.addEventListener(o,"reset",function(){r.removeErrors()});var l,u=!1;a.options.realtime&&this.addEventListener(o,I,function(t){if(!a._formIsLoading()){var n=t.target;clearTimeout(l),u||(l=setTimeout(function(){var i=document.activeElement===t.target;if(e(n)){i&&a._handleTooltipInline(),u=!0;var r=a._getDependentFields(n);a._customValidationsForElements(r).then(function(){a.prepareErrors(r,!1),i&&a.showAndOrCreateTooltip(t.target),u=!1})}},a.options.realtimeTimeout))}},!0),this.addEventListener(o,"blur",function(e){e.target.flexcssKeepTooltips||a._handleTooltipInline(e.target),delete e.target.flexcssKeepTooltips},!0),this.addEventListener(o,"focus",function(e){a._formIsLoading()||n(e.target)&&setTimeout(function(){a.showAndOrCreateTooltip(e.target)},N)},!0),a.options.inlineValidation&&this.addEventListener(o,"change",function(e){var n=e.target;if(!a._formIsLoading()&&i(n)){t();var r=n.getAttribute("name"),s=r?o.querySelectorAll('[name="'+r+'"]'):[n];1===s.length&&(s=a._getDependentFields(n)),a._customValidationsForElements(s).then(function(){a.prepareErrors(s,!1),n.flexcssKeepTooltips=a.showAndOrCreateTooltip(n,!0),n.flexcssKeepTooltips&&a._handleTooltipHideClickAfterChange()})}}),this.addEventListener(o,"submit",function c(e){a._submitListener(e,c)}),f["default"].dispatchAndFire(o,M)}},{key:"_formLoading",value:function(){this.getForm().classList.add(E)}},{key:"_formStopLoading",value:function(){this.getForm().classList.remove(E)}},{key:"_formIsLoading",value:function(){return this.getForm().classList.contains(E)}},{key:"_handleTooltipHideClickAfterChange",value:function(){var t=this;this.options.createTooltips&&setTimeout(function(){v["default"].addEventOnce(m["default"].getTabEvent(),e.document.body,function(e){t._isElementInvalidElement(e.target)||t._handleTooltipInline()})},D)}},{key:"_focusElement",value:function(e){e.focus(),v["default"].scrollToElement(e,this.options.scrollToElementDiff)}},{key:"_submitListener",value:function(e,t){var n=this.getForm(),i=this,r="submit";return this._formIsLoading()?(e.preventDefault(),!1):(this._formLoading(),n.removeEventListener(r,t),this.removeErrors(),e.preventDefault(),void(n.checkValidity()?(n.addEventListener(r,t),i.currentValidationFuture=new Promise(function(e){var t=i.validateCustomFields();t.then(function(t){var n=i._getInvalidElements(),r=i.prepareErrors(n,!1),o=r[0];o&&(i._focusElement(o),i.showAndOrCreateTooltip(o,!0)),e(t)})}),i.currentValidationFuture.then(function(t){t.foundAnyError?i._formStopLoading():i._handleSubmit(e)})):(i._formStopLoading(),n.addEventListener(r,t))))}},{key:"_handleSubmit",value:function(e){this._submitFunction(this.form,e)}}],[{key:"_shouldNotValidateField",value:function(e){var t=n._findErrorTarget(e);return t instanceof HTMLFieldSetElement||void 0===e.validity||t.hasAttribute(S)&&!v["default"].isVisible(t)}},{key:"_createArrayFromInvalidFieldList",value:function(e){for(var t=[],i=0;i-1?t:e}function d(e,t){t=t||{};var n=t.body;if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=u(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function c(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}}),t}function f(e){var t=new i,n=e.getAllResponseHeaders().trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),i=n.shift().trim(),r=n.join(":").trim();t.append(i,r)}),t}function h(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof i?t.headers:new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){i.prototype.append=function(e,i){e=t(e),i=n(i);var r=this.map[e];r||(r=[],this.map[e]=r),r.push(i)},i.prototype["delete"]=function(e){delete this.map[t(e)]},i.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},i.prototype.getAll=function(e){return this.map[t(e)]||[]},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,i){this.map[t(e)]=[n(i)]},i.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(i){e.call(t,i,n,this)},this)},this)};var v={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this)},l.call(d.prototype),l.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""});return e.type="error",e};var m=[301,302,303,307,308];h.redirect=function(e,t){if(-1===m.indexOf(t))throw new RangeError("Invalid status code");return new h(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=d,e.Response=h,e.fetch=function(e,t){return new Promise(function(n,i){function r(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var o;o=d.prototype.isPrototypeOf(e)&&!t?e:new d(e,t);var a=new XMLHttpRequest;a.onload=function(){var e=1223===a.status?204:a.status;if(100>e||e>599)return void i(new TypeError("Network request failed"));var t={status:e,statusText:a.statusText,headers:f(a),url:r()},o="response"in a?a.response:a.responseText;n(new h(o,t))},a.onerror=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&v.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_DROPDOWN_CLOSED=void 0;var o=function(){function e(e,t){for(var n=0;nl)["catch"](function(){r._runOptionalClose()})}}),r._keyboardNextEvent=function(e){if(e.keyCode===C||e.keyCode===T){if(r.isLoading())return;r.switchImageByDirection(e.keyCode===T)["catch"](function(){r._runOptionalClose()})}},e.addEventListener("keydown",r._keyboardNextEvent)):r._imageContainer.addEventListener(d["default"].getTabEvent(),function(){r._runOptionalClose()}),r.highRes(o,a)})}),i._future.then(function(){r._calculateContainer(i.img)}),r._modalContainerDiv.addEventListener(s.EVENT_MODAL_CLOSED,function(){i._modalContainerDiv.parentNode.removeChild(i._modalContainerDiv),i.options.onClose.apply(r),i._isOpen=!1,i.modal.destroy(),i._keyboardNextEvent&&e.removeEventListener("keydown",r._keyboardNextEvent),i._resizeEvent&&e.removeEventListener("resize",r._resizeEvent)}),i._future}),this._nextFuture=this._future,r._widget?(this.modal=new l["default"](this._modalAppend),this.modal.close().fromWidget(r._widget).then(function(){return r._future.then(function(){return r})})):!1)):!1}}],[{key:"_setupMaxWidthHeight",value:function(e,t,n){var i=e.getAttribute(h),r=e.getAttribute(v);i&&r?(t.style.maxWidth=i+"px",t.style.maxHeight=r+"px"):(t.style.maxWidth=n.width+"px",t.style.maxHeight=n.height+"px")}}]),t}();t["default"]=O}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_TOGGLE=void 0;var o=function(){function e(e,t){for(var n=0;n=s["default"].get().smallBreakpoint};if(!h||!f)throw new Error("Could not find needed elements (Darkener and/or NavigationId)");this.darkener=h,this.darkenerClassToggle=v,this.darkenerClassToggleInstant=p,this.globalToggleClass=s["default"].get().canvasToggledClass,this.navigationContainer=f,this.navigationContainerId=f.id,this.navigationContainerId||(this.navigationContainerId=u["default"].guid(),f.id=this.navigationContainerId),a||(f.addEventListener("touchstart",function(e){m()||(c=e.touches[0].clientX,f.mustHide=!1)}),f.addEventListener("touchmove",function(e){if(!m()){var t=e.touches[0].clientX,n=f,i=n.style,r=c-t,a=n.getBoundingClientRect(),s=o>0?0>=r:r>=0;if(s){i.transition="transform 0s ease",i.webkitTransition="-webkit-transform 0s ease",n.mustHide=o>0?-1*r>a.width/y:r>a.width/y;var l="translate3d("+-1*r+"px,0,0)";i.transform=l,i.webkitTransform=l}}}),f.addEventListener("touchend",function(){if(!m()){var e=f,t=e.style;if(e.mustHide){var n=e.getBoundingClientRect().width*o;t.transition="transform .2s ease",t.webkitTransition="-webkit-transform .2s ease";var i="translate3d("+n+"px,0,0)";t.transform=i,t.webkitTransform=i,l._remove().then(function(){l.resetTransform(t)}),l._removeInstant()}else l.resetTransform(t)}}))}return o(t,[{key:"resetTransform",value:function(e){e.transform="",e.transition="",e.webkitTransform="",e.webkitTransition=""}},{key:"_remove",value:function(n){var i=this;return new Promise(function(r){u["default"].addEventOnce(s["default"].getTransitionEvent(),i.navigationContainer,function o(i){var a=this;return i.target!==this.navigationContainer?u["default"].addEventOnce(s["default"].getTransitionEvent(),this.navigationContainer,o.bind(this)):void requestAnimationFrame(function(){t.currentOpen=null;var i=e.document.documentElement.classList;i.remove(a.darkenerClassToggle),i.remove(a.globalToggleClass),n&&c["default"].dispatchAndFire(a.navigationContainer,E),r()})}.bind(i))})}},{key:"_removeInstant",value:function(){this.navigationContainer.classList.remove(g),e.document.documentElement.classList.remove(this.darkenerClassToggleInstant),this.darkener.classList.remove(m),h["default"].getInstance().close()}},{key:"toggle",value:function(n){var i=this;n&&n.preventDefault(),this.resetTransform(this.navigationContainer.style);var r=this.darkener.classList,o=this.darkenerClassToggle,a=this.darkenerClassToggleInstant,l=this.navigationContainer.classList;if(t.currentOpen)return this.close(n);u["default"].addEventOnce(s["default"].getTransitionEvent(),this.navigationContainer,function(){n&&c["default"].dispatchAndFire(i.navigationContainer,E)}),t.currentOpen=this,h["default"].getInstance().open(this,this.navigationContainer);var d=e.document.documentElement.classList;d.add(this.globalToggleClass),d.add(a),d.add(o),r.add(m),l.add(g)}},{key:"close",value:function(e){if(this.navigationContainer.classList.contains(g)){var t=this._remove(e);return this._removeInstant(),t}return new Promise(function(e){return e()})}},{key:"registerEvents",value:function(n){var i=this,r=n||e.document;h["default"].getInstance().addScreenConstraint(t,function(e){return e0&&e.offsetHeight>0}},{key:"dashToCamelCase",value:function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}},{key:"copy",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"applyOptionsFromElement",value:function(e,n){if(!e)return n;for(var i=e.attributes,r=0;rh.width,b=n.classList;b.remove(a),b.remove(o),b.remove(s);var C=void 0,T=void 0;if(y&&!_)T=c.left-h.left-d+"px",b.add(o);else{var w=p-f.width-h.left-d+"px",O=(E+c.width/2-f.width/2||0)-h.left,L=O+f.width>h.width;r&&!L?T=O+"px":(b.add(a),T=w)}return g||l&&!m?(C=v-f.height-h.top+"px",b.add(s)):C=v+c.height-h.top+"px",n.style.cssText="top:"+C+";left:"+T+";",n}},{key:"scrollToElement",value:function(e,t){e.scrollIntoView();var n=t;if(n&&("function"==typeof n&&(n=t()),n>0)){var i=window.pageYOffset;i&&window.scroll(0,i-n)}}}]),t}();t["default"]=l}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0?this.widgets[this.widgets.length-1]:null}},{key:"_checkFixedNeeded",value:function(){var e=this;if(0!==this.widgets.length){var t=new Set(this.widgets),n=Array.from(t).some(function(t){var n=t.widget;return e.fixedScreenConstraints[n]&&e.fixedScreenConstraints[n](e.windowWidth)});n?this._addFixedContainer():this._removeFixedContainer()}}},{key:"_addFixedContainer",value:function(){var t=this;if(!this.isFixedWindowActive){h["default"].dispatchAndFire(e.document,g,{detail:this.getCurrentWidget()}),u["default"].get().scrollbarUpdateNodes.map(function(t){var n="paddingRight",i=1,r=t;if(t instanceof Array){var o=a(t,3),s=o[0],l=o[1],d=o[2];n=l,r=s,i=d||1}return{node:r,property:n,value:parseInt(e.getComputedStyle(r)[n],10)+(r.__fixedWindowMod__?0:u["default"].getScrollbarWidth()*i)+"px"}}).forEach(function(e){e.node.__fixedWindowMod__=!0,e.node.style[e.property]=e.value}),this.touchListener=function(e){e.preventDefault()};var n=!1,i=!1,r=!1,o=0;this.touchStartListener=function(e){var a=t.getCurrentWidget(),s=a.element,l=p["default"].closestCallback(e.target,function(e){return e instanceof HTMLTextAreaElement||e.hasAttribute&&e.hasAttribute(E)});if(l&&l.scrollHeight!==l.offsetHeight&&(s=l),p["default"].isPartOfNode(e.target,s)){if(r=s.scrollHeight===s.offsetHeight,o=e.touches[0].clientY,r)return!1;0===s.scrollTop?(s.scrollTop=1,n=!0):s.scrollHeight===s.scrollTop+s.offsetHeight&&(i=!0,s.scrollTop-=1)}},e.addEventListener("touchmove",this.touchListener),e.document.body.addEventListener("touchstart",this.touchStartListener),this.touchMoveListener=function(e){var a=t.getCurrentWidget(),s=a.element;if(p["default"].isPartOfNode(e.target,s)){var l=e.touches[0].clientY,u=o-l>0;if(o=l,r)return r=!1,!1;(!i&&u||i&&!u||!i&&!n&&!u||i&&n&&u)&&e.stopImmediatePropagation(),n=!1,i=!1}},e.document.body.addEventListener("touchmove",this.touchMoveListener),e.document.documentElement.classList.add(m),this.isFixedWindowActive=!0}}},{key:"_removeFixedContainer",value:function(){this.isFixedWindowActive&&(e.removeEventListener("touchmove",this.touchListener),e.document.body.removeEventListener("touchstart",this.touchStartListener),e.document.body.removeEventListener("touchmove",this.touchMoveListener),u["default"].get().scrollbarUpdateNodes.forEach(function(e){if(e instanceof Array){var t=a(e,2),n=t[0],i=t[1];delete n.__fixedWindowMod__,n.style[i]=""}else delete e.__fixedWindowMod__,e.style.paddingRight=""}),e.document.documentElement.classList.remove(m),h["default"].dispatchAndFire(e.document,y),this.isFixedWindowActive=!1)}},{key:"resizeListener",value:function(){this.windowWidth=e.innerWidth,this._checkFixedNeeded()}},{key:"close",value:function(){this.widgets.pop(),0===this.widgets.length&&this._removeFixedContainer()}},{key:"open",value:function(e,t){var n=!1;if("object"===("undefined"==typeof e?"undefined":o(e))){var i=e.constructor,r=this.fixedScreenConstraints[e.constructor];i&&r&&(n=r(this.windowWidth));var a=this.widgets.length;this.widgets.push({widget:i,element:t}),0===a&&n&&this._addFixedContainer()}}}],[{key:"getInstance",value:function(){if(!_){_=new t,_.windowWidth=e.innerWidth;var n=_.resizeListener.bind(_);e.addEventListener("resize",(0,c["default"])(n,500)),e.addEventListener("orientationchange",n)}return _}}]),t}();t["default"]=b}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_MODAL_ASYNC_TARGET_LOADED=t.EVENT_MODAL_INIT=t.EVENT_MODAL_OPENED=t.EVENT_MODAL_BEFORE_CLOSED=t.EVENT_MODAL_CLOSED=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n-1&&(t._modalInstances.splice(n,1),m["default"].getInstance().close())}},{key:"getModalContainer",value:function(){return this.modalContainer}},{key:"close",value:function(e){var n=this,i=n.currentOpen?f["default"].applyOptionsFromElement(n.currentOpen,f["default"].copy(n.options)):n.options;if(!i.closeOnEscape&&e instanceof KeyboardEvent)return!1;if(!i.closeOnBackgroundClick&&e&&e.type===l["default"].getTabEvent()&&!e.target.hasAttribute(E))return!1;if(n.loading)return!1;if(e&&e.preventDefault(),n.currentOpen){var r=d["default"].dispatchAndFire(n.currentOpen,x);if(r.defaultPrevented)return!1;if(this._finishState(n.currentOpen),n.currentOpen.prevModal)return n.switchModals(n.currentOpen.prevModal,n.currentOpen.prevModal.prevModal||null);d["default"].dispatch(n.currentOpen,F).withOriginal(e).fire()}if(n._removeModalFromStack(n.currentOpen),n.currentOpen=null,n.modalContainer){var o=t._modalInstances[t._modalInstances.length-1],a=n.modalContainer.classList;a.remove(b),a.remove(A),a.remove(C);for(var s=0;si;i++)t[i]=arguments[i];n.createWidget.apply(n,t)},i.addEventListener(l["default"].getTabEvent(),this.eventFunction,!1),this.eventContainer=i,this}},{key:"fromWidget",value:function(e){return this.createWidget(e)}},{key:"fromEvent",value:function(e){return this.createWidget(e)}},{key:"setDestroyOnFinish",value:function(e){return this.destroyOnFinish=e,this}},{key:"destroy",value:function(){var t=this.modalContainer,n=0===t.childNodes.length;this.eventContainer&&this.eventContainer.removeEventListener(l["default"].getTabEvent(),this.eventFunction,!0),n&&t.parentNode&&t.parentNode.removeChild(t),e.MutationObserver?!function(){var e=new MutationObserver(function(n){n.forEach(function(){0===t.childNodes.length&&(t.parentNode.removeChild(t),e.disconnect())})});e.observe(t,{childList:!0})}():t.addEventListener("DOMNodeRemoved",function(e){e.target!==t&&t.childNodes.length-1===0&&t.parentNode.removeChild(t)})}}]),t}();M._modalInstances=[],e.addEventListener("keydown",function(e){if(e.keyCode===g){var t=M._modalInstances[M._modalInstances.length-1];t&&v["default"].findWidget(t).close(e)}}),t["default"]=M}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_FORM_AJAX_COMPLETED=t.EVENT_FORM_AFTER_AJAX_SUBMIT=t.EVENT_FORM_SUBMIT=t.EVENT_FORM_READY=void 0;var s=function(){function e(e,t){for(var n=0;n '+e},inputErrorClass:"invalid",containerErrorClass:"form-error",fetchOptions:{credentials:"include"},tooltipContainer:e,tooltipOptions:{containerClass:"error-tooltip"},scrollToElementDiff:0},Object.assign(i.options,t),v["default"].applyOptionsFromElement(e,i.options),e.hfWidgetInstance=i,i._validators=n.globalValidators,i._remoteValidationFunction=null,i.initFormValidation(),i}return a(n,t),s(n,[{key:"destroy",value:function(){l(Object.getPrototypeOf(n.prototype),"destroy",this).call(this),this.tooltips&&this.tooltips.destroy()}},{key:"_submitFunction",value:function(e,t){var i=e.getAttribute(b),r=e.getAttribute(C)||e.getAttribute("action")||window.location.href,o=x===i,a=this,s=f["default"].dispatch(e,P).withOriginal(t).fire();if(s.defaultPrevented)return a._formStopLoading(),!1;if(null===i)return e.submit();t.preventDefault();var l={"X-Requested-With":"XMLHttpRequest"};o&&Object.assign(l,{"Content-Type":this.options.ajaxJsonContentType});var u=Object.assign(this.options.fetchOptions,{headers:l,method:this.options.ajaxSubmitType}),d=o?fetch(r,Object.assign(u,{body:JSON.stringify(this.serialize())})):fetch(r,Object.assign(u,{body:new FormData(e)}));return f["default"].dispatch(e,V).withOriginal(t).fire(),d.then(function(i){(a._remoteValidationFunction||n.globalRemoteValidationFunction).apply(a,[i]),f["default"].dispatch(e,j).withOriginal(t).withDetail({response:i}).fire(),a._formStopLoading()})}},{key:"serialize",value:function(){var e=['input[name]:not([type="radio"]):enabled','input[type="radio"][name]:checked',"select[name]:enabled","textarea[name]:enabled"],t=this.form.querySelectorAll(e.join(",")),n={};return Array.prototype.forEach.call(t,function(e){var t=n[e.name],i=e.value;t instanceof Array?t.push(i):t?n[e.name]=[n[e.name],i]:n[e.name]=i}),n}},{key:"handleValidation",value:function(e,t){var n=this,i=e instanceof Array||e instanceof NodeList?e:[e];return this._handleValidation(i,t,!0).then(function(e){return e.foundAnyError||n.tooltips&&n.tooltips.removeTooltip(),e}.bind(this))}},{key:"_handleValidation",value:function(e,t,i){var r=this,o=n._createArrayFromInvalidFieldList(e),a=o.length>0;a&&t&&r._focusElement(o[0]); +var s=i?this._customValidationsForElements(e):r.validateCustomFields();return s.then(function(n){a&&(n.foundAnyError=!0);var s=i?e:Array.from(o).concat(n.checkedFields);n.checkedFields=s;var l=r.prepareErrors(s,!1),u=l[0];return u&&(t?(r._focusElement(u),document.activeElement!==u&&r._handleTooltipHideClickAfterChange()):r._handleTooltipHideClickAfterChange(),r.showAndOrCreateTooltip(u)),n})}},{key:"_setupErrorMessages",value:function(e,t){return n.globalErrorMessageHandler?n.globalErrorMessageHandler.apply(this,[e,t]):!1}},{key:"_handleLabels",value:function(e){Object.keys(e).forEach(function(t){var n=this.getForm().querySelectorAll('[for="'+t+'"]'),i=e[t];if(n.length)for(var r=0;ro;o++){var a=e[o],s=a.getAttribute(O),l=a.validity;if(this._validators[s]){if(n._shouldNotValidateField(a)||l&&!l.customError&&!l.valid)continue;r.push(a),t.push(this._runValidation(s,a))}else s&&console.warn("data-validate was set but no validator was found")}return Promise.all(t).then(function(e){for(var t=e.length,n={checkedFields:r,foundAnyError:!1},i=0;t>i;i++)if(!e[i]){n.foundAnyError=!0;break}return n})}},{key:"removeErrors",value:function(){return this._removeElementErrors(this.form),this.tooltips&&this.tooltips.removeTooltip(),this}},{key:"prepareErrors",value:function(e,t){function i(e,t,n){var i=n.getAttribute(k)||n.id,r=t[i];i&&(r=r?r:e,t[i]=r)}t&&this.removeErrors();for(var r={},o=[],a=0;a'+f+""),o.push(s),s.flexFormsSavedValidationMessage=f}else this._markElementValid(l),this._markElementValid(s),delete s.flexFormsSavedValidationMessage,this._removeElementErrors(u);s.setCustomValidity("")}}if(1===e.length){var h=e[0],v=h.getAttribute(k)||h.id;if(v){var p=Array.from(this.getForm().querySelectorAll("["+k+'="'+v+'"], #'+v));p.forEach(function(e){var t=e.validity,n=t&&!t.valid&&this._isElementInvalidElement(e);i(n,r,e)}.bind(this))}}return this._handleLabels(r),o}},{key:"validateCustomFields",value:function(){return this._customValidationsForElements(this.form.querySelectorAll("[data-validate]"))}},{key:"getForm",value:function(){return this.form}},{key:"registerRemoteValidation",value:function(e){return this._remoteValidationFunction=e,this}},{key:"_formatErrorTooltip",value:function(e){return this.options.formatErrorTooltip.apply(this,[e])}},{key:"showAndOrCreateTooltip",value:function(e,t){var i=this;if(!this.tooltips&&this.options.createTooltips&&(this.tooltips=new d["default"](this.options.tooltipContainer,this.options.tooltipOptions)),!this.options.createTooltips)return!1;if(!e.flexFormsSavedValidity)return!1;var r=n._findErrorTarget(e);return!e.flexFormsSavedValidity.valid&&i._isElementInvalidElement(r)?(i.tooltips.createTooltip(r,i._formatErrorTooltip(e.flexFormsSavedValidationMessage),!1),!0):(t&&i.tooltips.removeTooltip(),!1)}},{key:"_isElementInvalidElement",value:function(e){return e.hasAttribute(_)}},{key:"_checkIsInvalid",value:function(e){e.preventDefault();var t=this.getForm().querySelectorAll(":invalid");return this._handleValidation(t,!0,!1)}},{key:"_getDependentFields",value:function(e){var t=e.getAttribute(F),n=[e];return t&&n.push.apply(n,Array.prototype.slice.apply(this.getForm().querySelectorAll(t))),n}},{key:"_handleTooltipInline",value:function(e){this.tooltips&&this.tooltips.removeTooltip(e)}},{key:"initFormValidation",value:function(){function e(e){return!e.hasAttribute(w)&&!e.hasAttribute(T)}function t(){u=!1,clearTimeout(l)}function n(e){var t=e.getAttribute("type");return"radio"!==t&&"checkbox"!==t&&"submit"!==t}function i(e){return!e.hasAttribute(T)}var r=this,o=this.getForm(),a=this,s="invalid";o.addEventListener(s,function(e){e.preventDefault()},!0),v["default"].addEventOnce(s,o,function d(e){a._formLoading();var t=a._checkIsInvalid(e);t&&(a.currentValidationFuture=new Promise(function(n){t.then(function(t){setTimeout(function(){v["default"].addEventOnce(s,o,d,!0)},0),n(t),a._formStopLoading(),t.foundAnyError||(a._formLoading(),a._handleSubmit(e))})}))},!0),this.addEventListener(o,"reset",function(){r.removeErrors()});var l,u=!1;a.options.realtime&&this.addEventListener(o,N,function(t){if(!a._formIsLoading()){var n=t.target;clearTimeout(l),u||(l=setTimeout(function(){var i=document.activeElement===t.target;if(e(n)){i&&a._handleTooltipInline(),u=!0;var r=a._getDependentFields(n);a._customValidationsForElements(r).then(function(){a.prepareErrors(r,!1),i&&a.showAndOrCreateTooltip(t.target),u=!1})}},a.options.realtimeTimeout))}},!0),this.addEventListener(o,"blur",function(e){e.target.flexcssKeepTooltips||a._handleTooltipInline(e.target),delete e.target.flexcssKeepTooltips},!0),this.addEventListener(o,"focus",function(e){a._formIsLoading()||n(e.target)&&setTimeout(function(){a.showAndOrCreateTooltip(e.target)},I)},!0),a.options.inlineValidation&&this.addEventListener(o,"change",function(e){var n=e.target;if(!a._formIsLoading()&&i(n)){t();var r=n.getAttribute("name"),s=r?o.querySelectorAll('[name="'+r+'"]'):[n];1===s.length&&(s=a._getDependentFields(n)),a._customValidationsForElements(s).then(function(){a.prepareErrors(s,!1),n.flexcssKeepTooltips=a.showAndOrCreateTooltip(n,!0),n.flexcssKeepTooltips&&a._handleTooltipHideClickAfterChange()})}}),this.addEventListener(o,"submit",function c(e){a._submitListener(e,c)}),f["default"].dispatchAndFire(o,M)}},{key:"_formLoading",value:function(){this.getForm().classList.add(E)}},{key:"_formStopLoading",value:function(){this.getForm().classList.remove(E)}},{key:"_formIsLoading",value:function(){return this.getForm().classList.contains(E)}},{key:"_handleTooltipHideClickAfterChange",value:function(){var t=this;this.options.createTooltips&&setTimeout(function(){v["default"].addEventOnce(m["default"].getTabEvent(),e.document.body,function(e){t._isElementInvalidElement(e.target)||t._handleTooltipInline()})},D)}},{key:"_focusElement",value:function(e){e.focus(),v["default"].scrollToElement(e,this.options.scrollToElementDiff)}},{key:"_submitListener",value:function(e,t){var n=this.getForm(),i=this,r="submit";return this._formIsLoading()?(e.preventDefault(),!1):(this._formLoading(),n.removeEventListener(r,t),this.removeErrors(),e.preventDefault(),void(n.checkValidity()?(n.addEventListener(r,t),i.currentValidationFuture=new Promise(function(e){var t=i.validateCustomFields();t.then(function(t){var n=i._getInvalidElements(),r=i.prepareErrors(n,!1),o=r[0];o&&(i._focusElement(o),i.showAndOrCreateTooltip(o,!0)),e(t)})}),i.currentValidationFuture.then(function(t){t.foundAnyError?i._formStopLoading():i._handleSubmit(e)})):(i._formStopLoading(),n.addEventListener(r,t))))}},{key:"_handleSubmit",value:function(e){this._submitFunction(this.form,e)}}],[{key:"_shouldNotValidateField",value:function(e){var t=n._findErrorTarget(e);return t instanceof HTMLFieldSetElement||void 0===e.validity||t.hasAttribute(S)&&!v["default"].isVisible(t)}},{key:"_createArrayFromInvalidFieldList",value:function(e){for(var t=[],i=0;i-1?t:e}function d(e,t){t=t||{};var n=t.body;if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=u(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function c(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}}),t}function f(e){var t=new i,n=e.getAllResponseHeaders().trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),i=n.shift().trim(),r=n.join(":").trim();t.append(i,r)}),t}function h(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof i?t.headers:new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){i.prototype.append=function(e,i){e=t(e),i=n(i);var r=this.map[e];r||(r=[],this.map[e]=r),r.push(i)},i.prototype["delete"]=function(e){delete this.map[t(e)]},i.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},i.prototype.getAll=function(e){return this.map[t(e)]||[]},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,i){this.map[t(e)]=[n(i)]},i.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(i){e.call(t,i,n,this)},this)},this)};var v={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this)},l.call(d.prototype),l.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""});return e.type="error",e};var m=[301,302,303,307,308];h.redirect=function(e,t){if(-1===m.indexOf(t))throw new RangeError("Invalid status code");return new h(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=d,e.Response=h,e.fetch=function(e,t){return new Promise(function(n,i){function r(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var o;o=d.prototype.isPrototypeOf(e)&&!t?e:new d(e,t);var a=new XMLHttpRequest;a.onload=function(){var e=1223===a.status?204:a.status;if(100>e||e>599)return void i(new TypeError("Network request failed"));var t={status:e,statusText:a.statusText,headers:f(a),url:r()},o="response"in a?a.response:a.responseText;n(new h(o,t))},a.onerror=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&v.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_DROPDOWN_CLOSED=void 0;var o=function(){function e(e,t){for(var n=0;nl)["catch"](function(){r._runOptionalClose()})}}),r._keyboardNextEvent=function(e){if(e.keyCode===C||e.keyCode===T){if(r.isLoading())return;r.switchImageByDirection(e.keyCode===T)["catch"](function(){r._runOptionalClose()})}},e.addEventListener("keydown",r._keyboardNextEvent)):r._imageContainer.addEventListener(d["default"].getTabEvent(),function(){r._runOptionalClose()}),r.highRes(o,a)})}),i._future.then(function(){r._calculateContainer(i.img)}),r._modalContainerDiv.addEventListener(s.EVENT_MODAL_CLOSED,function(){i._modalContainerDiv.parentNode.removeChild(i._modalContainerDiv),i.options.onClose.apply(r),i._isOpen=!1,i.modal.destroy(),i._keyboardNextEvent&&e.removeEventListener("keydown",r._keyboardNextEvent),i._resizeEvent&&e.removeEventListener("resize",r._resizeEvent)}),i._future}),this._nextFuture=this._future,r._widget?(this.modal=new l["default"](this._modalAppend),this.modal.close().fromWidget(r._widget).then(function(){return r._future.then(function(){return r})})):!1)):!1}}],[{key:"_setupMaxWidthHeight",value:function(e,t,n){var i=e.getAttribute(h),r=e.getAttribute(v);i&&r?(t.style.maxWidth=i+"px",t.style.maxHeight=r+"px"):(t.style.maxWidth=n.width+"px",t.style.maxHeight=n.height+"px")}}]),t}();t["default"]=O}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_TOGGLE=void 0;var o=function(){function e(e,t){for(var n=0;n=s["default"].get().smallBreakpoint};if(!h||!f)throw new Error("Could not find needed elements (Darkener and/or NavigationId)");this.darkener=h,this.darkenerClassToggle=v,this.darkenerClassToggleInstant=p,this.globalToggleClass=s["default"].get().canvasToggledClass,this.navigationContainer=f,this.navigationContainerId=f.id,this.navigationContainerId||(this.navigationContainerId=u["default"].guid(),f.id=this.navigationContainerId),a||(f.addEventListener("touchstart",function(e){m()||(c=e.touches[0].clientX,f.mustHide=!1)}),f.addEventListener("touchmove",function(e){if(!m()){var t=e.touches[0].clientX,n=f,i=n.style,r=c-t,a=n.getBoundingClientRect(),s=o>0?0>=r:r>=0;if(s){e.preventDefault(),i.transition="transform 0s ease",i.webkitTransition="-webkit-transform 0s ease",n.mustHide=o>0?-1*r>a.width/y:r>a.width/y;var l="translate3d("+-1*r+"px,0,0)";i.transform=l,i.webkitTransform=l}}}),f.addEventListener("touchend",function(){if(!m()){var e=f,t=e.style;if(e.mustHide){var n=e.getBoundingClientRect().width*o;t.transition="transform .2s ease",t.webkitTransition="-webkit-transform .2s ease";var i="translate3d("+n+"px,0,0)";t.transform=i,t.webkitTransform=i,l._remove().then(function(){l.resetTransform(t)}),l._removeInstant()}else l.resetTransform(t)}}))}return o(t,[{key:"resetTransform",value:function(e){e.transform="",e.transition="",e.webkitTransform="",e.webkitTransition=""}},{key:"_remove",value:function(n){var i=this;return new Promise(function(r){u["default"].addEventOnce(s["default"].getTransitionEvent(),i.navigationContainer,function o(i){var a=this;return i.target!==this.navigationContainer?u["default"].addEventOnce(s["default"].getTransitionEvent(),this.navigationContainer,o.bind(this)):void requestAnimationFrame(function(){t.currentOpen=null;var i=e.document.documentElement.classList;i.remove(a.darkenerClassToggle),i.remove(a.globalToggleClass),n&&c["default"].dispatchAndFire(a.navigationContainer,E),r()})}.bind(i))})}},{key:"_removeInstant",value:function(){this.navigationContainer.classList.remove(g),e.document.documentElement.classList.remove(this.darkenerClassToggleInstant),this.darkener.classList.remove(m),h["default"].getInstance().close()}},{key:"toggle",value:function(n){var i=this;n&&n.preventDefault(),this.resetTransform(this.navigationContainer.style);var r=this.darkener.classList,o=this.darkenerClassToggle,a=this.darkenerClassToggleInstant,l=this.navigationContainer.classList;if(t.currentOpen)return this.close(n);u["default"].addEventOnce(s["default"].getTransitionEvent(),this.navigationContainer,function(){n&&c["default"].dispatchAndFire(i.navigationContainer,E)}),t.currentOpen=this,h["default"].getInstance().open(this,this.navigationContainer);var d=e.document.documentElement.classList;d.add(this.globalToggleClass),d.add(a),d.add(o),r.add(m),l.add(g)}},{key:"close",value:function(e){if(this.navigationContainer.classList.contains(g)){var t=this._remove(e);return this._removeInstant(),t}return new Promise(function(e){return e()})}},{key:"registerEvents",value:function(n){var i=this,r=n||e.document;h["default"].getInstance().addScreenConstraint(t,function(e){return e0&&e.offsetHeight>0}},{key:"dashToCamelCase",value:function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}},{key:"copy",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"applyOptionsFromElement",value:function(e,n){if(!e)return n;for(var i=e.attributes,o=0;oh.width,C=n.classList;C.remove(a),C.remove(r),C.remove(s);var S=void 0,O=void 0;if(E&&!_)O=c.left-h.left-d+"px",C.add(r);else{var b=m-f.width-h.left-d+"px",w=(g+c.width/2-f.width/2||0)-h.left,L=w+f.width>h.width;o&&!L?O=w+"px":(C.add(a),O=b)}return y||l&&!p?(S=v-f.height-h.top+"px",C.add(s)):S=v+c.height-h.top+"px",n.style.cssText="top:"+S+";left:"+O+";",n}},{key:"scrollToElement",value:function(e,t){e.scrollIntoView();var n=t;if(n&&("function"==typeof n&&(n=t()),n>0)){var i=window.pageYOffset;i&&window.scroll(0,i-n)}}}]),t}();t["default"]=l}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0?this.widgets[this.widgets.length-1]:null}},{key:"_checkFixedNeeded",value:function(){var e=this;if(0!==this.widgets.length){var t=new Set(this.widgets),n=Array.from(t).some(function(t){var n=t.widget;return e.fixedScreenConstraints[n]&&e.fixedScreenConstraints[n](e.windowWidth)});n?this._addFixedContainer():this._removeFixedContainer()}}},{key:"_addFixedContainer",value:function(){var t=this;if(!this.isFixedWindowActive){h["default"].dispatchAndFire(e.document,y,{detail:this.getCurrentWidget()}),u["default"].get().scrollbarUpdateNodes.map(function(t){var n="paddingRight",i=1,o=t;if(t instanceof Array){var r=a(t,3),s=r[0],l=r[1],d=r[2];n=l,o=s,i=d||1}return{node:o,property:n,value:parseInt(e.getComputedStyle(o)[n],10)+(o.__fixedWindowMod__?0:u["default"].getScrollbarWidth()*i)+"px"}}).forEach(function(e){e.node.__fixedWindowMod__=!0,e.node.style[e.property]=e.value}),this.touchListener=function(e){e.preventDefault()};var n=!1,i=!1,o=!1,r=0;this.touchStartListener=function(e){var a=t.getCurrentWidget(),s=a.element,l=m["default"].closestCallback(e.target,function(e){return e instanceof HTMLTextAreaElement||e.hasAttribute&&e.hasAttribute(g)});if(l&&l.scrollHeight!==l.offsetHeight&&(s=l),m["default"].isPartOfNode(e.target,s)){if(o=s.scrollHeight===s.offsetHeight,r=e.touches[0].clientY,o)return!1;0===s.scrollTop?(s.scrollTop=1,n=!0):s.scrollHeight===s.scrollTop+s.offsetHeight&&(i=!0,s.scrollTop-=1)}},e.addEventListener("touchmove",this.touchListener),e.document.body.addEventListener("touchstart",this.touchStartListener),this.touchMoveListener=function(e){var a=t.getCurrentWidget(),s=a.element;if(m["default"].isPartOfNode(e.target,s)){var l=e.touches[0].clientY,u=r-l>0;if(r=l,o)return o=!1,!1;!i&&u&&e.stopImmediatePropagation(),i&&!u&&e.stopImmediatePropagation(),i||n||u||e.stopImmediatePropagation(),n=!1,i=!1}},e.document.body.addEventListener("touchmove",this.touchMoveListener),e.document.documentElement.classList.add(p),this.isFixedWindowActive=!0}}},{key:"_removeFixedContainer",value:function(){this.isFixedWindowActive&&(e.removeEventListener("touchmove",this.touchListener),e.document.body.removeEventListener("touchstart",this.touchStartListener),e.document.body.removeEventListener("touchmove",this.touchMoveListener),u["default"].get().scrollbarUpdateNodes.forEach(function(e){if(e instanceof Array){var t=a(e,2),n=t[0],i=t[1];delete n.__fixedWindowMod__,n.style[i]=""}else delete e.__fixedWindowMod__,e.style.paddingRight=""}),e.document.documentElement.classList.remove(p),h["default"].dispatchAndFire(e.document,E),this.isFixedWindowActive=!1)}},{key:"resizeListener",value:function(){this.windowWidth=e.innerWidth,this._checkFixedNeeded()}},{key:"close",value:function(){this.widgets.pop(),0===this.widgets.length&&this._removeFixedContainer()}},{key:"open",value:function(e,t){var n=!1;if("object"===("undefined"==typeof e?"undefined":r(e))){var i=e.constructor,o=this.fixedScreenConstraints[e.constructor];i&&o&&(n=o(this.windowWidth));var a=this.widgets.length;this.widgets.push({widget:i,element:t}),0===a&&n&&this._addFixedContainer()}}}],[{key:"getInstance",value:function(){if(!_){_=new t,_.windowWidth=e.innerWidth;var n=_.resizeListener.bind(_);e.addEventListener("resize",(0,c["default"])(n,500)),e.addEventListener("orientationchange",n)}return _}}]),t}();t["default"]=C}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_MODAL_ASYNC_TARGET_LOADED=t.EVENT_MODAL_INIT=t.EVENT_MODAL_OPENED=t.EVENT_MODAL_BEFORE_CLOSED=t.EVENT_MODAL_CLOSED=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n-1&&(t._modalInstances.splice(n,1),p["default"].getInstance().close())}},{key:"getModalContainer",value:function(){return this.modalContainer}},{key:"close",value:function(e){var n=this,i=n.currentOpen?f["default"].applyOptionsFromElement(n.currentOpen,f["default"].copy(n.options)):n.options;if(!i.closeOnEscape&&e instanceof KeyboardEvent)return!1;if(!i.closeOnBackgroundClick&&e&&e.type===l["default"].getTabEvent()&&!e.target.hasAttribute(g))return!1;if(n.loading)return!1;if(e&&e.preventDefault(),n.currentOpen){var o=d["default"].dispatchAndFire(n.currentOpen,A);if(o.defaultPrevented)return!1;if(this._finishState(n.currentOpen),n.currentOpen.prevModal)return n.switchModals(n.currentOpen.prevModal,n.currentOpen.prevModal.prevModal||null);d["default"].dispatch(n.currentOpen,F).withOriginal(e).fire()}if(n._removeModalFromStack(n.currentOpen),n.currentOpen=null,n.modalContainer){var r=t._modalInstances[t._modalInstances.length-1],a=n.modalContainer.classList;a.remove(C),a.remove(k),a.remove(S);for(var s=0;si;i++)t[i]=arguments[i];n.createWidget.apply(n,t)},i.addEventListener(l["default"].getTabEvent(),this.eventFunction,!1),this.eventContainer=i,this}},{key:"fromWidget",value:function(e){return this.createWidget(e)}},{key:"fromEvent",value:function(e){return this.createWidget(e)}},{key:"setDestroyOnFinish",value:function(e){return this.destroyOnFinish=e,this}},{key:"destroy",value:function(){var t=this.modalContainer,n=0===t.childNodes.length;this.eventContainer&&this.eventContainer.removeEventListener(l["default"].getTabEvent(),this.eventFunction,!0),n&&t.parentNode&&t.parentNode.removeChild(t),e.MutationObserver?!function(){var e=new MutationObserver(function(n){n.forEach(function(){0===t.childNodes.length&&(t.parentNode.removeChild(t),e.disconnect())})});e.observe(t,{childList:!0})}():t.addEventListener("DOMNodeRemoved",function(e){e.target!==t&&t.childNodes.length-1===0&&t.parentNode.removeChild(t)})}}]),t}();W._modalInstances=[],e.addEventListener("keydown",function(e){if(e.keyCode===y){var t=W._modalInstances[W._modalInstances.length-1];t&&v["default"].findWidget(t).close(e)}}),t["default"]=W}).call(t,function(){return this}())},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){return function(){clearTimeout(e.timeout),e.timeout=setTimeout(e,t)}}},,,,,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),r=i(o),a=n(2),s=i(a),l=n(4),u=i(l);t["default"]={Modal:r["default"],Settings:s["default"],Widget:u["default"]}}])}); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FlexCss=t():e.FlexCss=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="../",t(0)}([function(e,t,n){e.exports=n(19)},function(e,t){(function(e){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&e.offsetHeight>0}},{key:"dashToCamelCase",value:function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}},{key:"copy",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"applyOptionsFromElement",value:function(e,n){if(!e)return n;for(var i=e.attributes,o=0;oh.width,C=n.classList;C.remove(a),C.remove(r),C.remove(s);var S=void 0,O=void 0;if(E&&!_)O=c.left-h.left-d+"px",C.add(r);else{var b=m-f.width-h.left-d+"px",w=(g+c.width/2-f.width/2||0)-h.left,L=w+f.width>h.width;o&&!L?O=w+"px":(C.add(a),O=b)}return y||l&&!p?(S=v-f.height-h.top+"px",C.add(s)):S=v+c.height-h.top+"px",n.style.cssText="top:"+S+";left:"+O+";",n}},{key:"scrollToElement",value:function(e,t){e.scrollIntoView();var n=t;if(n&&("function"==typeof n&&(n=t()),n>0)){var i=window.pageYOffset;i&&window.scroll(0,i-n)}}}]),t}();t["default"]=l}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0?this.widgets[this.widgets.length-1]:null}},{key:"_checkFixedNeeded",value:function(){var e=this;if(0!==this.widgets.length){var t=new Set(this.widgets),n=Array.from(t).some(function(t){var n=t.widget;return e.fixedScreenConstraints[n]&&e.fixedScreenConstraints[n](e.windowWidth)});n?this._addFixedContainer():this._removeFixedContainer()}}},{key:"_addFixedContainer",value:function(){var t=this;if(!this.isFixedWindowActive){h["default"].dispatchAndFire(e.document,y,{detail:this.getCurrentWidget()}),u["default"].get().scrollbarUpdateNodes.map(function(t){var n="paddingRight",i=1,o=t;if(t instanceof Array){var r=a(t,3),s=r[0],l=r[1],d=r[2];n=l,o=s,i=d||1}return{node:o,property:n,value:parseInt(e.getComputedStyle(o)[n],10)+(o.__fixedWindowMod__?0:u["default"].getScrollbarWidth()*i)+"px"}}).forEach(function(e){e.node.__fixedWindowMod__=!0,e.node.style[e.property]=e.value}),this.touchListener=function(e){e.preventDefault()};var n=!1,i=!1,o=!1,r=0;this.touchStartListener=function(e){var a=t.getCurrentWidget(),s=a.element,l=m["default"].closestCallback(e.target,function(e){return e instanceof HTMLTextAreaElement||e.hasAttribute&&e.hasAttribute(g)});if(l&&l.scrollHeight!==l.offsetHeight&&(s=l),m["default"].isPartOfNode(e.target,s)){if(o=s.scrollHeight===s.offsetHeight,r=e.touches[0].clientY,o)return!1;0===s.scrollTop?(s.scrollTop=1,n=!0):s.scrollHeight===s.scrollTop+s.offsetHeight&&(i=!0,s.scrollTop-=1)}},e.addEventListener("touchmove",this.touchListener),e.document.body.addEventListener("touchstart",this.touchStartListener),this.touchMoveListener=function(e){var a=t.getCurrentWidget(),s=a.element;if(m["default"].isPartOfNode(e.target,s)){var l=e.touches[0].clientY,u=r-l>0;if(r=l,o)return o=!1,!1;(!i&&u||i&&!u||!i&&!n&&!u||i&&n&&u)&&e.stopImmediatePropagation(),n=!1,i=!1}},e.document.body.addEventListener("touchmove",this.touchMoveListener),e.document.documentElement.classList.add(p),this.isFixedWindowActive=!0}}},{key:"_removeFixedContainer",value:function(){this.isFixedWindowActive&&(e.removeEventListener("touchmove",this.touchListener),e.document.body.removeEventListener("touchstart",this.touchStartListener),e.document.body.removeEventListener("touchmove",this.touchMoveListener),u["default"].get().scrollbarUpdateNodes.forEach(function(e){if(e instanceof Array){var t=a(e,2),n=t[0],i=t[1];delete n.__fixedWindowMod__,n.style[i]=""}else delete e.__fixedWindowMod__,e.style.paddingRight=""}),e.document.documentElement.classList.remove(p),h["default"].dispatchAndFire(e.document,E),this.isFixedWindowActive=!1)}},{key:"resizeListener",value:function(){this.windowWidth=e.innerWidth,this._checkFixedNeeded()}},{key:"close",value:function(){this.widgets.pop(),0===this.widgets.length&&this._removeFixedContainer()}},{key:"open",value:function(e,t){var n=!1;if("object"===("undefined"==typeof e?"undefined":r(e))){var i=e.constructor,o=this.fixedScreenConstraints[e.constructor];i&&o&&(n=o(this.windowWidth));var a=this.widgets.length;this.widgets.push({widget:i,element:t}),0===a&&n&&this._addFixedContainer()}}}],[{key:"getInstance",value:function(){if(!_){_=new t,_.windowWidth=e.innerWidth;var n=_.resizeListener.bind(_);e.addEventListener("resize",(0,c["default"])(n,500)),e.addEventListener("orientationchange",n)}return _}}]),t}();t["default"]=C}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_MODAL_ASYNC_TARGET_LOADED=t.EVENT_MODAL_INIT=t.EVENT_MODAL_OPENED=t.EVENT_MODAL_BEFORE_CLOSED=t.EVENT_MODAL_CLOSED=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n-1&&(t._modalInstances.splice(n,1),p["default"].getInstance().close())}},{key:"getModalContainer",value:function(){return this.modalContainer}},{key:"close",value:function(e){var n=this,i=n.currentOpen?f["default"].applyOptionsFromElement(n.currentOpen,f["default"].copy(n.options)):n.options;if(!i.closeOnEscape&&e instanceof KeyboardEvent)return!1;if(!i.closeOnBackgroundClick&&e&&e.type===l["default"].getTabEvent()&&!e.target.hasAttribute(g))return!1;if(n.loading)return!1;if(e&&e.preventDefault(),n.currentOpen){var o=d["default"].dispatchAndFire(n.currentOpen,A);if(o.defaultPrevented)return!1;if(this._finishState(n.currentOpen),n.currentOpen.prevModal)return n.switchModals(n.currentOpen.prevModal,n.currentOpen.prevModal.prevModal||null);d["default"].dispatch(n.currentOpen,F).withOriginal(e).fire()}if(n._removeModalFromStack(n.currentOpen),n.currentOpen=null,n.modalContainer){var r=t._modalInstances[t._modalInstances.length-1],a=n.modalContainer.classList;a.remove(C),a.remove(k),a.remove(S);for(var s=0;si;i++)t[i]=arguments[i];n.createWidget.apply(n,t)},i.addEventListener(l["default"].getTabEvent(),this.eventFunction,!1),this.eventContainer=i,this}},{key:"fromWidget",value:function(e){return this.createWidget(e)}},{key:"fromEvent",value:function(e){return this.createWidget(e)}},{key:"setDestroyOnFinish",value:function(e){return this.destroyOnFinish=e,this}},{key:"destroy",value:function(){var t=this.modalContainer,n=0===t.childNodes.length;this.eventContainer&&this.eventContainer.removeEventListener(l["default"].getTabEvent(),this.eventFunction,!0),n&&t.parentNode&&t.parentNode.removeChild(t),e.MutationObserver?!function(){var e=new MutationObserver(function(n){n.forEach(function(){0===t.childNodes.length&&(t.parentNode.removeChild(t),e.disconnect())})});e.observe(t,{childList:!0})}():t.addEventListener("DOMNodeRemoved",function(e){e.target!==t&&t.childNodes.length-1===0&&t.parentNode.removeChild(t)})}}]),t}();W._modalInstances=[],e.addEventListener("keydown",function(e){if(e.keyCode===y){var t=W._modalInstances[W._modalInstances.length-1];t&&v["default"].findWidget(t).close(e)}}),t["default"]=W}).call(t,function(){return this}())},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){return function(){clearTimeout(e.timeout),e.timeout=setTimeout(e,t)}}},,,,,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),r=i(o),a=n(2),s=i(a),l=n(4),u=i(l);t["default"]={Modal:r["default"],Settings:s["default"],Widget:u["default"]}}])}); //# sourceMappingURL=../maps/modal.min.map \ No newline at end of file diff --git a/build/maps/flexcss.map b/build/maps/flexcss.map index 88faf06f..ce916a92 100644 --- a/build/maps/flexcss.map +++ b/build/maps/flexcss.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6*","webpack:///webpack/bootstrap e25fe34d2bc7e7cf2068?8d0c*","webpack:///./src/main/modules/All.js","webpack:///./src/main/Form.js","webpack:///./src/main/Tooltip.js","webpack:///./src/main/util/Util.js","webpack:///./src/main/DestroyableWidget.js","webpack:///./src/main/util/Settings.js","webpack:///./~/isomorphic-fetch/fetch-npm-browserify.js","webpack:///./~/whatwg-fetch/fetch.js","webpack:///./src/main/util/Event.js","webpack:///./src/main/Modal.js","webpack:///./src/main/Widget.js","webpack:///./src/main/lib/FixedWindow.js","webpack:///./src/main/lib/debounce.js","webpack:///./src/main/Toggleable.js","webpack:///./src/main/OffCanvas.js","webpack:///./src/main/Dropdown.js","webpack:///./src/main/LightBox.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SC3BS;SAAM;SAAS;SAAO;SAAQ;SAAU;SA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,IAA4B,CAAC,CAAE,OAAO,SAAP,CAAiB,gBAAjB,CAD/B;cAApC;AAGA,oBAAO,OAAO,sBAAP,CAJY;;;;;;;;;;gCAWT;AACV,iBAAI,CAAC,OAAO,mBAAP,EAA4B;AAC7B,wBAAO,mBAAP,GAA6B,mBAAmB,MAAnB,CADA;cAAjC;AAGA,oBAAO,OAAO,mBAAP,CAJG;;;;;;;;;8CAUc;AACxB,oBAAO,OAAO,8BAAP,CADiB;;;;;;;;;6CAOD;AACvB,oBAAO,OAAO,6BAAP,CADgB;;;;;;;;;uCAON;AACjB,oBAAO,OAAO,uBAAP,CADU;;;;YA5EnB;;;mBAiFS,S;;;;;;;ACvJf;AACA;AACA;AACA;AACA;AACA;;;;;;;ACLA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAO;;AAEP,MAAK;AACL;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA,wDAAuD;AACvD,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA,wCAAuC,0BAA0B;AACjE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,gCAA+B,0BAA0B,eAAe;AACxE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAO;;AAEP;AACA,MAAK;AACL;AACA;AACA,EAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxWD,EAAC,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Aa,oBAAU,KAAK,YAAL,CAAvB;;AADc,wBAGP,KAAK,KAAL,CAAW,KAAX,GAAmB,UAAnB,CAA8B,KAAK,OAAL,CAA9B,CAA4C,IAA5C,CAAiD,YAAM;AAC1D,4BAAO,KAAK,OAAL,CAAa,IAAb,CAAkB,YAAM;AAC3B,gCAAO,IAAP,CAD2B;sBAAN,CAAzB,CAD0D;kBAAN,CAAxD,CAHc;cAAlB;AASA,oBAAO,KAAP,CAjJS;;;;8CAzJe,QAAQ,KAAK,aAAa;AAClD,iBAAM,eAAe,OAAO,YAAP,CAAoB,cAApB,CAAf,CAD4C;AAElD,iBAAM,gBAAgB,OAAO,YAAP,CAAoB,eAApB,CAAhB,CAF4C;AAGlD,iBAAI,gBAAgB,aAAhB,EAA+B;AAC/B,qBAAI,KAAJ,CAAU,QAAV,GAAqB,eAAe,IAAf,CADU;AAE/B,qBAAI,KAAJ,CAAU,SAAV,GAAsB,gBAAgB,IAAhB,CAFS;cAAnC,MAGO;AACH,qBAAI,KAAJ,CAAU,QAAV,GAAqB,YAAY,KAAZ,GAAoB,IAApB,CADlB;AAEH,qBAAI,KAAJ,CAAU,SAAV,GAAsB,YAAY,MAAZ,GAAqB,IAArB,CAFnB;cAHP;;;;YAhLF;;;mBA4dS,S","file":"js/flexcss.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap e25fe34d2bc7e7cf2068\n **/","import Form from '../Form';\nimport Tooltip from '../Tooltip';\nimport Modal from '../Modal';\nimport Widget from '../Widget';\nimport Settings from '../util/Settings';\nimport Toggleable from '../Toggleable';\nimport OffCanvas from '../OffCanvas';\nimport Dropdown from '../Dropdown';\nimport LightBox from '../LightBox';\nimport Util from '../util/Util';\n\nexport { Form, Tooltip, Modal, Widget, Settings, Util, Toggleable, OffCanvas, Dropdown, LightBox };\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/All.js\n **/","/*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Form\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Tooltip from './Tooltip';\nimport 'isomorphic-fetch';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport DestroyableWidget from './DestroyableWidget';\n\nconst LOADING_CLASS = 'loading';\nconst DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\nconst REMOTE = 'data-remote';\nconst REMOTE_ACTION = 'data-remote-action';\nconst ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\nconst ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\nconst ATTR_VALIDATOR = 'data-validate';\nconst ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\nconst ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\nconst ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\nconst ATTR_ERROR_TARGET_ID = 'data-error-target';\nconst ATTR_DEPENDS = 'data-depends-selector';\nconst CONST_USE_JSON = 'json';\nconst CONST_REALTIME_EVENT = 'input';\nconst FOCUS_TOOLTIP_DELAY = 20;\nconst CLICK_TOOLTIP_DELAY = 150;\n\n/**\n * Triggered when form is fully initialized and handlers are binded\n * @type {string}\n */\nexport const EVENT_FORM_READY = 'flexcss.form.ready';\n/**\n * Fires when a form is submitted, cancelable\n * @type {string}\n */\nexport const EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n/**\n * Fired directly after the form has been submitted via ajax\n * @type {string}\n */\nexport const EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n/**\n * Fired when ajax events did complete\n * @type {string}\n */\nexport const EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\n/**\n * A HTML5 Form Validation replacement\n */\n\nclass Form extends DestroyableWidget {\n /**\n * @param {HTMLElement} form\n * @param [options] optional options\n */\n constructor(form, options) {\n super();\n\n if (!(form instanceof HTMLFormElement)) {\n throw 'argument {0} form needs to be an form element';\n }\n\n /**\n * The Form\n * @type {HTMLElement}\n */\n this.form = form;\n\n /**\n * @type {Tooltip}\n */\n this.tooltips = null;\n\n /**\n * @type {Promise}\n */\n this.currentValidationFuture = new Promise(() => {\n });\n\n /**\n * Default options\n * @type {Object}\n */\n this.options = {\n // if true creates tooltips above element, uses FlexCss Tooltips\n createTooltips: true,\n // if true appends error message after input element\n appendError: false,\n // type of ajax submit\n ajaxSubmitType: 'POST',\n // json content type if ajax method is set to json\n ajaxJsonContentType: 'application/json; charset=utf-8',\n // allow inline validation\n inlineValidation: true,\n // validate in realtime (on `input` event)\n realtime: true,\n // timeout when realtime event should be captured\n realtimeTimeout: 250,\n // formatting method for an error\n formatErrorTooltip: (error) => {\n return ' ' + error;\n },\n // the class that will be put on the element to mark it failed validation\n inputErrorClass: 'invalid',\n // the container class for error messages below an element\n containerErrorClass: 'form-error',\n // additional options for fetch\n fetchOptions: {\n credentials: 'include'\n },\n // the container for tooltips\n tooltipContainer: form,\n tooltipOptions: {\n containerClass: 'error-tooltip'\n },\n // if you have a fixed header, either set a number or function here\n scrollToElementDiff: 0\n };\n\n // overwrite default options\n Object.assign(this.options, options);\n\n // apply settings from attributes\n Util.applyOptionsFromElement(form, this.options);\n\n // set form class as widget\n // Forms are very different to classical widgets,\n // we will not use our base widget class for this but just self\n form.hfWidgetInstance = this;\n\n /**\n * A List of Validators\n * @type {Object}\n * @private\n */\n this._validators = Form.globalValidators;\n\n /**\n * @type {Function}\n * @private\n */\n this._remoteValidationFunction = null;\n\n this.initFormValidation();\n }\n\n destroy() {\n super.destroy();\n if (this.tooltips) {\n this.tooltips.destroy();\n }\n }\n\n /**\n * Submits this form, either via ajax or just classical (default)\n * @param {HTMLFormElement} thisForm\n * @param {Event} e\n * @private\n * @returns {Promise|boolean} returns false if submit is cancled\n */\n _submitFunction(thisForm, e) {\n var shouldUseAjax = thisForm.getAttribute(REMOTE), ajaxPostUrl =\n thisForm.getAttribute(REMOTE_ACTION) ||\n thisForm.getAttribute('action') || window.location.href,\n useJson = CONST_USE_JSON === shouldUseAjax, self = this;\n\n var ev = Event.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\n // abort execution is event was prevented\n if (ev.defaultPrevented) {\n self._formStopLoading();\n return false;\n }\n\n if (shouldUseAjax === null) {\n // submit\n return thisForm.submit();\n }\n // prevent form from submit normally\n e.preventDefault();\n\n // add information that this is an XMLHttpRequest request (used by some frameworks)\n let defaultHeaders = {\n 'X-Requested-With': 'XMLHttpRequest'\n };\n\n // setup default headers\n if (useJson) {\n Object.assign(defaultHeaders, {\n 'Content-Type': this.options.ajaxJsonContentType\n });\n }\n let defaultOptions = Object.assign(this.options.fetchOptions, {\n headers: defaultHeaders,\n method: this.options.ajaxSubmitType\n });\n\n // support either JSON request payload or normal payload submission\n var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: JSON.stringify(this.serialize())\n })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: new FormData(thisForm)\n }));\n\n Event.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\n return serverCall.then((r) => {\n (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\n Event.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n // always remove error class\n self._formStopLoading();\n });\n }\n\n /**\n * Serializes a form to a json object\n * @returns {Object}\n */\n serialize() {\n var selectors = [\n 'input[name]:not([type=\"radio\"]):enabled',\n 'input[type=\"radio\"][name]:checked',\n 'select[name]:enabled',\n 'textarea[name]:enabled'\n ], inputs = this.form.querySelectorAll(selectors.join(',')), result = {};\n\n Array.prototype.forEach.call(inputs, function (input) {\n var exists = result[input.name], value = input.value;\n if (exists instanceof Array) {\n exists.push(value);\n } else if (exists) {\n result[input.name] = [result[input.name], value];\n } else {\n result[input.name] = value;\n }\n });\n\n return result;\n }\n\n /**\n * Handles the chain of validation on given fields\n *\n * @param {HTMLElement|Array|NodeList} field\n * @param [focus] optional focus first error\n * @returns {Promise}\n */\n handleValidation(field, focus) {\n var fields = (field instanceof Array || field instanceof NodeList) ? field : [field];\n return this._handleValidation(fields, focus, true).then(((r) => {\n if (!r.foundAnyError) {\n // remove tooltips\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n }\n return r;\n }).bind(this));\n }\n\n /**\n * Handles errors on given node list\n * @param {NodeList} toValidateFields\n * @param {boolean} focus\n * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n * @returns {Promise}\n * @private\n */\n _handleValidation(toValidateFields, focus, scoped) {\n var self = this;\n var arr = Form._createArrayFromInvalidFieldList(toValidateFields), isLocalInvalid = arr.length > 0;\n // focus must appear in the same frame for iOS devices\n if (isLocalInvalid && focus) {\n self._focusElement(arr[0]);\n }\n var validation = scoped ? this._customValidationsForElements(toValidateFields) :\n self.validateCustomFields();\n return validation.then((r) => {\n if (isLocalInvalid) {\n // combine browser and custom validators\n r.foundAnyError = true;\n }\n // get a unique field list of all fields that need to be checked and rendered\n // it's possible that we have duplicates in non scoped mode\n let thisToValidateFields = scoped ? toValidateFields :\n Array.from(arr).concat(r.checkedFields);\n r.checkedFields = thisToValidateFields;\n let foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n firstInvalidField = foundInvalidFields[0];\n if (firstInvalidField) {\n if (focus) {\n self._focusElement(firstInvalidField);\n // if element could not be focused:\n if (document.activeElement !== firstInvalidField) {\n self._handleTooltipHideClickAfterChange();\n }\n } else {\n self._handleTooltipHideClickAfterChange();\n }\n self.showAndOrCreateTooltip(firstInvalidField);\n }\n return r;\n });\n }\n\n /**\n * @param {HTMLElement} field\n * @param {ValidityState} validity\n * @returns {*}\n * @private\n */\n\n _setupErrorMessages(field, validity) {\n return Form.globalErrorMessageHandler ?\n Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n }\n\n /**\n * Handles class labels for elements\n * @param {Object} fields\n * @private\n */\n _handleLabels(fields) {\n Object.keys(fields).forEach(function (id) {\n let labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'), invalid = fields[id];\n if (labels.length) {\n for (let labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n let labelEl = labels[labelsIndex];\n // we can't use toggle attribute, not supported in IE\n if (invalid) {\n this._markElementInvalid(labelEl);\n } else {\n this._markElementValid(labelEl);\n }\n }\n }\n }.bind(this));\n }\n\n /**\n * @param el\n * @private\n */\n _markElementInvalid(el) {\n el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n el.classList.add(this.options.inputErrorClass);\n }\n\n /**\n * @param el\n * @private\n */\n _markElementValid(el) {\n el.removeAttribute(DATA_ELEMENT_INVALID);\n el.classList.remove(this.options.inputErrorClass);\n }\n\n /**\n * A List of invalid elements (:invalid)\n * @returns {Array}\n * @private\n */\n _getInvalidElements() {\n return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n return !(r instanceof HTMLFieldSetElement);\n });\n }\n\n /**\n * @param {HTMLElement} thisParent\n * @private\n */\n _removeElementErrors(thisParent) {\n let errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass), inputsWithErrorClasses =\n thisParent.querySelectorAll(`[${DATA_ELEMENT_INVALID}]`);\n for (let elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n }\n for (let inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n let el = inputsWithErrorClasses[inputErrorIndex];\n this._markElementValid(el);\n }\n }\n\n\n /**\n * Registers a custom validator\n * @param {String} name\n * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n * we can't rely on that\n * @returns {Form}\n */\n registerValidator(name, validator) {\n this._validators[name] = validator;\n return this;\n }\n\n /**\n * Runs async validation\n * @param {String} validationRef\n * @param {HTMLElement} field\n * @returns {Promise}\n * @private\n */\n _runValidation(validationRef, field) {\n if (!this._validators[validationRef]) {\n throw 'Could not found validator: ' + validationRef;\n }\n var cl = field.classList, future = this._validators[validationRef].apply(this, [field, this.form]);\n cl.add(LOADING_CLASS);\n future.then(() => {\n cl.remove(LOADING_CLASS);\n });\n return future;\n }\n\n\n /**\n * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n *\n * @param {Array|NodeList} fields\n * @returns {Promise} contains either true if validations passed or false if something went wrong\n * @private\n */\n _customValidationsForElements(fields) {\n var futures = [], fieldsLength = fields.length, checkedFields = [];\n for (var iVal = 0; iVal < fieldsLength; iVal++) {\n var field = fields[iVal], validationRef = field.getAttribute(ATTR_VALIDATOR), validity = field.validity;\n if (this._validators[validationRef]) {\n // use local validation first and then continue with custom validations\n if (Form._shouldNotValidateField(field) || (validity && !validity.customError && !validity.valid)) {\n continue;\n }\n checkedFields.push(field);\n futures.push(this._runValidation(validationRef, field));\n } else {\n if (validationRef) {\n console.warn('data-validate was set but no validator was found');\n }\n }\n }\n return Promise.all(futures).then(function (allFutures) {\n let l = allFutures.length;\n let result = {\n checkedFields: checkedFields,\n foundAnyError: false\n };\n for (var fI = 0; fI < l; fI++) {\n if (!allFutures[fI]) {\n result.foundAnyError = true;\n break;\n }\n }\n return result;\n });\n }\n\n /**\n * Remove all errors for this form\n * @returns {Form}\n */\n removeErrors() {\n this._removeElementErrors(this.form);\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n return this;\n }\n\n /**\n * Will handle errors for given fields\n * @param {Array|NodeList} fields\n * @param {Boolean} removeAllErrors\n */\n prepareErrors(fields, removeAllErrors) {\n if (removeAllErrors) {\n this.removeErrors();\n }\n let labelGroups = {}, invalidFields = [];\n\n function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n let additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) ||\n field.id, group = thisLabelGroup[additionalLabels];\n if (additionalLabels) {\n // check additionally if field is currently marked as invalid\n // so the label is not marked as error if no field is marked as one\n group = group ? group : isInvalid;\n thisLabelGroup[additionalLabels] = group;\n }\n }\n\n // We save all validations in an extra property because we need to reset the validity due some\n // implementation errors in other browsers then chrome\n for (let i = 0; i < fields.length; i++) {\n let field = fields[i], errorTarget = Form._findErrorTarget(field), parent = errorTarget.parentNode,\n validity = field.validity, isInvalid = validity && !validity.valid;\n if (Form._shouldNotValidateField(field)) {\n continue;\n }\n field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n handleAdditionalLabels(isInvalid, labelGroups, field);\n if (isInvalid) {\n if (!removeAllErrors) {\n // Remove current errors:\n this._removeElementErrors(parent);\n }\n // setup custom error messages:\n this._setupErrorMessages(field, validity);\n let msg = field.validationMessage;\n\n // mark fields as invalid\n this._markElementInvalid(errorTarget);\n this._markElementInvalid(field);\n\n if (this.options.appendError) {\n parent.insertAdjacentHTML(\"beforeend\",\n `
${msg}
`);\n }\n invalidFields.push(field);\n field.flexFormsSavedValidationMessage = msg;\n } else {\n // restore invalid fields\n this._markElementValid(errorTarget);\n this._markElementValid(field);\n\n // cleanup\n delete field.flexFormsSavedValidationMessage;\n\n // remove error markup\n this._removeElementErrors(parent);\n }\n // We have to reset the custom validity here to allow native validations work again\n field.setCustomValidity('');\n }\n // if validates a single field we need to check the linked fields to a label:\n if (fields.length === 1) {\n let field = fields[0];\n let id = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id;\n if (id) {\n let linkedFields = Array.from(\n this.getForm().querySelectorAll(`[${ATTR_DATA_CUSTOM_LABEL}=\"${id}\"], #${id}`));\n linkedFields.forEach(function (thisField) {\n let validity = thisField.validity, isInvalid = validity && !validity.valid &&\n this._isElementInvalidElement(thisField);\n handleAdditionalLabels(isInvalid, labelGroups, thisField);\n }.bind(this));\n }\n }\n this._handleLabels(labelGroups);\n return invalidFields;\n }\n\n /**\n * Validates all custom fields\n * @returns {Promise}\n */\n validateCustomFields() {\n return this._customValidationsForElements(\n this.form.querySelectorAll(\"[data-validate]\"));\n }\n\n /**\n * Tests if a field should be validated\n * @param {HTMLElement} field\n * @returns {boolean}\n * @private\n */\n static _shouldNotValidateField(field) {\n var target = Form._findErrorTarget(field);\n return target instanceof HTMLFieldSetElement || field.validity === undefined ||\n (target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !Util.isVisible(target));\n }\n\n /**\n * Creates an array from a node list with invalid items\n * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n * @param list\n * @returns {Array}\n * @private\n */\n static _createArrayFromInvalidFieldList(list) {\n var arr = [];\n for (var i = 0; i < list.length; ++i) {\n var n = list[i];\n if (n.validity && !n.validity.valid) {\n if (!Form._shouldNotValidateField(n)) {\n arr.push(n);\n }\n }\n }\n return arr;\n }\n\n\n /**\n * This form\n * @returns {HTMLElement}\n */\n getForm() {\n return this.form;\n }\n\n /**\n * Registers a function that handles remote validation\n * @param {Function} func\n * @returns {Form}\n */\n registerRemoteValidation(func) {\n this._remoteValidationFunction = func;\n return this;\n }\n\n\n /**\n * Formats the error content for the tooltip\n * @param {String} error\n * @returns {String}\n * @private\n */\n _formatErrorTooltip(error) {\n return this.options.formatErrorTooltip.apply(this, [error]);\n }\n\n /**\n * Tries to find a custom error target on given target\n * @param target\n * @returns {HTMLElement}\n * @private\n */\n static _findErrorTarget(target) {\n var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n if (!foundTarget) {\n throw 'Given error target did not exsits:' + target;\n }\n return foundTarget;\n }\n\n /**\n * Creates a tooltip at given element, will only create a new instance if not created\n * @param {HTMLElement} target\n * @param {Boolean} [remove]\n */\n showAndOrCreateTooltip(target, remove) {\n var self = this;\n if (!this.tooltips && this.options.createTooltips) {\n this.tooltips = new Tooltip(this.options.tooltipContainer, this.options.tooltipOptions);\n }\n if (!this.options.createTooltips) {\n return false;\n }\n\n if (!target.flexFormsSavedValidity) {\n return false;\n }\n var errorTarget = Form._findErrorTarget(target);\n if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n self.tooltips.createTooltip(errorTarget,\n self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n return true;\n } else {\n if (remove) {\n self.tooltips.removeTooltip();\n }\n }\n return false;\n }\n\n /**\n * Checks if element is marked as invalid\n * @param {HTMLElement} el\n * @returns {boolean}\n * @private\n */\n _isElementInvalidElement(el) {\n return el.hasAttribute(DATA_ELEMENT_INVALID);\n }\n\n /**\n * Handles invalid event of a form\n * @param {Event} e\n * @returns {Promise|boolean}\n * @private\n */\n _checkIsInvalid(e) {\n e.preventDefault();\n var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n return this._handleValidation(invalidFields, true, false);\n }\n\n /**\n * Will query dependent fields (by selector) that should be validated with given field\n * @param field\n * @returns {NodeList|[]}\n * @private\n */\n _getDependentFields(field) {\n let fieldSelector = field.getAttribute(ATTR_DEPENDS), base = [field];\n if (fieldSelector) {\n base.push.apply(base, Array.prototype.slice.apply(\n this.getForm().querySelectorAll(fieldSelector)));\n }\n return base;\n }\n\n /**\n * @private\n * @param {HTMLElement} [target]\n */\n _handleTooltipInline(target) {\n if (this.tooltips) {\n this.tooltips.removeTooltip(target);\n }\n }\n\n /**\n * Initializes validation for a given form, registers event handlers\n */\n initFormValidation() {\n // Suppress the default bubbles\n var form = this.getForm(),\n self = this,\n invalidEvent = 'invalid';\n\n /**\n * Validates if is valid realtime element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidRealtimeElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n form.addEventListener(invalidEvent, function (e) {\n e.preventDefault();\n }, true);\n\n Util.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n self._formLoading();\n var result = self._checkIsInvalid(e);\n if (result) {\n self.currentValidationFuture = new Promise((resolve) => {\n result.then(function (r) {\n setTimeout(function () {\n Util.addEventOnce(invalidEvent, form, handleInvalid, true);\n }, 0);\n resolve(r);\n self._formStopLoading();\n if (!r.foundAnyError) {\n self._formLoading();\n self._handleSubmit(e);\n }\n });\n });\n }\n }, true);\n\n this.addEventListener(form, 'reset', () => {\n this.removeErrors();\n });\n\n // Timeout for keys:\n var TIMEOUT_KEYDOWN, KEYDOWN_RUNNING = false;\n\n // resets keydown events\n function clearKeyDownTimeout() {\n KEYDOWN_RUNNING = false;\n clearTimeout(TIMEOUT_KEYDOWN);\n }\n\n // setup custom realtime event if given\n if (self.options.realtime) {\n this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n if (self._formIsLoading()) {\n return;\n }\n var target = e.target;\n clearTimeout(TIMEOUT_KEYDOWN);\n if (KEYDOWN_RUNNING) {\n return;\n }\n TIMEOUT_KEYDOWN = setTimeout(() => {\n let isStillTarget = document.activeElement === e.target;\n if (!_checkIsValidRealtimeElement(target)) {\n return;\n }\n if (isStillTarget) {\n self._handleTooltipInline();\n }\n KEYDOWN_RUNNING = true;\n let dependentFields = self._getDependentFields(target);\n self._customValidationsForElements(dependentFields).then(function () {\n self.prepareErrors(dependentFields, false);\n if (isStillTarget) {\n self.showAndOrCreateTooltip(e.target);\n }\n // future must be resolved before another event can be started\n KEYDOWN_RUNNING = false;\n });\n }, self.options.realtimeTimeout);\n }, true);\n }\n\n /**\n * Validates if target is a valid input field to check blur and focus events\n *\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidBlurFocusElement(target) {\n let attr = target.getAttribute(\"type\");\n return (attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\");\n }\n\n /**\n * Validates if is valid inline-check element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidInlineCheckElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n this.addEventListener(form, 'blur', function (e) {\n // do not hide tooltip after change event\n if (!e.target.flexcssKeepTooltips) {\n self._handleTooltipInline(e.target);\n }\n delete e.target.flexcssKeepTooltips;\n }, true);\n\n // handle focus on input elements\n // will show an error if field is invalid\n this.addEventListener(form, \"focus\", function (e) {\n if (self._formIsLoading()) {\n return;\n }\n // do not track errors for checkbox and radios on focus:\n if (!_checkIsValidBlurFocusElement(e.target)) {\n return;\n }\n // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n // just have been hidden (on blur). Maybe fix this with a queue later\n setTimeout(function () {\n self.showAndOrCreateTooltip(e.target);\n }, FOCUS_TOOLTIP_DELAY);\n }, true);\n\n if (self.options.inlineValidation) {\n // Handle change for checkbox, radios and selects\n this.addEventListener(form, \"change\", function (e) {\n const target = e.target;\n if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n return;\n }\n clearKeyDownTimeout();\n const name = target.getAttribute('name');\n let inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n // we only support dependent fields for a single widgets right now\n if (inputs.length === 1) {\n inputs = self._getDependentFields(target);\n }\n self._customValidationsForElements(inputs).then(function () {\n self.prepareErrors(inputs, false);\n target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n if (target.flexcssKeepTooltips) {\n self._handleTooltipHideClickAfterChange();\n }\n });\n });\n }\n\n // prevent default if form is invalid\n this.addEventListener(form, \"submit\", function listener(e) {\n self._submitListener(e, listener);\n });\n\n Event.dispatchAndFire(form, EVENT_FORM_READY);\n }\n\n /* Loading states, unfortunately we can't check if a promise is pending :/*/\n /* TODO: Maybe wrap promise to extend this functionality */\n\n _formLoading() {\n this.getForm().classList.add(LOADING_CLASS);\n }\n\n _formStopLoading() {\n this.getForm().classList.remove(LOADING_CLASS);\n }\n\n _formIsLoading() {\n return this.getForm().classList.contains(LOADING_CLASS);\n }\n\n // this defines the logic after a change event when a tooltip is shown\n // because we call this method inside the change event, the click would be immeditally executed with the change\n // event when not using setTimeout(). There might be another solution for this...\n _handleTooltipHideClickAfterChange() {\n const self = this;\n if (this.options.createTooltips) {\n setTimeout(function () {\n Util.addEventOnce(Settings.getTabEvent(), global.document.body, function (t) {\n if (!self._isElementInvalidElement(t.target)) {\n self._handleTooltipInline();\n }\n });\n }, CLICK_TOOLTIP_DELAY);\n }\n }\n\n _focusElement(el) {\n el.focus();\n Util.scrollToElement(el, this.options.scrollToElementDiff);\n }\n\n /**\n * Listener that is executed on form submit\n * @param e\n * @param submitListener\n * @returns {boolean}\n * @private\n */\n _submitListener(e, submitListener) {\n\n const form = this.getForm(),\n self = this,\n submitEvent = 'submit';\n\n if (this._formIsLoading()) {\n e.preventDefault();\n return false;\n }\n this._formLoading();\n form.removeEventListener(submitEvent, submitListener);\n this.removeErrors();\n e.preventDefault();\n // reset:\n if (form.checkValidity()) {\n form.addEventListener(submitEvent, submitListener);\n // It's possible that the form is valid but the custom validations need to be checked again:\n self.currentValidationFuture = new Promise((resolve) => {\n var validation = self.validateCustomFields();\n validation.then(function (r) {\n // because custom validators may mark multiple fields as invalid, we get all of them in the form\n var fields = self._getInvalidElements(),\n errors = self.prepareErrors(fields, false), firstError = errors[0];\n if (firstError) {\n self._focusElement(firstError);\n self.showAndOrCreateTooltip(firstError, true);\n }\n resolve(r);\n });\n });\n self.currentValidationFuture.then(function (r) {\n if (!r.foundAnyError) {\n // Handle submitting the form to server:\n self._handleSubmit(e);\n } else {\n self._formStopLoading();\n }\n });\n } else {\n self._formStopLoading();\n form.addEventListener(submitEvent, submitListener);\n }\n }\n\n\n /**\n * Handles submitting, optionally allows to stop submitting\n * @param e\n * @private\n */\n _handleSubmit(e) {\n this._submitFunction(this.form, e);\n }\n\n\n /**\n * Registers a global event Handler\n * @param errorFunc\n */\n static registerErrorMessageHandler(errorFunc) {\n Form.globalErrorMessageHandler = errorFunc;\n }\n\n /**\n * Initialize forms for a specific selector\n * @param {String} selector\n * @param {Object} [options]\n * @return {array.
}\n */\n static init(selector, options) {\n var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') :\n document.querySelectorAll(selector), instances = [];\n for (var i = 0; i < forms.length; i++) {\n instances.push(new Form(forms[i], options));\n }\n return instances;\n }\n\n\n /**\n * Registers a global validator that is usable on all form instances\n * @param {String} name\n * @param {Function} validator\n * @returns {Function}\n */\n static registerValidator(name, validator) {\n Form.globalValidators[name] = validator;\n return Form;\n }\n\n /**\n * Registers a global function that is called when a form should validate the response of a server\n * @param {Function} func\n * @returns {Form}\n */\n static registerGlobalRemoteValidationFunction(func) {\n Form.globalRemoteValidationFunction = func;\n return Form;\n }\n}\n\n\n/**\n * Global validators\n * @type {Array}\n */\nForm.globalValidators = [];\n\n/**\n * Global Remote validation function\n */\nForm.globalRemoteValidationFunction = function () {\n};\n\n/**\n * Handles custom error messages extracts custom message by default\n */\nForm.globalErrorMessageHandler = (field, validity) => {\n if (!validity.customError) {\n let customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n if (customMsg) {\n field.setCustomValidity(customMsg);\n }\n }\n};\n\nexport default Form;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Form.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Tooltip\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport DestroyableWidget from './DestroyableWidget';\nimport Settings from './util/Settings';\n\n/**\n * @type {string}\n */\nconst CLASS_NAMES_TOOLTIP = 'tooltip-container';\n/**\n * @type {string}\n */\nconst CLASS_NAMES_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_CLASSNAME = 'data-class';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\n/**\n * @type {HTMLDocument}\n */\nconst doc = global.document;\n\n/**\n * Simple Tooltip\n */\nclass Tooltip extends DestroyableWidget {\n\n /**\n * Creates a Tooltip\n * @param {HTMLElement|String} DelegateContainer\n * @param {Object} [options]\n */\n constructor(DelegateContainer, options) {\n super();\n /**\n * The Container where possible events are captured\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n if (!this.container) {\n throw new Error('Could not create Tooltip, DelegateContainer not found');\n }\n\n /**\n * The Container where tooltips are stored for this instance\n * @type {HTMLElement}\n */\n this.tooltipContainer = null;\n\n /**\n * Default Options\n */\n this.options = {\n containerClass: '',\n selectorAttribute: 'data-tooltip',\n collisionContainer: this.container\n };\n\n Object.assign(this.options, options || {});\n }\n\n /**\n * Creates and shows a tooltip\n * @param {HTMLElement} target where is this tooltip positioned\n * @param {String} text text content in tooltip, will be NOT escaped\n * @param {Boolean} [removeTitle] removes title element if given\n * @param {Node} [positionRelative]\n */\n createTooltip(target, text, removeTitle, positionRelative) {\n // abort if text is empty\n if (!text || text && text.trim() === '') {\n return;\n }\n\n if (Settings.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n return;\n }\n\n let tooltipContainer = this.tooltipContainer;\n\n if (!tooltipContainer) {\n tooltipContainer = doc.createElement('div');\n this.container.appendChild(tooltipContainer);\n this.tooltipContainer = tooltipContainer;\n }\n this._restoreClassNames(tooltipContainer, target);\n\n tooltipContainer.style.left = 'auto';\n tooltipContainer.style.top = 'auto';\n tooltipContainer.innerHTML = text;\n tooltipContainer.flexTooltipCurrentTarget = target;\n if (removeTitle) {\n target.oldTitle = text;\n target.removeAttribute('title');\n }\n\n Util.setupPositionNearby(positionRelative || target, tooltipContainer,\n this.options.collisionContainer, true, true);\n\n tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n }\n\n _restoreClassNames(container, target) {\n // allow additional classname per tooltip on target element\n const classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n const maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n if (maybeTargetClass) {\n classNames.push(maybeTargetClass);\n }\n container.className = classNames.join(\" \");\n return this;\n }\n\n /**\n * @returns {HTMLElement|null}\n */\n getCurrentTarget() {\n return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n }\n\n /**\n * Destroys this Widget\n * @returns {boolean}\n */\n destroy() {\n super.destroy();\n\n if (this.tooltipContainer) {\n this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n return true;\n }\n return false;\n }\n\n /**\n * Removes a Tooltip on given target\n * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n */\n removeTooltip(target) {\n let selfTarget = target;\n if (!selfTarget && this.tooltipContainer) {\n selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (this.tooltipContainer) {\n if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n return;\n }\n this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n delete this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (selfTarget && selfTarget.oldTitle) {\n selfTarget.setAttribute('title', selfTarget.oldTitle);\n }\n }\n\n /**\n * Initilizes mouse events on container element\n */\n registerEvents() {\n const self = this;\n this.addEventListener(this.container, 'mouseover', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.createTooltip(e.target, e.target.getAttribute('title'), true);\n }\n });\n\n this.addEventListener(this.container, 'mouseout', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.removeTooltip(e.target);\n }\n });\n return this;\n }\n}\n\nexport default Tooltip;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Tooltip.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Provides a Basic Widget\n */\nclass DestroyableWidget {\n\n constructor() {\n this.listeners = [];\n }\n\n /**\n * Destroys a Widget\n */\n destroy() {\n this.listeners.forEach((listener) => {\n listener.element.removeEventListener.apply(listener.element, listener.args);\n });\n this.listeners = [];\n }\n\n /**\n * Adds an event and registers it later to remove bindings\n * @param {HTMLElement} element\n * @param {String} name\n * @param {Function} listener\n * @param {boolean} [capture]\n * @returns {Function}\n */\n addEventListener(element, name, listener, capture) {\n this.listeners.push({\n element,\n args: [name, listener, capture]\n });\n\n element.addEventListener(name, listener, capture);\n return listener;\n }\n\n}\n\nexport default DestroyableWidget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/DestroyableWidget.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","// the whatwg-fetch polyfill installs the fetch() function\n// on the global object (window or self)\n//\n// Return that as the export for use in Webpack, Browserify etc.\nrequire('whatwg-fetch');\nmodule.exports = self.fetch.bind(self);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/isomorphic-fetch/fetch-npm-browserify.js\n ** module id = 12\n ** module chunks = 2 3\n **/","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var list = this.map[name]\n if (!list) {\n list = []\n this.map[name] = list\n }\n list.push(value)\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n var values = this.map[normalizeName(name)]\n return values ? values[0] : null\n }\n\n Headers.prototype.getAll = function(name) {\n return this.map[normalizeName(name)] || []\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = [normalizeValue(value)]\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n Object.getOwnPropertyNames(this.map).forEach(function(name) {\n this.map[name].forEach(function(value) {\n callback.call(thisArg, value, name, this)\n }, this)\n }, this)\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n reader.readAsArrayBuffer(blob)\n return fileReaderReady(reader)\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n reader.readAsText(blob)\n return fileReaderReady(reader)\n }\n\n var support = {\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob();\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n function Body() {\n this.bodyUsed = false\n\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (!body) {\n this._bodyText = ''\n } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n // Only support ArrayBuffers for POST method.\n // Receiving ArrayBuffers happens via Blobs, instead.\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n } else {\n this.text = function() {\n var rejected = consumed(this)\n return rejected ? rejected : Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n if (Request.prototype.isPrototypeOf(input)) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = input\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this)\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function headers(xhr) {\n var head = new Headers()\n var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n pairs.forEach(function(header) {\n var split = header.trim().split(':')\n var key = split.shift().trim()\n var value = split.join(':').trim()\n head.append(key, value)\n })\n return head\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText\n this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request\n if (Request.prototype.isPrototypeOf(input) && !init) {\n request = input\n } else {\n request = new Request(input, init)\n }\n\n var xhr = new XMLHttpRequest()\n\n function responseURL() {\n if ('responseURL' in xhr) {\n return xhr.responseURL\n }\n\n // Avoid security warnings on getResponseHeader when not allowed by CORS\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL')\n }\n\n return;\n }\n\n xhr.onload = function() {\n var status = (xhr.status === 1223) ? 204 : xhr.status\n if (status < 100 || status > 599) {\n reject(new TypeError('Network request failed'))\n return\n }\n var options = {\n status: status,\n statusText: xhr.statusText,\n headers: headers(xhr),\n url: responseURL()\n }\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/whatwg-fetch/fetch.js\n ** module id = 13\n ** module chunks = 2 3\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Modal\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global KeyboardEvent */\n\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\nconst KEY_ESC = 27;\n/* Attribute Names */\nconst ATTR_CREATE_NEW = 'data-new-instance';\nconst ATTR_CLOSE = 'data-close-modal';\nconst ATTR_NAME = 'data-modal';\n\n/* Class names */\nconst CLS_CONTAINER_CURRENT = 'front';\nconst CLS_OPEN = 'open';\nconst CLS_CURRENT = 'current';\nconst CLS_PART_OF_STACK = 'part-of-stack';\nconst CLS_MODAL_CONTAINER = 'modal-container';\nconst CLS_ANIM_END = 'modal-anim-end';\nconst CLS_LOADER_CONTAINER = 'loader-container';\nconst CLS_LOADER = 'loader';\nconst CLS_BACKDROP = 'backdrop';\n\n/* Events */\n\n/**\n * Event triggered when modal is closed\n * @type {string}\n */\nexport const EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n/**\n * Event triggered before a modal is closed, cancelable\n * @type {string}\n */\nexport const EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n/**\n * Event triggered when a modal is opened\n * @type {string}\n */\nexport const EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\n/**\n * Event triggered when modal is initilized, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_INIT = 'flexcss.modal.init';\n\n/**\n * Triggered when the content of an async modal on a target is loaded, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\n/**\n * A Modal Implementation\n */\nclass Modal {\n constructor(DelegateContainer, options) {\n const doc = global.document;\n const container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n // Instance vars:\n if (!container) {\n throw new Error(`Could not found container element by given ID/Element: ${DelegateContainer}`);\n }\n\n this.currentOpen = null;\n\n this.loading = false;\n\n this.container = container;\n\n /**\n * Default Options\n */\n this.options = {\n classNames: 'modal',\n closeOnEscape: true,\n closeOnBackgroundClick: true,\n destroyOnFinish: false,\n fixedContainer: true,\n containerClassNames: ''\n };\n\n Object.assign(this.options, options);\n\n // Container where events are delegated\n this.eventContainer = null;\n this.eventFunction = null;\n\n this.dataMainPageContainer = global.document.body;\n\n this.currentScrollTop = 0;\n\n this.modalContainer = null;\n\n // Destroy full modal instance when no dialogs are bind to?\n // Otherwise container is recycled\n this.destroyOnFinish = this.options.destroyOnFinish;\n }\n\n /**\n * Removes this modal from global stack\n * Will handle fixing main html element too\n * @private\n * @param n\n */\n _removeModalFromStack(n) {\n const t = Modal._modalInstances.indexOf(n);\n if (t > -1) {\n Modal._modalInstances.splice(t, 1);\n FixedWindow.getInstance().close();\n }\n }\n\n\n /**\n * Modal container that contains all `stacked` modals for this instance\n * @returns {HTMLElement}\n */\n getModalContainer() {\n return this.modalContainer;\n }\n\n /**\n * Closes the current open modal of this stack\n * @params [e], optional event\n * @returns {*}\n */\n close(e) {\n const self = this;\n\n const options = self.currentOpen ? Util.applyOptionsFromElement(\n self.currentOpen, Util.copy(self.options)) : self.options;\n\n // close only on keyboard if instance should\n if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n return false;\n }\n\n // close only on background if instance should\n if (!options.closeOnBackgroundClick && e &&\n e.type === Settings.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n\n // if an instance is currently loading, prevent from closing\n if (self.loading) {\n return false;\n }\n\n if (e) {\n e.preventDefault();\n }\n\n if (self.currentOpen) {\n // dispatch beforeClose event, if prevented prevent modal from closing\n const ev = Event.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n if (ev.defaultPrevented) {\n return false;\n }\n\n this._finishState(self.currentOpen);\n // if there is an previous modal\n if (self.currentOpen.prevModal) {\n // switch to the next modal\n return self.switchModals(self.currentOpen.prevModal,\n self.currentOpen.prevModal.prevModal || null);\n }\n\n // finally trigger closed event\n Event.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n }\n self._removeModalFromStack(self.currentOpen);\n\n // Full stack closed:\n self.currentOpen = null;\n if (self.modalContainer) {\n // setup next open\n const lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n const classList = self.modalContainer.classList;\n classList.remove(CLS_CONTAINER_CURRENT);\n classList.remove(CLS_BACKDROP);\n classList.remove(CLS_OPEN);\n // Remove all current classes from child-nodes\n for (let i = 0; i < self.modalContainer.childNodes.length; i++) {\n const node = self.modalContainer.childNodes[i];\n const cl = node.classList;\n // remove applied styles\n self._finishState(node);\n cl.remove(CLS_CURRENT);\n cl.remove(CLS_PART_OF_STACK);\n }\n if (lastContainer) {\n lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n }\n }\n\n if (self.destroyOnFinish) {\n self.destroy();\n }\n return self;\n }\n\n /**\n * Resets a target when newly initilizes\n * @param target\n * @private\n */\n _finishState(target) {\n target.classList.remove(CLS_ANIM_END);\n }\n\n /**\n * Handler called when a Modal has finished an animation\n * @param e\n * @param self\n * @private\n */\n _finishAnim(e, self) {\n e.target.classList.add(CLS_ANIM_END);\n e.target.removeEventListener(e.type, self, true);\n }\n\n /**\n * Brings the given modal to front\n * @param co\n * @param last\n */\n switchModals(co, last) {\n co.prevModal = last;\n Modal._modalInstances.push(co);\n FixedWindow.getInstance().open(this, this.modalContainer);\n if (last) {\n this._finishState(last);\n Util.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n last.classList.add(CLS_PART_OF_STACK);\n }\n // set new currentOpen\n this.currentOpen = co;\n\n // bring current container to the front\n const instances = Modal._modalInstances;\n\n for (let m = 0; m < instances.length; m++) {\n instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n }\n this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n // remove animations if animations has been completed, fixes various bugs:\n // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n Util.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\n for (let i = 0; i < this.modalContainer.childNodes.length; i++) {\n const n = this.modalContainer.childNodes[i];\n const isCurrent = n.classList.contains(CLS_CURRENT);\n if (n === co) {\n co.classList.add(CLS_CURRENT);\n co.classList.remove(CLS_PART_OF_STACK);\n this._finishState(co);\n } else {\n n.classList.remove(CLS_CURRENT);\n if (isCurrent) {\n this._removeModalFromStack(n);\n Event.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n }\n }\n }\n }\n\n /**\n * Creates a Modal and opens it (later)\n * @param e\n * @returns {Promise|boolean}\n */\n createWidget(e) {\n const self = this;\n if (this.loading) {\n return false;\n }\n\n // check if another modal has registered events on this dom path:\n if (e && e.target) {\n const foundInstance = Util.parentsUntil(e.target, (node) => {\n return node && node.flexModalInstance;\n });\n\n // if another instance has been found, abort\n if (foundInstance !== this.container) {\n return false;\n }\n }\n let targetContent;\n let future;\n let widget;\n let target;\n let hasTarget = true;\n const isHtmlElement = e instanceof HTMLElement;\n const isWidget = Widget.isWidget(e);\n if (isHtmlElement || isWidget) {\n if (isHtmlElement) {\n targetContent = e;\n } else {\n widget = e;\n targetContent = widget.element;\n }\n } else {\n target = e.target;\n if (!target) {\n throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n }\n hasTarget = target.hasAttribute(ATTR_NAME);\n targetContent = target.getAttribute(ATTR_NAME);\n widget = Widget.findWidget(target);\n if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n const newInstance = new Modal(this.container)\n .setDestroyOnFinish(true);\n e.newInstance = true;\n newInstance.fromEvent(e).then(() => {\n newInstance.registerEvents(newInstance.getModalContainer());\n });\n return false;\n }\n if (hasTarget) {\n e.stopImmediatePropagation();\n e.preventDefault();\n }\n }\n\n if (!hasTarget) {\n return false;\n }\n\n let modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\n // lazy create modal container\n if (!this.modalContainer) {\n this.modalContainer = global.document.createElement('div');\n this.modalContainer.className = `${CLS_MODAL_CONTAINER} ${this.options.containerClassNames} ${CLS_OPEN}`;\n const closeModalFunction = (ce) => {\n if (this.loading) {\n return false;\n }\n if (Util.isPartOfNode(ce.target, this.currentOpen)) {\n if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n }\n this.close(ce);\n };\n\n this.modalContainer.addEventListener(Settings.getTabEvent(), closeModalFunction, false);\n\n modalContainerClasses = this.modalContainer.classList;\n this.container.appendChild(this.modalContainer);\n } else {\n modalContainerClasses.add(CLS_OPEN);\n }\n\n let loader;\n const doc = global.document;\n const toggleLoader = (show) => {\n if (show) {\n loader = doc.createElement('div');\n loader.className = CLS_LOADER_CONTAINER;\n const loaderLoader = doc.createElement('div');\n loaderLoader.className = CLS_LOADER;\n loader.appendChild(loaderLoader);\n this.modalContainer.appendChild(loader);\n } else {\n loader.parentNode.removeChild(loader);\n }\n };\n modalContainerClasses.add('loading');\n modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n modalContainerClasses.add(CLS_BACKDROP);\n });\n });\n\n this.loading = true;\n toggleLoader(true);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n let result;\n if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n result = r;\n } else {\n // Create container Element:\n const element = doc.createElement('div');\n element.className = self.options.classNames;\n element.innerHTML = r;\n element.id = Util.guid();\n result = element;\n }\n widget.finalContent = result;\n Event.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n return result;\n });\n } else {\n const el = targetContent instanceof HTMLElement ||\n targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n if (el) {\n future = new Promise((resolve) => {\n resolve(el);\n });\n } else {\n throw new Error(`Could not found given modal element (content) with ID: ${targetContent}`);\n }\n }\n\n Event.dispatchAndFire(target, EVENT_MODAL_INIT);\n\n return future.then((thisEl) => {\n thisEl.hfWidgetInstance = this;\n this.modalContainer.appendChild(thisEl);\n modalContainerClasses.remove('loading');\n this.loading = false;\n toggleLoader(false);\n this.open(thisEl, true, e);\n return thisEl;\n });\n }\n\n /**\n * Open's an already rendered modal\n * @param {HTMLElement} modal\n * @param {Boolean} [internal], set to true to prevent container management\n * @param {Boolean} [maybeEvent], optional event-object that triggered open\n */\n open(modal, internal, maybeEvent) {\n if (!internal) {\n this.modalContainer.classList.add('open');\n }\n this.switchModals(modal, this.currentOpen);\n\n Event.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n }\n\n\n registerEvents(delegate) {\n const delegateContainer = delegate || this.container;\n // Modals should always be fixed\n FixedWindow.getInstance().addScreenConstraint(Modal, () => true);\n // register modal instance so we can detect multiple registrars\n delegateContainer.flexModalInstance = this;\n this.eventFunction = (...args) => {\n this.createWidget.apply(this, args);\n };\n delegateContainer.addEventListener(Settings.getTabEvent(), this.eventFunction, false);\n\n this.eventContainer = delegateContainer;\n return this;\n }\n\n\n /**\n * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n * @param {HTMLElement|Widget} widget instance or html element\n * @returns {Promise}\n */\n fromWidget(widget) {\n return this.createWidget(widget);\n }\n\n /**\n * Creates a Widget from event\n * @param e\n * @returns {Promise}\n */\n fromEvent(e) {\n return this.createWidget(e);\n }\n\n setDestroyOnFinish(v) {\n this.destroyOnFinish = v;\n return this;\n }\n\n /**\n * Destroy this widget instance, cleans empty DOM nodes\n * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n */\n destroy() {\n const modalContainer = this.modalContainer;\n const isEmptyContainer = modalContainer.childNodes.length === 0;\n // Remove event listener on destroy, do not remove DOM node\n if (this.eventContainer) {\n this.eventContainer.removeEventListener(Settings.getTabEvent(), this.eventFunction, true);\n }\n\n if (isEmptyContainer) {\n if (modalContainer.parentNode) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n }\n if (global.MutationObserver) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach(() => {\n if (modalContainer.childNodes.length === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n observer.disconnect();\n }\n });\n });\n observer.observe(modalContainer,\n {\n childList: true\n }\n );\n } else {\n modalContainer.addEventListener('DOMNodeRemoved', (e) => {\n if (e.target !== modalContainer && (modalContainer.childNodes.length - 1) === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n });\n }\n }\n}\n\n\n// Static variable that keeps track of all open modals\nModal._modalInstances = [];\n\n// Global keydown listener for modal\nglobal.addEventListener('keydown', (e) => {\n if (e.keyCode === KEY_ESC) {\n const lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n if (lastModal) {\n Widget.findWidget(lastModal).close(e);\n }\n }\n});\n\nexport default Modal;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Modal.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Widget\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/**\n * A Widget provides async content on a specific target (e.g. a modal link)\n */\nclass Widget {\n\n /**\n * Creates a new Widget\n * @param [element], optional define the content of widget\n */\n constructor(element) {\n /**\n *\n * @type {Promise}\n */\n this.asyncContent = null;\n\n /**\n * @type {boolean}\n */\n this._isWidget = true;\n\n if (element) {\n /**\n * @type {HTMLElement}\n */\n this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n if (this.element) {\n this.element.hfWidgetInstance = this;\n this.setAsync(() => {\n return new Promise((s) => {\n s(this.element);\n });\n });\n } else {\n throw new Error(`Could not found element with ID: ${element}`);\n }\n }\n /**\n * The final resulted content that a widget did create (e.g. a modal container)\n * @type {HTMLElement}\n */\n this.finalContent = null;\n }\n\n /**\n *\n * @returns {Promise}\n */\n getAsync() {\n return this.asyncContent();\n }\n\n /**\n * @param {Function.} async\n * @returns {Widget}\n */\n setAsync(async) {\n this.asyncContent = async;\n return this;\n }\n\n /**\n * @returns {HTMLElement}\n */\n getFinalContent() {\n return this.finalContent;\n }\n\n /**\n * @param {HTMLElement} element\n * @returns {Widget}\n */\n setElement(element) {\n this.element = element;\n return this;\n }\n\n /**\n * Destroys the generated content of this widget\n * @returns {boolean}\n */\n destroy() {\n if (this.finalContent && this.finalContent.parentNode) {\n this.finalContent.parentNode.removeChild(this.finalContent);\n return true;\n }\n\n delete this.element;\n delete this.asyncContent;\n delete this.finalContent;\n\n return false;\n }\n\n /**\n * Will find a widget on an Element\n * @param {HTMLElement} element\n * @returns {Widget|undefined}\n */\n static findWidget(element) {\n return element ? element.hfWidgetInstance : undefined;\n }\n\n /**\n * Checks if a given object is an instance\n * @param {Object} self\n * @returns {boolean}\n */\n static isWidget(self) {\n return self instanceof Widget || typeof self === 'object' && self.hasOwnProperty('_isWidget');\n }\n}\n\nexport default Widget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Widget.js\n **/","import Settings from '../util/Settings';\nimport debounce from './debounce';\nimport Event from '../util/Event';\nimport Util from '../util/Util';\n\nconst CLS_FIXED_WINDOW = 'fixed-window-open';\n\nexport const EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\nexport const EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\n/**\n * @type {string}\n */\nexport const ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\n/**\n * @type {FixedWindow}\n */\nlet fixedWindowInstance;\n\nexport default class FixedWindow {\n\n constructor() {\n this.widgets = [];\n this.currentScrollTop = 0;\n this.fixedScreenConstraints = [];\n this.windowWidth = 0;\n this.isFixedWindowActive = false;\n this.touchListener = null;\n }\n\n /**\n * Adds a constraint to detect if the window needs to be changed when the screensize changes\n *\n * @param {Function} widget\n * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n */\n addScreenConstraint(widget, fixedBreakpointFn) {\n this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n }\n\n /**\n * @returns {null|DestroyableWidget}\n */\n getCurrentWidget() {\n return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n }\n\n /**\n * @private\n */\n _checkFixedNeeded() {\n if (this.widgets.length === 0) {\n return;\n }\n const widgets = new Set(this.widgets);\n const widgetsThatRequireFixedWindow = Array.from(widgets).some(({ widget }) => {\n return this.fixedScreenConstraints[widget] && this.fixedScreenConstraints[widget](this.windowWidth);\n });\n if (!widgetsThatRequireFixedWindow) {\n this._removeFixedContainer();\n } else {\n this._addFixedContainer();\n }\n }\n\n /**\n * @private\n */\n _addFixedContainer() {\n if (this.isFixedWindowActive) {\n return;\n }\n Event.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n detail: this.getCurrentWidget()\n });\n // this causes layout and should be optimized\n // At lest we write in a batch later\n Settings.get().scrollbarUpdateNodes.map((n) => {\n let foundProperty = 'paddingRight';\n let direction = 1;\n let node = n;\n if (n instanceof Array) {\n const [whatNode, property, d] = n;\n foundProperty = property;\n node = whatNode;\n direction = d || 1;\n }\n return {\n node,\n property: foundProperty,\n value: `${parseInt(global.getComputedStyle(node)[foundProperty], 10) +\n (!node.__fixedWindowMod__ ? (Settings.getScrollbarWidth() * direction) : 0)}px`\n };\n }).forEach((d) => {\n d.node.__fixedWindowMod__ = true;\n d.node.style[d.property] = d.value;\n });\n\n this.touchListener = (e) => {\n e.preventDefault();\n };\n\n let shouldNotMoveUp = false;\n let shouldNotMoveDown = false;\n let neverScroll = false;\n let lastClientY = 0;\n this.touchStartListener = (e) => {\n let { element } = this.getCurrentWidget();\n const closestOverflow = Util.closestCallback(e.target,\n (el) => el instanceof HTMLTextAreaElement ||\n (el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH)));\n if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n element = closestOverflow;\n }\n if (Util.isPartOfNode(e.target, element)) {\n neverScroll = element.scrollHeight === element.offsetHeight;\n lastClientY = e.touches[0].clientY;\n // never allow scrolling when there is nothing to scroll\n if (neverScroll) {\n return false;\n }\n if (element.scrollTop === 0) {\n element.scrollTop = 1;\n shouldNotMoveUp = true;\n } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n shouldNotMoveDown = true;\n element.scrollTop -= 1;\n }\n }\n };\n\n global.addEventListener('touchmove', this.touchListener);\n global.document.body.addEventListener('touchstart', this.touchStartListener);\n\n this.touchMoveListener = (e) => {\n const { element } = this.getCurrentWidget();\n if (Util.isPartOfNode(e.target, element)) {\n const { clientY } = e.touches[0];\n const isScrollingDown = (lastClientY - clientY) > 0;\n lastClientY = clientY;\n\n if (neverScroll) {\n neverScroll = false;\n return false;\n }\n\n if (!shouldNotMoveDown && isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n if (shouldNotMoveDown && !isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n if (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n shouldNotMoveUp = false;\n shouldNotMoveDown = false;\n }\n };\n global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\n global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n this.isFixedWindowActive = true;\n }\n\n /**\n * @private\n */\n _removeFixedContainer() {\n if (this.isFixedWindowActive) {\n // cleanup event listeners\n global.removeEventListener('touchmove', this.touchListener);\n global.document.body.removeEventListener('touchstart', this.touchStartListener);\n global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\n // reset scrollbar nodes\n Settings.get().scrollbarUpdateNodes.forEach((node) => {\n if (node instanceof Array) {\n const [whatNode, property] = node;\n delete whatNode.__fixedWindowMod__;\n whatNode.style[property] = '';\n } else {\n delete node.__fixedWindowMod__;\n node.style.paddingRight = '';\n }\n });\n global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n Event.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n this.isFixedWindowActive = false;\n }\n }\n\n /**\n * Will close a window when no widgets are opened that need one\n */\n resizeListener() {\n this.windowWidth = global.innerWidth;\n this._checkFixedNeeded();\n }\n\n /**\n * @returns {FixedWindow}\n */\n static getInstance() {\n if (!fixedWindowInstance) {\n fixedWindowInstance = new FixedWindow();\n fixedWindowInstance.windowWidth = global.innerWidth;\n const eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n global.addEventListener(\n 'resize',\n debounce(eventHandler, 500)\n );\n global.addEventListener('orientationchange', eventHandler);\n }\n return fixedWindowInstance;\n }\n\n /**\n * Request a close of the fixed window\n */\n close() {\n this.widgets.pop();\n if (this.widgets.length === 0) {\n this._removeFixedContainer();\n }\n }\n\n /**\n * Request to open a fixed windows\n * @param {Object|DestroyableWidget} instance\n * @param {HTMLElement} element\n */\n open(instance, element) {\n let fixed = false;\n if (typeof instance === 'object') {\n const widget = instance.constructor;\n const fixedWidget = this.fixedScreenConstraints[instance.constructor];\n if (widget && fixedWidget) {\n fixed = fixedWidget(this.windowWidth);\n }\n const length = this.widgets.length;\n this.widgets.push(\n {\n widget,\n element\n }\n );\n // open a new window if there is no window active\n if (length === 0) {\n if (fixed) {\n this._addFixedContainer();\n }\n }\n }\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/FixedWindow.js\n **/","export default (fn, ms) => () => {\n clearTimeout(fn.timeout);\n fn.timeout = setTimeout(fn, ms);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/debounce.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Toggleable\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Settings from './util/Settings';\nimport Widget from './Widget';\nimport Util from './util/Util';\nimport Event from './util/Event';\n\n/**\n * Event that is fired when a tab is closed\n * @type {string}\n */\n\nexport const EVENT_TAB_CLOSED = 'flexcss.tab.closed';\n\n/**\n * Event that is fired when a tab has been opened\n * @type {string}\n */\nexport const EVENT_TAB_OPENED = 'flexcss.tab.opened';\n/**\n * @type {string}\n */\nconst ATTR_NAME = 'data-toggle';\n/**\n * @type {string}\n */\nconst ACTIVE_CLASS = 'active';\n/**\n * @type {string}\n */\nconst LOADING_CLASS = 'loading';\n\n/**\n * @type {string}\n */\nconst ATTR_TOGGLE_LIST = 'data-toggle-list';\n\n/**\n * Creates a toggleable element, either for tabs or a single toggle\n */\nclass Toggleable {\n constructor(ContainerId) {\n const doc = global.document;\n\n this.container = ContainerId instanceof HTMLElement ? ContainerId :\n doc.getElementById(ContainerId);\n\n this.loading = false;\n\n if (!this.container) {\n throw new Error(`Toggleable container with id ${ContainerId} not found`);\n }\n }\n\n /**\n * Listener\n * @param {Event} e\n * @private\n */\n _listener(e) {\n let target = e.target;\n const parent = target.parentNode;\n const doc = global.document;\n\n // support target child element to clicked\n if (!target.hasAttribute(ATTR_NAME)) {\n if (parent && parent.hasAttribute(ATTR_NAME)) {\n target = parent;\n } else {\n return;\n }\n }\n\n if (!target.hasAttribute(ATTR_NAME)) {\n return;\n }\n\n const refId = target.getAttribute(ATTR_NAME);\n const ref = doc.getElementById(refId);\n\n e.preventDefault();\n\n if (this.loading) {\n return;\n }\n\n this.toggleTarget(ref, target);\n }\n\n /**\n * Registers Events for this instance\n * @returns {Toggleable}\n */\n registerEvents() {\n this.container.addEventListener(Settings.getTabEvent(), this._listener.bind(this));\n return this;\n }\n\n /**\n * Toggles given `ref`\n * @param {HTMLElement|Node} ref\n * @param {HTMLElement|Node} [selfTarget] optional target node\n */\n toggleTarget(ref, selfTarget) {\n let target = selfTarget;\n if (!target && !ref) {\n return;\n }\n if (!target) {\n target = document.querySelector(`[${ATTR_NAME}=\"${ref.id}\"]`);\n }\n\n let future;\n const elClassList = target.classList;\n const parent = target.parentNode;\n const doc = global.document;\n\n future = new Promise((resolve, failure) => {\n if (ref) {\n resolve(ref);\n } else {\n const widget = Widget.findWidget(target);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n if (r instanceof HTMLElement) {\n const id = Util.guid();\n r.id = id;\n target.setAttribute(ATTR_NAME, id);\n resolve(r);\n } else {\n throw new Error(`Dynamically creating toggle-content is not supported right now.\n Return an HTMLElement instance`);\n }\n });\n } else {\n failure('Target not given');\n }\n }\n });\n\n if (parent) {\n const maybeToggleNode = Util.parentsUntil(target, (node) => {\n return node && node.hasAttribute && node.hasAttribute(ATTR_TOGGLE_LIST);\n });\n\n const parentClassList = parent.classList;\n // Abort if element is already active and if is part of a toggle list\n if (maybeToggleNode) {\n if (!parentClassList.contains(ACTIVE_CLASS)) {\n parentClassList.toggle(ACTIVE_CLASS);\n parentClassList.add(LOADING_CLASS);\n } else {\n return;\n }\n }\n\n if (maybeToggleNode) {\n for (let i = 0; i < maybeToggleNode.children.length; i++) {\n const n = maybeToggleNode.children[i];\n const targetRef = n.children[0];\n if (n !== parent) {\n n.classList.remove(ACTIVE_CLASS);\n if (targetRef) {\n const attr = targetRef.getAttribute(ATTR_NAME);\n const el = attr ? doc.getElementById(attr) : null;\n if (el) {\n Event.dispatchAndFire(el, EVENT_TAB_CLOSED);\n el.classList.remove(ACTIVE_CLASS);\n targetRef.classList.remove(ACTIVE_CLASS);\n }\n }\n }\n }\n }\n }\n if (elClassList) {\n elClassList.toggle(ACTIVE_CLASS);\n elClassList.add(LOADING_CLASS);\n }\n this.loading = true;\n future.then((r) => {\n Event.dispatchAndFire(r, EVENT_TAB_OPENED);\n Toggleable._handleLoaded(target);\n r.classList.toggle(ACTIVE_CLASS);\n this.loading = false;\n }).catch(() => {\n this.loading = false;\n Toggleable._handleLoaded(target);\n });\n }\n\n /**\n * @param el\n * @private\n */\n static _handleLoaded(el) {\n const parentClassList = el.parentNode.classList;\n el.classList.remove(LOADING_CLASS);\n if (parentClassList) {\n parentClassList.remove(LOADING_CLASS);\n }\n }\n}\n\nexport default Toggleable;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Toggleable.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.OffCanvas\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Settings from './util/Settings';\nimport Util from './util/Util';\nimport Event from './util/Event';\nimport FixedWindow from './lib/FixedWindow';\n\n/**\n * @type {string}\n */\nconst ATTR_CLOSE_SIDEBAR = 'data-close-offcanvas';\n\n/**\n * @type {string}\n */\nconst ATTR_TARGET = 'data-offcanvas';\n/**\n * @type {string}\n */\nconst INIT_CLASS = 'init';\n/**\n * @type {string}\n */\nconst OPEN_CLASS = 'open';\n/**\n * @type {number}\n */\nconst HIDE_FACTOR = 3;\n\n/**\n * @type {string}\n */\nexport const EVENT_TOGGLE = 'flexcss.offcanvas.toggle';\n\n/**\n * A OffCanvas Implementation\n */\nclass OffCanvas {\n\n /**\n * Creates an off-canvas navigation\n * @param {HTMLElement|String} NavigationId\n * @param {HTMLElement|String} Darkener\n * @param {int} factor positive will expect right sidebar, positive left\n * @param {bool} [disableTouch] if true all touch events are disabled\n * @constructor\n */\n constructor(NavigationId, Darkener, factor, disableTouch) {\n const doc = global.document;\n let touchedX = 0;\n const navigationContainer = NavigationId instanceof HTMLElement ?\n NavigationId : doc.getElementById(NavigationId);\n const darkener = Darkener instanceof HTMLElement ? Darkener : doc.getElementById(Darkener);\n const DARKENER_CLASS_TOGGLE = `toggle-${darkener.id}` || 'darkener';\n const DARKENER_CLASS_INSTANT_TOGGLE = `${DARKENER_CLASS_TOGGLE}-open`;\n\n const shouldNotTouch = () => {\n return window.innerWidth >= Settings.get().smallBreakpoint;\n };\n\n if (!darkener || !navigationContainer) {\n throw new Error('Could not find needed elements (Darkener and/or NavigationId)');\n }\n\n this.darkener = darkener;\n this.darkenerClassToggle = DARKENER_CLASS_TOGGLE;\n this.darkenerClassToggleInstant = DARKENER_CLASS_INSTANT_TOGGLE;\n this.globalToggleClass = Settings.get().canvasToggledClass;\n\n this.navigationContainer = navigationContainer;\n this.navigationContainerId = navigationContainer.id;\n\n // create id if id does not exist\n if (!this.navigationContainerId) {\n this.navigationContainerId = Util.guid();\n navigationContainer.id = this.navigationContainerId;\n }\n\n if (!disableTouch) {\n navigationContainer.addEventListener('touchstart', (e) => {\n if (shouldNotTouch()) {\n return;\n }\n touchedX = e.touches[0].clientX;\n navigationContainer.mustHide = false;\n });\n navigationContainer.addEventListener('touchmove', (e) => {\n if (shouldNotTouch()) {\n return;\n }\n const { clientX } = e.touches[0];\n const target = navigationContainer;\n const style = target.style;\n const calcX = touchedX - clientX;\n const bounds = target.getBoundingClientRect();\n const compare = factor > 0 ? calcX <= 0 : calcX >= 0;\n if (compare) {\n style.transition = 'transform 0s ease';\n style.webkitTransition = '-webkit-transform 0s ease';\n target.mustHide = factor > 0 ? calcX * -1 >\n bounds.width / HIDE_FACTOR : calcX > bounds.width / HIDE_FACTOR;\n const transform = `translate3d(${calcX * -1}px,0,0)`;\n style.transform = transform;\n style.webkitTransform = transform;\n }\n });\n navigationContainer.addEventListener('touchend', () => {\n if (shouldNotTouch()) {\n return;\n }\n const target = navigationContainer;\n const style = target.style;\n if (target.mustHide) {\n const width = target.getBoundingClientRect().width * factor;\n style.transition = 'transform .2s ease';\n style.webkitTransition = '-webkit-transform .2s ease';\n const transform = `translate3d(${width}px,0,0)`;\n style.transform = transform;\n style.webkitTransform = transform;\n this._remove().then(() => {\n this.resetTransform(style);\n });\n this._removeInstant();\n } else {\n this.resetTransform(style);\n }\n });\n }\n }\n\n /**\n * @param {Object} s\n */\n resetTransform(s) {\n s.transform = '';\n s.transition = '';\n s.webkitTransform = '';\n s.webkitTransition = '';\n }\n\n /**\n * @param {Object} [event]\n * @private\n */\n _remove(event) {\n return new Promise((resolve) => {\n Util.addEventOnce(Settings.getTransitionEvent(), this.navigationContainer, function scheduler(e) {\n if (e.target !== this.navigationContainer) {\n return Util.addEventOnce(Settings.getTransitionEvent(),\n this.navigationContainer, scheduler.bind(this));\n }\n requestAnimationFrame(() => {\n OffCanvas.currentOpen = null;\n const docCls = global.document.documentElement.classList;\n docCls.remove(this.darkenerClassToggle);\n docCls.remove(this.globalToggleClass);\n if (!!event) {\n Event.dispatchAndFire(this.navigationContainer, EVENT_TOGGLE);\n }\n resolve();\n });\n }.bind(this));\n });\n }\n\n /**\n * @private\n */\n _removeInstant() {\n this.navigationContainer.classList.remove(OPEN_CLASS);\n global.document.documentElement.classList.remove(this.darkenerClassToggleInstant);\n this.darkener.classList.remove(INIT_CLASS);\n FixedWindow.getInstance().close();\n }\n\n /**\n * Toggles a an off-canvas element\n * @param [e]\n * @private\n */\n toggle(e) {\n if (e) {\n e.preventDefault();\n }\n this.resetTransform(this.navigationContainer.style);\n const darkenerClass = this.darkener.classList;\n const DARKENER_CLASS_TOGGLE = this.darkenerClassToggle;\n const DARKENER_CLASS_INSTANT_TOGGLE = this.darkenerClassToggleInstant;\n const navigationControllerClassList = this.navigationContainer.classList;\n if (!OffCanvas.currentOpen) {\n Util.addEventOnce(Settings.getTransitionEvent(), this.navigationContainer, () => {\n if (!!e) {\n Event.dispatchAndFire(this.navigationContainer, EVENT_TOGGLE);\n }\n });\n OffCanvas.currentOpen = this;\n FixedWindow.getInstance().open(this, this.navigationContainer);\n const docElementCls = global.document.documentElement.classList;\n docElementCls.add(this.globalToggleClass);\n docElementCls.add(DARKENER_CLASS_INSTANT_TOGGLE);\n docElementCls.add(DARKENER_CLASS_TOGGLE);\n darkenerClass.add(INIT_CLASS);\n navigationControllerClassList.add(OPEN_CLASS);\n } else {\n return this.close(e);\n }\n }\n\n close(event) {\n if (this.navigationContainer.classList.contains(OPEN_CLASS)) {\n const promise = this._remove(event);\n this._removeInstant();\n return promise;\n }\n return new Promise(r => r());\n }\n\n /**\n * Register events\n * @param [delegate]\n */\n registerEvents(delegate) {\n const thisDelegate = delegate || global.document;\n FixedWindow.getInstance().addScreenConstraint(OffCanvas, (width) => width < Settings.get().smallBreakpoint);\n thisDelegate.addEventListener(Settings.getTabEvent(), (e) => {\n if (OffCanvas.currentOpen && OffCanvas.currentOpen !== this) {\n return;\n }\n const id = this.navigationContainerId;\n const validTarget = e.target.getAttribute(ATTR_TARGET) === id;\n if (!Util.isPartOfNode(e.target, this.navigationContainer)) {\n if (validTarget || (OffCanvas.currentOpen === this && e.target === this.darkener)) {\n this.toggle(e);\n }\n } else {\n if (e.target.hasAttribute(ATTR_CLOSE_SIDEBAR)) {\n this.toggle(e);\n }\n }\n });\n }\n}\n\nOffCanvas.currentOpen = null;\n\nexport default OffCanvas;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/OffCanvas.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Dropdown\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\n\n/**\n * @type {string}\n */\nconst ATTR_CC = 'data-collision-container';\n/**\n * @type {string}\n */\nconst ATTR_DARKENER = 'data-darkener-container';\n/**\n * @type {string}\n */\nconst DARKENER_INIT = 'init';\n/**\n * @type {string}\n */\nconst ATTR_DATA_TARGET = 'data-target';\n/**\n * @type {string}\n */\nconst ATTR_CLOSE_DROPDOWN = 'data-close-dropdown';\n/**\n * @type {string}\n */\nconst ATTR_NAME = 'data-dropdown';\n/**\n * @type {string}\n */\nconst STATE_LOADING = 'loading';\n\nconst CLS_DARKENER_DROPDOWN = 'darkener-dropdown';\n/**\n * @type {string}\n */\nconst CLS_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst CLS_DROPDOWN = 'dropdown';\n\n/**\n * @type {string}\n */\nexport const EVENT_DROPDOWN_CLOSED = 'flexcss.dropdown.closed';\n\n/**\n * A Dropdown\n */\nclass Dropdown {\n constructor(DelegateContainer, Darkener) {\n const doc = global.document;\n\n /**\n * Container Element\n * @type {HTMLElement}\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n this.currentOpen = null;\n this.currentTarget = null;\n /**\n * @type {HTMLElement}\n */\n this.darkener = Darkener instanceof HTMLElement ? Darkener : document.getElementById(Darkener);\n\n this.destroyOnClose = false;\n\n if (!this.darkener || !this.container) {\n throw new Error('required elements not found (darkener and container element)');\n }\n }\n\n /**\n * Method that handles delegation events for dropdowns\n * @param e\n * @returns {boolean}\n * @private\n */\n _delegateFunction(e) {\n const currentOpen = this.currentOpen;\n const target = Util.closestCallback(e.target, n => n instanceof HTMLElement && n.hasAttribute(ATTR_NAME));\n const targetIsCurrent = target === this.currentTarget;\n\n if (currentOpen && !Util.isPartOfNode(e.target, currentOpen) || targetIsCurrent) {\n this.close();\n if (targetIsCurrent) {\n e.preventDefault();\n }\n return targetIsCurrent ? false : this._delegateFunction(e);\n }\n\n if (target && !currentOpen) {\n e.preventDefault();\n e.stopImmediatePropagation();\n\n if (target.isLoading) {\n return false;\n }\n this.createDropdown(target);\n } else {\n if (currentOpen) {\n if (e.target.hasAttribute(ATTR_CLOSE_DROPDOWN)) {\n e.preventDefault();\n this.close();\n }\n if (!Util.isPartOfNode(e.target, currentOpen)) {\n this.close();\n }\n }\n }\n }\n\n /**\n * Register Events for this dropdown container\n * @returns {Dropdown}\n */\n registerEvents() {\n FixedWindow.getInstance().addScreenConstraint(Dropdown, (width) => width < Settings.get().smallBreakpoint);\n this.container.addEventListener(Settings.getTabEvent(), this._delegateFunction.bind(this), true);\n return this;\n }\n\n /**\n * Destroys this instance, unbinds events\n * @returns {Dropdown}\n */\n destroy() {\n this.container.removeEventListener(Settings.getTabEvent(), this._delegateFunction.bind(this), true);\n return this;\n }\n\n\n /**\n * Destroys instance on close of dropdown\n * @param v\n * @returns {Dropdown}\n */\n setDestroyOnClose(v) {\n this.destroyOnClose = v;\n return this;\n }\n\n\n /**\n * Will add the right class to container for specific darkener id\n * @param instance\n * @param show\n */\n toggleDarkenerToggler(instance, show) {\n const cls = `toggle-${(instance.id || CLS_DARKENER_DROPDOWN)}`;\n const classList = this.container.classList;\n if (show) {\n classList.add(cls);\n } else {\n classList.remove(cls);\n }\n }\n\n /**\n * Closes Dropdown on current instance\n * @return {Boolean|Promise}\n */\n close() {\n const currentOpen = this.currentOpen;\n if (!currentOpen) {\n return false;\n }\n const darkenerInstance = currentOpen.flexDarkenerInstance || this.darkener;\n const thisCurrentOpen = currentOpen;\n\n const future = new Promise((resolve) => {\n if (window.getComputedStyle(currentOpen).position === 'fixed') {\n Util.addEventOnce(Settings.getTransitionEvent(), currentOpen, function scheduler(e) {\n if (e.srcElement !== currentOpen) {\n return Util.addEventOnce(Settings.getTransitionEvent(), currentOpen, scheduler.bind(this));\n }\n requestAnimationFrame(() => {\n Event.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n // if a new dropdown has been opened in the meantime, do not remove darkener\n if (this.currentOpen !== null) {\n return false;\n }\n this.toggleDarkenerToggler(darkenerInstance, false);\n resolve(true);\n });\n }.bind(this));\n } else {\n resolve(true);\n Event.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n }\n });\n\n FixedWindow.getInstance().close();\n currentOpen.classList.remove(CLS_OPEN);\n\n if (currentOpen.flexDarkenerInstance) {\n currentOpen.flexDarkenerInstance.classList.remove(DARKENER_INIT);\n } else {\n this.darkener.classList.remove(DARKENER_INIT);\n }\n\n this.currentOpen = null;\n this.currentTarget = null;\n\n if (this.destroyOnClose) {\n this.destroy();\n }\n\n return future;\n }\n\n /**\n * Creates a dropdown on given target and opens it\n * @param {HTMLElement} target target where this dropdown is placed\n * @param {FlexCss.Widget} [thisWidget] if given will use widget instead of widget instance\n * @return {FlexCss.Dropdown}\n */\n createDropdown(target, thisWidget) {\n const doc = global.document;\n\n if (!target) {\n throw new Error('Dropdown target not found');\n }\n\n const widget = thisWidget || Widget.findWidget(target);\n let future;\n const data = target.getAttribute(ATTR_NAME);\n const dropdownContainerElement = doc.getElementById(data);\n const async = !dropdownContainerElement && Widget.isWidget(widget) ? widget.getAsync() : false;\n\n if (async) {\n target.classList.add(STATE_LOADING);\n target.isLoading = true;\n future = async.then((r) => {\n if (r instanceof HTMLElement) {\n if (r.id) {\n target.setAttribute(ATTR_NAME, r.id);\n }\n return r;\n }\n // Create container Element:\n const element = doc.createElement('div');\n element.className = CLS_DROPDOWN;\n element.innerHTML = r;\n element.id = Util.guid();\n // Cache target for later use:\n target.setAttribute(ATTR_NAME, element.id);\n this.container.appendChild(element);\n return element;\n }).then((r) => {\n target.isLoading = false;\n target.classList.remove(STATE_LOADING);\n return r;\n });\n } else {\n if (!dropdownContainerElement) {\n throw new Error(`Could not found Dropdown container with ID \"${data}\"`);\n }\n future = new Promise((r) => {\n r(dropdownContainerElement);\n });\n }\n\n future.then((dropdownContent) => {\n if (this.currentOpen) {\n this.close();\n }\n // Skip one frame to show animation\n target.dropdownContent = dropdownContent;\n const isAbsolute = global.getComputedStyle(dropdownContent).position === 'absolute';\n dropdownContent.hfWidgetInstance = this;\n\n if (!target.flexCollisionContainer) {\n const collisionC = target.getAttribute(ATTR_CC);\n target.flexCollisionContainer = collisionC ?\n doc.getElementById(collisionC) || document.documentElement : document.documentElement;\n }\n\n dropdownContent.classList.toggle(CLS_OPEN);\n if (dropdownContent.classList.contains(CLS_OPEN)) {\n this.currentOpen = dropdownContent;\n this.currentTarget = target;\n }\n FixedWindow.getInstance().open(this, dropdownContent);\n if (isAbsolute) {\n // Check collision:\n let selfTarget = target.getAttribute(ATTR_DATA_TARGET);\n selfTarget = selfTarget ? doc.getElementById(selfTarget) : target;\n Util.setupPositionNearby(selfTarget, dropdownContent, target.flexCollisionContainer);\n } else {\n // optionally get custom darkener container for target\n const d = target.getAttribute(ATTR_DARKENER);\n if (d) {\n dropdownContent.flexDarkenerInstance = doc.getElementById(d);\n (dropdownContent.flexDarkenerInstance || this.darkener).classList.toggle(DARKENER_INIT);\n } else {\n this.darkener.classList.toggle(DARKENER_INIT);\n }\n this.toggleDarkenerToggler(dropdownContent.flexDarkenerInstance || this.darkener, true);\n\n dropdownContent.style.left = '0';\n dropdownContent.style.top = 'auto';\n }\n });\n }\n\n}\n\nexport default Dropdown;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Dropdown.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.LightBox\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global Image, TouchEvent*/\n\nimport Modal, { EVENT_MODAL_CLOSED } from './Modal';\nimport Settings from './util/Settings';\nimport Widget from './Widget';\n\nconst ATTR_MAX_WIDTH = 'data-original-width';\nconst ATTR_MAX_HEIGHT = 'data-original-height';\nconst ATTR_SRC = 'data-src';\n\nconst CLS_HAS_PREV = 'has-prev';\nconst CLS_HAS_NEXT = 'has-next';\nconst CLS_LOADING = 'loading';\n\nconst ATTR_NO_THUMBNAIL = 'data-no-thumbnail';\nconst ATTR_DATA_HREF = 'data-href';\nconst ATTR_HREF = 'href';\n\nconst KEY_NEXT = 39;\nconst KEY_PREV = 37;\nconst ATTR_CLOSE = 'data-close-modal';\n/**\n * A Simple LightBox\n */\nclass LightBox {\n\n /**\n * Creates a new Lightbox\n * @param DelegateContainer\n * @param AttributeSelector\n * @param ModalAppend\n * @param [options]\n */\n constructor(DelegateContainer, AttributeSelector, ModalAppend, options) {\n const thisDelegateContainer = DelegateContainer instanceof HTMLElement ? DelegateContainer :\n document.getElementById(DelegateContainer);\n\n this._modalAppend = ModalAppend || DelegateContainer;\n /**\n * @type {Function}\n */\n this._resizeEvent = null;\n /**\n * @type {Function}\n */\n this._keyboardNextEvent = null;\n /**\n * @type {Promise}\n */\n this._future = null;\n /**\n * @type {Promise}\n */\n this._nextFuture = this._future;\n /**\n * @type {HTMLElement}\n */\n this._imageContainer = null;\n /**\n * @type {HTMLElement}\n */\n this._modalContainerDiv = null;\n /**\n * @type {HTMLElement}\n */\n this._contentContainer = null;\n /**\n * @type {HTMLElement}\n */\n this._closerContainerDiv = null;\n /**\n * @type {HTMLElement}\n */\n this._delegateContainer = thisDelegateContainer;\n /**\n * @type {HTMLElement}\n */\n this._attributeSelector = AttributeSelector;\n /**\n * @type {Widget}\n */\n this._widget = null;\n /**\n * @type {boolean}\n */\n this._isOpen = false;\n /**\n * @type {HTMLElement}\n */\n this.target = null;\n /**\n * @type {HTMLElement}\n */\n this.img = null;\n /**\n * @type {boolean}\n */\n this._isLoading = false;\n\n /**\n * Default options\n */\n this.options = {\n // set if prev and next should be available\n registerPrevNextEvents: true,\n // set if modal should be closed after last image\n closeOnLast: true,\n // called when next image is requested (either by keyboard or click), return false to abort\n onNext: () => {\n return true;\n },\n onClose: () => {\n },\n getNext: null,\n getPrev: null,\n // called when underlying target changed\n onSwitchImage: () => {\n }\n };\n\n Object.assign(this.options, options);\n }\n\n /**\n * @param {HTMLElement} node\n * @returns {HTMLElement|null}\n */\n findImmediateNextTarget(node) {\n if (node && node.children[0].hasAttribute(this._attributeSelector)) {\n return node.children[0];\n }\n return null;\n }\n\n /**\n * Will fetch the next element of a lightBox\n * @param {HTMLElement} target\n * @returns {null|HTMLElement}\n */\n getNext(target) {\n if (this.options.getNext) {\n return this.options.getNext.apply(this, [target]);\n }\n return this.findImmediateNextTarget(target.parentNode.nextElementSibling);\n }\n\n /**\n * Will fetch the previous element of a lightBox\n * @param {HTMLElement} target\n * @returns {null|HTMLElement}\n */\n getPrev(target) {\n if (this.options.getPrev) {\n return this.options.getPrev.apply(this, [target]);\n }\n return this.findImmediateNextTarget(target.parentNode.previousElementSibling);\n }\n\n /**\n * Registers events for delegate container\n */\n registerEvents(onOpen) {\n this._delegateContainer.addEventListener(Settings.getTabEvent(), (e) => {\n let target = e.target;\n const parent = target.parentNode;\n let validTarget = target.hasAttribute(this._attributeSelector);\n const parentIsValid = parent && parent.hasAttribute(this._attributeSelector);\n\n if (!validTarget && parentIsValid) {\n validTarget = true;\n target = parent;\n }\n if (validTarget) {\n e.preventDefault();\n this.open(target).then((r) => {\n if (onOpen) {\n onOpen.apply(this, [r, target]);\n }\n });\n }\n });\n }\n\n /**\n * @returns {HTMLElement}\n */\n getContentContainer() {\n return this._contentContainer;\n }\n\n /**\n * Setup max-width and max-height\n * @param {HTMLElement} target\n * @param {HTMLElement} img\n * @param {HTMLElement} loadedImage\n * @private\n */\n static _setupMaxWidthHeight(target, img, loadedImage) {\n const nextMaxWidth = target.getAttribute(ATTR_MAX_WIDTH);\n const nextMaxHeight = target.getAttribute(ATTR_MAX_HEIGHT);\n if (nextMaxWidth && nextMaxHeight) {\n img.style.maxWidth = nextMaxWidth + \"px\";\n img.style.maxHeight = nextMaxHeight + \"px\";\n } else {\n img.style.maxWidth = loadedImage.width + \"px\";\n img.style.maxHeight = loadedImage.height + \"px\";\n }\n }\n\n /**\n * Switches to the next image\n * @param {boolean} direction\n */\n switchImageByDirection(direction) {\n const next = direction ? this.getPrev(this.target) : this.getNext(this.target);\n if (this.options.onNext.apply(this, [next])) {\n return this.switchImage(next);\n }\n return new Promise((_, reject) => reject(next));\n }\n\n /**\n * Checks if lightbox is currently loading\n * @returns {boolean}\n */\n isLoading() {\n return this._isLoading;\n }\n\n /**\n * Checks if modal should be closed\n * @private\n */\n _runOptionalClose() {\n if (this.options.closeOnLast) {\n this.modal.close();\n }\n }\n\n _setupPrevNextStates() {\n const target = this.target;\n const hasPrev = this.getPrev(target);\n const hasNext = this.getNext(target);\n const hasPrevClass = CLS_HAS_PREV;\n const hasNextClass = CLS_HAS_NEXT;\n // because IE does not support the second toggle parameter, we need to do this manually\n if (hasPrev) {\n this._imageContainer.classList.add(hasPrevClass);\n } else {\n this._imageContainer.classList.remove(hasPrevClass);\n }\n if (hasNext) {\n this._imageContainer.classList.add(hasNextClass);\n } else {\n this._imageContainer.classList.remove(hasNextClass);\n }\n }\n\n /**\n * @param img\n * @private\n */\n _calculateContainer(img) {\n if (Settings.isIE()) {\n setTimeout(() => {\n this._imageContainer.style.height = img.offsetHeight + 'px';\n }, 0);\n }\n }\n\n /**\n * Switch to a specific image\n * @param next\n * @returns {*}\n */\n switchImage(next) {\n const self = this;\n const img = this.img;\n this._isLoading = true;\n self._nextFuture = new Promise((resolve, reject) => {\n // notify observers about image switching\n self.options.onSwitchImage.apply(self, [self._nextFuture]);\n if (next) {\n const nextThumb = next.hasAttribute(ATTR_NO_THUMBNAIL) ? next : (next.children[0] || next);\n const nextHighRes = next.getAttribute(ATTR_DATA_HREF) ||\n next.getAttribute(ATTR_HREF);\n const nextSource = nextThumb.getAttribute(ATTR_SRC) || nextThumb.src || nextHighRes;\n const nextImgObject = new Image();\n\n if (!nextSource) {\n reject(next);\n return;\n }\n // set new target to next element\n this.target = next;\n nextImgObject.src = nextSource;\n self._imageContainer.classList.add(CLS_LOADING);\n nextImgObject.addEventListener('load', () => {\n img.src = nextSource;\n self._imageContainer.style.backgroundImage = 'url(' + nextSource + ')';\n LightBox._setupMaxWidthHeight(next, img, nextImgObject);\n self._calculateContainer(img);\n self.highRes(nextThumb, nextHighRes);\n self._setupPrevNextStates();\n self._imageContainer.classList.remove(CLS_LOADING);\n this._isLoading = false;\n resolve(nextSource, this.target);\n });\n } else {\n reject(this);\n }\n });\n return self._nextFuture;\n }\n\n\n /**\n * Setup High-Resolution picture\n * @param {HTMLElement} thisThumbnail\n * @param {String} thisImgHighResolution\n */\n highRes(thisThumbnail, thisImgHighResolution) {\n if (thisImgHighResolution && thisThumbnail.src !== thisImgHighResolution) {\n const highImageObj = new Image();\n highImageObj.src = thisImgHighResolution;\n highImageObj.addEventListener('load', () => {\n // if current image is still available\n if (this._getSrc(thisThumbnail) === this.img.src) {\n this.img.src = thisImgHighResolution;\n this._imageContainer.style.backgroundImage = 'url(' + thisImgHighResolution + ')';\n }\n });\n }\n }\n\n /**\n * Extracts the source of an image\n * @param target\n * @returns {String|null}\n * @private\n */\n _getSrc(target) {\n return target.getAttribute(ATTR_SRC) || target.src;\n }\n\n /**\n * Will show a lightBox on given target\n * @param {HTMLElement} target\n * @returns {$.Deferred|*}\n */\n open(target) {\n const self = this;\n\n if (!target) {\n return false;\n }\n\n this.target = target;\n\n // if lightBox is open, we just switch to the new target image\n if (this._isOpen && target) {\n return this.switchImage(target).then(() => {\n return this;\n });\n }\n\n this._isOpen = true;\n\n /**\n * Setup Widget for modal\n * @type {Widget}\n */\n this._widget = new Widget().setAsync(() => {\n // thumbnail is either target itself or expected to be first childNode\n const thumbnail = target.hasAttribute(ATTR_NO_THUMBNAIL) ? target : (target.children[0] || target);\n\n const imgHighResolution = target.getAttribute(ATTR_DATA_HREF) || target.getAttribute(ATTR_HREF);\n const imgSrc = this._getSrc(thumbnail) || imgHighResolution;\n\n const imageObj = new Image();\n imageObj.src = imgSrc;\n this._imageContainer = document.createElement('div');\n this._modalContainerDiv = document.createElement('div');\n this._closerContainerDiv = document.createElement('i');\n this._contentContainer = document.createElement('div');\n\n this._closerContainerDiv.className = 'modal-close modal-close-lightbox icon-cancel-1';\n this._closerContainerDiv.setAttribute(ATTR_CLOSE, ATTR_CLOSE);\n\n this._modalContainerDiv.className = 'modal image-modal';\n this._modalContainerDiv.appendChild(this._imageContainer);\n this._modalContainerDiv.appendChild(this._contentContainer);\n this._modalContainerDiv.appendChild(this._closerContainerDiv);\n this._contentContainer.className = 'content-container';\n this._isLoading = true;\n this._future = new Promise((resolve) => {\n imageObj.addEventListener('load', () => {\n this._imageContainer.className = 'image-container';\n const img = document.createElement('img');\n // current image\n this.img = img;\n\n img.src = imgSrc;\n LightBox._setupMaxWidthHeight(target, img, imageObj);\n this._imageContainer.appendChild(img);\n this._imageContainer.style.backgroundImage = 'url(' + imgSrc + ')';\n\n resolve(self._modalContainerDiv);\n this._isLoading = false;\n\n if (Settings.isIE()) {\n self._resizeEvent = global.addEventListener('resize', () => {\n setTimeout(() => {\n self._imageContainer.style.height = img.offsetHeight + 'px';\n }, 0);\n });\n }\n\n if (self.options.registerPrevNextEvents) {\n self._setupPrevNextStates();\n // prev or next on touch/click\n self._imageContainer.addEventListener(Settings.getTabEvent(), (e) => {\n if (self.isLoading()) {\n return;\n }\n e.preventDefault();\n\n const ev = e;\n const pageX = global.TouchEvent && ev instanceof TouchEvent ?\n ev.changedTouches[0].pageX : ev.pageX;\n const rect = self._imageContainer.getBoundingClientRect();\n const imgX = rect.left;\n const wrapperWidth = rect.width;\n const posX = pageX - imgX;\n\n self.switchImageByDirection(wrapperWidth / 2 > posX).catch(() => {\n self._runOptionalClose();\n });\n });\n\n // register keyboard events\n self._keyboardNextEvent = (e) => {\n if (e.keyCode === KEY_NEXT || e.keyCode === KEY_PREV) {\n if (self.isLoading()) {\n return;\n }\n self.switchImageByDirection(e.keyCode === KEY_PREV).catch(() => {\n self._runOptionalClose();\n });\n }\n };\n global.addEventListener('keydown', self._keyboardNextEvent);\n } else {\n self._imageContainer.addEventListener(Settings.getTabEvent(), () => {\n self._runOptionalClose();\n });\n }\n\n self.highRes(thumbnail, imgHighResolution);\n });\n });\n\n this._future.then(() => {\n self._calculateContainer(this.img);\n });\n\n self._modalContainerDiv.addEventListener(EVENT_MODAL_CLOSED, () => {\n // cleanup:\n this._modalContainerDiv.parentNode.removeChild(this._modalContainerDiv);\n this.options.onClose.apply(self);\n this._isOpen = false;\n this.modal.destroy();\n // unbind events\n if (this._keyboardNextEvent) {\n global.removeEventListener('keydown', self._keyboardNextEvent);\n }\n if (this._resizeEvent) {\n global.removeEventListener('resize', self._resizeEvent);\n }\n });\n\n return this._future;\n });\n\n this._nextFuture = this._future;\n\n if (self._widget) {\n this.modal = new Modal(this._modalAppend);\n // make sure we close stack before\n return this.modal.close().fromWidget(self._widget).then(() => {\n return self._future.then(() => {\n return self;\n });\n });\n }\n return false;\n }\n\n}\n\nexport default LightBox;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/LightBox.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6*","webpack:///webpack/bootstrap 81c2cbe516e809e8be72?ed04*","webpack:///./src/main/modules/All.js","webpack:///./src/main/Form.js","webpack:///./src/main/Tooltip.js","webpack:///./src/main/util/Util.js","webpack:///./src/main/DestroyableWidget.js","webpack:///./src/main/util/Settings.js","webpack:///./~/isomorphic-fetch/fetch-npm-browserify.js","webpack:///./~/whatwg-fetch/fetch.js","webpack:///./src/main/util/Event.js","webpack:///./src/main/Modal.js","webpack:///./src/main/Widget.js","webpack:///./src/main/lib/FixedWindow.js","webpack:///./src/main/lib/debounce.js","webpack:///./src/main/Toggleable.js","webpack:///./src/main/OffCanvas.js","webpack:///./src/main/Dropdown.js","webpack:///./src/main/LightBox.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SC3BS;SAAM;SAAS;SAAO;SAAQ;SAAU;SAAM;SAAY;SAAW;SAAU,8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4BxF,KAAM,gBAAgB,SAAhB;AACN,KAAM,uBAAuB,sBAAvB;AACN,KAAM,SAAS,aAAT;AACN,KAAM,gBAAgB,oBAAhB;AACN,KAAM,sBAAsB,gCAAtB;AACN,KAAM,wBAAwB,kCAAxB;AACN,KAAM,iBAAiB,eAAjB;AACN,KAAM,2BAA2B,yBAA3B;AACN,KAAM,yBAAyB,mBAAzB;AACN,KAAM,2BAA2B,0BAA3B;AACN,KAAM,uBAAuB,mBAAvB;AACN,KAAM,eAAe,uBAAf;AACN,KAAM,iBAAiB,MAAjB;AACN,KAAM,uBAAuB,OAAvB;AACN,KAAM,sBAAsB,EAAtB;AACN,KAAM,sBAAsB,GAAtB;;;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;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAO;;AAEP,MAAK;AACL;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA,wDAAuD;AACvD,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA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AnC,MAGO;AACH,qBAAI,KAAJ,CAAU,QAAV,GAAqB,YAAY,KAAZ,GAAoB,IAApB,CADlB;AAEH,qBAAI,KAAJ,CAAU,SAAV,GAAsB,YAAY,MAAZ,GAAqB,IAArB,CAFnB;cAHP;;;;YAhLF;;;mBA4dS,S","file":"js/flexcss.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 81c2cbe516e809e8be72\n **/","import Form from '../Form';\nimport Tooltip from '../Tooltip';\nimport Modal from '../Modal';\nimport Widget from '../Widget';\nimport Settings from '../util/Settings';\nimport Toggleable from '../Toggleable';\nimport OffCanvas from '../OffCanvas';\nimport Dropdown from '../Dropdown';\nimport LightBox from '../LightBox';\nimport Util from '../util/Util';\n\nexport { Form, Tooltip, Modal, Widget, Settings, Util, Toggleable, OffCanvas, Dropdown, LightBox };\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/All.js\n **/","/*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Form\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Tooltip from './Tooltip';\nimport 'isomorphic-fetch';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport DestroyableWidget from './DestroyableWidget';\n\nconst LOADING_CLASS = 'loading';\nconst DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\nconst REMOTE = 'data-remote';\nconst REMOTE_ACTION = 'data-remote-action';\nconst ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\nconst ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\nconst ATTR_VALIDATOR = 'data-validate';\nconst ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\nconst ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\nconst ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\nconst ATTR_ERROR_TARGET_ID = 'data-error-target';\nconst ATTR_DEPENDS = 'data-depends-selector';\nconst CONST_USE_JSON = 'json';\nconst CONST_REALTIME_EVENT = 'input';\nconst FOCUS_TOOLTIP_DELAY = 20;\nconst CLICK_TOOLTIP_DELAY = 150;\n\n/**\n * Triggered when form is fully initialized and handlers are binded\n * @type {string}\n */\nexport const EVENT_FORM_READY = 'flexcss.form.ready';\n/**\n * Fires when a form is submitted, cancelable\n * @type {string}\n */\nexport const EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n/**\n * Fired directly after the form has been submitted via ajax\n * @type {string}\n */\nexport const EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n/**\n * Fired when ajax events did complete\n * @type {string}\n */\nexport const EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\n/**\n * A HTML5 Form Validation replacement\n */\n\nclass Form extends DestroyableWidget {\n /**\n * @param {HTMLElement} form\n * @param [options] optional options\n */\n constructor(form, options) {\n super();\n\n if (!(form instanceof HTMLFormElement)) {\n throw 'argument {0} form needs to be an form element';\n }\n\n /**\n * The Form\n * @type {HTMLElement}\n */\n this.form = form;\n\n /**\n * @type {Tooltip}\n */\n this.tooltips = null;\n\n /**\n * @type {Promise}\n */\n this.currentValidationFuture = new Promise(() => {\n });\n\n /**\n * Default options\n * @type {Object}\n */\n this.options = {\n // if true creates tooltips above element, uses FlexCss Tooltips\n createTooltips: true,\n // if true appends error message after input element\n appendError: false,\n // type of ajax submit\n ajaxSubmitType: 'POST',\n // json content type if ajax method is set to json\n ajaxJsonContentType: 'application/json; charset=utf-8',\n // allow inline validation\n inlineValidation: true,\n // validate in realtime (on `input` event)\n realtime: true,\n // timeout when realtime event should be captured\n realtimeTimeout: 250,\n // formatting method for an error\n formatErrorTooltip: (error) => {\n return ' ' + error;\n },\n // the class that will be put on the element to mark it failed validation\n inputErrorClass: 'invalid',\n // the container class for error messages below an element\n containerErrorClass: 'form-error',\n // additional options for fetch\n fetchOptions: {\n credentials: 'include'\n },\n // the container for tooltips\n tooltipContainer: form,\n tooltipOptions: {\n containerClass: 'error-tooltip'\n },\n // if you have a fixed header, either set a number or function here\n scrollToElementDiff: 0\n };\n\n // overwrite default options\n Object.assign(this.options, options);\n\n // apply settings from attributes\n Util.applyOptionsFromElement(form, this.options);\n\n // set form class as widget\n // Forms are very different to classical widgets,\n // we will not use our base widget class for this but just self\n form.hfWidgetInstance = this;\n\n /**\n * A List of Validators\n * @type {Object}\n * @private\n */\n this._validators = Form.globalValidators;\n\n /**\n * @type {Function}\n * @private\n */\n this._remoteValidationFunction = null;\n\n this.initFormValidation();\n }\n\n destroy() {\n super.destroy();\n if (this.tooltips) {\n this.tooltips.destroy();\n }\n }\n\n /**\n * Submits this form, either via ajax or just classical (default)\n * @param {HTMLFormElement} thisForm\n * @param {Event} e\n * @private\n * @returns {Promise|boolean} returns false if submit is cancled\n */\n _submitFunction(thisForm, e) {\n var shouldUseAjax = thisForm.getAttribute(REMOTE), ajaxPostUrl =\n thisForm.getAttribute(REMOTE_ACTION) ||\n thisForm.getAttribute('action') || window.location.href,\n useJson = CONST_USE_JSON === shouldUseAjax, self = this;\n\n var ev = Event.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\n // abort execution is event was prevented\n if (ev.defaultPrevented) {\n self._formStopLoading();\n return false;\n }\n\n if (shouldUseAjax === null) {\n // submit\n return thisForm.submit();\n }\n // prevent form from submit normally\n e.preventDefault();\n\n // add information that this is an XMLHttpRequest request (used by some frameworks)\n let defaultHeaders = {\n 'X-Requested-With': 'XMLHttpRequest'\n };\n\n // setup default headers\n if (useJson) {\n Object.assign(defaultHeaders, {\n 'Content-Type': this.options.ajaxJsonContentType\n });\n }\n let defaultOptions = Object.assign(this.options.fetchOptions, {\n headers: defaultHeaders,\n method: this.options.ajaxSubmitType\n });\n\n // support either JSON request payload or normal payload submission\n var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: JSON.stringify(this.serialize())\n })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: new FormData(thisForm)\n }));\n\n Event.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\n return serverCall.then((r) => {\n (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\n Event.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n // always remove error class\n self._formStopLoading();\n });\n }\n\n /**\n * Serializes a form to a json object\n * @returns {Object}\n */\n serialize() {\n var selectors = [\n 'input[name]:not([type=\"radio\"]):enabled',\n 'input[type=\"radio\"][name]:checked',\n 'select[name]:enabled',\n 'textarea[name]:enabled'\n ], inputs = this.form.querySelectorAll(selectors.join(',')), result = {};\n\n Array.prototype.forEach.call(inputs, function (input) {\n var exists = result[input.name], value = input.value;\n if (exists instanceof Array) {\n exists.push(value);\n } else if (exists) {\n result[input.name] = [result[input.name], value];\n } else {\n result[input.name] = value;\n }\n });\n\n return result;\n }\n\n /**\n * Handles the chain of validation on given fields\n *\n * @param {HTMLElement|Array|NodeList} field\n * @param [focus] optional focus first error\n * @returns {Promise}\n */\n handleValidation(field, focus) {\n var fields = (field instanceof Array || field instanceof NodeList) ? field : [field];\n return this._handleValidation(fields, focus, true).then(((r) => {\n if (!r.foundAnyError) {\n // remove tooltips\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n }\n return r;\n }).bind(this));\n }\n\n /**\n * Handles errors on given node list\n * @param {NodeList} toValidateFields\n * @param {boolean} focus\n * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n * @returns {Promise}\n * @private\n */\n _handleValidation(toValidateFields, focus, scoped) {\n var self = this;\n var arr = Form._createArrayFromInvalidFieldList(toValidateFields), isLocalInvalid = arr.length > 0;\n // focus must appear in the same frame for iOS devices\n if (isLocalInvalid && focus) {\n self._focusElement(arr[0]);\n }\n var validation = scoped ? this._customValidationsForElements(toValidateFields) :\n self.validateCustomFields();\n return validation.then((r) => {\n if (isLocalInvalid) {\n // combine browser and custom validators\n r.foundAnyError = true;\n }\n // get a unique field list of all fields that need to be checked and rendered\n // it's possible that we have duplicates in non scoped mode\n let thisToValidateFields = scoped ? toValidateFields :\n Array.from(arr).concat(r.checkedFields);\n r.checkedFields = thisToValidateFields;\n let foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n firstInvalidField = foundInvalidFields[0];\n if (firstInvalidField) {\n if (focus) {\n self._focusElement(firstInvalidField);\n // if element could not be focused:\n if (document.activeElement !== firstInvalidField) {\n self._handleTooltipHideClickAfterChange();\n }\n } else {\n self._handleTooltipHideClickAfterChange();\n }\n self.showAndOrCreateTooltip(firstInvalidField);\n }\n return r;\n });\n }\n\n /**\n * @param {HTMLElement} field\n * @param {ValidityState} validity\n * @returns {*}\n * @private\n */\n\n _setupErrorMessages(field, validity) {\n return Form.globalErrorMessageHandler ?\n Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n }\n\n /**\n * Handles class labels for elements\n * @param {Object} fields\n * @private\n */\n _handleLabels(fields) {\n Object.keys(fields).forEach(function (id) {\n let labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'), invalid = fields[id];\n if (labels.length) {\n for (let labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n let labelEl = labels[labelsIndex];\n // we can't use toggle attribute, not supported in IE\n if (invalid) {\n this._markElementInvalid(labelEl);\n } else {\n this._markElementValid(labelEl);\n }\n }\n }\n }.bind(this));\n }\n\n /**\n * @param el\n * @private\n */\n _markElementInvalid(el) {\n el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n el.classList.add(this.options.inputErrorClass);\n }\n\n /**\n * @param el\n * @private\n */\n _markElementValid(el) {\n el.removeAttribute(DATA_ELEMENT_INVALID);\n el.classList.remove(this.options.inputErrorClass);\n }\n\n /**\n * A List of invalid elements (:invalid)\n * @returns {Array}\n * @private\n */\n _getInvalidElements() {\n return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n return !(r instanceof HTMLFieldSetElement);\n });\n }\n\n /**\n * @param {HTMLElement} thisParent\n * @private\n */\n _removeElementErrors(thisParent) {\n let errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass), inputsWithErrorClasses =\n thisParent.querySelectorAll(`[${DATA_ELEMENT_INVALID}]`);\n for (let elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n }\n for (let inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n let el = inputsWithErrorClasses[inputErrorIndex];\n this._markElementValid(el);\n }\n }\n\n\n /**\n * Registers a custom validator\n * @param {String} name\n * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n * we can't rely on that\n * @returns {Form}\n */\n registerValidator(name, validator) {\n this._validators[name] = validator;\n return this;\n }\n\n /**\n * Runs async validation\n * @param {String} validationRef\n * @param {HTMLElement} field\n * @returns {Promise}\n * @private\n */\n _runValidation(validationRef, field) {\n if (!this._validators[validationRef]) {\n throw 'Could not found validator: ' + validationRef;\n }\n var cl = field.classList, future = this._validators[validationRef].apply(this, [field, this.form]);\n cl.add(LOADING_CLASS);\n future.then(() => {\n cl.remove(LOADING_CLASS);\n });\n return future;\n }\n\n\n /**\n * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n *\n * @param {Array|NodeList} fields\n * @returns {Promise} contains either true if validations passed or false if something went wrong\n * @private\n */\n _customValidationsForElements(fields) {\n var futures = [], fieldsLength = fields.length, checkedFields = [];\n for (var iVal = 0; iVal < fieldsLength; iVal++) {\n var field = fields[iVal], validationRef = field.getAttribute(ATTR_VALIDATOR), validity = field.validity;\n if (this._validators[validationRef]) {\n // use local validation first and then continue with custom validations\n if (Form._shouldNotValidateField(field) || (validity && !validity.customError && !validity.valid)) {\n continue;\n }\n checkedFields.push(field);\n futures.push(this._runValidation(validationRef, field));\n } else {\n if (validationRef) {\n console.warn('data-validate was set but no validator was found');\n }\n }\n }\n return Promise.all(futures).then(function (allFutures) {\n let l = allFutures.length;\n let result = {\n checkedFields: checkedFields,\n foundAnyError: false\n };\n for (var fI = 0; fI < l; fI++) {\n if (!allFutures[fI]) {\n result.foundAnyError = true;\n break;\n }\n }\n return result;\n });\n }\n\n /**\n * Remove all errors for this form\n * @returns {Form}\n */\n removeErrors() {\n this._removeElementErrors(this.form);\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n return this;\n }\n\n /**\n * Will handle errors for given fields\n * @param {Array|NodeList} fields\n * @param {Boolean} removeAllErrors\n */\n prepareErrors(fields, removeAllErrors) {\n if (removeAllErrors) {\n this.removeErrors();\n }\n let labelGroups = {}, invalidFields = [];\n\n function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n let additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) ||\n field.id, group = thisLabelGroup[additionalLabels];\n if (additionalLabels) {\n // check additionally if field is currently marked as invalid\n // so the label is not marked as error if no field is marked as one\n group = group ? group : isInvalid;\n thisLabelGroup[additionalLabels] = group;\n }\n }\n\n // We save all validations in an extra property because we need to reset the validity due some\n // implementation errors in other browsers then chrome\n for (let i = 0; i < fields.length; i++) {\n let field = fields[i], errorTarget = Form._findErrorTarget(field), parent = errorTarget.parentNode,\n validity = field.validity, isInvalid = validity && !validity.valid;\n if (Form._shouldNotValidateField(field)) {\n continue;\n }\n field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n handleAdditionalLabels(isInvalid, labelGroups, field);\n if (isInvalid) {\n if (!removeAllErrors) {\n // Remove current errors:\n this._removeElementErrors(parent);\n }\n // setup custom error messages:\n this._setupErrorMessages(field, validity);\n let msg = field.validationMessage;\n\n // mark fields as invalid\n this._markElementInvalid(errorTarget);\n this._markElementInvalid(field);\n\n if (this.options.appendError) {\n parent.insertAdjacentHTML(\"beforeend\",\n `
${msg}
`);\n }\n invalidFields.push(field);\n field.flexFormsSavedValidationMessage = msg;\n } else {\n // restore invalid fields\n this._markElementValid(errorTarget);\n this._markElementValid(field);\n\n // cleanup\n delete field.flexFormsSavedValidationMessage;\n\n // remove error markup\n this._removeElementErrors(parent);\n }\n // We have to reset the custom validity here to allow native validations work again\n field.setCustomValidity('');\n }\n // if validates a single field we need to check the linked fields to a label:\n if (fields.length === 1) {\n let field = fields[0];\n let id = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id;\n if (id) {\n let linkedFields = Array.from(\n this.getForm().querySelectorAll(`[${ATTR_DATA_CUSTOM_LABEL}=\"${id}\"], #${id}`));\n linkedFields.forEach(function (thisField) {\n let validity = thisField.validity, isInvalid = validity && !validity.valid &&\n this._isElementInvalidElement(thisField);\n handleAdditionalLabels(isInvalid, labelGroups, thisField);\n }.bind(this));\n }\n }\n this._handleLabels(labelGroups);\n return invalidFields;\n }\n\n /**\n * Validates all custom fields\n * @returns {Promise}\n */\n validateCustomFields() {\n return this._customValidationsForElements(\n this.form.querySelectorAll(\"[data-validate]\"));\n }\n\n /**\n * Tests if a field should be validated\n * @param {HTMLElement} field\n * @returns {boolean}\n * @private\n */\n static _shouldNotValidateField(field) {\n var target = Form._findErrorTarget(field);\n return target instanceof HTMLFieldSetElement || field.validity === undefined ||\n (target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !Util.isVisible(target));\n }\n\n /**\n * Creates an array from a node list with invalid items\n * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n * @param list\n * @returns {Array}\n * @private\n */\n static _createArrayFromInvalidFieldList(list) {\n var arr = [];\n for (var i = 0; i < list.length; ++i) {\n var n = list[i];\n if (n.validity && !n.validity.valid) {\n if (!Form._shouldNotValidateField(n)) {\n arr.push(n);\n }\n }\n }\n return arr;\n }\n\n\n /**\n * This form\n * @returns {HTMLElement}\n */\n getForm() {\n return this.form;\n }\n\n /**\n * Registers a function that handles remote validation\n * @param {Function} func\n * @returns {Form}\n */\n registerRemoteValidation(func) {\n this._remoteValidationFunction = func;\n return this;\n }\n\n\n /**\n * Formats the error content for the tooltip\n * @param {String} error\n * @returns {String}\n * @private\n */\n _formatErrorTooltip(error) {\n return this.options.formatErrorTooltip.apply(this, [error]);\n }\n\n /**\n * Tries to find a custom error target on given target\n * @param target\n * @returns {HTMLElement}\n * @private\n */\n static _findErrorTarget(target) {\n var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n if (!foundTarget) {\n throw 'Given error target did not exsits:' + target;\n }\n return foundTarget;\n }\n\n /**\n * Creates a tooltip at given element, will only create a new instance if not created\n * @param {HTMLElement} target\n * @param {Boolean} [remove]\n */\n showAndOrCreateTooltip(target, remove) {\n var self = this;\n if (!this.tooltips && this.options.createTooltips) {\n this.tooltips = new Tooltip(this.options.tooltipContainer, this.options.tooltipOptions);\n }\n if (!this.options.createTooltips) {\n return false;\n }\n\n if (!target.flexFormsSavedValidity) {\n return false;\n }\n var errorTarget = Form._findErrorTarget(target);\n if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n self.tooltips.createTooltip(errorTarget,\n self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n return true;\n } else {\n if (remove) {\n self.tooltips.removeTooltip();\n }\n }\n return false;\n }\n\n /**\n * Checks if element is marked as invalid\n * @param {HTMLElement} el\n * @returns {boolean}\n * @private\n */\n _isElementInvalidElement(el) {\n return el.hasAttribute(DATA_ELEMENT_INVALID);\n }\n\n /**\n * Handles invalid event of a form\n * @param {Event} e\n * @returns {Promise|boolean}\n * @private\n */\n _checkIsInvalid(e) {\n e.preventDefault();\n var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n return this._handleValidation(invalidFields, true, false);\n }\n\n /**\n * Will query dependent fields (by selector) that should be validated with given field\n * @param field\n * @returns {NodeList|[]}\n * @private\n */\n _getDependentFields(field) {\n let fieldSelector = field.getAttribute(ATTR_DEPENDS), base = [field];\n if (fieldSelector) {\n base.push.apply(base, Array.prototype.slice.apply(\n this.getForm().querySelectorAll(fieldSelector)));\n }\n return base;\n }\n\n /**\n * @private\n * @param {HTMLElement} [target]\n */\n _handleTooltipInline(target) {\n if (this.tooltips) {\n this.tooltips.removeTooltip(target);\n }\n }\n\n /**\n * Initializes validation for a given form, registers event handlers\n */\n initFormValidation() {\n // Suppress the default bubbles\n var form = this.getForm(),\n self = this,\n invalidEvent = 'invalid';\n\n /**\n * Validates if is valid realtime element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidRealtimeElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n form.addEventListener(invalidEvent, function (e) {\n e.preventDefault();\n }, true);\n\n Util.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n self._formLoading();\n var result = self._checkIsInvalid(e);\n if (result) {\n self.currentValidationFuture = new Promise((resolve) => {\n result.then(function (r) {\n setTimeout(function () {\n Util.addEventOnce(invalidEvent, form, handleInvalid, true);\n }, 0);\n resolve(r);\n self._formStopLoading();\n if (!r.foundAnyError) {\n self._formLoading();\n self._handleSubmit(e);\n }\n });\n });\n }\n }, true);\n\n this.addEventListener(form, 'reset', () => {\n this.removeErrors();\n });\n\n // Timeout for keys:\n var TIMEOUT_KEYDOWN, KEYDOWN_RUNNING = false;\n\n // resets keydown events\n function clearKeyDownTimeout() {\n KEYDOWN_RUNNING = false;\n clearTimeout(TIMEOUT_KEYDOWN);\n }\n\n // setup custom realtime event if given\n if (self.options.realtime) {\n this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n if (self._formIsLoading()) {\n return;\n }\n var target = e.target;\n clearTimeout(TIMEOUT_KEYDOWN);\n if (KEYDOWN_RUNNING) {\n return;\n }\n TIMEOUT_KEYDOWN = setTimeout(() => {\n let isStillTarget = document.activeElement === e.target;\n if (!_checkIsValidRealtimeElement(target)) {\n return;\n }\n if (isStillTarget) {\n self._handleTooltipInline();\n }\n KEYDOWN_RUNNING = true;\n let dependentFields = self._getDependentFields(target);\n self._customValidationsForElements(dependentFields).then(function () {\n self.prepareErrors(dependentFields, false);\n if (isStillTarget) {\n self.showAndOrCreateTooltip(e.target);\n }\n // future must be resolved before another event can be started\n KEYDOWN_RUNNING = false;\n });\n }, self.options.realtimeTimeout);\n }, true);\n }\n\n /**\n * Validates if target is a valid input field to check blur and focus events\n *\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidBlurFocusElement(target) {\n let attr = target.getAttribute(\"type\");\n return (attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\");\n }\n\n /**\n * Validates if is valid inline-check element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidInlineCheckElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n this.addEventListener(form, 'blur', function (e) {\n // do not hide tooltip after change event\n if (!e.target.flexcssKeepTooltips) {\n self._handleTooltipInline(e.target);\n }\n delete e.target.flexcssKeepTooltips;\n }, true);\n\n // handle focus on input elements\n // will show an error if field is invalid\n this.addEventListener(form, \"focus\", function (e) {\n if (self._formIsLoading()) {\n return;\n }\n // do not track errors for checkbox and radios on focus:\n if (!_checkIsValidBlurFocusElement(e.target)) {\n return;\n }\n // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n // just have been hidden (on blur). Maybe fix this with a queue later\n setTimeout(function () {\n self.showAndOrCreateTooltip(e.target);\n }, FOCUS_TOOLTIP_DELAY);\n }, true);\n\n if (self.options.inlineValidation) {\n // Handle change for checkbox, radios and selects\n this.addEventListener(form, \"change\", function (e) {\n const target = e.target;\n if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n return;\n }\n clearKeyDownTimeout();\n const name = target.getAttribute('name');\n let inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n // we only support dependent fields for a single widgets right now\n if (inputs.length === 1) {\n inputs = self._getDependentFields(target);\n }\n self._customValidationsForElements(inputs).then(function () {\n self.prepareErrors(inputs, false);\n target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n if (target.flexcssKeepTooltips) {\n self._handleTooltipHideClickAfterChange();\n }\n });\n });\n }\n\n // prevent default if form is invalid\n this.addEventListener(form, \"submit\", function listener(e) {\n self._submitListener(e, listener);\n });\n\n Event.dispatchAndFire(form, EVENT_FORM_READY);\n }\n\n /* Loading states, unfortunately we can't check if a promise is pending :/*/\n /* TODO: Maybe wrap promise to extend this functionality */\n\n _formLoading() {\n this.getForm().classList.add(LOADING_CLASS);\n }\n\n _formStopLoading() {\n this.getForm().classList.remove(LOADING_CLASS);\n }\n\n _formIsLoading() {\n return this.getForm().classList.contains(LOADING_CLASS);\n }\n\n // this defines the logic after a change event when a tooltip is shown\n // because we call this method inside the change event, the click would be immeditally executed with the change\n // event when not using setTimeout(). There might be another solution for this...\n _handleTooltipHideClickAfterChange() {\n const self = this;\n if (this.options.createTooltips) {\n setTimeout(function () {\n Util.addEventOnce(Settings.getTabEvent(), global.document.body, function (t) {\n if (!self._isElementInvalidElement(t.target)) {\n self._handleTooltipInline();\n }\n });\n }, CLICK_TOOLTIP_DELAY);\n }\n }\n\n _focusElement(el) {\n el.focus();\n Util.scrollToElement(el, this.options.scrollToElementDiff);\n }\n\n /**\n * Listener that is executed on form submit\n * @param e\n * @param submitListener\n * @returns {boolean}\n * @private\n */\n _submitListener(e, submitListener) {\n\n const form = this.getForm(),\n self = this,\n submitEvent = 'submit';\n\n if (this._formIsLoading()) {\n e.preventDefault();\n return false;\n }\n this._formLoading();\n form.removeEventListener(submitEvent, submitListener);\n this.removeErrors();\n e.preventDefault();\n // reset:\n if (form.checkValidity()) {\n form.addEventListener(submitEvent, submitListener);\n // It's possible that the form is valid but the custom validations need to be checked again:\n self.currentValidationFuture = new Promise((resolve) => {\n var validation = self.validateCustomFields();\n validation.then(function (r) {\n // because custom validators may mark multiple fields as invalid, we get all of them in the form\n var fields = self._getInvalidElements(),\n errors = self.prepareErrors(fields, false), firstError = errors[0];\n if (firstError) {\n self._focusElement(firstError);\n self.showAndOrCreateTooltip(firstError, true);\n }\n resolve(r);\n });\n });\n self.currentValidationFuture.then(function (r) {\n if (!r.foundAnyError) {\n // Handle submitting the form to server:\n self._handleSubmit(e);\n } else {\n self._formStopLoading();\n }\n });\n } else {\n self._formStopLoading();\n form.addEventListener(submitEvent, submitListener);\n }\n }\n\n\n /**\n * Handles submitting, optionally allows to stop submitting\n * @param e\n * @private\n */\n _handleSubmit(e) {\n this._submitFunction(this.form, e);\n }\n\n\n /**\n * Registers a global event Handler\n * @param errorFunc\n */\n static registerErrorMessageHandler(errorFunc) {\n Form.globalErrorMessageHandler = errorFunc;\n }\n\n /**\n * Initialize forms for a specific selector\n * @param {String} selector\n * @param {Object} [options]\n * @return {array.}\n */\n static init(selector, options) {\n var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') :\n document.querySelectorAll(selector), instances = [];\n for (var i = 0; i < forms.length; i++) {\n instances.push(new Form(forms[i], options));\n }\n return instances;\n }\n\n\n /**\n * Registers a global validator that is usable on all form instances\n * @param {String} name\n * @param {Function} validator\n * @returns {Function}\n */\n static registerValidator(name, validator) {\n Form.globalValidators[name] = validator;\n return Form;\n }\n\n /**\n * Registers a global function that is called when a form should validate the response of a server\n * @param {Function} func\n * @returns {Form}\n */\n static registerGlobalRemoteValidationFunction(func) {\n Form.globalRemoteValidationFunction = func;\n return Form;\n }\n}\n\n\n/**\n * Global validators\n * @type {Array}\n */\nForm.globalValidators = [];\n\n/**\n * Global Remote validation function\n */\nForm.globalRemoteValidationFunction = function () {\n};\n\n/**\n * Handles custom error messages extracts custom message by default\n */\nForm.globalErrorMessageHandler = (field, validity) => {\n if (!validity.customError) {\n let customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n if (customMsg) {\n field.setCustomValidity(customMsg);\n }\n }\n};\n\nexport default Form;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Form.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Tooltip\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport DestroyableWidget from './DestroyableWidget';\nimport Settings from './util/Settings';\n\n/**\n * @type {string}\n */\nconst CLASS_NAMES_TOOLTIP = 'tooltip-container';\n/**\n * @type {string}\n */\nconst CLASS_NAMES_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_CLASSNAME = 'data-class';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\n/**\n * @type {HTMLDocument}\n */\nconst doc = global.document;\n\n/**\n * Simple Tooltip\n */\nclass Tooltip extends DestroyableWidget {\n\n /**\n * Creates a Tooltip\n * @param {HTMLElement|String} DelegateContainer\n * @param {Object} [options]\n */\n constructor(DelegateContainer, options) {\n super();\n /**\n * The Container where possible events are captured\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n if (!this.container) {\n throw new Error('Could not create Tooltip, DelegateContainer not found');\n }\n\n /**\n * The Container where tooltips are stored for this instance\n * @type {HTMLElement}\n */\n this.tooltipContainer = null;\n\n /**\n * Default Options\n */\n this.options = {\n containerClass: '',\n selectorAttribute: 'data-tooltip',\n collisionContainer: this.container\n };\n\n Object.assign(this.options, options || {});\n }\n\n /**\n * Creates and shows a tooltip\n * @param {HTMLElement} target where is this tooltip positioned\n * @param {String} text text content in tooltip, will be NOT escaped\n * @param {Boolean} [removeTitle] removes title element if given\n * @param {Node} [positionRelative]\n */\n createTooltip(target, text, removeTitle, positionRelative) {\n // abort if text is empty\n if (!text || text && text.trim() === '') {\n return;\n }\n\n if (Settings.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n return;\n }\n\n let tooltipContainer = this.tooltipContainer;\n\n if (!tooltipContainer) {\n tooltipContainer = doc.createElement('div');\n this.container.appendChild(tooltipContainer);\n this.tooltipContainer = tooltipContainer;\n }\n this._restoreClassNames(tooltipContainer, target);\n\n tooltipContainer.style.left = 'auto';\n tooltipContainer.style.top = 'auto';\n tooltipContainer.innerHTML = text;\n tooltipContainer.flexTooltipCurrentTarget = target;\n if (removeTitle) {\n target.oldTitle = text;\n target.removeAttribute('title');\n }\n\n Util.setupPositionNearby(positionRelative || target, tooltipContainer,\n this.options.collisionContainer, true, true);\n\n tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n }\n\n _restoreClassNames(container, target) {\n // allow additional classname per tooltip on target element\n const classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n const maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n if (maybeTargetClass) {\n classNames.push(maybeTargetClass);\n }\n container.className = classNames.join(\" \");\n return this;\n }\n\n /**\n * @returns {HTMLElement|null}\n */\n getCurrentTarget() {\n return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n }\n\n /**\n * Destroys this Widget\n * @returns {boolean}\n */\n destroy() {\n super.destroy();\n\n if (this.tooltipContainer) {\n this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n return true;\n }\n return false;\n }\n\n /**\n * Removes a Tooltip on given target\n * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n */\n removeTooltip(target) {\n let selfTarget = target;\n if (!selfTarget && this.tooltipContainer) {\n selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (this.tooltipContainer) {\n if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n return;\n }\n this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n delete this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (selfTarget && selfTarget.oldTitle) {\n selfTarget.setAttribute('title', selfTarget.oldTitle);\n }\n }\n\n /**\n * Initilizes mouse events on container element\n */\n registerEvents() {\n const self = this;\n this.addEventListener(this.container, 'mouseover', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.createTooltip(e.target, e.target.getAttribute('title'), true);\n }\n });\n\n this.addEventListener(this.container, 'mouseout', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.removeTooltip(e.target);\n }\n });\n return this;\n }\n}\n\nexport default Tooltip;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Tooltip.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Provides a Basic Widget\n */\nclass DestroyableWidget {\n\n constructor() {\n this.listeners = [];\n }\n\n /**\n * Destroys a Widget\n */\n destroy() {\n this.listeners.forEach((listener) => {\n listener.element.removeEventListener.apply(listener.element, listener.args);\n });\n this.listeners = [];\n }\n\n /**\n * Adds an event and registers it later to remove bindings\n * @param {HTMLElement} element\n * @param {String} name\n * @param {Function} listener\n * @param {boolean} [capture]\n * @returns {Function}\n */\n addEventListener(element, name, listener, capture) {\n this.listeners.push({\n element,\n args: [name, listener, capture]\n });\n\n element.addEventListener(name, listener, capture);\n return listener;\n }\n\n}\n\nexport default DestroyableWidget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/DestroyableWidget.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","// the whatwg-fetch polyfill installs the fetch() function\n// on the global object (window or self)\n//\n// Return that as the export for use in Webpack, Browserify etc.\nrequire('whatwg-fetch');\nmodule.exports = self.fetch.bind(self);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/isomorphic-fetch/fetch-npm-browserify.js\n ** module id = 12\n ** module chunks = 2 3\n **/","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var list = this.map[name]\n if (!list) {\n list = []\n this.map[name] = list\n }\n list.push(value)\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n var values = this.map[normalizeName(name)]\n return values ? values[0] : null\n }\n\n Headers.prototype.getAll = function(name) {\n return this.map[normalizeName(name)] || []\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = [normalizeValue(value)]\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n Object.getOwnPropertyNames(this.map).forEach(function(name) {\n this.map[name].forEach(function(value) {\n callback.call(thisArg, value, name, this)\n }, this)\n }, this)\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n reader.readAsArrayBuffer(blob)\n return fileReaderReady(reader)\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n reader.readAsText(blob)\n return fileReaderReady(reader)\n }\n\n var support = {\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob();\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n function Body() {\n this.bodyUsed = false\n\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (!body) {\n this._bodyText = ''\n } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n // Only support ArrayBuffers for POST method.\n // Receiving ArrayBuffers happens via Blobs, instead.\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n } else {\n this.text = function() {\n var rejected = consumed(this)\n return rejected ? rejected : Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n if (Request.prototype.isPrototypeOf(input)) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = input\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this)\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function headers(xhr) {\n var head = new Headers()\n var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n pairs.forEach(function(header) {\n var split = header.trim().split(':')\n var key = split.shift().trim()\n var value = split.join(':').trim()\n head.append(key, value)\n })\n return head\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText\n this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request\n if (Request.prototype.isPrototypeOf(input) && !init) {\n request = input\n } else {\n request = new Request(input, init)\n }\n\n var xhr = new XMLHttpRequest()\n\n function responseURL() {\n if ('responseURL' in xhr) {\n return xhr.responseURL\n }\n\n // Avoid security warnings on getResponseHeader when not allowed by CORS\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL')\n }\n\n return;\n }\n\n xhr.onload = function() {\n var status = (xhr.status === 1223) ? 204 : xhr.status\n if (status < 100 || status > 599) {\n reject(new TypeError('Network request failed'))\n return\n }\n var options = {\n status: status,\n statusText: xhr.statusText,\n headers: headers(xhr),\n url: responseURL()\n }\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/whatwg-fetch/fetch.js\n ** module id = 13\n ** module chunks = 2 3\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Modal\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global KeyboardEvent */\n\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\nconst KEY_ESC = 27;\n/* Attribute Names */\nconst ATTR_CREATE_NEW = 'data-new-instance';\nconst ATTR_CLOSE = 'data-close-modal';\nconst ATTR_NAME = 'data-modal';\n\n/* Class names */\nconst CLS_CONTAINER_CURRENT = 'front';\nconst CLS_OPEN = 'open';\nconst CLS_CURRENT = 'current';\nconst CLS_PART_OF_STACK = 'part-of-stack';\nconst CLS_MODAL_CONTAINER = 'modal-container';\nconst CLS_ANIM_END = 'modal-anim-end';\nconst CLS_LOADER_CONTAINER = 'loader-container';\nconst CLS_LOADER = 'loader';\nconst CLS_BACKDROP = 'backdrop';\n\n/* Events */\n\n/**\n * Event triggered when modal is closed\n * @type {string}\n */\nexport const EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n/**\n * Event triggered before a modal is closed, cancelable\n * @type {string}\n */\nexport const EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n/**\n * Event triggered when a modal is opened\n * @type {string}\n */\nexport const EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\n/**\n * Event triggered when modal is initilized, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_INIT = 'flexcss.modal.init';\n\n/**\n * Triggered when the content of an async modal on a target is loaded, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\n/**\n * A Modal Implementation\n */\nclass Modal {\n constructor(DelegateContainer, options) {\n const doc = global.document;\n const container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n // Instance vars:\n if (!container) {\n throw new Error(`Could not found container element by given ID/Element: ${DelegateContainer}`);\n }\n\n this.currentOpen = null;\n\n this.loading = false;\n\n this.container = container;\n\n /**\n * Default Options\n */\n this.options = {\n classNames: 'modal',\n closeOnEscape: true,\n closeOnBackgroundClick: true,\n destroyOnFinish: false,\n fixedContainer: true,\n containerClassNames: ''\n };\n\n Object.assign(this.options, options);\n\n // Container where events are delegated\n this.eventContainer = null;\n this.eventFunction = null;\n\n this.dataMainPageContainer = global.document.body;\n\n this.currentScrollTop = 0;\n\n this.modalContainer = null;\n\n // Destroy full modal instance when no dialogs are bind to?\n // Otherwise container is recycled\n this.destroyOnFinish = this.options.destroyOnFinish;\n }\n\n /**\n * Removes this modal from global stack\n * Will handle fixing main html element too\n * @private\n * @param n\n */\n _removeModalFromStack(n) {\n const t = Modal._modalInstances.indexOf(n);\n if (t > -1) {\n Modal._modalInstances.splice(t, 1);\n FixedWindow.getInstance().close();\n }\n }\n\n\n /**\n * Modal container that contains all `stacked` modals for this instance\n * @returns {HTMLElement}\n */\n getModalContainer() {\n return this.modalContainer;\n }\n\n /**\n * Closes the current open modal of this stack\n * @params [e], optional event\n * @returns {*}\n */\n close(e) {\n const self = this;\n\n const options = self.currentOpen ? Util.applyOptionsFromElement(\n self.currentOpen, Util.copy(self.options)) : self.options;\n\n // close only on keyboard if instance should\n if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n return false;\n }\n\n // close only on background if instance should\n if (!options.closeOnBackgroundClick && e &&\n e.type === Settings.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n\n // if an instance is currently loading, prevent from closing\n if (self.loading) {\n return false;\n }\n\n if (e) {\n e.preventDefault();\n }\n\n if (self.currentOpen) {\n // dispatch beforeClose event, if prevented prevent modal from closing\n const ev = Event.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n if (ev.defaultPrevented) {\n return false;\n }\n\n this._finishState(self.currentOpen);\n // if there is an previous modal\n if (self.currentOpen.prevModal) {\n // switch to the next modal\n return self.switchModals(self.currentOpen.prevModal,\n self.currentOpen.prevModal.prevModal || null);\n }\n\n // finally trigger closed event\n Event.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n }\n self._removeModalFromStack(self.currentOpen);\n\n // Full stack closed:\n self.currentOpen = null;\n if (self.modalContainer) {\n // setup next open\n const lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n const classList = self.modalContainer.classList;\n classList.remove(CLS_CONTAINER_CURRENT);\n classList.remove(CLS_BACKDROP);\n classList.remove(CLS_OPEN);\n // Remove all current classes from child-nodes\n for (let i = 0; i < self.modalContainer.childNodes.length; i++) {\n const node = self.modalContainer.childNodes[i];\n const cl = node.classList;\n // remove applied styles\n self._finishState(node);\n cl.remove(CLS_CURRENT);\n cl.remove(CLS_PART_OF_STACK);\n }\n if (lastContainer) {\n lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n }\n }\n\n if (self.destroyOnFinish) {\n self.destroy();\n }\n return self;\n }\n\n /**\n * Resets a target when newly initilizes\n * @param target\n * @private\n */\n _finishState(target) {\n target.classList.remove(CLS_ANIM_END);\n }\n\n /**\n * Handler called when a Modal has finished an animation\n * @param e\n * @param self\n * @private\n */\n _finishAnim(e, self) {\n e.target.classList.add(CLS_ANIM_END);\n e.target.removeEventListener(e.type, self, true);\n }\n\n /**\n * Brings the given modal to front\n * @param co\n * @param last\n */\n switchModals(co, last) {\n co.prevModal = last;\n Modal._modalInstances.push(co);\n FixedWindow.getInstance().open(this, this.modalContainer);\n if (last) {\n this._finishState(last);\n Util.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n last.classList.add(CLS_PART_OF_STACK);\n }\n // set new currentOpen\n this.currentOpen = co;\n\n // bring current container to the front\n const instances = Modal._modalInstances;\n\n for (let m = 0; m < instances.length; m++) {\n instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n }\n this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n // remove animations if animations has been completed, fixes various bugs:\n // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n Util.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\n for (let i = 0; i < this.modalContainer.childNodes.length; i++) {\n const n = this.modalContainer.childNodes[i];\n const isCurrent = n.classList.contains(CLS_CURRENT);\n if (n === co) {\n co.classList.add(CLS_CURRENT);\n co.classList.remove(CLS_PART_OF_STACK);\n this._finishState(co);\n } else {\n n.classList.remove(CLS_CURRENT);\n if (isCurrent) {\n this._removeModalFromStack(n);\n Event.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n }\n }\n }\n }\n\n /**\n * Creates a Modal and opens it (later)\n * @param e\n * @returns {Promise|boolean}\n */\n createWidget(e) {\n const self = this;\n if (this.loading) {\n return false;\n }\n\n // check if another modal has registered events on this dom path:\n if (e && e.target) {\n const foundInstance = Util.parentsUntil(e.target, (node) => {\n return node && node.flexModalInstance;\n });\n\n // if another instance has been found, abort\n if (foundInstance !== this.container) {\n return false;\n }\n }\n let targetContent;\n let future;\n let widget;\n let target;\n let hasTarget = true;\n const isHtmlElement = e instanceof HTMLElement;\n const isWidget = Widget.isWidget(e);\n if (isHtmlElement || isWidget) {\n if (isHtmlElement) {\n targetContent = e;\n } else {\n widget = e;\n targetContent = widget.element;\n }\n } else {\n target = e.target;\n if (!target) {\n throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n }\n hasTarget = target.hasAttribute(ATTR_NAME);\n targetContent = target.getAttribute(ATTR_NAME);\n widget = Widget.findWidget(target);\n if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n const newInstance = new Modal(this.container)\n .setDestroyOnFinish(true);\n e.newInstance = true;\n newInstance.fromEvent(e).then(() => {\n newInstance.registerEvents(newInstance.getModalContainer());\n });\n return false;\n }\n if (hasTarget) {\n e.stopImmediatePropagation();\n e.preventDefault();\n }\n }\n\n if (!hasTarget) {\n return false;\n }\n\n let modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\n // lazy create modal container\n if (!this.modalContainer) {\n this.modalContainer = global.document.createElement('div');\n this.modalContainer.className = `${CLS_MODAL_CONTAINER} ${this.options.containerClassNames} ${CLS_OPEN}`;\n const closeModalFunction = (ce) => {\n if (this.loading) {\n return false;\n }\n if (Util.isPartOfNode(ce.target, this.currentOpen)) {\n if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n }\n this.close(ce);\n };\n\n this.modalContainer.addEventListener(Settings.getTabEvent(), closeModalFunction, false);\n\n modalContainerClasses = this.modalContainer.classList;\n this.container.appendChild(this.modalContainer);\n } else {\n modalContainerClasses.add(CLS_OPEN);\n }\n\n let loader;\n const doc = global.document;\n const toggleLoader = (show) => {\n if (show) {\n loader = doc.createElement('div');\n loader.className = CLS_LOADER_CONTAINER;\n const loaderLoader = doc.createElement('div');\n loaderLoader.className = CLS_LOADER;\n loader.appendChild(loaderLoader);\n this.modalContainer.appendChild(loader);\n } else {\n loader.parentNode.removeChild(loader);\n }\n };\n modalContainerClasses.add('loading');\n modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n modalContainerClasses.add(CLS_BACKDROP);\n });\n });\n\n this.loading = true;\n toggleLoader(true);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n let result;\n if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n result = r;\n } else {\n // Create container Element:\n const element = doc.createElement('div');\n element.className = self.options.classNames;\n element.innerHTML = r;\n element.id = Util.guid();\n result = element;\n }\n widget.finalContent = result;\n Event.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n return result;\n });\n } else {\n const el = targetContent instanceof HTMLElement ||\n targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n if (el) {\n future = new Promise((resolve) => {\n resolve(el);\n });\n } else {\n throw new Error(`Could not found given modal element (content) with ID: ${targetContent}`);\n }\n }\n\n Event.dispatchAndFire(target, EVENT_MODAL_INIT);\n\n return future.then((thisEl) => {\n thisEl.hfWidgetInstance = this;\n this.modalContainer.appendChild(thisEl);\n modalContainerClasses.remove('loading');\n this.loading = false;\n toggleLoader(false);\n this.open(thisEl, true, e);\n return thisEl;\n });\n }\n\n /**\n * Open's an already rendered modal\n * @param {HTMLElement} modal\n * @param {Boolean} [internal], set to true to prevent container management\n * @param {Boolean} [maybeEvent], optional event-object that triggered open\n */\n open(modal, internal, maybeEvent) {\n if (!internal) {\n this.modalContainer.classList.add('open');\n }\n this.switchModals(modal, this.currentOpen);\n\n Event.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n }\n\n\n registerEvents(delegate) {\n const delegateContainer = delegate || this.container;\n // Modals should always be fixed\n FixedWindow.getInstance().addScreenConstraint(Modal, () => true);\n // register modal instance so we can detect multiple registrars\n delegateContainer.flexModalInstance = this;\n this.eventFunction = (...args) => {\n this.createWidget.apply(this, args);\n };\n delegateContainer.addEventListener(Settings.getTabEvent(), this.eventFunction, false);\n\n this.eventContainer = delegateContainer;\n return this;\n }\n\n\n /**\n * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n * @param {HTMLElement|Widget} widget instance or html element\n * @returns {Promise}\n */\n fromWidget(widget) {\n return this.createWidget(widget);\n }\n\n /**\n * Creates a Widget from event\n * @param e\n * @returns {Promise}\n */\n fromEvent(e) {\n return this.createWidget(e);\n }\n\n setDestroyOnFinish(v) {\n this.destroyOnFinish = v;\n return this;\n }\n\n /**\n * Destroy this widget instance, cleans empty DOM nodes\n * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n */\n destroy() {\n const modalContainer = this.modalContainer;\n const isEmptyContainer = modalContainer.childNodes.length === 0;\n // Remove event listener on destroy, do not remove DOM node\n if (this.eventContainer) {\n this.eventContainer.removeEventListener(Settings.getTabEvent(), this.eventFunction, true);\n }\n\n if (isEmptyContainer) {\n if (modalContainer.parentNode) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n }\n if (global.MutationObserver) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach(() => {\n if (modalContainer.childNodes.length === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n observer.disconnect();\n }\n });\n });\n observer.observe(modalContainer,\n {\n childList: true\n }\n );\n } else {\n modalContainer.addEventListener('DOMNodeRemoved', (e) => {\n if (e.target !== modalContainer && (modalContainer.childNodes.length - 1) === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n });\n }\n }\n}\n\n\n// Static variable that keeps track of all open modals\nModal._modalInstances = [];\n\n// Global keydown listener for modal\nglobal.addEventListener('keydown', (e) => {\n if (e.keyCode === KEY_ESC) {\n const lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n if (lastModal) {\n Widget.findWidget(lastModal).close(e);\n }\n }\n});\n\nexport default Modal;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Modal.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Widget\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/**\n * A Widget provides async content on a specific target (e.g. a modal link)\n */\nclass Widget {\n\n /**\n * Creates a new Widget\n * @param [element], optional define the content of widget\n */\n constructor(element) {\n /**\n *\n * @type {Promise}\n */\n this.asyncContent = null;\n\n /**\n * @type {boolean}\n */\n this._isWidget = true;\n\n if (element) {\n /**\n * @type {HTMLElement}\n */\n this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n if (this.element) {\n this.element.hfWidgetInstance = this;\n this.setAsync(() => {\n return new Promise((s) => {\n s(this.element);\n });\n });\n } else {\n throw new Error(`Could not found element with ID: ${element}`);\n }\n }\n /**\n * The final resulted content that a widget did create (e.g. a modal container)\n * @type {HTMLElement}\n */\n this.finalContent = null;\n }\n\n /**\n *\n * @returns {Promise}\n */\n getAsync() {\n return this.asyncContent();\n }\n\n /**\n * @param {Function.} async\n * @returns {Widget}\n */\n setAsync(async) {\n this.asyncContent = async;\n return this;\n }\n\n /**\n * @returns {HTMLElement}\n */\n getFinalContent() {\n return this.finalContent;\n }\n\n /**\n * @param {HTMLElement} element\n * @returns {Widget}\n */\n setElement(element) {\n this.element = element;\n return this;\n }\n\n /**\n * Destroys the generated content of this widget\n * @returns {boolean}\n */\n destroy() {\n if (this.finalContent && this.finalContent.parentNode) {\n this.finalContent.parentNode.removeChild(this.finalContent);\n return true;\n }\n\n delete this.element;\n delete this.asyncContent;\n delete this.finalContent;\n\n return false;\n }\n\n /**\n * Will find a widget on an Element\n * @param {HTMLElement} element\n * @returns {Widget|undefined}\n */\n static findWidget(element) {\n return element ? element.hfWidgetInstance : undefined;\n }\n\n /**\n * Checks if a given object is an instance\n * @param {Object} self\n * @returns {boolean}\n */\n static isWidget(self) {\n return self instanceof Widget || typeof self === 'object' && self.hasOwnProperty('_isWidget');\n }\n}\n\nexport default Widget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Widget.js\n **/","import Settings from '../util/Settings';\nimport debounce from './debounce';\nimport Event from '../util/Event';\nimport Util from '../util/Util';\n\nconst CLS_FIXED_WINDOW = 'fixed-window-open';\n\nexport const EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\nexport const EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\n/**\n * @type {string}\n */\nexport const ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\n/**\n * @type {FixedWindow}\n */\nlet fixedWindowInstance;\n\nexport default class FixedWindow {\n\n constructor() {\n this.widgets = [];\n this.currentScrollTop = 0;\n this.fixedScreenConstraints = [];\n this.windowWidth = 0;\n this.isFixedWindowActive = false;\n this.touchListener = null;\n }\n\n /**\n * Adds a constraint to detect if the window needs to be changed when the screensize changes\n *\n * @param {Function} widget\n * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n */\n addScreenConstraint(widget, fixedBreakpointFn) {\n this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n }\n\n /**\n * @returns {null|DestroyableWidget}\n */\n getCurrentWidget() {\n return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n }\n\n /**\n * @private\n */\n _checkFixedNeeded() {\n if (this.widgets.length === 0) {\n return;\n }\n const widgets = new Set(this.widgets);\n const widgetsThatRequireFixedWindow = Array.from(widgets).some(({ widget }) => {\n return this.fixedScreenConstraints[widget] && this.fixedScreenConstraints[widget](this.windowWidth);\n });\n if (!widgetsThatRequireFixedWindow) {\n this._removeFixedContainer();\n } else {\n this._addFixedContainer();\n }\n }\n\n /**\n * @private\n */\n _addFixedContainer() {\n if (this.isFixedWindowActive) {\n return;\n }\n Event.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n detail: this.getCurrentWidget()\n });\n // this causes layout and should be optimized\n // At lest we write in a batch later\n Settings.get().scrollbarUpdateNodes.map((n) => {\n let foundProperty = 'paddingRight';\n let direction = 1;\n let node = n;\n if (n instanceof Array) {\n const [whatNode, property, d] = n;\n foundProperty = property;\n node = whatNode;\n direction = d || 1;\n }\n return {\n node,\n property: foundProperty,\n value: `${parseInt(global.getComputedStyle(node)[foundProperty], 10) +\n (!node.__fixedWindowMod__ ? (Settings.getScrollbarWidth() * direction) : 0)}px`\n };\n }).forEach((d) => {\n d.node.__fixedWindowMod__ = true;\n d.node.style[d.property] = d.value;\n });\n\n this.touchListener = (e) => {\n e.preventDefault();\n };\n\n let shouldNotMoveUp = false;\n let shouldNotMoveDown = false;\n let neverScroll = false;\n let lastClientY = 0;\n this.touchStartListener = (e) => {\n let { element } = this.getCurrentWidget();\n const closestOverflow = Util.closestCallback(e.target,\n (el) => el instanceof HTMLTextAreaElement ||\n (el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH)));\n if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n element = closestOverflow;\n }\n if (Util.isPartOfNode(e.target, element)) {\n neverScroll = element.scrollHeight === element.offsetHeight;\n lastClientY = e.touches[0].clientY;\n // never allow scrolling when there is nothing to scroll\n if (neverScroll) {\n return false;\n }\n if (element.scrollTop === 0) {\n element.scrollTop = 1;\n shouldNotMoveUp = true;\n } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n shouldNotMoveDown = true;\n element.scrollTop -= 1;\n }\n }\n };\n\n global.addEventListener('touchmove', this.touchListener);\n global.document.body.addEventListener('touchstart', this.touchStartListener);\n\n this.touchMoveListener = (e) => {\n const { element } = this.getCurrentWidget();\n if (Util.isPartOfNode(e.target, element)) {\n const { clientY } = e.touches[0];\n const isScrollingDown = (lastClientY - clientY) > 0;\n lastClientY = clientY;\n\n if (neverScroll) {\n neverScroll = false;\n return false;\n }\n\n if ((!shouldNotMoveDown && isScrollingDown) ||\n (shouldNotMoveDown && !isScrollingDown) ||\n (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) ||\n (shouldNotMoveDown && shouldNotMoveUp && isScrollingDown)\n ) {\n e.stopImmediatePropagation();\n }\n\n shouldNotMoveUp = false;\n shouldNotMoveDown = false;\n }\n };\n global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\n global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n this.isFixedWindowActive = true;\n }\n\n /**\n * @private\n */\n _removeFixedContainer() {\n if (this.isFixedWindowActive) {\n // cleanup event listeners\n global.removeEventListener('touchmove', this.touchListener);\n global.document.body.removeEventListener('touchstart', this.touchStartListener);\n global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\n // reset scrollbar nodes\n Settings.get().scrollbarUpdateNodes.forEach((node) => {\n if (node instanceof Array) {\n const [whatNode, property] = node;\n delete whatNode.__fixedWindowMod__;\n whatNode.style[property] = '';\n } else {\n delete node.__fixedWindowMod__;\n node.style.paddingRight = '';\n }\n });\n global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n Event.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n this.isFixedWindowActive = false;\n }\n }\n\n /**\n * Will close a window when no widgets are opened that need one\n */\n resizeListener() {\n this.windowWidth = global.innerWidth;\n this._checkFixedNeeded();\n }\n\n /**\n * @returns {FixedWindow}\n */\n static getInstance() {\n if (!fixedWindowInstance) {\n fixedWindowInstance = new FixedWindow();\n fixedWindowInstance.windowWidth = global.innerWidth;\n const eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n global.addEventListener(\n 'resize',\n debounce(eventHandler, 500)\n );\n global.addEventListener('orientationchange', eventHandler);\n }\n return fixedWindowInstance;\n }\n\n /**\n * Request a close of the fixed window\n */\n close() {\n this.widgets.pop();\n if (this.widgets.length === 0) {\n this._removeFixedContainer();\n }\n }\n\n /**\n * Request to open a fixed windows\n * @param {Object|DestroyableWidget} instance\n * @param {HTMLElement} element\n */\n open(instance, element) {\n let fixed = false;\n if (typeof instance === 'object') {\n const widget = instance.constructor;\n const fixedWidget = this.fixedScreenConstraints[instance.constructor];\n if (widget && fixedWidget) {\n fixed = fixedWidget(this.windowWidth);\n }\n const length = this.widgets.length;\n this.widgets.push(\n {\n widget,\n element\n }\n );\n // open a new window if there is no window active\n if (length === 0) {\n if (fixed) {\n this._addFixedContainer();\n }\n }\n }\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/FixedWindow.js\n **/","export default (fn, ms) => () => {\n clearTimeout(fn.timeout);\n fn.timeout = setTimeout(fn, ms);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/debounce.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Toggleable\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Settings from './util/Settings';\nimport Widget from './Widget';\nimport Util from './util/Util';\nimport Event from './util/Event';\n\n/**\n * Event that is fired when a tab is closed\n * @type {string}\n */\n\nexport const EVENT_TAB_CLOSED = 'flexcss.tab.closed';\n\n/**\n * Event that is fired when a tab has been opened\n * @type {string}\n */\nexport const EVENT_TAB_OPENED = 'flexcss.tab.opened';\n/**\n * @type {string}\n */\nconst ATTR_NAME = 'data-toggle';\n/**\n * @type {string}\n */\nconst ACTIVE_CLASS = 'active';\n/**\n * @type {string}\n */\nconst LOADING_CLASS = 'loading';\n\n/**\n * @type {string}\n */\nconst ATTR_TOGGLE_LIST = 'data-toggle-list';\n\n/**\n * Creates a toggleable element, either for tabs or a single toggle\n */\nclass Toggleable {\n constructor(ContainerId) {\n const doc = global.document;\n\n this.container = ContainerId instanceof HTMLElement ? ContainerId :\n doc.getElementById(ContainerId);\n\n this.loading = false;\n\n if (!this.container) {\n throw new Error(`Toggleable container with id ${ContainerId} not found`);\n }\n }\n\n /**\n * Listener\n * @param {Event} e\n * @private\n */\n _listener(e) {\n let target = e.target;\n const parent = target.parentNode;\n const doc = global.document;\n\n // support target child element to clicked\n if (!target.hasAttribute(ATTR_NAME)) {\n if (parent && parent.hasAttribute(ATTR_NAME)) {\n target = parent;\n } else {\n return;\n }\n }\n\n if (!target.hasAttribute(ATTR_NAME)) {\n return;\n }\n\n const refId = target.getAttribute(ATTR_NAME);\n const ref = doc.getElementById(refId);\n\n e.preventDefault();\n\n if (this.loading) {\n return;\n }\n\n this.toggleTarget(ref, target);\n }\n\n /**\n * Registers Events for this instance\n * @returns {Toggleable}\n */\n registerEvents() {\n this.container.addEventListener(Settings.getTabEvent(), this._listener.bind(this));\n return this;\n }\n\n /**\n * Toggles given `ref`\n * @param {HTMLElement|Node} ref\n * @param {HTMLElement|Node} [selfTarget] optional target node\n */\n toggleTarget(ref, selfTarget) {\n let target = selfTarget;\n if (!target && !ref) {\n return;\n }\n if (!target) {\n target = document.querySelector(`[${ATTR_NAME}=\"${ref.id}\"]`);\n }\n\n let future;\n const elClassList = target.classList;\n const parent = target.parentNode;\n const doc = global.document;\n\n future = new Promise((resolve, failure) => {\n if (ref) {\n resolve(ref);\n } else {\n const widget = Widget.findWidget(target);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n if (r instanceof HTMLElement) {\n const id = Util.guid();\n r.id = id;\n target.setAttribute(ATTR_NAME, id);\n resolve(r);\n } else {\n throw new Error(`Dynamically creating toggle-content is not supported right now.\n Return an HTMLElement instance`);\n }\n });\n } else {\n failure('Target not given');\n }\n }\n });\n\n if (parent) {\n const maybeToggleNode = Util.parentsUntil(target, (node) => {\n return node && node.hasAttribute && node.hasAttribute(ATTR_TOGGLE_LIST);\n });\n\n const parentClassList = parent.classList;\n // Abort if element is already active and if is part of a toggle list\n if (maybeToggleNode) {\n if (!parentClassList.contains(ACTIVE_CLASS)) {\n parentClassList.toggle(ACTIVE_CLASS);\n parentClassList.add(LOADING_CLASS);\n } else {\n return;\n }\n }\n\n if (maybeToggleNode) {\n for (let i = 0; i < maybeToggleNode.children.length; i++) {\n const n = maybeToggleNode.children[i];\n const targetRef = n.children[0];\n if (n !== parent) {\n n.classList.remove(ACTIVE_CLASS);\n if (targetRef) {\n const attr = targetRef.getAttribute(ATTR_NAME);\n const el = attr ? doc.getElementById(attr) : null;\n if (el) {\n Event.dispatchAndFire(el, EVENT_TAB_CLOSED);\n el.classList.remove(ACTIVE_CLASS);\n targetRef.classList.remove(ACTIVE_CLASS);\n }\n }\n }\n }\n }\n }\n if (elClassList) {\n elClassList.toggle(ACTIVE_CLASS);\n elClassList.add(LOADING_CLASS);\n }\n this.loading = true;\n future.then((r) => {\n Event.dispatchAndFire(r, EVENT_TAB_OPENED);\n Toggleable._handleLoaded(target);\n r.classList.toggle(ACTIVE_CLASS);\n this.loading = false;\n }).catch(() => {\n this.loading = false;\n Toggleable._handleLoaded(target);\n });\n }\n\n /**\n * @param el\n * @private\n */\n static _handleLoaded(el) {\n const parentClassList = el.parentNode.classList;\n el.classList.remove(LOADING_CLASS);\n if (parentClassList) {\n parentClassList.remove(LOADING_CLASS);\n }\n }\n}\n\nexport default Toggleable;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Toggleable.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.OffCanvas\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Settings from './util/Settings';\nimport Util from './util/Util';\nimport Event from './util/Event';\nimport FixedWindow from './lib/FixedWindow';\n\n/**\n * @type {string}\n */\nconst ATTR_CLOSE_SIDEBAR = 'data-close-offcanvas';\n\n/**\n * @type {string}\n */\nconst ATTR_TARGET = 'data-offcanvas';\n/**\n * @type {string}\n */\nconst INIT_CLASS = 'init';\n/**\n * @type {string}\n */\nconst OPEN_CLASS = 'open';\n/**\n * @type {number}\n */\nconst HIDE_FACTOR = 3;\n\n/**\n * @type {string}\n */\nexport const EVENT_TOGGLE = 'flexcss.offcanvas.toggle';\n\n/**\n * A OffCanvas Implementation\n */\nclass OffCanvas {\n\n /**\n * Creates an off-canvas navigation\n * @param {HTMLElement|String} NavigationId\n * @param {HTMLElement|String} Darkener\n * @param {int} factor positive will expect right sidebar, positive left\n * @param {bool} [disableTouch] if true all touch events are disabled\n * @constructor\n */\n constructor(NavigationId, Darkener, factor, disableTouch) {\n const doc = global.document;\n let touchedX = 0;\n const navigationContainer = NavigationId instanceof HTMLElement ?\n NavigationId : doc.getElementById(NavigationId);\n const darkener = Darkener instanceof HTMLElement ? Darkener : doc.getElementById(Darkener);\n const DARKENER_CLASS_TOGGLE = `toggle-${darkener.id}` || 'darkener';\n const DARKENER_CLASS_INSTANT_TOGGLE = `${DARKENER_CLASS_TOGGLE}-open`;\n\n const shouldNotTouch = () => {\n return window.innerWidth >= Settings.get().smallBreakpoint;\n };\n\n if (!darkener || !navigationContainer) {\n throw new Error('Could not find needed elements (Darkener and/or NavigationId)');\n }\n\n this.darkener = darkener;\n this.darkenerClassToggle = DARKENER_CLASS_TOGGLE;\n this.darkenerClassToggleInstant = DARKENER_CLASS_INSTANT_TOGGLE;\n this.globalToggleClass = Settings.get().canvasToggledClass;\n\n this.navigationContainer = navigationContainer;\n this.navigationContainerId = navigationContainer.id;\n\n // create id if id does not exist\n if (!this.navigationContainerId) {\n this.navigationContainerId = Util.guid();\n navigationContainer.id = this.navigationContainerId;\n }\n\n if (!disableTouch) {\n navigationContainer.addEventListener('touchstart', (e) => {\n if (shouldNotTouch()) {\n return;\n }\n touchedX = e.touches[0].clientX;\n navigationContainer.mustHide = false;\n });\n navigationContainer.addEventListener('touchmove', (e) => {\n if (shouldNotTouch()) {\n return;\n }\n const { clientX } = e.touches[0];\n const target = navigationContainer;\n const style = target.style;\n const calcX = touchedX - clientX;\n const bounds = target.getBoundingClientRect();\n const compare = factor > 0 ? calcX <= 0 : calcX >= 0;\n if (compare) {\n e.preventDefault();\n style.transition = 'transform 0s ease';\n style.webkitTransition = '-webkit-transform 0s ease';\n target.mustHide = factor > 0 ? calcX * -1 >\n bounds.width / HIDE_FACTOR : calcX > bounds.width / HIDE_FACTOR;\n const transform = `translate3d(${calcX * -1}px,0,0)`;\n style.transform = transform;\n style.webkitTransform = transform;\n }\n });\n navigationContainer.addEventListener('touchend', () => {\n if (shouldNotTouch()) {\n return;\n }\n const target = navigationContainer;\n const style = target.style;\n if (target.mustHide) {\n const width = target.getBoundingClientRect().width * factor;\n style.transition = 'transform .2s ease';\n style.webkitTransition = '-webkit-transform .2s ease';\n const transform = `translate3d(${width}px,0,0)`;\n style.transform = transform;\n style.webkitTransform = transform;\n this._remove().then(() => {\n this.resetTransform(style);\n });\n this._removeInstant();\n } else {\n this.resetTransform(style);\n }\n });\n }\n }\n\n /**\n * @param {Object} s\n */\n resetTransform(s) {\n s.transform = '';\n s.transition = '';\n s.webkitTransform = '';\n s.webkitTransition = '';\n }\n\n /**\n * @param {Object} [event]\n * @private\n */\n _remove(event) {\n return new Promise((resolve) => {\n Util.addEventOnce(Settings.getTransitionEvent(), this.navigationContainer, function scheduler(e) {\n if (e.target !== this.navigationContainer) {\n return Util.addEventOnce(Settings.getTransitionEvent(),\n this.navigationContainer, scheduler.bind(this));\n }\n requestAnimationFrame(() => {\n OffCanvas.currentOpen = null;\n const docCls = global.document.documentElement.classList;\n docCls.remove(this.darkenerClassToggle);\n docCls.remove(this.globalToggleClass);\n if (!!event) {\n Event.dispatchAndFire(this.navigationContainer, EVENT_TOGGLE);\n }\n resolve();\n });\n }.bind(this));\n });\n }\n\n /**\n * @private\n */\n _removeInstant() {\n this.navigationContainer.classList.remove(OPEN_CLASS);\n global.document.documentElement.classList.remove(this.darkenerClassToggleInstant);\n this.darkener.classList.remove(INIT_CLASS);\n FixedWindow.getInstance().close();\n }\n\n /**\n * Toggles a an off-canvas element\n * @param [e]\n * @private\n */\n toggle(e) {\n if (e) {\n e.preventDefault();\n }\n this.resetTransform(this.navigationContainer.style);\n const darkenerClass = this.darkener.classList;\n const DARKENER_CLASS_TOGGLE = this.darkenerClassToggle;\n const DARKENER_CLASS_INSTANT_TOGGLE = this.darkenerClassToggleInstant;\n const navigationControllerClassList = this.navigationContainer.classList;\n if (!OffCanvas.currentOpen) {\n Util.addEventOnce(Settings.getTransitionEvent(), this.navigationContainer, () => {\n if (!!e) {\n Event.dispatchAndFire(this.navigationContainer, EVENT_TOGGLE);\n }\n });\n OffCanvas.currentOpen = this;\n FixedWindow.getInstance().open(this, this.navigationContainer);\n const docElementCls = global.document.documentElement.classList;\n docElementCls.add(this.globalToggleClass);\n docElementCls.add(DARKENER_CLASS_INSTANT_TOGGLE);\n docElementCls.add(DARKENER_CLASS_TOGGLE);\n darkenerClass.add(INIT_CLASS);\n navigationControllerClassList.add(OPEN_CLASS);\n } else {\n return this.close(e);\n }\n }\n\n close(event) {\n if (this.navigationContainer.classList.contains(OPEN_CLASS)) {\n const promise = this._remove(event);\n this._removeInstant();\n return promise;\n }\n return new Promise(r => r());\n }\n\n /**\n * Register events\n * @param [delegate]\n */\n registerEvents(delegate) {\n const thisDelegate = delegate || global.document;\n FixedWindow.getInstance().addScreenConstraint(OffCanvas, (width) => width < Settings.get().smallBreakpoint);\n thisDelegate.addEventListener(Settings.getTabEvent(), (e) => {\n if (OffCanvas.currentOpen && OffCanvas.currentOpen !== this) {\n return;\n }\n const id = this.navigationContainerId;\n const validTarget = e.target.getAttribute(ATTR_TARGET) === id;\n if (!Util.isPartOfNode(e.target, this.navigationContainer)) {\n if (validTarget || (OffCanvas.currentOpen === this && e.target === this.darkener)) {\n this.toggle(e);\n }\n } else {\n if (e.target.hasAttribute(ATTR_CLOSE_SIDEBAR)) {\n this.toggle(e);\n }\n }\n });\n }\n}\n\nOffCanvas.currentOpen = null;\n\nexport default OffCanvas;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/OffCanvas.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Dropdown\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\n\n/**\n * @type {string}\n */\nconst ATTR_CC = 'data-collision-container';\n/**\n * @type {string}\n */\nconst ATTR_DARKENER = 'data-darkener-container';\n/**\n * @type {string}\n */\nconst DARKENER_INIT = 'init';\n/**\n * @type {string}\n */\nconst ATTR_DATA_TARGET = 'data-target';\n/**\n * @type {string}\n */\nconst ATTR_CLOSE_DROPDOWN = 'data-close-dropdown';\n/**\n * @type {string}\n */\nconst ATTR_NAME = 'data-dropdown';\n/**\n * @type {string}\n */\nconst STATE_LOADING = 'loading';\n\nconst CLS_DARKENER_DROPDOWN = 'darkener-dropdown';\n/**\n * @type {string}\n */\nconst CLS_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst CLS_DROPDOWN = 'dropdown';\n\n/**\n * @type {string}\n */\nexport const EVENT_DROPDOWN_CLOSED = 'flexcss.dropdown.closed';\n\n/**\n * A Dropdown\n */\nclass Dropdown {\n constructor(DelegateContainer, Darkener) {\n const doc = global.document;\n\n /**\n * Container Element\n * @type {HTMLElement}\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n this.currentOpen = null;\n this.currentTarget = null;\n /**\n * @type {HTMLElement}\n */\n this.darkener = Darkener instanceof HTMLElement ? Darkener : document.getElementById(Darkener);\n\n this.destroyOnClose = false;\n\n if (!this.darkener || !this.container) {\n throw new Error('required elements not found (darkener and container element)');\n }\n }\n\n /**\n * Method that handles delegation events for dropdowns\n * @param e\n * @returns {boolean}\n * @private\n */\n _delegateFunction(e) {\n const currentOpen = this.currentOpen;\n const target = Util.closestCallback(e.target, n => n instanceof HTMLElement && n.hasAttribute(ATTR_NAME));\n const targetIsCurrent = target === this.currentTarget;\n\n if (currentOpen && !Util.isPartOfNode(e.target, currentOpen) || targetIsCurrent) {\n this.close();\n if (targetIsCurrent) {\n e.preventDefault();\n }\n return targetIsCurrent ? false : this._delegateFunction(e);\n }\n\n if (target && !currentOpen) {\n e.preventDefault();\n e.stopImmediatePropagation();\n\n if (target.isLoading) {\n return false;\n }\n this.createDropdown(target);\n } else {\n if (currentOpen) {\n if (e.target.hasAttribute(ATTR_CLOSE_DROPDOWN)) {\n e.preventDefault();\n this.close();\n }\n if (!Util.isPartOfNode(e.target, currentOpen)) {\n this.close();\n }\n }\n }\n }\n\n /**\n * Register Events for this dropdown container\n * @returns {Dropdown}\n */\n registerEvents() {\n FixedWindow.getInstance().addScreenConstraint(Dropdown, (width) => width < Settings.get().smallBreakpoint);\n this.container.addEventListener(Settings.getTabEvent(), this._delegateFunction.bind(this), true);\n return this;\n }\n\n /**\n * Destroys this instance, unbinds events\n * @returns {Dropdown}\n */\n destroy() {\n this.container.removeEventListener(Settings.getTabEvent(), this._delegateFunction.bind(this), true);\n return this;\n }\n\n\n /**\n * Destroys instance on close of dropdown\n * @param v\n * @returns {Dropdown}\n */\n setDestroyOnClose(v) {\n this.destroyOnClose = v;\n return this;\n }\n\n\n /**\n * Will add the right class to container for specific darkener id\n * @param instance\n * @param show\n */\n toggleDarkenerToggler(instance, show) {\n const cls = `toggle-${(instance.id || CLS_DARKENER_DROPDOWN)}`;\n const classList = this.container.classList;\n if (show) {\n classList.add(cls);\n } else {\n classList.remove(cls);\n }\n }\n\n /**\n * Closes Dropdown on current instance\n * @return {Boolean|Promise}\n */\n close() {\n const currentOpen = this.currentOpen;\n if (!currentOpen) {\n return false;\n }\n const darkenerInstance = currentOpen.flexDarkenerInstance || this.darkener;\n const thisCurrentOpen = currentOpen;\n\n const future = new Promise((resolve) => {\n if (window.getComputedStyle(currentOpen).position === 'fixed') {\n Util.addEventOnce(Settings.getTransitionEvent(), currentOpen, function scheduler(e) {\n if (e.srcElement !== currentOpen) {\n return Util.addEventOnce(Settings.getTransitionEvent(), currentOpen, scheduler.bind(this));\n }\n requestAnimationFrame(() => {\n Event.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n // if a new dropdown has been opened in the meantime, do not remove darkener\n if (this.currentOpen !== null) {\n return false;\n }\n this.toggleDarkenerToggler(darkenerInstance, false);\n resolve(true);\n });\n }.bind(this));\n } else {\n resolve(true);\n Event.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n }\n });\n\n FixedWindow.getInstance().close();\n currentOpen.classList.remove(CLS_OPEN);\n\n if (currentOpen.flexDarkenerInstance) {\n currentOpen.flexDarkenerInstance.classList.remove(DARKENER_INIT);\n } else {\n this.darkener.classList.remove(DARKENER_INIT);\n }\n\n this.currentOpen = null;\n this.currentTarget = null;\n\n if (this.destroyOnClose) {\n this.destroy();\n }\n\n return future;\n }\n\n /**\n * Creates a dropdown on given target and opens it\n * @param {HTMLElement} target target where this dropdown is placed\n * @param {FlexCss.Widget} [thisWidget] if given will use widget instead of widget instance\n * @return {FlexCss.Dropdown}\n */\n createDropdown(target, thisWidget) {\n const doc = global.document;\n\n if (!target) {\n throw new Error('Dropdown target not found');\n }\n\n const widget = thisWidget || Widget.findWidget(target);\n let future;\n const data = target.getAttribute(ATTR_NAME);\n const dropdownContainerElement = doc.getElementById(data);\n const async = !dropdownContainerElement && Widget.isWidget(widget) ? widget.getAsync() : false;\n\n if (async) {\n target.classList.add(STATE_LOADING);\n target.isLoading = true;\n future = async.then((r) => {\n if (r instanceof HTMLElement) {\n if (r.id) {\n target.setAttribute(ATTR_NAME, r.id);\n }\n return r;\n }\n // Create container Element:\n const element = doc.createElement('div');\n element.className = CLS_DROPDOWN;\n element.innerHTML = r;\n element.id = Util.guid();\n // Cache target for later use:\n target.setAttribute(ATTR_NAME, element.id);\n this.container.appendChild(element);\n return element;\n }).then((r) => {\n target.isLoading = false;\n target.classList.remove(STATE_LOADING);\n return r;\n });\n } else {\n if (!dropdownContainerElement) {\n throw new Error(`Could not found Dropdown container with ID \"${data}\"`);\n }\n future = new Promise((r) => {\n r(dropdownContainerElement);\n });\n }\n\n future.then((dropdownContent) => {\n if (this.currentOpen) {\n this.close();\n }\n // Skip one frame to show animation\n target.dropdownContent = dropdownContent;\n const isAbsolute = global.getComputedStyle(dropdownContent).position === 'absolute';\n dropdownContent.hfWidgetInstance = this;\n\n if (!target.flexCollisionContainer) {\n const collisionC = target.getAttribute(ATTR_CC);\n target.flexCollisionContainer = collisionC ?\n doc.getElementById(collisionC) || document.documentElement : document.documentElement;\n }\n\n dropdownContent.classList.toggle(CLS_OPEN);\n if (dropdownContent.classList.contains(CLS_OPEN)) {\n this.currentOpen = dropdownContent;\n this.currentTarget = target;\n }\n FixedWindow.getInstance().open(this, dropdownContent);\n if (isAbsolute) {\n // Check collision:\n let selfTarget = target.getAttribute(ATTR_DATA_TARGET);\n selfTarget = selfTarget ? doc.getElementById(selfTarget) : target;\n Util.setupPositionNearby(selfTarget, dropdownContent, target.flexCollisionContainer);\n } else {\n // optionally get custom darkener container for target\n const d = target.getAttribute(ATTR_DARKENER);\n if (d) {\n dropdownContent.flexDarkenerInstance = doc.getElementById(d);\n (dropdownContent.flexDarkenerInstance || this.darkener).classList.toggle(DARKENER_INIT);\n } else {\n this.darkener.classList.toggle(DARKENER_INIT);\n }\n this.toggleDarkenerToggler(dropdownContent.flexDarkenerInstance || this.darkener, true);\n\n dropdownContent.style.left = '0';\n dropdownContent.style.top = 'auto';\n }\n });\n }\n\n}\n\nexport default Dropdown;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Dropdown.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.LightBox\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global Image, TouchEvent*/\n\nimport Modal, { EVENT_MODAL_CLOSED } from './Modal';\nimport Settings from './util/Settings';\nimport Widget from './Widget';\n\nconst ATTR_MAX_WIDTH = 'data-original-width';\nconst ATTR_MAX_HEIGHT = 'data-original-height';\nconst ATTR_SRC = 'data-src';\n\nconst CLS_HAS_PREV = 'has-prev';\nconst CLS_HAS_NEXT = 'has-next';\nconst CLS_LOADING = 'loading';\n\nconst ATTR_NO_THUMBNAIL = 'data-no-thumbnail';\nconst ATTR_DATA_HREF = 'data-href';\nconst ATTR_HREF = 'href';\n\nconst KEY_NEXT = 39;\nconst KEY_PREV = 37;\nconst ATTR_CLOSE = 'data-close-modal';\n/**\n * A Simple LightBox\n */\nclass LightBox {\n\n /**\n * Creates a new Lightbox\n * @param DelegateContainer\n * @param AttributeSelector\n * @param ModalAppend\n * @param [options]\n */\n constructor(DelegateContainer, AttributeSelector, ModalAppend, options) {\n const thisDelegateContainer = DelegateContainer instanceof HTMLElement ? DelegateContainer :\n document.getElementById(DelegateContainer);\n\n this._modalAppend = ModalAppend || DelegateContainer;\n /**\n * @type {Function}\n */\n this._resizeEvent = null;\n /**\n * @type {Function}\n */\n this._keyboardNextEvent = null;\n /**\n * @type {Promise}\n */\n this._future = null;\n /**\n * @type {Promise}\n */\n this._nextFuture = this._future;\n /**\n * @type {HTMLElement}\n */\n this._imageContainer = null;\n /**\n * @type {HTMLElement}\n */\n this._modalContainerDiv = null;\n /**\n * @type {HTMLElement}\n */\n this._contentContainer = null;\n /**\n * @type {HTMLElement}\n */\n this._closerContainerDiv = null;\n /**\n * @type {HTMLElement}\n */\n this._delegateContainer = thisDelegateContainer;\n /**\n * @type {HTMLElement}\n */\n this._attributeSelector = AttributeSelector;\n /**\n * @type {Widget}\n */\n this._widget = null;\n /**\n * @type {boolean}\n */\n this._isOpen = false;\n /**\n * @type {HTMLElement}\n */\n this.target = null;\n /**\n * @type {HTMLElement}\n */\n this.img = null;\n /**\n * @type {boolean}\n */\n this._isLoading = false;\n\n /**\n * Default options\n */\n this.options = {\n // set if prev and next should be available\n registerPrevNextEvents: true,\n // set if modal should be closed after last image\n closeOnLast: true,\n // called when next image is requested (either by keyboard or click), return false to abort\n onNext: () => {\n return true;\n },\n onClose: () => {\n },\n getNext: null,\n getPrev: null,\n // called when underlying target changed\n onSwitchImage: () => {\n }\n };\n\n Object.assign(this.options, options);\n }\n\n /**\n * @param {HTMLElement} node\n * @returns {HTMLElement|null}\n */\n findImmediateNextTarget(node) {\n if (node && node.children[0].hasAttribute(this._attributeSelector)) {\n return node.children[0];\n }\n return null;\n }\n\n /**\n * Will fetch the next element of a lightBox\n * @param {HTMLElement} target\n * @returns {null|HTMLElement}\n */\n getNext(target) {\n if (this.options.getNext) {\n return this.options.getNext.apply(this, [target]);\n }\n return this.findImmediateNextTarget(target.parentNode.nextElementSibling);\n }\n\n /**\n * Will fetch the previous element of a lightBox\n * @param {HTMLElement} target\n * @returns {null|HTMLElement}\n */\n getPrev(target) {\n if (this.options.getPrev) {\n return this.options.getPrev.apply(this, [target]);\n }\n return this.findImmediateNextTarget(target.parentNode.previousElementSibling);\n }\n\n /**\n * Registers events for delegate container\n */\n registerEvents(onOpen) {\n this._delegateContainer.addEventListener(Settings.getTabEvent(), (e) => {\n let target = e.target;\n const parent = target.parentNode;\n let validTarget = target.hasAttribute(this._attributeSelector);\n const parentIsValid = parent && parent.hasAttribute(this._attributeSelector);\n\n if (!validTarget && parentIsValid) {\n validTarget = true;\n target = parent;\n }\n if (validTarget) {\n e.preventDefault();\n this.open(target).then((r) => {\n if (onOpen) {\n onOpen.apply(this, [r, target]);\n }\n });\n }\n });\n }\n\n /**\n * @returns {HTMLElement}\n */\n getContentContainer() {\n return this._contentContainer;\n }\n\n /**\n * Setup max-width and max-height\n * @param {HTMLElement} target\n * @param {HTMLElement} img\n * @param {HTMLElement} loadedImage\n * @private\n */\n static _setupMaxWidthHeight(target, img, loadedImage) {\n const nextMaxWidth = target.getAttribute(ATTR_MAX_WIDTH);\n const nextMaxHeight = target.getAttribute(ATTR_MAX_HEIGHT);\n if (nextMaxWidth && nextMaxHeight) {\n img.style.maxWidth = nextMaxWidth + \"px\";\n img.style.maxHeight = nextMaxHeight + \"px\";\n } else {\n img.style.maxWidth = loadedImage.width + \"px\";\n img.style.maxHeight = loadedImage.height + \"px\";\n }\n }\n\n /**\n * Switches to the next image\n * @param {boolean} direction\n */\n switchImageByDirection(direction) {\n const next = direction ? this.getPrev(this.target) : this.getNext(this.target);\n if (this.options.onNext.apply(this, [next])) {\n return this.switchImage(next);\n }\n return new Promise((_, reject) => reject(next));\n }\n\n /**\n * Checks if lightbox is currently loading\n * @returns {boolean}\n */\n isLoading() {\n return this._isLoading;\n }\n\n /**\n * Checks if modal should be closed\n * @private\n */\n _runOptionalClose() {\n if (this.options.closeOnLast) {\n this.modal.close();\n }\n }\n\n _setupPrevNextStates() {\n const target = this.target;\n const hasPrev = this.getPrev(target);\n const hasNext = this.getNext(target);\n const hasPrevClass = CLS_HAS_PREV;\n const hasNextClass = CLS_HAS_NEXT;\n // because IE does not support the second toggle parameter, we need to do this manually\n if (hasPrev) {\n this._imageContainer.classList.add(hasPrevClass);\n } else {\n this._imageContainer.classList.remove(hasPrevClass);\n }\n if (hasNext) {\n this._imageContainer.classList.add(hasNextClass);\n } else {\n this._imageContainer.classList.remove(hasNextClass);\n }\n }\n\n /**\n * @param img\n * @private\n */\n _calculateContainer(img) {\n if (Settings.isIE()) {\n setTimeout(() => {\n this._imageContainer.style.height = img.offsetHeight + 'px';\n }, 0);\n }\n }\n\n /**\n * Switch to a specific image\n * @param next\n * @returns {*}\n */\n switchImage(next) {\n const self = this;\n const img = this.img;\n this._isLoading = true;\n self._nextFuture = new Promise((resolve, reject) => {\n // notify observers about image switching\n self.options.onSwitchImage.apply(self, [self._nextFuture]);\n if (next) {\n const nextThumb = next.hasAttribute(ATTR_NO_THUMBNAIL) ? next : (next.children[0] || next);\n const nextHighRes = next.getAttribute(ATTR_DATA_HREF) ||\n next.getAttribute(ATTR_HREF);\n const nextSource = nextThumb.getAttribute(ATTR_SRC) || nextThumb.src || nextHighRes;\n const nextImgObject = new Image();\n\n if (!nextSource) {\n reject(next);\n return;\n }\n // set new target to next element\n this.target = next;\n nextImgObject.src = nextSource;\n self._imageContainer.classList.add(CLS_LOADING);\n nextImgObject.addEventListener('load', () => {\n img.src = nextSource;\n self._imageContainer.style.backgroundImage = 'url(' + nextSource + ')';\n LightBox._setupMaxWidthHeight(next, img, nextImgObject);\n self._calculateContainer(img);\n self.highRes(nextThumb, nextHighRes);\n self._setupPrevNextStates();\n self._imageContainer.classList.remove(CLS_LOADING);\n this._isLoading = false;\n resolve(nextSource, this.target);\n });\n } else {\n reject(this);\n }\n });\n return self._nextFuture;\n }\n\n\n /**\n * Setup High-Resolution picture\n * @param {HTMLElement} thisThumbnail\n * @param {String} thisImgHighResolution\n */\n highRes(thisThumbnail, thisImgHighResolution) {\n if (thisImgHighResolution && thisThumbnail.src !== thisImgHighResolution) {\n const highImageObj = new Image();\n highImageObj.src = thisImgHighResolution;\n highImageObj.addEventListener('load', () => {\n // if current image is still available\n if (this._getSrc(thisThumbnail) === this.img.src) {\n this.img.src = thisImgHighResolution;\n this._imageContainer.style.backgroundImage = 'url(' + thisImgHighResolution + ')';\n }\n });\n }\n }\n\n /**\n * Extracts the source of an image\n * @param target\n * @returns {String|null}\n * @private\n */\n _getSrc(target) {\n return target.getAttribute(ATTR_SRC) || target.src;\n }\n\n /**\n * Will show a lightBox on given target\n * @param {HTMLElement} target\n * @returns {$.Deferred|*}\n */\n open(target) {\n const self = this;\n\n if (!target) {\n return false;\n }\n\n this.target = target;\n\n // if lightBox is open, we just switch to the new target image\n if (this._isOpen && target) {\n return this.switchImage(target).then(() => {\n return this;\n });\n }\n\n this._isOpen = true;\n\n /**\n * Setup Widget for modal\n * @type {Widget}\n */\n this._widget = new Widget().setAsync(() => {\n // thumbnail is either target itself or expected to be first childNode\n const thumbnail = target.hasAttribute(ATTR_NO_THUMBNAIL) ? target : (target.children[0] || target);\n\n const imgHighResolution = target.getAttribute(ATTR_DATA_HREF) || target.getAttribute(ATTR_HREF);\n const imgSrc = this._getSrc(thumbnail) || imgHighResolution;\n\n const imageObj = new Image();\n imageObj.src = imgSrc;\n this._imageContainer = document.createElement('div');\n this._modalContainerDiv = document.createElement('div');\n this._closerContainerDiv = document.createElement('i');\n this._contentContainer = document.createElement('div');\n\n this._closerContainerDiv.className = 'modal-close modal-close-lightbox icon-cancel-1';\n this._closerContainerDiv.setAttribute(ATTR_CLOSE, ATTR_CLOSE);\n\n this._modalContainerDiv.className = 'modal image-modal';\n this._modalContainerDiv.appendChild(this._imageContainer);\n this._modalContainerDiv.appendChild(this._contentContainer);\n this._modalContainerDiv.appendChild(this._closerContainerDiv);\n this._contentContainer.className = 'content-container';\n this._isLoading = true;\n this._future = new Promise((resolve) => {\n imageObj.addEventListener('load', () => {\n this._imageContainer.className = 'image-container';\n const img = document.createElement('img');\n // current image\n this.img = img;\n\n img.src = imgSrc;\n LightBox._setupMaxWidthHeight(target, img, imageObj);\n this._imageContainer.appendChild(img);\n this._imageContainer.style.backgroundImage = 'url(' + imgSrc + ')';\n\n resolve(self._modalContainerDiv);\n this._isLoading = false;\n\n if (Settings.isIE()) {\n self._resizeEvent = global.addEventListener('resize', () => {\n setTimeout(() => {\n self._imageContainer.style.height = img.offsetHeight + 'px';\n }, 0);\n });\n }\n\n if (self.options.registerPrevNextEvents) {\n self._setupPrevNextStates();\n // prev or next on touch/click\n self._imageContainer.addEventListener(Settings.getTabEvent(), (e) => {\n if (self.isLoading()) {\n return;\n }\n e.preventDefault();\n\n const ev = e;\n const pageX = global.TouchEvent && ev instanceof TouchEvent ?\n ev.changedTouches[0].pageX : ev.pageX;\n const rect = self._imageContainer.getBoundingClientRect();\n const imgX = rect.left;\n const wrapperWidth = rect.width;\n const posX = pageX - imgX;\n\n self.switchImageByDirection(wrapperWidth / 2 > posX).catch(() => {\n self._runOptionalClose();\n });\n });\n\n // register keyboard events\n self._keyboardNextEvent = (e) => {\n if (e.keyCode === KEY_NEXT || e.keyCode === KEY_PREV) {\n if (self.isLoading()) {\n return;\n }\n self.switchImageByDirection(e.keyCode === KEY_PREV).catch(() => {\n self._runOptionalClose();\n });\n }\n };\n global.addEventListener('keydown', self._keyboardNextEvent);\n } else {\n self._imageContainer.addEventListener(Settings.getTabEvent(), () => {\n self._runOptionalClose();\n });\n }\n\n self.highRes(thumbnail, imgHighResolution);\n });\n });\n\n this._future.then(() => {\n self._calculateContainer(this.img);\n });\n\n self._modalContainerDiv.addEventListener(EVENT_MODAL_CLOSED, () => {\n // cleanup:\n this._modalContainerDiv.parentNode.removeChild(this._modalContainerDiv);\n this.options.onClose.apply(self);\n this._isOpen = false;\n this.modal.destroy();\n // unbind events\n if (this._keyboardNextEvent) {\n global.removeEventListener('keydown', self._keyboardNextEvent);\n }\n if (this._resizeEvent) {\n global.removeEventListener('resize', self._resizeEvent);\n }\n });\n\n return this._future;\n });\n\n this._nextFuture = this._future;\n\n if (self._widget) {\n this.modal = new Modal(this._modalAppend);\n // make sure we close stack before\n return this.modal.close().fromWidget(self._widget).then(() => {\n return self._future.then(() => {\n return self;\n });\n });\n }\n return false;\n }\n\n}\n\nexport default LightBox;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/LightBox.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/build/maps/flexcss.min.map b/build/maps/flexcss.min.map index 76a381a3..8ed88f25 100644 --- a/build/maps/flexcss.min.map +++ b/build/maps/flexcss.min.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///js/flexcss.min.js","webpack:///webpack/bootstrap 13012788ed6358b638c7","webpack:///./src/main/util/Util.js","webpack:///./src/main/util/Settings.js","webpack:///./src/main/util/Event.js","webpack:///./src/main/Widget.js","webpack:///./src/main/DestroyableWidget.js","webpack:///./src/main/Tooltip.js","webpack:///./src/main/lib/FixedWindow.js","webpack:///./src/main/Modal.js","webpack:///./src/main/Form.js","webpack:///./src/main/lib/debounce.js","webpack:///./~/isomorphic-fetch/fetch-npm-browserify.js","webpack:///./~/whatwg-fetch/fetch.js","webpack:///./src/main/Dropdown.js","webpack:///./src/main/LightBox.js","webpack:///./src/main/OffCanvas.js","webpack:///./src/main/Toggleable.js","webpack:///./src/main/modules/All.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","global","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","PFX","COL_LEFT_CLASS","COL_RIGHT_CLASS","COL_BOTTOM_CLASS","Util","element","type","callback","thisFunction","e","apply","thisType","toLowerCase","name","addEventListener","t","el","document","createElement","transitions","transition","OTransition","MozTransition","WebkitTransition","undefined","style","parent","now","parentNode","func","s4","Math","floor","random","toString","substring","doc","inner","width","height","outer","position","top","left","visibility","overflow","appendChild","body","w1","offsetWidth","w2","clientWidth","removeChild","ev","capture","event","removeEventListener","offsetHeight","str","replace","g","toUpperCase","input","JSON","parse","stringify","base","attrs","attributes","attr","s","dashToCamelCase","nodeName","val","nodeValue","hasOwnProperty","parseInt","elementToPosition","collisionContainer","centerHorizontal","positionTop","amountTop","amountLeft","parentsUntil","HTMLElement","window","getComputedStyle","isPartOfNode","offsetTop","offsetLeft","targetPosition","getBoundingClientRect","elementRect","colRect","targetTop","targetRight","right","isCollisionTop","isCollisionBottom","innerHeight","isCollisionLeft","targetLeft","isCollisionRight","classList","remove","calcTop","calcLeft","add","rightPosition","leftCentered","collisionCentered","cssText","optionalOffset","scrollIntoView","thisOffset","scrolledY","pageYOffset","scroll","_interopRequireDefault","obj","__esModule","default","_Util","_Util2","FLEXCSS_GLOBAL_SETTINGS","smallBreakpoint","scrollbarUpdateNodes","darkenerFadeDelay","canvasToggledClass","FLEXCSS_CONST_IS_IOS","FLEXCSS_CONST_IS_TOUCH","FLEXCSS_CONST_IS_IE","FLEXCSS_CONST_TAB_EVENT","FLEXCSS_IS_SMALL_SCREEN","init","FLEXCSS_CONST_SCROLLBAR_WIDTH","getScrollBarWidth","FLEXCSS_CONST_TRANSITION_EVENT","whichTransitionEndEvent","readyState","Settings","settings","assign","navigator","userAgent","match","innerWidth","get","msMaxTouchPoints","CustomEvent","_CustomEvent","params","thisParams","bubbles","cancelable","detail","evt","createEvent","initCustomEvent","Event","EventHandler","defaultOptions","options","withDetail","originalEvent","o","dispatchEvent","withOptions","fire","_typeof","Symbol","iterator","constructor","Widget","_this","asyncContent","_isWidget","getElementById","Error","hfWidgetInstance","setAsync","Promise","finalContent","async","self","DestroyableWidget","listeners","forEach","listener","args","push","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","create","setPrototypeOf","__proto__","_get","object","property","receiver","Function","desc","getOwnPropertyDescriptor","getPrototypeOf","getter","_DestroyableWidget2","_DestroyableWidget3","_Settings","_Settings2","CLASS_NAMES_TOOLTIP","CLASS_NAMES_OPEN","ATTR_DATA_CLASSNAME","ATTR_DATA_NO_TOUCH","Tooltip","_DestroyableWidget","DelegateContainer","container","tooltipContainer","containerClass","selectorAttribute","text","removeTitle","positionRelative","trim","isTouchDevice","hasAttribute","_restoreClassNames","innerHTML","flexTooltipCurrentTarget","oldTitle","removeAttribute","setupPositionNearby","classNames","maybeTargetClass","getAttribute","className","join","selfTarget","setAttribute","createTooltip","removeTooltip","ALLOW_ELEMENT_OVERFLOW_TOUCH","EVENT_AFTER_FIXED_REMOVE","EVENT_BEFORE_FIXED_ADD","_slicedToArray","sliceIterator","arr","_arr","_n","_d","_e","_s","_i","next","done","err","Array","isArray","_debounce","_debounce2","_Event","_Event2","CLS_FIXED_WINDOW","fixedWindowInstance","FixedWindow","widgets","currentScrollTop","fixedScreenConstraints","windowWidth","isFixedWindowActive","touchListener","widget","fixedBreakpointFn","Set","widgetsThatRequireFixedWindow","from","some","_ref","_addFixedContainer","_removeFixedContainer","_this2","dispatchAndFire","getCurrentWidget","map","n","foundProperty","direction","node","whatNode","d","__fixedWindowMod__","getScrollbarWidth","preventDefault","shouldNotMoveUp","shouldNotMoveDown","neverScroll","lastClientY","touchStartListener","_getCurrentWidget","closestOverflow","closestCallback","HTMLTextAreaElement","scrollHeight","touches","clientY","scrollTop","touchMoveListener","_getCurrentWidget2","isScrollingDown","stopImmediatePropagation","documentElement","_node","paddingRight","_checkFixedNeeded","pop","fixed","fixedWidget","eventHandler","resizeListener","bind","EVENT_MODAL_ASYNC_TARGET_LOADED","EVENT_MODAL_INIT","EVENT_MODAL_OPENED","EVENT_MODAL_BEFORE_CLOSED","EVENT_MODAL_CLOSED","_Widget","_Widget2","_FixedWindow","_FixedWindow2","KEY_ESC","ATTR_CREATE_NEW","ATTR_CLOSE","ATTR_NAME","CLS_CONTAINER_CURRENT","CLS_OPEN","CLS_CURRENT","CLS_PART_OF_STACK","CLS_MODAL_CONTAINER","CLS_ANIM_END","CLS_LOADER_CONTAINER","CLS_LOADER","CLS_BACKDROP","Modal","currentOpen","loading","closeOnEscape","closeOnBackgroundClick","destroyOnFinish","fixedContainer","containerClassNames","eventContainer","eventFunction","dataMainPageContainer","modalContainer","_modalInstances","indexOf","splice","getInstance","close","applyOptionsFromElement","copy","KeyboardEvent","getTabEvent","defaultPrevented","_finishState","prevModal","switchModals","dispatch","withOriginal","_removeModalFromStack","lastContainer","childNodes","cl","destroy","co","last","open","prefixedAnimateEvent","_finishAnim","instances","isCurrent","contains","foundInstance","flexModalInstance","targetContent","future","hasTarget","isHtmlElement","isWidget","findWidget","newInstance","_ret","setDestroyOnFinish","fromEvent","then","registerEvents","getModalContainer","v","modalContainerClasses","closeModalFunction","ce","loader","toggleLoader","show","loaderLoader","requestAnimationFrame","getAsync","r","result","DocumentFragment","guid","resolve","thisEl","modal","internal","maybeEvent","delegate","delegateContainer","addScreenConstraint","_len","arguments","_key","createWidget","isEmptyContainer","MutationObserver","observer","mutations","disconnect","observe","childList","keyCode","lastModal","EVENT_FORM_AJAX_COMPLETED","EVENT_FORM_AFTER_AJAX_SUBMIT","EVENT_FORM_SUBMIT","EVENT_FORM_READY","_Tooltip","_Tooltip2","LOADING_CLASS","DATA_ELEMENT_INVALID","REMOTE","REMOTE_ACTION","ATTR_DISABLE_INLINE","ATTR_DISABLE_REALTIME","ATTR_VALIDATOR","ATTR_DATA_CUSTOM_MESSAGE","ATTR_DATA_CUSTOM_LABEL","ATTR_VALIDATE_VISIBILITY","ATTR_ERROR_TARGET_ID","ATTR_DEPENDS","CONST_USE_JSON","CONST_REALTIME_EVENT","FOCUS_TOOLTIP_DELAY","CLICK_TOOLTIP_DELAY","Form","form","HTMLFormElement","tooltips","currentValidationFuture","createTooltips","appendError","ajaxSubmitType","ajaxJsonContentType","inlineValidation","realtime","realtimeTimeout","formatErrorTooltip","error","inputErrorClass","containerErrorClass","fetchOptions","credentials","tooltipOptions","scrollToElementDiff","_validators","globalValidators","_remoteValidationFunction","initFormValidation","thisForm","shouldUseAjax","ajaxPostUrl","location","href","useJson","_formStopLoading","submit","defaultHeaders","X-Requested-With","Content-Type","headers","method","serverCall","fetch","serialize","FormData","globalRemoteValidationFunction","response","selectors","inputs","querySelectorAll","exists","field","focus","fields","NodeList","_handleValidation","foundAnyError","toValidateFields","scoped","_createArrayFromInvalidFieldList","isLocalInvalid","_focusElement","validation","_customValidationsForElements","validateCustomFields","thisToValidateFields","concat","checkedFields","foundInvalidFields","prepareErrors","firstInvalidField","activeElement","_handleTooltipHideClickAfterChange","showAndOrCreateTooltip","validity","globalErrorMessageHandler","keys","labels","getForm","invalid","labelsIndex","labelEl","_markElementInvalid","_markElementValid","filter","HTMLFieldSetElement","thisParent","errors","inputsWithErrorClasses","elementErrorIndex","inputErrorIndex","validator","validationRef","futures","fieldsLength","iVal","_shouldNotValidateField","customError","valid","_runValidation","console","warn","all","allFutures","l","fI","_removeElementErrors","removeAllErrors","handleAdditionalLabels","isInvalid","thisLabelGroup","additionalLabels","group","removeErrors","labelGroups","invalidFields","errorTarget","_findErrorTarget","flexFormsSavedValidity","_setupErrorMessages","msg","validationMessage","insertAdjacentHTML","flexFormsSavedValidationMessage","setCustomValidity","_field","linkedFields","thisField","_isElementInvalidElement","_handleLabels","_formatErrorTooltip","fieldSelector","slice","_checkIsValidRealtimeElement","clearKeyDownTimeout","KEYDOWN_RUNNING","clearTimeout","TIMEOUT_KEYDOWN","_checkIsValidBlurFocusElement","_checkIsValidInlineCheckElement","_this3","invalidEvent","addEventOnce","handleInvalid","_formLoading","_checkIsInvalid","setTimeout","_handleSubmit","_formIsLoading","isStillTarget","_handleTooltipInline","dependentFields","_getDependentFields","flexcssKeepTooltips","_submitListener","scrollToElement","submitListener","submitEvent","checkValidity","_getInvalidElements","firstError","_submitFunction","isVisible","list","foundTarget","errorFunc","selector","forms","customMsg","fn","ms","timeout","normalizeName","String","test","normalizeValue","Headers","append","getOwnPropertyNames","consumed","bodyUsed","reject","fileReaderReady","reader","onload","onerror","readBlobAsArrayBuffer","blob","FileReader","readAsArrayBuffer","readBlobAsText","readAsText","Body","_initBody","_bodyInit","_bodyText","support","Blob","isPrototypeOf","_bodyBlob","formData","_bodyFormData","arrayBuffer","ArrayBuffer","set","rejected","decode","json","normalizeMethod","upcased","methods","Request","url","mode","referrer","split","bytes","shift","decodeURIComponent","xhr","head","pairs","getAllResponseHeaders","header","Response","bodyInit","status","ok","statusText","values","getAll","has","thisArg","clone","redirectStatuses","redirect","RangeError","responseURL","getResponseHeader","request","XMLHttpRequest","responseText","withCredentials","responseType","setRequestHeader","send","polyfill","EVENT_DROPDOWN_CLOSED","ATTR_CC","ATTR_DARKENER","DARKENER_INIT","ATTR_DATA_TARGET","ATTR_CLOSE_DROPDOWN","STATE_LOADING","CLS_DARKENER_DROPDOWN","CLS_DROPDOWN","Dropdown","Darkener","currentTarget","darkener","destroyOnClose","targetIsCurrent","_delegateFunction","isLoading","createDropdown","cls","darkenerInstance","flexDarkenerInstance","thisCurrentOpen","getTransitionEvent","scheduler","srcElement","toggleDarkenerToggler","thisWidget","data","dropdownContainerElement","dropdownContent","isAbsolute","flexCollisionContainer","collisionC","toggle","_Modal","_Modal2","ATTR_MAX_WIDTH","ATTR_MAX_HEIGHT","ATTR_SRC","CLS_HAS_PREV","CLS_HAS_NEXT","CLS_LOADING","ATTR_NO_THUMBNAIL","ATTR_DATA_HREF","ATTR_HREF","KEY_NEXT","KEY_PREV","LightBox","AttributeSelector","ModalAppend","thisDelegateContainer","_modalAppend","_resizeEvent","_keyboardNextEvent","_future","_nextFuture","_imageContainer","_modalContainerDiv","_contentContainer","_closerContainerDiv","_delegateContainer","_attributeSelector","_widget","_isOpen","img","_isLoading","registerPrevNextEvents","closeOnLast","onNext","onClose","getNext","getPrev","onSwitchImage","children","findImmediateNextTarget","nextElementSibling","previousElementSibling","onOpen","validTarget","parentIsValid","switchImage","_","hasPrev","hasNext","hasPrevClass","hasNextClass","isIE","nextThumb","nextHighRes","nextSource","src","nextImgObject","Image","backgroundImage","_setupMaxWidthHeight","_calculateContainer","highRes","_setupPrevNextStates","thisThumbnail","thisImgHighResolution","_this4","highImageObj","_getSrc","_this5","thumbnail","imgHighResolution","imgSrc","imageObj","pageX","TouchEvent","changedTouches","rect","imgX","wrapperWidth","posX","switchImageByDirection","_runOptionalClose","fromWidget","loadedImage","nextMaxWidth","nextMaxHeight","maxWidth","maxHeight","EVENT_TOGGLE","ATTR_CLOSE_SIDEBAR","ATTR_TARGET","INIT_CLASS","OPEN_CLASS","HIDE_FACTOR","OffCanvas","NavigationId","factor","disableTouch","touchedX","navigationContainer","DARKENER_CLASS_TOGGLE","DARKENER_CLASS_INSTANT_TOGGLE","shouldNotTouch","darkenerClassToggle","darkenerClassToggleInstant","globalToggleClass","navigationContainerId","clientX","mustHide","calcX","bounds","compare","webkitTransition","transform","webkitTransform","_remove","resetTransform","_removeInstant","docCls","darkenerClass","navigationControllerClassList","docElementCls","promise","thisDelegate","EVENT_TAB_OPENED","EVENT_TAB_CLOSED","ACTIVE_CLASS","ATTR_TOGGLE_LIST","Toggleable","ContainerId","refId","ref","toggleTarget","_listener","querySelector","elClassList","failure","maybeToggleNode","parentClassList","targetRef","_handleLoaded","_Form","_Form2","_Toggleable","_Toggleable2","_OffCanvas","_OffCanvas2","_Dropdown","_Dropdown2","_LightBox","_LightBox2"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,KACCK,KAAA,WACD,MCAgB,UAAU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a7vB,EAAuB4vB,GAEpCE,EAAYn5B,EAAoB,IAEhCo5B,EAAa/vB,EAAuB8vB,GAEpC1vB,EAAQzJ,EAAoB,GAE5B0J,EAASL,EAAuBI,EAIpC/J,GkB/pLQ8e,KAAAoa,alBgqLRl5B,EkBhqLc6P,QAAAgO,alBiqLd7d,EkBjqLuB8X,MAAAsY,alBkqLvBpwB,EkBlqL8BkN,OAAA4J,alBmqL9B9W,EkBnqLsCiL,SAAAuE,alBoqLtCxP,EkBpqLgDyC,KAAAuH,alBqqLhDhK,EkBrqLsDo4B,WAAAgB,alBsqLtDp5B,EkBtqLkEk2B,UAAAoD,alBuqLlEt5B,EkBvqL6E0uB,SAAA8K,alBwqL7Ex5B,EkBxqLuFgxB,SAAA0I","file":"js/flexcss.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"../\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(17);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\tvar PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\t\n\tvar COL_LEFT_CLASS = 'is-collision-left';\n\t\n\tvar COL_RIGHT_CLASS = 'is-collision-right';\n\t\n\tvar COL_BOTTOM_CLASS = 'is-collision-bottom';\n\t\n\t/**\n\t * Provides shared DOM-Utility functions\n\t */\n\t\n\tvar Util = function () {\n\t function Util() {\n\t _classCallCheck(this, Util);\n\t }\n\t\n\t _createClass(Util, null, [{\n\t key: \"prefixedAnimateEvent\",\n\t\n\t\n\t /**\n\t * Will register the right animation event based on browser\n\t * @param element\n\t * @param type\n\t * @param callback\n\t */\n\t value: function prefixedAnimateEvent(element, type, callback) {\n\t var thisFunction = function thisFunction(e) {\n\t callback.apply(element, [e, thisFunction]);\n\t };\n\t\n\t for (var p = 0; p < PFX.length; p++) {\n\t var thisType = type;\n\t if (!PFX[p]) {\n\t thisType = type.toLowerCase();\n\t }\n\t var name = PFX[p] + thisType;\n\t element.addEventListener(name, thisFunction, true);\n\t }\n\t }\n\t\n\t /**\n\t * Get correct transitionend event\n\t * @returns {String}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"whichTransitionEndEvent\",\n\t value: function whichTransitionEndEvent() {\n\t var t = void 0;\n\t var el = document.createElement('fake');\n\t\n\t var transitions = {\n\t transition: 'transitionend',\n\t OTransition: 'oTransitionEnd',\n\t MozTransition: 'transitionend',\n\t WebkitTransition: 'webkitTransitionEnd'\n\t };\n\t\n\t for (t in transitions) {\n\t if (el.style[t] !== undefined) {\n\t return transitions[t];\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Check if target is part of parent node\n\t * @param target\n\t * @param parent\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: \"isPartOfNode\",\n\t value: function isPartOfNode(target, parent) {\n\t if (!target || !parent) {\n\t return false;\n\t }\n\t var now = target;\n\t while (now !== parent && now !== null) {\n\t if (now === parent) {\n\t break;\n\t }\n\t now = now.parentNode;\n\t }\n\t return now !== null;\n\t }\n\t\n\t /**\n\t * Finds the closest element including itself matching a callback\n\t * @param {Node} el\n\t * @param {Function} callback\n\t * @returns {Node|boolean}\n\t */\n\t\n\t }, {\n\t key: \"closestCallback\",\n\t value: function closestCallback(el, callback) {\n\t var element = el;\n\t while (element !== null) {\n\t if (callback(element)) {\n\t return element;\n\t }\n\t element = element.parentNode;\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Walks the tree until func returns true for given argument\n\t * @param target\n\t * @param func\n\t * @returns {boolean|HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"parentsUntil\",\n\t value: function parentsUntil(target, func) {\n\t if (!target) {\n\t return false;\n\t }\n\t var now = target;\n\t while (!func(now) && now !== null) {\n\t now = now.parentNode;\n\t }\n\t\n\t return now;\n\t }\n\t\n\t /**\n\t * Generates a unique id\n\t * @return {String}\n\t */\n\t\n\t }, {\n\t key: \"guid\",\n\t value: function guid() {\n\t function s4() {\n\t return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n\t }\n\t\n\t return s4() + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + (s4() + s4() + s4());\n\t }\n\t\n\t /**\n\t * Detects scrollbar width\n\t * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n\t * @returns {number}\n\t */\n\t\n\t }, {\n\t key: \"getScrollBarWidth\",\n\t value: function getScrollBarWidth() {\n\t var doc = global.document;\n\t var inner = doc.createElement('p');\n\t\n\t inner.style.width = \"100%\";\n\t inner.style.height = \"200px\";\n\t\n\t var outer = doc.createElement('div');\n\t outer.style.position = \"absolute\";\n\t outer.style.top = \"0px\";\n\t outer.style.left = \"0px\";\n\t outer.style.visibility = \"hidden\";\n\t outer.style.width = \"200px\";\n\t outer.style.height = \"150px\";\n\t outer.style.overflow = \"hidden\";\n\t outer.appendChild(inner);\n\t\n\t doc.body.appendChild(outer);\n\t var w1 = inner.offsetWidth;\n\t outer.style.overflow = 'scroll';\n\t var w2 = inner.offsetWidth;\n\t if (w1 === w2) {\n\t w2 = outer.clientWidth;\n\t }\n\t doc.body.removeChild(outer);\n\t\n\t return w1 - w2;\n\t }\n\t\n\t /**\n\t * Run an event once\n\t * @param {String} ev\n\t * @param {HTMLElement|HTMLDocument} target\n\t * @param {Function} func\n\t * @param {boolean} [capture]\n\t * @return Function created listener\n\t */\n\t\n\t }, {\n\t key: \"addEventOnce\",\n\t value: function addEventOnce(ev, target, func, capture) {\n\t var thisFunction = function thisFunction(event) {\n\t func(event, func);\n\t target.removeEventListener(ev, thisFunction, capture);\n\t };\n\t target.addEventListener(ev, thisFunction, capture);\n\t return thisFunction;\n\t }\n\t\n\t /**\n\t * Checks if an element is visible\n\t * @param {HTMLElement} element\n\t * @returns bool\n\t */\n\t\n\t }, {\n\t key: \"isVisible\",\n\t value: function isVisible(element) {\n\t return element.offsetWidth > 0 && element.offsetHeight > 0;\n\t }\n\t\n\t /**\n\t * Creates a camelCaseRepresentation of a dashed string\n\t * @param {String} str\n\t * @returns String\n\t */\n\t\n\t }, {\n\t key: \"dashToCamelCase\",\n\t value: function dashToCamelCase(str) {\n\t return str.replace(/-([a-z])/g, function (g) {\n\t return g[1].toUpperCase();\n\t });\n\t }\n\t\n\t /**\n\t * Creates a copy of `input`\n\t * @param {*} input\n\t * @return *\n\t */\n\t\n\t }, {\n\t key: \"copy\",\n\t value: function copy(input) {\n\t return JSON.parse(JSON.stringify(input));\n\t }\n\t\n\t /**\n\t * Reads options from element (data attributes) and applies to base\n\t * @param {HTMLElement} element\n\t * @param {Object} base\n\t * @return {Object}\n\t */\n\t\n\t }, {\n\t key: \"applyOptionsFromElement\",\n\t value: function applyOptionsFromElement(element, base) {\n\t if (!element) {\n\t return base;\n\t }\n\t var attrs = element.attributes;\n\t for (var i = 0; i < attrs.length; i++) {\n\t var attr = attrs[i];\n\t if (attr) {\n\t var s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n\t var val = attr.nodeValue;\n\t if (base.hasOwnProperty(s)) {\n\t // skip functions\n\t if (typeof base[s] === 'function') {\n\t continue;\n\t }\n\t if (typeof base[s] === 'boolean') {\n\t base[s] = parseInt(val || 1, 10) === 1;\n\t } else {\n\t base[s] = val;\n\t }\n\t }\n\t }\n\t }\n\t return base;\n\t }\n\t\n\t /**\n\t * Will position an element directly at given target\n\t * Is aware of a given collision container to detect edges\n\t * Will put elementToPosition either to left, center or right edge (prefer right)\n\t * and either to bottom or top (prefers bottom)\n\t *\n\t * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n\t *\n\t * @param {HTMLElement|ClientRect} target the target container to align to\n\t * @param {HTMLElement} elementToPosition the element to position\n\t * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n\t * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n\t * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"setupPositionNearby\",\n\t value: function setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n\t // determine relative offsets\n\t var amountTop = 0;\n\t var amountLeft = 0;\n\t Util.parentsUntil(target.parentNode, function (el) {\n\t if (!(el instanceof HTMLElement)) {\n\t return false;\n\t }\n\t var style = window.getComputedStyle(el);\n\t if (Util.isPartOfNode(elementToPosition, el)) {\n\t if (style && style.position === 'relative') {\n\t amountTop += el.offsetTop || 0;\n\t amountLeft += el.offsetLeft || 0;\n\t }\n\t return false;\n\t }\n\t return true;\n\t });\n\t\n\t var targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n\t var elementRect = elementToPosition.getBoundingClientRect();\n\t var colRect = collisionContainer.getBoundingClientRect();\n\t var targetTop = targetPosition.top - amountTop;\n\t var targetRight = targetPosition.right;\n\t var isCollisionTop = targetTop - elementRect.height <= 0;\n\t var isCollisionBottom = window.innerHeight < targetTop + amountTop + targetPosition.height + elementRect.height;\n\t var isCollisionLeft = targetRight < elementRect.width;\n\t var targetLeft = targetPosition.left;\n\t var isCollisionRight = targetLeft + elementRect.width > colRect.width;\n\t var classList = elementToPosition.classList;\n\t\n\t classList.remove(COL_RIGHT_CLASS);\n\t classList.remove(COL_LEFT_CLASS);\n\t classList.remove(COL_BOTTOM_CLASS);\n\t\n\t var calcTop = void 0;\n\t var calcLeft = void 0;\n\t if (isCollisionLeft && !isCollisionRight) {\n\t // put element to left if collision with left\n\t calcLeft = targetPosition.left - colRect.left - amountLeft + \"px\";\n\t classList.add(COL_LEFT_CLASS);\n\t } else {\n\t // maybe center if no collision with either side\n\t var rightPosition = targetRight - elementRect.width - colRect.left - amountLeft + \"px\";\n\t var leftCentered = (targetLeft + targetPosition.width / 2 - elementRect.width / 2 || 0) - colRect.left;\n\t var collisionCentered = leftCentered + elementRect.width > colRect.width;\n\t if (centerHorizontal && !collisionCentered) {\n\t calcLeft = leftCentered + \"px\";\n\t } else {\n\t classList.add(COL_RIGHT_CLASS);\n\t calcLeft = rightPosition;\n\t }\n\t }\n\t\n\t if (isCollisionBottom || positionTop && !isCollisionTop) {\n\t // Put Element on top if collision\n\t calcTop = targetTop - elementRect.height - colRect.top + \"px\";\n\t classList.add(COL_BOTTOM_CLASS);\n\t } else {\n\t calcTop = targetTop + targetPosition.height - colRect.top + \"px\";\n\t }\n\t\n\t elementToPosition.style.cssText = \"top:\" + calcTop + \";left:\" + calcLeft + \";\";\n\t\n\t return elementToPosition;\n\t }\n\t\n\t /**\n\t * Brings a given element into viewport\n\t * @param {HTMLElement} el\n\t * @param {int|function}[optionalOffset]\n\t */\n\t\n\t }, {\n\t key: \"scrollToElement\",\n\t value: function scrollToElement(el, optionalOffset) {\n\t el.scrollIntoView();\n\t var thisOffset = optionalOffset;\n\t // optionally use a additional scrollDif\n\t if (thisOffset) {\n\t if (typeof thisOffset === 'function') {\n\t thisOffset = optionalOffset();\n\t }\n\t if (thisOffset > 0) {\n\t var scrolledY = window.pageYOffset;\n\t if (scrolledY) {\n\t window.scroll(0, scrolledY - thisOffset);\n\t }\n\t }\n\t }\n\t }\n\t }]);\n\t\n\t return Util;\n\t}();\n\t\n\texports.default = Util;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t// we attach global settings to global once because settings might be shared a lot of times trough the application\n\t// Maybe find a better way to handle that scenario\n\tif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n\t (function () {\n\t global.FLEXCSS_GLOBAL_SETTINGS = {\n\t // defined breakpoint for small devices < n\n\t smallBreakpoint: 768,\n\t // nodes that should be updated when no scrollbar is expected\n\t scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n\t // additional Delay until darkener is fully hidden\n\t darkenerFadeDelay: 100,\n\t // class that is added if canvas has been toggled\n\t canvasToggledClass: 'toggled-canvas'\n\t };\n\t\n\t global.FLEXCSS_CONST_IS_IOS = null;\n\t\n\t global.FLEXCSS_CONST_IS_TOUCH = null;\n\t\n\t global.FLEXCSS_CONST_IS_IE = null;\n\t\n\t global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\t\n\t global.FLEXCSS_IS_SMALL_SCREEN = false;\n\t\n\t var init = function init() {\n\t // Measure scrollbar width\n\t global.FLEXCSS_CONST_SCROLLBAR_WIDTH = _Util2.default.getScrollBarWidth();\n\t // detect right transition end event\n\t global.FLEXCSS_CONST_TRANSITION_EVENT = _Util2.default.whichTransitionEndEvent();\n\t };\n\t\n\t if (global.document.readyState !== 'loading') {\n\t init();\n\t } else {\n\t // it's possible that global.document.body is not available if the document is not\n\t // loaded completely\n\t document.addEventListener('DOMContentLoaded', function () {\n\t init();\n\t });\n\t }\n\t })();\n\t}\n\t\n\t/**\n\t * Utility class that setups global settings\n\t */\n\t\n\tvar Settings = function () {\n\t function Settings() {\n\t _classCallCheck(this, Settings);\n\t }\n\t\n\t _createClass(Settings, null, [{\n\t key: 'setup',\n\t\n\t\n\t /**\n\t * Setup global settings, overwrite default values\n\t * @param {Object} settings\n\t */\n\t value: function setup(settings) {\n\t Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n\t }\n\t\n\t /**\n\t * Access to global settings\n\t * @returns {Object}\n\t */\n\t\n\t }, {\n\t key: 'get',\n\t value: function get() {\n\t return global.FLEXCSS_GLOBAL_SETTINGS;\n\t }\n\t\n\t /**\n\t * Detects a IOS Device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isIosDevice',\n\t value: function isIosDevice() {\n\t if (!global.FLEXCSS_CONST_IS_IOS) {\n\t global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n\t }\n\t\n\t return global.FLEXCSS_CONST_IS_IOS;\n\t }\n\t\n\t /**\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isSmallScreen',\n\t value: function isSmallScreen() {\n\t return window.innerWidth < Settings.get().smallBreakpoint;\n\t }\n\t\n\t /**\n\t * Detects a touch device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isTouchDevice',\n\t value: function isTouchDevice() {\n\t if (!global.FLEXCSS_CONST_IS_TOUCH) {\n\t global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!global.navigator.msMaxTouchPoints;\n\t }\n\t return global.FLEXCSS_CONST_IS_TOUCH;\n\t }\n\t\n\t /**\n\t * Checks if current browser is Internet Explorer\n\t * @returns {boolean|*}\n\t */\n\t\n\t }, {\n\t key: 'isIE',\n\t value: function isIE() {\n\t if (!global.FLEXCSS_CONST_IS_IE) {\n\t global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n\t }\n\t return global.FLEXCSS_CONST_IS_IE;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTransitionEvent',\n\t value: function getTransitionEvent() {\n\t return global.FLEXCSS_CONST_TRANSITION_EVENT;\n\t }\n\t\n\t /**\n\t * @returns {int}\n\t */\n\t\n\t }, {\n\t key: 'getScrollbarWidth',\n\t value: function getScrollbarWidth() {\n\t return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTabEvent',\n\t value: function getTabEvent() {\n\t return global.FLEXCSS_CONST_TAB_EVENT;\n\t }\n\t }]);\n\t\n\t return Settings;\n\t}();\n\t\n\texports.default = Settings;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/* global CustomEvent */\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t// polyfill for custom events to make thinks work in IE\n\t// The needed polyfill is so small that I embedded it here\n\t(function poly() {\n\t if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n\t var _CustomEvent = function CustomEvent(event, params) {\n\t var thisParams = params || {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: undefined\n\t };\n\t var evt = document.createEvent(\"CustomEvent\");\n\t evt.initCustomEvent(event, thisParams.bubbles, thisParams.cancelable, thisParams.detail);\n\t return evt;\n\t };\n\t _CustomEvent.prototype = global.Event.prototype;\n\t global.CustomEvent = _CustomEvent;\n\t }\n\t})();\n\t/**\n\t * Simpler Event dispatching\n\t */\n\t\n\tvar EventHandler = function () {\n\t\n\t /**\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t */\n\t\n\t function EventHandler(target, name) {\n\t _classCallCheck(this, EventHandler);\n\t\n\t this.target = target;\n\t this.defaultOptions = {\n\t bubbles: true,\n\t cancelable: true\n\t };\n\t\n\t this.name = name;\n\t }\n\t\n\t /**\n\t * Set more options\n\t * @param {Object} options\n\t * @returns {EventHandler}\n\t */\n\t\n\t\n\t _createClass(EventHandler, [{\n\t key: \"withOptions\",\n\t value: function withOptions(options) {\n\t Object.assign(this.defaultOptions, options || {});\n\t return this;\n\t }\n\t\n\t /**\n\t * Call with the originalEvent\n\t * @param {Event} e\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withOriginal\",\n\t value: function withOriginal(e) {\n\t return this.withDetail({\n\t originalEvent: e\n\t });\n\t }\n\t\n\t /**\n\t * Extends the detail part of the event\n\t * @param {Object} o\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withDetail\",\n\t value: function withDetail(o) {\n\t if (!this.defaultOptions.detail) {\n\t this.defaultOptions.detail = {};\n\t }\n\t Object.assign(this.defaultOptions.detail, o);\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"fire\",\n\t value: function fire() {\n\t var e = new CustomEvent(this.name, this.defaultOptions);\n\t if (this.target) {\n\t this.target.dispatchEvent(e);\n\t }\n\t return e;\n\t }\n\t }]);\n\t\n\t return EventHandler;\n\t}();\n\t\n\tvar Event = function () {\n\t function Event() {\n\t _classCallCheck(this, Event);\n\t }\n\t\n\t _createClass(Event, null, [{\n\t key: \"dispatch\",\n\t\n\t /**\n\t * Prepares to dispatch a custom event (without firing)\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @returns {EventHandler}\n\t */\n\t value: function dispatch(target, name) {\n\t return new EventHandler(target, name);\n\t }\n\t\n\t /**\n\t * Dispatches a custom event and fires it directly\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @param {Object} [options]\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"dispatchAndFire\",\n\t value: function dispatchAndFire(target, name, options) {\n\t return new EventHandler(target, name).withOptions(options).fire();\n\t }\n\t }]);\n\t\n\t return Event;\n\t}();\n\t\n\texports.default = Event;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Widget\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/**\n\t * A Widget provides async content on a specific target (e.g. a modal link)\n\t */\n\t\n\tvar Widget = function () {\n\t\n\t /**\n\t * Creates a new Widget\n\t * @param [element], optional define the content of widget\n\t */\n\t\n\t function Widget(element) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, Widget);\n\t\n\t /**\n\t *\n\t * @type {Promise}\n\t */\n\t this.asyncContent = null;\n\t\n\t /**\n\t * @type {boolean}\n\t */\n\t this._isWidget = true;\n\t\n\t if (element) {\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n\t if (this.element) {\n\t this.element.hfWidgetInstance = this;\n\t this.setAsync(function () {\n\t return new Promise(function (s) {\n\t s(_this.element);\n\t });\n\t });\n\t } else {\n\t throw new Error('Could not found element with ID: ' + element);\n\t }\n\t }\n\t /**\n\t * The final resulted content that a widget did create (e.g. a modal container)\n\t * @type {HTMLElement}\n\t */\n\t this.finalContent = null;\n\t }\n\t\n\t /**\n\t *\n\t * @returns {Promise}\n\t */\n\t\n\t\n\t _createClass(Widget, [{\n\t key: 'getAsync',\n\t value: function getAsync() {\n\t return this.asyncContent();\n\t }\n\t\n\t /**\n\t * @param {Function.} async\n\t * @returns {Widget}\n\t */\n\t\n\t }, {\n\t key: 'setAsync',\n\t value: function setAsync(async) {\n\t this.asyncContent = async;\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getFinalContent',\n\t value: function getFinalContent() {\n\t return this.finalContent;\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} element\n\t * @returns {Widget}\n\t */\n\t\n\t }, {\n\t key: 'setElement',\n\t value: function setElement(element) {\n\t this.element = element;\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroys the generated content of this widget\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t if (this.finalContent && this.finalContent.parentNode) {\n\t this.finalContent.parentNode.removeChild(this.finalContent);\n\t return true;\n\t }\n\t\n\t delete this.element;\n\t delete this.asyncContent;\n\t delete this.finalContent;\n\t\n\t return false;\n\t }\n\t\n\t /**\n\t * Will find a widget on an Element\n\t * @param {HTMLElement} element\n\t * @returns {Widget|undefined}\n\t */\n\t\n\t }], [{\n\t key: 'findWidget',\n\t value: function findWidget(element) {\n\t return element ? element.hfWidgetInstance : undefined;\n\t }\n\t\n\t /**\n\t * Checks if a given object is an instance\n\t * @param {Object} self\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isWidget',\n\t value: function isWidget(self) {\n\t return self instanceof Widget || (typeof self === 'undefined' ? 'undefined' : _typeof(self)) === 'object' && self.hasOwnProperty('_isWidget');\n\t }\n\t }]);\n\t\n\t return Widget;\n\t}();\n\t\n\texports.default = Widget;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/**\n\t * Provides a Basic Widget\n\t */\n\t\n\tvar DestroyableWidget = function () {\n\t function DestroyableWidget() {\n\t _classCallCheck(this, DestroyableWidget);\n\t\n\t this.listeners = [];\n\t }\n\t\n\t /**\n\t * Destroys a Widget\n\t */\n\t\n\t\n\t _createClass(DestroyableWidget, [{\n\t key: \"destroy\",\n\t value: function destroy() {\n\t this.listeners.forEach(function (listener) {\n\t listener.element.removeEventListener.apply(listener.element, listener.args);\n\t });\n\t this.listeners = [];\n\t }\n\t\n\t /**\n\t * Adds an event and registers it later to remove bindings\n\t * @param {HTMLElement} element\n\t * @param {String} name\n\t * @param {Function} listener\n\t * @param {boolean} [capture]\n\t * @returns {Function}\n\t */\n\t\n\t }, {\n\t key: \"addEventListener\",\n\t value: function addEventListener(element, name, listener, capture) {\n\t this.listeners.push({\n\t element: element,\n\t args: [name, listener, capture]\n\t });\n\t\n\t element.addEventListener(name, listener, capture);\n\t return listener;\n\t }\n\t }]);\n\t\n\t return DestroyableWidget;\n\t}();\n\t\n\texports.default = DestroyableWidget;\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _DestroyableWidget2 = __webpack_require__(5);\n\t\n\tvar _DestroyableWidget3 = _interopRequireDefault(_DestroyableWidget2);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Tooltip\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar CLASS_NAMES_TOOLTIP = 'tooltip-container';\n\t/**\n\t * @type {string}\n\t */\n\tvar CLASS_NAMES_OPEN = 'open';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DATA_CLASSNAME = 'data-class';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\t\n\t/**\n\t * @type {HTMLDocument}\n\t */\n\tvar doc = global.document;\n\t\n\t/**\n\t * Simple Tooltip\n\t */\n\t\n\tvar Tooltip = function (_DestroyableWidget) {\n\t _inherits(Tooltip, _DestroyableWidget);\n\t\n\t /**\n\t * Creates a Tooltip\n\t * @param {HTMLElement|String} DelegateContainer\n\t * @param {Object} [options]\n\t */\n\t\n\t function Tooltip(DelegateContainer, options) {\n\t _classCallCheck(this, Tooltip);\n\t\n\t /**\n\t * The Container where possible events are captured\n\t */\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Tooltip).call(this));\n\t\n\t _this.container = DelegateContainer instanceof HTMLElement ? DelegateContainer : doc.getElementById(DelegateContainer);\n\t\n\t if (!_this.container) {\n\t throw new Error('Could not create Tooltip, DelegateContainer not found');\n\t }\n\t\n\t /**\n\t * The Container where tooltips are stored for this instance\n\t * @type {HTMLElement}\n\t */\n\t _this.tooltipContainer = null;\n\t\n\t /**\n\t * Default Options\n\t */\n\t _this.options = {\n\t containerClass: '',\n\t selectorAttribute: 'data-tooltip',\n\t collisionContainer: _this.container\n\t };\n\t\n\t Object.assign(_this.options, options || {});\n\t return _this;\n\t }\n\t\n\t /**\n\t * Creates and shows a tooltip\n\t * @param {HTMLElement} target where is this tooltip positioned\n\t * @param {String} text text content in tooltip, will be NOT escaped\n\t * @param {Boolean} [removeTitle] removes title element if given\n\t * @param {Node} [positionRelative]\n\t */\n\t\n\t\n\t _createClass(Tooltip, [{\n\t key: 'createTooltip',\n\t value: function createTooltip(target, text, removeTitle, positionRelative) {\n\t // abort if text is empty\n\t if (!text || text && text.trim() === '') {\n\t return;\n\t }\n\t\n\t if (_Settings2.default.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n\t return;\n\t }\n\t\n\t var tooltipContainer = this.tooltipContainer;\n\t\n\t if (!tooltipContainer) {\n\t tooltipContainer = doc.createElement('div');\n\t this.container.appendChild(tooltipContainer);\n\t this.tooltipContainer = tooltipContainer;\n\t }\n\t this._restoreClassNames(tooltipContainer, target);\n\t\n\t tooltipContainer.style.left = 'auto';\n\t tooltipContainer.style.top = 'auto';\n\t tooltipContainer.innerHTML = text;\n\t tooltipContainer.flexTooltipCurrentTarget = target;\n\t if (removeTitle) {\n\t target.oldTitle = text;\n\t target.removeAttribute('title');\n\t }\n\t\n\t _Util2.default.setupPositionNearby(positionRelative || target, tooltipContainer, this.options.collisionContainer, true, true);\n\t\n\t tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n\t }\n\t }, {\n\t key: '_restoreClassNames',\n\t value: function _restoreClassNames(container, target) {\n\t // allow additional classname per tooltip on target element\n\t var classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n\t var maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n\t if (maybeTargetClass) {\n\t classNames.push(maybeTargetClass);\n\t }\n\t container.className = classNames.join(\" \");\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {HTMLElement|null}\n\t */\n\t\n\t }, {\n\t key: 'getCurrentTarget',\n\t value: function getCurrentTarget() {\n\t return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n\t }\n\t\n\t /**\n\t * Destroys this Widget\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t _get(Object.getPrototypeOf(Tooltip.prototype), 'destroy', this).call(this);\n\t\n\t if (this.tooltipContainer) {\n\t this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n\t return true;\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Removes a Tooltip on given target\n\t * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n\t */\n\t\n\t }, {\n\t key: 'removeTooltip',\n\t value: function removeTooltip(target) {\n\t var selfTarget = target;\n\t if (!selfTarget && this.tooltipContainer) {\n\t selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n\t }\n\t if (this.tooltipContainer) {\n\t if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n\t return;\n\t }\n\t this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n\t delete this.tooltipContainer.flexTooltipCurrentTarget;\n\t }\n\t if (selfTarget && selfTarget.oldTitle) {\n\t selfTarget.setAttribute('title', selfTarget.oldTitle);\n\t }\n\t }\n\t\n\t /**\n\t * Initilizes mouse events on container element\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents() {\n\t var self = this;\n\t this.addEventListener(this.container, 'mouseover', function (e) {\n\t if (e.target.hasAttribute(self.options.selectorAttribute)) {\n\t self.createTooltip(e.target, e.target.getAttribute('title'), true);\n\t }\n\t });\n\t\n\t this.addEventListener(this.container, 'mouseout', function (e) {\n\t if (e.target.hasAttribute(self.options.selectorAttribute)) {\n\t self.removeTooltip(e.target);\n\t }\n\t });\n\t return this;\n\t }\n\t }]);\n\t\n\t return Tooltip;\n\t}(_DestroyableWidget3.default);\n\t\n\texports.default = Tooltip;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.ALLOW_ELEMENT_OVERFLOW_TOUCH = exports.EVENT_AFTER_FIXED_REMOVE = exports.EVENT_BEFORE_FIXED_ADD = undefined;\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _debounce = __webpack_require__(10);\n\t\n\tvar _debounce2 = _interopRequireDefault(_debounce);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar CLS_FIXED_WINDOW = 'fixed-window-open';\n\t\n\tvar EVENT_BEFORE_FIXED_ADD = exports.EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\n\tvar EVENT_AFTER_FIXED_REMOVE = exports.EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ALLOW_ELEMENT_OVERFLOW_TOUCH = exports.ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\t\n\t/**\n\t * @type {FixedWindow}\n\t */\n\tvar fixedWindowInstance = void 0;\n\t\n\tvar FixedWindow = function () {\n\t function FixedWindow() {\n\t _classCallCheck(this, FixedWindow);\n\t\n\t this.widgets = [];\n\t this.currentScrollTop = 0;\n\t this.fixedScreenConstraints = [];\n\t this.windowWidth = 0;\n\t this.isFixedWindowActive = false;\n\t this.touchListener = null;\n\t }\n\t\n\t /**\n\t * Adds a constraint to detect if the window needs to be changed when the screensize changes\n\t *\n\t * @param {Function} widget\n\t * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n\t */\n\t\n\t\n\t _createClass(FixedWindow, [{\n\t key: 'addScreenConstraint',\n\t value: function addScreenConstraint(widget, fixedBreakpointFn) {\n\t this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n\t }\n\t\n\t /**\n\t * @returns {null|DestroyableWidget}\n\t */\n\t\n\t }, {\n\t key: 'getCurrentWidget',\n\t value: function getCurrentWidget() {\n\t return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_checkFixedNeeded',\n\t value: function _checkFixedNeeded() {\n\t var _this = this;\n\t\n\t if (this.widgets.length === 0) {\n\t return;\n\t }\n\t var widgets = new Set(this.widgets);\n\t var widgetsThatRequireFixedWindow = Array.from(widgets).some(function (_ref) {\n\t var widget = _ref.widget;\n\t\n\t return _this.fixedScreenConstraints[widget] && _this.fixedScreenConstraints[widget](_this.windowWidth);\n\t });\n\t if (!widgetsThatRequireFixedWindow) {\n\t this._removeFixedContainer();\n\t } else {\n\t this._addFixedContainer();\n\t }\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_addFixedContainer',\n\t value: function _addFixedContainer() {\n\t var _this2 = this;\n\t\n\t if (this.isFixedWindowActive) {\n\t return;\n\t }\n\t _Event2.default.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n\t detail: this.getCurrentWidget()\n\t });\n\t // this causes layout and should be optimized\n\t // At lest we write in a batch later\n\t _Settings2.default.get().scrollbarUpdateNodes.map(function (n) {\n\t var foundProperty = 'paddingRight';\n\t var direction = 1;\n\t var node = n;\n\t if (n instanceof Array) {\n\t var _n = _slicedToArray(n, 3);\n\t\n\t var whatNode = _n[0];\n\t var property = _n[1];\n\t var d = _n[2];\n\t\n\t foundProperty = property;\n\t node = whatNode;\n\t direction = d || 1;\n\t }\n\t return {\n\t node: node,\n\t property: foundProperty,\n\t value: parseInt(global.getComputedStyle(node)[foundProperty], 10) + (!node.__fixedWindowMod__ ? _Settings2.default.getScrollbarWidth() * direction : 0) + 'px'\n\t };\n\t }).forEach(function (d) {\n\t d.node.__fixedWindowMod__ = true;\n\t d.node.style[d.property] = d.value;\n\t });\n\t\n\t this.touchListener = function (e) {\n\t e.preventDefault();\n\t };\n\t\n\t var shouldNotMoveUp = false;\n\t var shouldNotMoveDown = false;\n\t var neverScroll = false;\n\t var lastClientY = 0;\n\t this.touchStartListener = function (e) {\n\t var _getCurrentWidget = _this2.getCurrentWidget();\n\t\n\t var element = _getCurrentWidget.element;\n\t\n\t var closestOverflow = _Util2.default.closestCallback(e.target, function (el) {\n\t return el instanceof HTMLTextAreaElement || el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH);\n\t });\n\t if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n\t element = closestOverflow;\n\t }\n\t if (_Util2.default.isPartOfNode(e.target, element)) {\n\t neverScroll = element.scrollHeight === element.offsetHeight;\n\t lastClientY = e.touches[0].clientY;\n\t // never allow scrolling when there is nothing to scroll\n\t if (neverScroll) {\n\t return false;\n\t }\n\t if (element.scrollTop === 0) {\n\t element.scrollTop = 1;\n\t shouldNotMoveUp = true;\n\t } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n\t shouldNotMoveDown = true;\n\t element.scrollTop -= 1;\n\t }\n\t }\n\t };\n\t\n\t global.addEventListener('touchmove', this.touchListener);\n\t global.document.body.addEventListener('touchstart', this.touchStartListener);\n\t\n\t this.touchMoveListener = function (e) {\n\t var _getCurrentWidget2 = _this2.getCurrentWidget();\n\t\n\t var element = _getCurrentWidget2.element;\n\t\n\t if (_Util2.default.isPartOfNode(e.target, element)) {\n\t var clientY = e.touches[0].clientY;\n\t\n\t var isScrollingDown = lastClientY - clientY > 0;\n\t lastClientY = clientY;\n\t\n\t if (neverScroll) {\n\t neverScroll = false;\n\t return false;\n\t }\n\t\n\t if (!shouldNotMoveDown && isScrollingDown) {\n\t e.stopImmediatePropagation();\n\t }\n\t\n\t if (shouldNotMoveDown && !isScrollingDown) {\n\t e.stopImmediatePropagation();\n\t }\n\t\n\t if (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) {\n\t e.stopImmediatePropagation();\n\t }\n\t\n\t shouldNotMoveUp = false;\n\t shouldNotMoveDown = false;\n\t }\n\t };\n\t global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\t\n\t global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n\t this.isFixedWindowActive = true;\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_removeFixedContainer',\n\t value: function _removeFixedContainer() {\n\t if (this.isFixedWindowActive) {\n\t // cleanup event listeners\n\t global.removeEventListener('touchmove', this.touchListener);\n\t global.document.body.removeEventListener('touchstart', this.touchStartListener);\n\t global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\t\n\t // reset scrollbar nodes\n\t _Settings2.default.get().scrollbarUpdateNodes.forEach(function (node) {\n\t if (node instanceof Array) {\n\t var _node = _slicedToArray(node, 2);\n\t\n\t var whatNode = _node[0];\n\t var property = _node[1];\n\t\n\t delete whatNode.__fixedWindowMod__;\n\t whatNode.style[property] = '';\n\t } else {\n\t delete node.__fixedWindowMod__;\n\t node.style.paddingRight = '';\n\t }\n\t });\n\t global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n\t _Event2.default.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n\t this.isFixedWindowActive = false;\n\t }\n\t }\n\t\n\t /**\n\t * Will close a window when no widgets are opened that need one\n\t */\n\t\n\t }, {\n\t key: 'resizeListener',\n\t value: function resizeListener() {\n\t this.windowWidth = global.innerWidth;\n\t this._checkFixedNeeded();\n\t }\n\t\n\t /**\n\t * @returns {FixedWindow}\n\t */\n\t\n\t }, {\n\t key: 'close',\n\t\n\t\n\t /**\n\t * Request a close of the fixed window\n\t */\n\t value: function close() {\n\t this.widgets.pop();\n\t if (this.widgets.length === 0) {\n\t this._removeFixedContainer();\n\t }\n\t }\n\t\n\t /**\n\t * Request to open a fixed windows\n\t * @param {Object|DestroyableWidget} instance\n\t * @param {HTMLElement} element\n\t */\n\t\n\t }, {\n\t key: 'open',\n\t value: function open(instance, element) {\n\t var fixed = false;\n\t if ((typeof instance === 'undefined' ? 'undefined' : _typeof(instance)) === 'object') {\n\t var widget = instance.constructor;\n\t var fixedWidget = this.fixedScreenConstraints[instance.constructor];\n\t if (widget && fixedWidget) {\n\t fixed = fixedWidget(this.windowWidth);\n\t }\n\t var length = this.widgets.length;\n\t this.widgets.push({\n\t widget: widget,\n\t element: element\n\t });\n\t // open a new window if there is no window active\n\t if (length === 0) {\n\t if (fixed) {\n\t this._addFixedContainer();\n\t }\n\t }\n\t }\n\t }\n\t }], [{\n\t key: 'getInstance',\n\t value: function getInstance() {\n\t if (!fixedWindowInstance) {\n\t fixedWindowInstance = new FixedWindow();\n\t fixedWindowInstance.windowWidth = global.innerWidth;\n\t var eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n\t global.addEventListener('resize', (0, _debounce2.default)(eventHandler, 500));\n\t global.addEventListener('orientationchange', eventHandler);\n\t }\n\t return fixedWindowInstance;\n\t }\n\t }]);\n\t\n\t return FixedWindow;\n\t}();\n\n\texports.default = FixedWindow;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_MODAL_ASYNC_TARGET_LOADED = exports.EVENT_MODAL_INIT = exports.EVENT_MODAL_OPENED = exports.EVENT_MODAL_BEFORE_CLOSED = exports.EVENT_MODAL_CLOSED = undefined;\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Modal\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/* global KeyboardEvent */\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tvar _FixedWindow = __webpack_require__(7);\n\t\n\tvar _FixedWindow2 = _interopRequireDefault(_FixedWindow);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar KEY_ESC = 27;\n\t/* Attribute Names */\n\tvar ATTR_CREATE_NEW = 'data-new-instance';\n\tvar ATTR_CLOSE = 'data-close-modal';\n\tvar ATTR_NAME = 'data-modal';\n\t\n\t/* Class names */\n\tvar CLS_CONTAINER_CURRENT = 'front';\n\tvar CLS_OPEN = 'open';\n\tvar CLS_CURRENT = 'current';\n\tvar CLS_PART_OF_STACK = 'part-of-stack';\n\tvar CLS_MODAL_CONTAINER = 'modal-container';\n\tvar CLS_ANIM_END = 'modal-anim-end';\n\tvar CLS_LOADER_CONTAINER = 'loader-container';\n\tvar CLS_LOADER = 'loader';\n\tvar CLS_BACKDROP = 'backdrop';\n\t\n\t/* Events */\n\t\n\t/**\n\t * Event triggered when modal is closed\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_CLOSED = exports.EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n\t/**\n\t * Event triggered before a modal is closed, cancelable\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_BEFORE_CLOSED = exports.EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n\t/**\n\t * Event triggered when a modal is opened\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_OPENED = exports.EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\t\n\t/**\n\t * Event triggered when modal is initilized, called on target\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_INIT = exports.EVENT_MODAL_INIT = 'flexcss.modal.init';\n\t\n\t/**\n\t * Triggered when the content of an async modal on a target is loaded, called on target\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_ASYNC_TARGET_LOADED = exports.EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\t\n\t/**\n\t * A Modal Implementation\n\t */\n\t\n\tvar Modal = function () {\n\t function Modal(DelegateContainer, options) {\n\t _classCallCheck(this, Modal);\n\t\n\t var doc = global.document;\n\t var container = DelegateContainer instanceof HTMLElement ? DelegateContainer : doc.getElementById(DelegateContainer);\n\t\n\t // Instance vars:\n\t if (!container) {\n\t throw new Error('Could not found container element by given ID/Element: ' + DelegateContainer);\n\t }\n\t\n\t this.currentOpen = null;\n\t\n\t this.loading = false;\n\t\n\t this.container = container;\n\t\n\t /**\n\t * Default Options\n\t */\n\t this.options = {\n\t classNames: 'modal',\n\t closeOnEscape: true,\n\t closeOnBackgroundClick: true,\n\t destroyOnFinish: false,\n\t fixedContainer: true,\n\t containerClassNames: ''\n\t };\n\t\n\t Object.assign(this.options, options);\n\t\n\t // Container where events are delegated\n\t this.eventContainer = null;\n\t this.eventFunction = null;\n\t\n\t this.dataMainPageContainer = global.document.body;\n\t\n\t this.currentScrollTop = 0;\n\t\n\t this.modalContainer = null;\n\t\n\t // Destroy full modal instance when no dialogs are bind to?\n\t // Otherwise container is recycled\n\t this.destroyOnFinish = this.options.destroyOnFinish;\n\t }\n\t\n\t /**\n\t * Removes this modal from global stack\n\t * Will handle fixing main html element too\n\t * @private\n\t * @param n\n\t */\n\t\n\t\n\t _createClass(Modal, [{\n\t key: '_removeModalFromStack',\n\t value: function _removeModalFromStack(n) {\n\t var t = Modal._modalInstances.indexOf(n);\n\t if (t > -1) {\n\t Modal._modalInstances.splice(t, 1);\n\t _FixedWindow2.default.getInstance().close();\n\t }\n\t }\n\t\n\t /**\n\t * Modal container that contains all `stacked` modals for this instance\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getModalContainer',\n\t value: function getModalContainer() {\n\t return this.modalContainer;\n\t }\n\t\n\t /**\n\t * Closes the current open modal of this stack\n\t * @params [e], optional event\n\t * @returns {*}\n\t */\n\t\n\t }, {\n\t key: 'close',\n\t value: function close(e) {\n\t var self = this;\n\t\n\t var options = self.currentOpen ? _Util2.default.applyOptionsFromElement(self.currentOpen, _Util2.default.copy(self.options)) : self.options;\n\t\n\t // close only on keyboard if instance should\n\t if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n\t return false;\n\t }\n\t\n\t // close only on background if instance should\n\t if (!options.closeOnBackgroundClick && e && e.type === _Settings2.default.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n\t return false;\n\t }\n\t\n\t // if an instance is currently loading, prevent from closing\n\t if (self.loading) {\n\t return false;\n\t }\n\t\n\t if (e) {\n\t e.preventDefault();\n\t }\n\t\n\t if (self.currentOpen) {\n\t // dispatch beforeClose event, if prevented prevent modal from closing\n\t var ev = _Event2.default.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n\t if (ev.defaultPrevented) {\n\t return false;\n\t }\n\t\n\t this._finishState(self.currentOpen);\n\t // if there is an previous modal\n\t if (self.currentOpen.prevModal) {\n\t // switch to the next modal\n\t return self.switchModals(self.currentOpen.prevModal, self.currentOpen.prevModal.prevModal || null);\n\t }\n\t\n\t // finally trigger closed event\n\t _Event2.default.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n\t }\n\t self._removeModalFromStack(self.currentOpen);\n\t\n\t // Full stack closed:\n\t self.currentOpen = null;\n\t if (self.modalContainer) {\n\t // setup next open\n\t var lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n\t var classList = self.modalContainer.classList;\n\t classList.remove(CLS_CONTAINER_CURRENT);\n\t classList.remove(CLS_BACKDROP);\n\t classList.remove(CLS_OPEN);\n\t // Remove all current classes from child-nodes\n\t for (var i = 0; i < self.modalContainer.childNodes.length; i++) {\n\t var node = self.modalContainer.childNodes[i];\n\t var cl = node.classList;\n\t // remove applied styles\n\t self._finishState(node);\n\t cl.remove(CLS_CURRENT);\n\t cl.remove(CLS_PART_OF_STACK);\n\t }\n\t if (lastContainer) {\n\t lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n\t }\n\t }\n\t\n\t if (self.destroyOnFinish) {\n\t self.destroy();\n\t }\n\t return self;\n\t }\n\t\n\t /**\n\t * Resets a target when newly initilizes\n\t * @param target\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_finishState',\n\t value: function _finishState(target) {\n\t target.classList.remove(CLS_ANIM_END);\n\t }\n\t\n\t /**\n\t * Handler called when a Modal has finished an animation\n\t * @param e\n\t * @param self\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_finishAnim',\n\t value: function _finishAnim(e, self) {\n\t e.target.classList.add(CLS_ANIM_END);\n\t e.target.removeEventListener(e.type, self, true);\n\t }\n\t\n\t /**\n\t * Brings the given modal to front\n\t * @param co\n\t * @param last\n\t */\n\t\n\t }, {\n\t key: 'switchModals',\n\t value: function switchModals(co, last) {\n\t co.prevModal = last;\n\t Modal._modalInstances.push(co);\n\t _FixedWindow2.default.getInstance().open(this, this.modalContainer);\n\t if (last) {\n\t this._finishState(last);\n\t _Util2.default.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n\t last.classList.add(CLS_PART_OF_STACK);\n\t }\n\t // set new currentOpen\n\t this.currentOpen = co;\n\t\n\t // bring current container to the front\n\t var instances = Modal._modalInstances;\n\t\n\t for (var m = 0; m < instances.length; m++) {\n\t instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n\t }\n\t this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n\t // remove animations if animations has been completed, fixes various bugs:\n\t // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n\t _Util2.default.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\t\n\t for (var i = 0; i < this.modalContainer.childNodes.length; i++) {\n\t var n = this.modalContainer.childNodes[i];\n\t var isCurrent = n.classList.contains(CLS_CURRENT);\n\t if (n === co) {\n\t co.classList.add(CLS_CURRENT);\n\t co.classList.remove(CLS_PART_OF_STACK);\n\t this._finishState(co);\n\t } else {\n\t n.classList.remove(CLS_CURRENT);\n\t if (isCurrent) {\n\t this._removeModalFromStack(n);\n\t _Event2.default.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n\t }\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Creates a Modal and opens it (later)\n\t * @param e\n\t * @returns {Promise|boolean}\n\t */\n\t\n\t }, {\n\t key: 'createWidget',\n\t value: function createWidget(e) {\n\t var _this = this;\n\t\n\t var self = this;\n\t if (this.loading) {\n\t return false;\n\t }\n\t\n\t // check if another modal has registered events on this dom path:\n\t if (e && e.target) {\n\t var foundInstance = _Util2.default.parentsUntil(e.target, function (node) {\n\t return node && node.flexModalInstance;\n\t });\n\t\n\t // if another instance has been found, abort\n\t if (foundInstance !== this.container) {\n\t return false;\n\t }\n\t }\n\t var targetContent = void 0;\n\t var future = void 0;\n\t var widget = void 0;\n\t var target = void 0;\n\t var hasTarget = true;\n\t var isHtmlElement = e instanceof HTMLElement;\n\t var isWidget = _Widget2.default.isWidget(e);\n\t if (isHtmlElement || isWidget) {\n\t if (isHtmlElement) {\n\t targetContent = e;\n\t } else {\n\t widget = e;\n\t targetContent = widget.element;\n\t }\n\t } else {\n\t target = e.target;\n\t if (!target) {\n\t throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n\t }\n\t hasTarget = target.hasAttribute(ATTR_NAME);\n\t targetContent = target.getAttribute(ATTR_NAME);\n\t widget = _Widget2.default.findWidget(target);\n\t if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n\t var _ret = function () {\n\t var newInstance = new Modal(_this.container).setDestroyOnFinish(true);\n\t e.newInstance = true;\n\t newInstance.fromEvent(e).then(function () {\n\t newInstance.registerEvents(newInstance.getModalContainer());\n\t });\n\t return {\n\t v: false\n\t };\n\t }();\n\t\n\t if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === \"object\") return _ret.v;\n\t }\n\t if (hasTarget) {\n\t e.stopImmediatePropagation();\n\t e.preventDefault();\n\t }\n\t }\n\t\n\t if (!hasTarget) {\n\t return false;\n\t }\n\t\n\t var modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\t\n\t // lazy create modal container\n\t if (!this.modalContainer) {\n\t this.modalContainer = global.document.createElement('div');\n\t this.modalContainer.className = CLS_MODAL_CONTAINER + ' ' + this.options.containerClassNames + ' ' + CLS_OPEN;\n\t var closeModalFunction = function closeModalFunction(ce) {\n\t if (_this.loading) {\n\t return false;\n\t }\n\t if (_Util2.default.isPartOfNode(ce.target, _this.currentOpen)) {\n\t if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n\t return false;\n\t }\n\t }\n\t _this.close(ce);\n\t };\n\t\n\t this.modalContainer.addEventListener(_Settings2.default.getTabEvent(), closeModalFunction, false);\n\t\n\t modalContainerClasses = this.modalContainer.classList;\n\t this.container.appendChild(this.modalContainer);\n\t } else {\n\t modalContainerClasses.add(CLS_OPEN);\n\t }\n\t\n\t var loader = void 0;\n\t var doc = global.document;\n\t var toggleLoader = function toggleLoader(show) {\n\t if (show) {\n\t loader = doc.createElement('div');\n\t loader.className = CLS_LOADER_CONTAINER;\n\t var loaderLoader = doc.createElement('div');\n\t loaderLoader.className = CLS_LOADER;\n\t loader.appendChild(loaderLoader);\n\t _this.modalContainer.appendChild(loader);\n\t } else {\n\t loader.parentNode.removeChild(loader);\n\t }\n\t };\n\t modalContainerClasses.add('loading');\n\t modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\t\n\t requestAnimationFrame(function () {\n\t requestAnimationFrame(function () {\n\t modalContainerClasses.add(CLS_BACKDROP);\n\t });\n\t });\n\t\n\t this.loading = true;\n\t toggleLoader(true);\n\t var async = widget ? widget.getAsync() : null;\n\t if (_Widget2.default.isWidget(widget) && async) {\n\t future = async.then(function (r) {\n\t var result = void 0;\n\t if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n\t result = r;\n\t } else {\n\t // Create container Element:\n\t var element = doc.createElement('div');\n\t element.className = self.options.classNames;\n\t element.innerHTML = r;\n\t element.id = _Util2.default.guid();\n\t result = element;\n\t }\n\t widget.finalContent = result;\n\t _Event2.default.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n\t return result;\n\t });\n\t } else {\n\t (function () {\n\t var el = targetContent instanceof HTMLElement || targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n\t if (el) {\n\t future = new Promise(function (resolve) {\n\t resolve(el);\n\t });\n\t } else {\n\t throw new Error('Could not found given modal element (content) with ID: ' + targetContent);\n\t }\n\t })();\n\t }\n\t\n\t _Event2.default.dispatchAndFire(target, EVENT_MODAL_INIT);\n\t\n\t return future.then(function (thisEl) {\n\t thisEl.hfWidgetInstance = _this;\n\t _this.modalContainer.appendChild(thisEl);\n\t modalContainerClasses.remove('loading');\n\t _this.loading = false;\n\t toggleLoader(false);\n\t _this.open(thisEl, true, e);\n\t return thisEl;\n\t });\n\t }\n\t\n\t /**\n\t * Open's an already rendered modal\n\t * @param {HTMLElement} modal\n\t * @param {Boolean} [internal], set to true to prevent container management\n\t * @param {Boolean} [maybeEvent], optional event-object that triggered open\n\t */\n\t\n\t }, {\n\t key: 'open',\n\t value: function open(modal, internal, maybeEvent) {\n\t if (!internal) {\n\t this.modalContainer.classList.add('open');\n\t }\n\t this.switchModals(modal, this.currentOpen);\n\t\n\t _Event2.default.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n\t }\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents(delegate) {\n\t var _this2 = this;\n\t\n\t var delegateContainer = delegate || this.container;\n\t // Modals should always be fixed\n\t _FixedWindow2.default.getInstance().addScreenConstraint(Modal, function () {\n\t return true;\n\t });\n\t // register modal instance so we can detect multiple registrars\n\t delegateContainer.flexModalInstance = this;\n\t this.eventFunction = function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t _this2.createWidget.apply(_this2, args);\n\t };\n\t delegateContainer.addEventListener(_Settings2.default.getTabEvent(), this.eventFunction, false);\n\t\n\t this.eventContainer = delegateContainer;\n\t return this;\n\t }\n\t\n\t /**\n\t * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n\t * @param {HTMLElement|Widget} widget instance or html element\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'fromWidget',\n\t value: function fromWidget(widget) {\n\t return this.createWidget(widget);\n\t }\n\t\n\t /**\n\t * Creates a Widget from event\n\t * @param e\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'fromEvent',\n\t value: function fromEvent(e) {\n\t return this.createWidget(e);\n\t }\n\t }, {\n\t key: 'setDestroyOnFinish',\n\t value: function setDestroyOnFinish(v) {\n\t this.destroyOnFinish = v;\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroy this widget instance, cleans empty DOM nodes\n\t * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t var modalContainer = this.modalContainer;\n\t var isEmptyContainer = modalContainer.childNodes.length === 0;\n\t // Remove event listener on destroy, do not remove DOM node\n\t if (this.eventContainer) {\n\t this.eventContainer.removeEventListener(_Settings2.default.getTabEvent(), this.eventFunction, true);\n\t }\n\t\n\t if (isEmptyContainer) {\n\t if (modalContainer.parentNode) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t }\n\t }\n\t if (global.MutationObserver) {\n\t (function () {\n\t var observer = new MutationObserver(function (mutations) {\n\t mutations.forEach(function () {\n\t if (modalContainer.childNodes.length === 0) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t observer.disconnect();\n\t }\n\t });\n\t });\n\t observer.observe(modalContainer, {\n\t childList: true\n\t });\n\t })();\n\t } else {\n\t modalContainer.addEventListener('DOMNodeRemoved', function (e) {\n\t if (e.target !== modalContainer && modalContainer.childNodes.length - 1 === 0) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t }\n\t });\n\t }\n\t }\n\t }]);\n\t\n\t return Modal;\n\t}();\n\t\n\t// Static variable that keeps track of all open modals\n\t\n\t\n\tModal._modalInstances = [];\n\t\n\t// Global keydown listener for modal\n\tglobal.addEventListener('keydown', function (e) {\n\t if (e.keyCode === KEY_ESC) {\n\t var lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n\t if (lastModal) {\n\t _Widget2.default.findWidget(lastModal).close(e);\n\t }\n\t }\n\t});\n\t\n\texports.default = Modal;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_FORM_AJAX_COMPLETED = exports.EVENT_FORM_AFTER_AJAX_SUBMIT = exports.EVENT_FORM_SUBMIT = exports.EVENT_FORM_READY = undefined;\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _Tooltip = __webpack_require__(6);\n\t\n\tvar _Tooltip2 = _interopRequireDefault(_Tooltip);\n\t\n\t__webpack_require__(11);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _DestroyableWidget2 = __webpack_require__(5);\n\t\n\tvar _DestroyableWidget3 = _interopRequireDefault(_DestroyableWidget2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Form\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\tvar LOADING_CLASS = 'loading';\n\tvar DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\n\tvar REMOTE = 'data-remote';\n\tvar REMOTE_ACTION = 'data-remote-action';\n\tvar ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\n\tvar ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\n\tvar ATTR_VALIDATOR = 'data-validate';\n\tvar ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\n\tvar ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\n\tvar ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\n\tvar ATTR_ERROR_TARGET_ID = 'data-error-target';\n\tvar ATTR_DEPENDS = 'data-depends-selector';\n\tvar CONST_USE_JSON = 'json';\n\tvar CONST_REALTIME_EVENT = 'input';\n\tvar FOCUS_TOOLTIP_DELAY = 20;\n\tvar CLICK_TOOLTIP_DELAY = 150;\n\t\n\t/**\n\t * Triggered when form is fully initialized and handlers are binded\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_READY = exports.EVENT_FORM_READY = 'flexcss.form.ready';\n\t/**\n\t * Fires when a form is submitted, cancelable\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_SUBMIT = exports.EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n\t/**\n\t * Fired directly after the form has been submitted via ajax\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_AFTER_AJAX_SUBMIT = exports.EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n\t/**\n\t * Fired when ajax events did complete\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_AJAX_COMPLETED = exports.EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\t\n\t/**\n\t * A HTML5 Form Validation replacement\n\t */\n\t\n\tvar Form = function (_DestroyableWidget) {\n\t _inherits(Form, _DestroyableWidget);\n\t\n\t /**\n\t * @param {HTMLElement} form\n\t * @param [options] optional options\n\t */\n\t\n\t function Form(form, options) {\n\t _classCallCheck(this, Form);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Form).call(this));\n\t\n\t if (!(form instanceof HTMLFormElement)) {\n\t throw 'argument {0} form needs to be an form element';\n\t }\n\t\n\t /**\n\t * The Form\n\t * @type {HTMLElement}\n\t */\n\t _this.form = form;\n\t\n\t /**\n\t * @type {Tooltip}\n\t */\n\t _this.tooltips = null;\n\t\n\t /**\n\t * @type {Promise}\n\t */\n\t _this.currentValidationFuture = new Promise(function () {});\n\t\n\t /**\n\t * Default options\n\t * @type {Object}\n\t */\n\t _this.options = {\n\t // if true creates tooltips above element, uses FlexCss Tooltips\n\t createTooltips: true,\n\t // if true appends error message after input element\n\t appendError: false,\n\t // type of ajax submit\n\t ajaxSubmitType: 'POST',\n\t // json content type if ajax method is set to json\n\t ajaxJsonContentType: 'application/json; charset=utf-8',\n\t // allow inline validation\n\t inlineValidation: true,\n\t // validate in realtime (on `input` event)\n\t realtime: true,\n\t // timeout when realtime event should be captured\n\t realtimeTimeout: 250,\n\t // formatting method for an error\n\t formatErrorTooltip: function formatErrorTooltip(error) {\n\t return ' ' + error;\n\t },\n\t // the class that will be put on the element to mark it failed validation\n\t inputErrorClass: 'invalid',\n\t // the container class for error messages below an element\n\t containerErrorClass: 'form-error',\n\t // additional options for fetch\n\t fetchOptions: {\n\t credentials: 'include'\n\t },\n\t // the container for tooltips\n\t tooltipContainer: form,\n\t tooltipOptions: {\n\t containerClass: 'error-tooltip'\n\t },\n\t // if you have a fixed header, either set a number or function here\n\t scrollToElementDiff: 0\n\t };\n\t\n\t // overwrite default options\n\t Object.assign(_this.options, options);\n\t\n\t // apply settings from attributes\n\t _Util2.default.applyOptionsFromElement(form, _this.options);\n\t\n\t // set form class as widget\n\t // Forms are very different to classical widgets,\n\t // we will not use our base widget class for this but just self\n\t form.hfWidgetInstance = _this;\n\t\n\t /**\n\t * A List of Validators\n\t * @type {Object}\n\t * @private\n\t */\n\t _this._validators = Form.globalValidators;\n\t\n\t /**\n\t * @type {Function}\n\t * @private\n\t */\n\t _this._remoteValidationFunction = null;\n\t\n\t _this.initFormValidation();\n\t return _this;\n\t }\n\t\n\t _createClass(Form, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t _get(Object.getPrototypeOf(Form.prototype), 'destroy', this).call(this);\n\t if (this.tooltips) {\n\t this.tooltips.destroy();\n\t }\n\t }\n\t\n\t /**\n\t * Submits this form, either via ajax or just classical (default)\n\t * @param {HTMLFormElement} thisForm\n\t * @param {Event} e\n\t * @private\n\t * @returns {Promise|boolean} returns false if submit is cancled\n\t */\n\t\n\t }, {\n\t key: '_submitFunction',\n\t value: function _submitFunction(thisForm, e) {\n\t var shouldUseAjax = thisForm.getAttribute(REMOTE),\n\t ajaxPostUrl = thisForm.getAttribute(REMOTE_ACTION) || thisForm.getAttribute('action') || window.location.href,\n\t useJson = CONST_USE_JSON === shouldUseAjax,\n\t self = this;\n\t\n\t var ev = _Event2.default.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\t\n\t // abort execution is event was prevented\n\t if (ev.defaultPrevented) {\n\t self._formStopLoading();\n\t return false;\n\t }\n\t\n\t if (shouldUseAjax === null) {\n\t // submit\n\t return thisForm.submit();\n\t }\n\t // prevent form from submit normally\n\t e.preventDefault();\n\t\n\t // add information that this is an XMLHttpRequest request (used by some frameworks)\n\t var defaultHeaders = {\n\t 'X-Requested-With': 'XMLHttpRequest'\n\t };\n\t\n\t // setup default headers\n\t if (useJson) {\n\t Object.assign(defaultHeaders, {\n\t 'Content-Type': this.options.ajaxJsonContentType\n\t });\n\t }\n\t var defaultOptions = Object.assign(this.options.fetchOptions, {\n\t headers: defaultHeaders,\n\t method: this.options.ajaxSubmitType\n\t });\n\t\n\t // support either JSON request payload or normal payload submission\n\t var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n\t body: JSON.stringify(this.serialize())\n\t })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n\t body: new FormData(thisForm)\n\t }));\n\t\n\t _Event2.default.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\t\n\t return serverCall.then(function (r) {\n\t (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\t\n\t _Event2.default.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n\t // always remove error class\n\t self._formStopLoading();\n\t });\n\t }\n\t\n\t /**\n\t * Serializes a form to a json object\n\t * @returns {Object}\n\t */\n\t\n\t }, {\n\t key: 'serialize',\n\t value: function serialize() {\n\t var selectors = ['input[name]:not([type=\"radio\"]):enabled', 'input[type=\"radio\"][name]:checked', 'select[name]:enabled', 'textarea[name]:enabled'],\n\t inputs = this.form.querySelectorAll(selectors.join(',')),\n\t result = {};\n\t\n\t Array.prototype.forEach.call(inputs, function (input) {\n\t var exists = result[input.name],\n\t value = input.value;\n\t if (exists instanceof Array) {\n\t exists.push(value);\n\t } else if (exists) {\n\t result[input.name] = [result[input.name], value];\n\t } else {\n\t result[input.name] = value;\n\t }\n\t });\n\t\n\t return result;\n\t }\n\t\n\t /**\n\t * Handles the chain of validation on given fields\n\t *\n\t * @param {HTMLElement|Array|NodeList} field\n\t * @param [focus] optional focus first error\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'handleValidation',\n\t value: function handleValidation(field, focus) {\n\t var _this2 = this;\n\t\n\t var fields = field instanceof Array || field instanceof NodeList ? field : [field];\n\t return this._handleValidation(fields, focus, true).then(function (r) {\n\t if (!r.foundAnyError) {\n\t // remove tooltips\n\t if (_this2.tooltips) {\n\t _this2.tooltips.removeTooltip();\n\t }\n\t }\n\t return r;\n\t }.bind(this));\n\t }\n\t\n\t /**\n\t * Handles errors on given node list\n\t * @param {NodeList} toValidateFields\n\t * @param {boolean} focus\n\t * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n\t * @returns {Promise}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleValidation',\n\t value: function _handleValidation(toValidateFields, focus, scoped) {\n\t var self = this;\n\t var arr = Form._createArrayFromInvalidFieldList(toValidateFields),\n\t isLocalInvalid = arr.length > 0;\n\t // focus must appear in the same frame for iOS devices\n\t if (isLocalInvalid && focus) {\n\t self._focusElement(arr[0]);\n\t }\n\t var validation = scoped ? this._customValidationsForElements(toValidateFields) : self.validateCustomFields();\n\t return validation.then(function (r) {\n\t if (isLocalInvalid) {\n\t // combine browser and custom validators\n\t r.foundAnyError = true;\n\t }\n\t // get a unique field list of all fields that need to be checked and rendered\n\t // it's possible that we have duplicates in non scoped mode\n\t var thisToValidateFields = scoped ? toValidateFields : Array.from(arr).concat(r.checkedFields);\n\t r.checkedFields = thisToValidateFields;\n\t var foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n\t firstInvalidField = foundInvalidFields[0];\n\t if (firstInvalidField) {\n\t if (focus) {\n\t self._focusElement(firstInvalidField);\n\t // if element could not be focused:\n\t if (document.activeElement !== firstInvalidField) {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t } else {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t self.showAndOrCreateTooltip(firstInvalidField);\n\t }\n\t return r;\n\t });\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} field\n\t * @param {ValidityState} validity\n\t * @returns {*}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_setupErrorMessages',\n\t value: function _setupErrorMessages(field, validity) {\n\t return Form.globalErrorMessageHandler ? Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n\t }\n\t\n\t /**\n\t * Handles class labels for elements\n\t * @param {Object} fields\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleLabels',\n\t value: function _handleLabels(fields) {\n\t Object.keys(fields).forEach(function (id) {\n\t var labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'),\n\t invalid = fields[id];\n\t if (labels.length) {\n\t for (var labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n\t var labelEl = labels[labelsIndex];\n\t // we can't use toggle attribute, not supported in IE\n\t if (invalid) {\n\t this._markElementInvalid(labelEl);\n\t } else {\n\t this._markElementValid(labelEl);\n\t }\n\t }\n\t }\n\t }.bind(this));\n\t }\n\t\n\t /**\n\t * @param el\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_markElementInvalid',\n\t value: function _markElementInvalid(el) {\n\t el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n\t el.classList.add(this.options.inputErrorClass);\n\t }\n\t\n\t /**\n\t * @param el\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_markElementValid',\n\t value: function _markElementValid(el) {\n\t el.removeAttribute(DATA_ELEMENT_INVALID);\n\t el.classList.remove(this.options.inputErrorClass);\n\t }\n\t\n\t /**\n\t * A List of invalid elements (:invalid)\n\t * @returns {Array}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_getInvalidElements',\n\t value: function _getInvalidElements() {\n\t return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n\t return !(r instanceof HTMLFieldSetElement);\n\t });\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} thisParent\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_removeElementErrors',\n\t value: function _removeElementErrors(thisParent) {\n\t var errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass),\n\t inputsWithErrorClasses = thisParent.querySelectorAll('[' + DATA_ELEMENT_INVALID + ']');\n\t for (var elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n\t errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n\t }\n\t for (var inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n\t var el = inputsWithErrorClasses[inputErrorIndex];\n\t this._markElementValid(el);\n\t }\n\t }\n\t\n\t /**\n\t * Registers a custom validator\n\t * @param {String} name\n\t * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n\t * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n\t * we can't rely on that\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerValidator',\n\t value: function registerValidator(name, validator) {\n\t this._validators[name] = validator;\n\t return this;\n\t }\n\t\n\t /**\n\t * Runs async validation\n\t * @param {String} validationRef\n\t * @param {HTMLElement} field\n\t * @returns {Promise}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_runValidation',\n\t value: function _runValidation(validationRef, field) {\n\t if (!this._validators[validationRef]) {\n\t throw 'Could not found validator: ' + validationRef;\n\t }\n\t var cl = field.classList,\n\t future = this._validators[validationRef].apply(this, [field, this.form]);\n\t cl.add(LOADING_CLASS);\n\t future.then(function () {\n\t cl.remove(LOADING_CLASS);\n\t });\n\t return future;\n\t }\n\t\n\t /**\n\t * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n\t *\n\t * @param {Array|NodeList} fields\n\t * @returns {Promise} contains either true if validations passed or false if something went wrong\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_customValidationsForElements',\n\t value: function _customValidationsForElements(fields) {\n\t var futures = [],\n\t fieldsLength = fields.length,\n\t checkedFields = [];\n\t for (var iVal = 0; iVal < fieldsLength; iVal++) {\n\t var field = fields[iVal],\n\t validationRef = field.getAttribute(ATTR_VALIDATOR),\n\t validity = field.validity;\n\t if (this._validators[validationRef]) {\n\t // use local validation first and then continue with custom validations\n\t if (Form._shouldNotValidateField(field) || validity && !validity.customError && !validity.valid) {\n\t continue;\n\t }\n\t checkedFields.push(field);\n\t futures.push(this._runValidation(validationRef, field));\n\t } else {\n\t if (validationRef) {\n\t console.warn('data-validate was set but no validator was found');\n\t }\n\t }\n\t }\n\t return Promise.all(futures).then(function (allFutures) {\n\t var l = allFutures.length;\n\t var result = {\n\t checkedFields: checkedFields,\n\t foundAnyError: false\n\t };\n\t for (var fI = 0; fI < l; fI++) {\n\t if (!allFutures[fI]) {\n\t result.foundAnyError = true;\n\t break;\n\t }\n\t }\n\t return result;\n\t });\n\t }\n\t\n\t /**\n\t * Remove all errors for this form\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'removeErrors',\n\t value: function removeErrors() {\n\t this._removeElementErrors(this.form);\n\t if (this.tooltips) {\n\t this.tooltips.removeTooltip();\n\t }\n\t return this;\n\t }\n\t\n\t /**\n\t * Will handle errors for given fields\n\t * @param {Array|NodeList} fields\n\t * @param {Boolean} removeAllErrors\n\t */\n\t\n\t }, {\n\t key: 'prepareErrors',\n\t value: function prepareErrors(fields, removeAllErrors) {\n\t if (removeAllErrors) {\n\t this.removeErrors();\n\t }\n\t var labelGroups = {},\n\t invalidFields = [];\n\t\n\t function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n\t var additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id,\n\t group = thisLabelGroup[additionalLabels];\n\t if (additionalLabels) {\n\t // check additionally if field is currently marked as invalid\n\t // so the label is not marked as error if no field is marked as one\n\t group = group ? group : isInvalid;\n\t thisLabelGroup[additionalLabels] = group;\n\t }\n\t }\n\t\n\t // We save all validations in an extra property because we need to reset the validity due some\n\t // implementation errors in other browsers then chrome\n\t for (var i = 0; i < fields.length; i++) {\n\t var field = fields[i],\n\t errorTarget = Form._findErrorTarget(field),\n\t parent = errorTarget.parentNode,\n\t validity = field.validity,\n\t isInvalid = validity && !validity.valid;\n\t if (Form._shouldNotValidateField(field)) {\n\t continue;\n\t }\n\t field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n\t handleAdditionalLabels(isInvalid, labelGroups, field);\n\t if (isInvalid) {\n\t if (!removeAllErrors) {\n\t // Remove current errors:\n\t this._removeElementErrors(parent);\n\t }\n\t // setup custom error messages:\n\t this._setupErrorMessages(field, validity);\n\t var msg = field.validationMessage;\n\t\n\t // mark fields as invalid\n\t this._markElementInvalid(errorTarget);\n\t this._markElementInvalid(field);\n\t\n\t if (this.options.appendError) {\n\t parent.insertAdjacentHTML(\"beforeend\", '
' + msg + '
');\n\t }\n\t invalidFields.push(field);\n\t field.flexFormsSavedValidationMessage = msg;\n\t } else {\n\t // restore invalid fields\n\t this._markElementValid(errorTarget);\n\t this._markElementValid(field);\n\t\n\t // cleanup\n\t delete field.flexFormsSavedValidationMessage;\n\t\n\t // remove error markup\n\t this._removeElementErrors(parent);\n\t }\n\t // We have to reset the custom validity here to allow native validations work again\n\t field.setCustomValidity('');\n\t }\n\t // if validates a single field we need to check the linked fields to a label:\n\t if (fields.length === 1) {\n\t var _field = fields[0];\n\t var id = _field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || _field.id;\n\t if (id) {\n\t var linkedFields = Array.from(this.getForm().querySelectorAll('[' + ATTR_DATA_CUSTOM_LABEL + '=\"' + id + '\"], #' + id));\n\t linkedFields.forEach(function (thisField) {\n\t var validity = thisField.validity,\n\t isInvalid = validity && !validity.valid && this._isElementInvalidElement(thisField);\n\t handleAdditionalLabels(isInvalid, labelGroups, thisField);\n\t }.bind(this));\n\t }\n\t }\n\t this._handleLabels(labelGroups);\n\t return invalidFields;\n\t }\n\t\n\t /**\n\t * Validates all custom fields\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'validateCustomFields',\n\t value: function validateCustomFields() {\n\t return this._customValidationsForElements(this.form.querySelectorAll(\"[data-validate]\"));\n\t }\n\t\n\t /**\n\t * Tests if a field should be validated\n\t * @param {HTMLElement} field\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'getForm',\n\t\n\t\n\t /**\n\t * This form\n\t * @returns {HTMLElement}\n\t */\n\t value: function getForm() {\n\t return this.form;\n\t }\n\t\n\t /**\n\t * Registers a function that handles remote validation\n\t * @param {Function} func\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerRemoteValidation',\n\t value: function registerRemoteValidation(func) {\n\t this._remoteValidationFunction = func;\n\t return this;\n\t }\n\t\n\t /**\n\t * Formats the error content for the tooltip\n\t * @param {String} error\n\t * @returns {String}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_formatErrorTooltip',\n\t value: function _formatErrorTooltip(error) {\n\t return this.options.formatErrorTooltip.apply(this, [error]);\n\t }\n\t\n\t /**\n\t * Tries to find a custom error target on given target\n\t * @param target\n\t * @returns {HTMLElement}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'showAndOrCreateTooltip',\n\t\n\t\n\t /**\n\t * Creates a tooltip at given element, will only create a new instance if not created\n\t * @param {HTMLElement} target\n\t * @param {Boolean} [remove]\n\t */\n\t value: function showAndOrCreateTooltip(target, remove) {\n\t var self = this;\n\t if (!this.tooltips && this.options.createTooltips) {\n\t this.tooltips = new _Tooltip2.default(this.options.tooltipContainer, this.options.tooltipOptions);\n\t }\n\t if (!this.options.createTooltips) {\n\t return false;\n\t }\n\t\n\t if (!target.flexFormsSavedValidity) {\n\t return false;\n\t }\n\t var errorTarget = Form._findErrorTarget(target);\n\t if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n\t self.tooltips.createTooltip(errorTarget, self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n\t return true;\n\t } else {\n\t if (remove) {\n\t self.tooltips.removeTooltip();\n\t }\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Checks if element is marked as invalid\n\t * @param {HTMLElement} el\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_isElementInvalidElement',\n\t value: function _isElementInvalidElement(el) {\n\t return el.hasAttribute(DATA_ELEMENT_INVALID);\n\t }\n\t\n\t /**\n\t * Handles invalid event of a form\n\t * @param {Event} e\n\t * @returns {Promise|boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_checkIsInvalid',\n\t value: function _checkIsInvalid(e) {\n\t e.preventDefault();\n\t var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n\t return this._handleValidation(invalidFields, true, false);\n\t }\n\t\n\t /**\n\t * Will query dependent fields (by selector) that should be validated with given field\n\t * @param field\n\t * @returns {NodeList|[]}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_getDependentFields',\n\t value: function _getDependentFields(field) {\n\t var fieldSelector = field.getAttribute(ATTR_DEPENDS),\n\t base = [field];\n\t if (fieldSelector) {\n\t base.push.apply(base, Array.prototype.slice.apply(this.getForm().querySelectorAll(fieldSelector)));\n\t }\n\t return base;\n\t }\n\t\n\t /**\n\t * @private\n\t * @param {HTMLElement} [target]\n\t */\n\t\n\t }, {\n\t key: '_handleTooltipInline',\n\t value: function _handleTooltipInline(target) {\n\t if (this.tooltips) {\n\t this.tooltips.removeTooltip(target);\n\t }\n\t }\n\t\n\t /**\n\t * Initializes validation for a given form, registers event handlers\n\t */\n\t\n\t }, {\n\t key: 'initFormValidation',\n\t value: function initFormValidation() {\n\t var _this3 = this;\n\t\n\t // Suppress the default bubbles\n\t var form = this.getForm(),\n\t self = this,\n\t invalidEvent = 'invalid';\n\t\n\t /**\n\t * Validates if is valid realtime element\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidRealtimeElement(target) {\n\t return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n\t }\n\t\n\t form.addEventListener(invalidEvent, function (e) {\n\t e.preventDefault();\n\t }, true);\n\t\n\t _Util2.default.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n\t self._formLoading();\n\t var result = self._checkIsInvalid(e);\n\t if (result) {\n\t self.currentValidationFuture = new Promise(function (resolve) {\n\t result.then(function (r) {\n\t setTimeout(function () {\n\t _Util2.default.addEventOnce(invalidEvent, form, handleInvalid, true);\n\t }, 0);\n\t resolve(r);\n\t self._formStopLoading();\n\t if (!r.foundAnyError) {\n\t self._formLoading();\n\t self._handleSubmit(e);\n\t }\n\t });\n\t });\n\t }\n\t }, true);\n\t\n\t this.addEventListener(form, 'reset', function () {\n\t _this3.removeErrors();\n\t });\n\t\n\t // Timeout for keys:\n\t var TIMEOUT_KEYDOWN,\n\t KEYDOWN_RUNNING = false;\n\t\n\t // resets keydown events\n\t function clearKeyDownTimeout() {\n\t KEYDOWN_RUNNING = false;\n\t clearTimeout(TIMEOUT_KEYDOWN);\n\t }\n\t\n\t // setup custom realtime event if given\n\t if (self.options.realtime) {\n\t this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n\t if (self._formIsLoading()) {\n\t return;\n\t }\n\t var target = e.target;\n\t clearTimeout(TIMEOUT_KEYDOWN);\n\t if (KEYDOWN_RUNNING) {\n\t return;\n\t }\n\t TIMEOUT_KEYDOWN = setTimeout(function () {\n\t var isStillTarget = document.activeElement === e.target;\n\t if (!_checkIsValidRealtimeElement(target)) {\n\t return;\n\t }\n\t if (isStillTarget) {\n\t self._handleTooltipInline();\n\t }\n\t KEYDOWN_RUNNING = true;\n\t var dependentFields = self._getDependentFields(target);\n\t self._customValidationsForElements(dependentFields).then(function () {\n\t self.prepareErrors(dependentFields, false);\n\t if (isStillTarget) {\n\t self.showAndOrCreateTooltip(e.target);\n\t }\n\t // future must be resolved before another event can be started\n\t KEYDOWN_RUNNING = false;\n\t });\n\t }, self.options.realtimeTimeout);\n\t }, true);\n\t }\n\t\n\t /**\n\t * Validates if target is a valid input field to check blur and focus events\n\t *\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidBlurFocusElement(target) {\n\t var attr = target.getAttribute(\"type\");\n\t return attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\";\n\t }\n\t\n\t /**\n\t * Validates if is valid inline-check element\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidInlineCheckElement(target) {\n\t return !target.hasAttribute(ATTR_DISABLE_INLINE);\n\t }\n\t\n\t this.addEventListener(form, 'blur', function (e) {\n\t // do not hide tooltip after change event\n\t if (!e.target.flexcssKeepTooltips) {\n\t self._handleTooltipInline(e.target);\n\t }\n\t delete e.target.flexcssKeepTooltips;\n\t }, true);\n\t\n\t // handle focus on input elements\n\t // will show an error if field is invalid\n\t this.addEventListener(form, \"focus\", function (e) {\n\t if (self._formIsLoading()) {\n\t return;\n\t }\n\t // do not track errors for checkbox and radios on focus:\n\t if (!_checkIsValidBlurFocusElement(e.target)) {\n\t return;\n\t }\n\t // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n\t // just have been hidden (on blur). Maybe fix this with a queue later\n\t setTimeout(function () {\n\t self.showAndOrCreateTooltip(e.target);\n\t }, FOCUS_TOOLTIP_DELAY);\n\t }, true);\n\t\n\t if (self.options.inlineValidation) {\n\t // Handle change for checkbox, radios and selects\n\t this.addEventListener(form, \"change\", function (e) {\n\t var target = e.target;\n\t if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n\t return;\n\t }\n\t clearKeyDownTimeout();\n\t var name = target.getAttribute('name');\n\t var inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n\t // we only support dependent fields for a single widgets right now\n\t if (inputs.length === 1) {\n\t inputs = self._getDependentFields(target);\n\t }\n\t self._customValidationsForElements(inputs).then(function () {\n\t self.prepareErrors(inputs, false);\n\t target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n\t if (target.flexcssKeepTooltips) {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t });\n\t });\n\t }\n\t\n\t // prevent default if form is invalid\n\t this.addEventListener(form, \"submit\", function listener(e) {\n\t self._submitListener(e, listener);\n\t });\n\t\n\t _Event2.default.dispatchAndFire(form, EVENT_FORM_READY);\n\t }\n\t\n\t /* Loading states, unfortunately we can't check if a promise is pending :/*/\n\t /* TODO: Maybe wrap promise to extend this functionality */\n\t\n\t }, {\n\t key: '_formLoading',\n\t value: function _formLoading() {\n\t this.getForm().classList.add(LOADING_CLASS);\n\t }\n\t }, {\n\t key: '_formStopLoading',\n\t value: function _formStopLoading() {\n\t this.getForm().classList.remove(LOADING_CLASS);\n\t }\n\t }, {\n\t key: '_formIsLoading',\n\t value: function _formIsLoading() {\n\t return this.getForm().classList.contains(LOADING_CLASS);\n\t }\n\t\n\t // this defines the logic after a change event when a tooltip is shown\n\t // because we call this method inside the change event, the click would be immeditally executed with the change\n\t // event when not using setTimeout(). There might be another solution for this...\n\t\n\t }, {\n\t key: '_handleTooltipHideClickAfterChange',\n\t value: function _handleTooltipHideClickAfterChange() {\n\t var self = this;\n\t if (this.options.createTooltips) {\n\t setTimeout(function () {\n\t _Util2.default.addEventOnce(_Settings2.default.getTabEvent(), global.document.body, function (t) {\n\t if (!self._isElementInvalidElement(t.target)) {\n\t self._handleTooltipInline();\n\t }\n\t });\n\t }, CLICK_TOOLTIP_DELAY);\n\t }\n\t }\n\t }, {\n\t key: '_focusElement',\n\t value: function _focusElement(el) {\n\t el.focus();\n\t _Util2.default.scrollToElement(el, this.options.scrollToElementDiff);\n\t }\n\t\n\t /**\n\t * Listener that is executed on form submit\n\t * @param e\n\t * @param submitListener\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_submitListener',\n\t value: function _submitListener(e, submitListener) {\n\t\n\t var form = this.getForm(),\n\t self = this,\n\t submitEvent = 'submit';\n\t\n\t if (this._formIsLoading()) {\n\t e.preventDefault();\n\t return false;\n\t }\n\t this._formLoading();\n\t form.removeEventListener(submitEvent, submitListener);\n\t this.removeErrors();\n\t e.preventDefault();\n\t // reset:\n\t if (form.checkValidity()) {\n\t form.addEventListener(submitEvent, submitListener);\n\t // It's possible that the form is valid but the custom validations need to be checked again:\n\t self.currentValidationFuture = new Promise(function (resolve) {\n\t var validation = self.validateCustomFields();\n\t validation.then(function (r) {\n\t // because custom validators may mark multiple fields as invalid, we get all of them in the form\n\t var fields = self._getInvalidElements(),\n\t errors = self.prepareErrors(fields, false),\n\t firstError = errors[0];\n\t if (firstError) {\n\t self._focusElement(firstError);\n\t self.showAndOrCreateTooltip(firstError, true);\n\t }\n\t resolve(r);\n\t });\n\t });\n\t self.currentValidationFuture.then(function (r) {\n\t if (!r.foundAnyError) {\n\t // Handle submitting the form to server:\n\t self._handleSubmit(e);\n\t } else {\n\t self._formStopLoading();\n\t }\n\t });\n\t } else {\n\t self._formStopLoading();\n\t form.addEventListener(submitEvent, submitListener);\n\t }\n\t }\n\t\n\t /**\n\t * Handles submitting, optionally allows to stop submitting\n\t * @param e\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleSubmit',\n\t value: function _handleSubmit(e) {\n\t this._submitFunction(this.form, e);\n\t }\n\t\n\t /**\n\t * Registers a global event Handler\n\t * @param errorFunc\n\t */\n\t\n\t }], [{\n\t key: '_shouldNotValidateField',\n\t value: function _shouldNotValidateField(field) {\n\t var target = Form._findErrorTarget(field);\n\t return target instanceof HTMLFieldSetElement || field.validity === undefined || target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !_Util2.default.isVisible(target);\n\t }\n\t\n\t /**\n\t * Creates an array from a node list with invalid items\n\t * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n\t * @param list\n\t * @returns {Array}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_createArrayFromInvalidFieldList',\n\t value: function _createArrayFromInvalidFieldList(list) {\n\t var arr = [];\n\t for (var i = 0; i < list.length; ++i) {\n\t var n = list[i];\n\t if (n.validity && !n.validity.valid) {\n\t if (!Form._shouldNotValidateField(n)) {\n\t arr.push(n);\n\t }\n\t }\n\t }\n\t return arr;\n\t }\n\t }, {\n\t key: '_findErrorTarget',\n\t value: function _findErrorTarget(target) {\n\t var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n\t foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n\t if (!foundTarget) {\n\t throw 'Given error target did not exsits:' + target;\n\t }\n\t return foundTarget;\n\t }\n\t }, {\n\t key: 'registerErrorMessageHandler',\n\t value: function registerErrorMessageHandler(errorFunc) {\n\t Form.globalErrorMessageHandler = errorFunc;\n\t }\n\t\n\t /**\n\t * Initialize forms for a specific selector\n\t * @param {String} selector\n\t * @param {Object} [options]\n\t * @return {array.}\n\t */\n\t\n\t }, {\n\t key: 'init',\n\t value: function init(selector, options) {\n\t var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') : document.querySelectorAll(selector),\n\t instances = [];\n\t for (var i = 0; i < forms.length; i++) {\n\t instances.push(new Form(forms[i], options));\n\t }\n\t return instances;\n\t }\n\t\n\t /**\n\t * Registers a global validator that is usable on all form instances\n\t * @param {String} name\n\t * @param {Function} validator\n\t * @returns {Function}\n\t */\n\t\n\t }, {\n\t key: 'registerValidator',\n\t value: function registerValidator(name, validator) {\n\t Form.globalValidators[name] = validator;\n\t return Form;\n\t }\n\t\n\t /**\n\t * Registers a global function that is called when a form should validate the response of a server\n\t * @param {Function} func\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerGlobalRemoteValidationFunction',\n\t value: function registerGlobalRemoteValidationFunction(func) {\n\t Form.globalRemoteValidationFunction = func;\n\t return Form;\n\t }\n\t }]);\n\t\n\t return Form;\n\t}(_DestroyableWidget3.default);\n\t\n\t/**\n\t * Global validators\n\t * @type {Array}\n\t */\n\t\n\t\n\tForm.globalValidators = [];\n\t\n\t/**\n\t * Global Remote validation function\n\t */\n\tForm.globalRemoteValidationFunction = function () {};\n\t\n\t/**\n\t * Handles custom error messages extracts custom message by default\n\t */\n\tForm.globalErrorMessageHandler = function (field, validity) {\n\t if (!validity.customError) {\n\t var customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n\t if (customMsg) {\n\t field.setCustomValidity(customMsg);\n\t }\n\t }\n\t};\n\t\n\texports.default = Form;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 10 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (fn, ms) {\n\t return function () {\n\t clearTimeout(fn.timeout);\n\t fn.timeout = setTimeout(fn, ms);\n\t };\n\t};\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// the whatwg-fetch polyfill installs the fetch() function\n\t// on the global object (window or self)\n\t//\n\t// Return that as the export for use in Webpack, Browserify etc.\n\t__webpack_require__(12);\n\tmodule.exports = self.fetch.bind(self);\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports) {\n\n\t(function(self) {\n\t 'use strict';\n\t\n\t if (self.fetch) {\n\t return\n\t }\n\t\n\t function normalizeName(name) {\n\t if (typeof name !== 'string') {\n\t name = String(name)\n\t }\n\t if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n\t throw new TypeError('Invalid character in header field name')\n\t }\n\t return name.toLowerCase()\n\t }\n\t\n\t function normalizeValue(value) {\n\t if (typeof value !== 'string') {\n\t value = String(value)\n\t }\n\t return value\n\t }\n\t\n\t function Headers(headers) {\n\t this.map = {}\n\t\n\t if (headers instanceof Headers) {\n\t headers.forEach(function(value, name) {\n\t this.append(name, value)\n\t }, this)\n\t\n\t } else if (headers) {\n\t Object.getOwnPropertyNames(headers).forEach(function(name) {\n\t this.append(name, headers[name])\n\t }, this)\n\t }\n\t }\n\t\n\t Headers.prototype.append = function(name, value) {\n\t name = normalizeName(name)\n\t value = normalizeValue(value)\n\t var list = this.map[name]\n\t if (!list) {\n\t list = []\n\t this.map[name] = list\n\t }\n\t list.push(value)\n\t }\n\t\n\t Headers.prototype['delete'] = function(name) {\n\t delete this.map[normalizeName(name)]\n\t }\n\t\n\t Headers.prototype.get = function(name) {\n\t var values = this.map[normalizeName(name)]\n\t return values ? values[0] : null\n\t }\n\t\n\t Headers.prototype.getAll = function(name) {\n\t return this.map[normalizeName(name)] || []\n\t }\n\t\n\t Headers.prototype.has = function(name) {\n\t return this.map.hasOwnProperty(normalizeName(name))\n\t }\n\t\n\t Headers.prototype.set = function(name, value) {\n\t this.map[normalizeName(name)] = [normalizeValue(value)]\n\t }\n\t\n\t Headers.prototype.forEach = function(callback, thisArg) {\n\t Object.getOwnPropertyNames(this.map).forEach(function(name) {\n\t this.map[name].forEach(function(value) {\n\t callback.call(thisArg, value, name, this)\n\t }, this)\n\t }, this)\n\t }\n\t\n\t function consumed(body) {\n\t if (body.bodyUsed) {\n\t return Promise.reject(new TypeError('Already read'))\n\t }\n\t body.bodyUsed = true\n\t }\n\t\n\t function fileReaderReady(reader) {\n\t return new Promise(function(resolve, reject) {\n\t reader.onload = function() {\n\t resolve(reader.result)\n\t }\n\t reader.onerror = function() {\n\t reject(reader.error)\n\t }\n\t })\n\t }\n\t\n\t function readBlobAsArrayBuffer(blob) {\n\t var reader = new FileReader()\n\t reader.readAsArrayBuffer(blob)\n\t return fileReaderReady(reader)\n\t }\n\t\n\t function readBlobAsText(blob) {\n\t var reader = new FileReader()\n\t reader.readAsText(blob)\n\t return fileReaderReady(reader)\n\t }\n\t\n\t var support = {\n\t blob: 'FileReader' in self && 'Blob' in self && (function() {\n\t try {\n\t new Blob();\n\t return true\n\t } catch(e) {\n\t return false\n\t }\n\t })(),\n\t formData: 'FormData' in self,\n\t arrayBuffer: 'ArrayBuffer' in self\n\t }\n\t\n\t function Body() {\n\t this.bodyUsed = false\n\t\n\t\n\t this._initBody = function(body) {\n\t this._bodyInit = body\n\t if (typeof body === 'string') {\n\t this._bodyText = body\n\t } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n\t this._bodyBlob = body\n\t } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n\t this._bodyFormData = body\n\t } else if (!body) {\n\t this._bodyText = ''\n\t } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n\t // Only support ArrayBuffers for POST method.\n\t // Receiving ArrayBuffers happens via Blobs, instead.\n\t } else {\n\t throw new Error('unsupported BodyInit type')\n\t }\n\t\n\t if (!this.headers.get('content-type')) {\n\t if (typeof body === 'string') {\n\t this.headers.set('content-type', 'text/plain;charset=UTF-8')\n\t } else if (this._bodyBlob && this._bodyBlob.type) {\n\t this.headers.set('content-type', this._bodyBlob.type)\n\t }\n\t }\n\t }\n\t\n\t if (support.blob) {\n\t this.blob = function() {\n\t var rejected = consumed(this)\n\t if (rejected) {\n\t return rejected\n\t }\n\t\n\t if (this._bodyBlob) {\n\t return Promise.resolve(this._bodyBlob)\n\t } else if (this._bodyFormData) {\n\t throw new Error('could not read FormData body as blob')\n\t } else {\n\t return Promise.resolve(new Blob([this._bodyText]))\n\t }\n\t }\n\t\n\t this.arrayBuffer = function() {\n\t return this.blob().then(readBlobAsArrayBuffer)\n\t }\n\t\n\t this.text = function() {\n\t var rejected = consumed(this)\n\t if (rejected) {\n\t return rejected\n\t }\n\t\n\t if (this._bodyBlob) {\n\t return readBlobAsText(this._bodyBlob)\n\t } else if (this._bodyFormData) {\n\t throw new Error('could not read FormData body as text')\n\t } else {\n\t return Promise.resolve(this._bodyText)\n\t }\n\t }\n\t } else {\n\t this.text = function() {\n\t var rejected = consumed(this)\n\t return rejected ? rejected : Promise.resolve(this._bodyText)\n\t }\n\t }\n\t\n\t if (support.formData) {\n\t this.formData = function() {\n\t return this.text().then(decode)\n\t }\n\t }\n\t\n\t this.json = function() {\n\t return this.text().then(JSON.parse)\n\t }\n\t\n\t return this\n\t }\n\t\n\t // HTTP methods whose capitalization should be normalized\n\t var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\t\n\t function normalizeMethod(method) {\n\t var upcased = method.toUpperCase()\n\t return (methods.indexOf(upcased) > -1) ? upcased : method\n\t }\n\t\n\t function Request(input, options) {\n\t options = options || {}\n\t var body = options.body\n\t if (Request.prototype.isPrototypeOf(input)) {\n\t if (input.bodyUsed) {\n\t throw new TypeError('Already read')\n\t }\n\t this.url = input.url\n\t this.credentials = input.credentials\n\t if (!options.headers) {\n\t this.headers = new Headers(input.headers)\n\t }\n\t this.method = input.method\n\t this.mode = input.mode\n\t if (!body) {\n\t body = input._bodyInit\n\t input.bodyUsed = true\n\t }\n\t } else {\n\t this.url = input\n\t }\n\t\n\t this.credentials = options.credentials || this.credentials || 'omit'\n\t if (options.headers || !this.headers) {\n\t this.headers = new Headers(options.headers)\n\t }\n\t this.method = normalizeMethod(options.method || this.method || 'GET')\n\t this.mode = options.mode || this.mode || null\n\t this.referrer = null\n\t\n\t if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n\t throw new TypeError('Body not allowed for GET or HEAD requests')\n\t }\n\t this._initBody(body)\n\t }\n\t\n\t Request.prototype.clone = function() {\n\t return new Request(this)\n\t }\n\t\n\t function decode(body) {\n\t var form = new FormData()\n\t body.trim().split('&').forEach(function(bytes) {\n\t if (bytes) {\n\t var split = bytes.split('=')\n\t var name = split.shift().replace(/\\+/g, ' ')\n\t var value = split.join('=').replace(/\\+/g, ' ')\n\t form.append(decodeURIComponent(name), decodeURIComponent(value))\n\t }\n\t })\n\t return form\n\t }\n\t\n\t function headers(xhr) {\n\t var head = new Headers()\n\t var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n\t pairs.forEach(function(header) {\n\t var split = header.trim().split(':')\n\t var key = split.shift().trim()\n\t var value = split.join(':').trim()\n\t head.append(key, value)\n\t })\n\t return head\n\t }\n\t\n\t Body.call(Request.prototype)\n\t\n\t function Response(bodyInit, options) {\n\t if (!options) {\n\t options = {}\n\t }\n\t\n\t this.type = 'default'\n\t this.status = options.status\n\t this.ok = this.status >= 200 && this.status < 300\n\t this.statusText = options.statusText\n\t this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n\t this.url = options.url || ''\n\t this._initBody(bodyInit)\n\t }\n\t\n\t Body.call(Response.prototype)\n\t\n\t Response.prototype.clone = function() {\n\t return new Response(this._bodyInit, {\n\t status: this.status,\n\t statusText: this.statusText,\n\t headers: new Headers(this.headers),\n\t url: this.url\n\t })\n\t }\n\t\n\t Response.error = function() {\n\t var response = new Response(null, {status: 0, statusText: ''})\n\t response.type = 'error'\n\t return response\n\t }\n\t\n\t var redirectStatuses = [301, 302, 303, 307, 308]\n\t\n\t Response.redirect = function(url, status) {\n\t if (redirectStatuses.indexOf(status) === -1) {\n\t throw new RangeError('Invalid status code')\n\t }\n\t\n\t return new Response(null, {status: status, headers: {location: url}})\n\t }\n\t\n\t self.Headers = Headers;\n\t self.Request = Request;\n\t self.Response = Response;\n\t\n\t self.fetch = function(input, init) {\n\t return new Promise(function(resolve, reject) {\n\t var request\n\t if (Request.prototype.isPrototypeOf(input) && !init) {\n\t request = input\n\t } else {\n\t request = new Request(input, init)\n\t }\n\t\n\t var xhr = new XMLHttpRequest()\n\t\n\t function responseURL() {\n\t if ('responseURL' in xhr) {\n\t return xhr.responseURL\n\t }\n\t\n\t // Avoid security warnings on getResponseHeader when not allowed by CORS\n\t if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n\t return xhr.getResponseHeader('X-Request-URL')\n\t }\n\t\n\t return;\n\t }\n\t\n\t xhr.onload = function() {\n\t var status = (xhr.status === 1223) ? 204 : xhr.status\n\t if (status < 100 || status > 599) {\n\t reject(new TypeError('Network request failed'))\n\t return\n\t }\n\t var options = {\n\t status: status,\n\t statusText: xhr.statusText,\n\t headers: headers(xhr),\n\t url: responseURL()\n\t }\n\t var body = 'response' in xhr ? xhr.response : xhr.responseText;\n\t resolve(new Response(body, options))\n\t }\n\t\n\t xhr.onerror = function() {\n\t reject(new TypeError('Network request failed'))\n\t }\n\t\n\t xhr.open(request.method, request.url, true)\n\t\n\t if (request.credentials === 'include') {\n\t xhr.withCredentials = true\n\t }\n\t\n\t if ('responseType' in xhr && support.blob) {\n\t xhr.responseType = 'blob'\n\t }\n\t\n\t request.headers.forEach(function(value, name) {\n\t xhr.setRequestHeader(name, value)\n\t })\n\t\n\t xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n\t })\n\t }\n\t self.fetch.polyfill = true\n\t})(typeof self !== 'undefined' ? self : this);\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_DROPDOWN_CLOSED = undefined;\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Dropdown\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tvar _FixedWindow = __webpack_require__(7);\n\t\n\tvar _FixedWindow2 = _interopRequireDefault(_FixedWindow);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_CC = 'data-collision-container';\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DARKENER = 'data-darkener-container';\n\t/**\n\t * @type {string}\n\t */\n\tvar DARKENER_INIT = 'init';\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DATA_TARGET = 'data-target';\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_CLOSE_DROPDOWN = 'data-close-dropdown';\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_NAME = 'data-dropdown';\n\t/**\n\t * @type {string}\n\t */\n\tvar STATE_LOADING = 'loading';\n\t\n\tvar CLS_DARKENER_DROPDOWN = 'darkener-dropdown';\n\t/**\n\t * @type {string}\n\t */\n\tvar CLS_OPEN = 'open';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar CLS_DROPDOWN = 'dropdown';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar EVENT_DROPDOWN_CLOSED = exports.EVENT_DROPDOWN_CLOSED = 'flexcss.dropdown.closed';\n\t\n\t/**\n\t * A Dropdown\n\t */\n\t\n\tvar Dropdown = function () {\n\t function Dropdown(DelegateContainer, Darkener) {\n\t _classCallCheck(this, Dropdown);\n\t\n\t var doc = global.document;\n\t\n\t /**\n\t * Container Element\n\t * @type {HTMLElement}\n\t */\n\t this.container = DelegateContainer instanceof HTMLElement ? DelegateContainer : doc.getElementById(DelegateContainer);\n\t\n\t this.currentOpen = null;\n\t this.currentTarget = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this.darkener = Darkener instanceof HTMLElement ? Darkener : document.getElementById(Darkener);\n\t\n\t this.destroyOnClose = false;\n\t\n\t if (!this.darkener || !this.container) {\n\t throw new Error('required elements not found (darkener and container element)');\n\t }\n\t }\n\t\n\t /**\n\t * Method that handles delegation events for dropdowns\n\t * @param e\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t\n\t _createClass(Dropdown, [{\n\t key: '_delegateFunction',\n\t value: function _delegateFunction(e) {\n\t var currentOpen = this.currentOpen;\n\t var target = _Util2.default.closestCallback(e.target, function (n) {\n\t return n instanceof HTMLElement && n.hasAttribute(ATTR_NAME);\n\t });\n\t var targetIsCurrent = target === this.currentTarget;\n\t\n\t if (currentOpen && !_Util2.default.isPartOfNode(e.target, currentOpen) || targetIsCurrent) {\n\t this.close();\n\t if (targetIsCurrent) {\n\t e.preventDefault();\n\t }\n\t return targetIsCurrent ? false : this._delegateFunction(e);\n\t }\n\t\n\t if (target && !currentOpen) {\n\t e.preventDefault();\n\t e.stopImmediatePropagation();\n\t\n\t if (target.isLoading) {\n\t return false;\n\t }\n\t this.createDropdown(target);\n\t } else {\n\t if (currentOpen) {\n\t if (e.target.hasAttribute(ATTR_CLOSE_DROPDOWN)) {\n\t e.preventDefault();\n\t this.close();\n\t }\n\t if (!_Util2.default.isPartOfNode(e.target, currentOpen)) {\n\t this.close();\n\t }\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Register Events for this dropdown container\n\t * @returns {Dropdown}\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents() {\n\t _FixedWindow2.default.getInstance().addScreenConstraint(Dropdown, function (width) {\n\t return width < _Settings2.default.get().smallBreakpoint;\n\t });\n\t this.container.addEventListener(_Settings2.default.getTabEvent(), this._delegateFunction.bind(this), true);\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroys this instance, unbinds events\n\t * @returns {Dropdown}\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t this.container.removeEventListener(_Settings2.default.getTabEvent(), this._delegateFunction.bind(this), true);\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroys instance on close of dropdown\n\t * @param v\n\t * @returns {Dropdown}\n\t */\n\t\n\t }, {\n\t key: 'setDestroyOnClose',\n\t value: function setDestroyOnClose(v) {\n\t this.destroyOnClose = v;\n\t return this;\n\t }\n\t\n\t /**\n\t * Will add the right class to container for specific darkener id\n\t * @param instance\n\t * @param show\n\t */\n\t\n\t }, {\n\t key: 'toggleDarkenerToggler',\n\t value: function toggleDarkenerToggler(instance, show) {\n\t var cls = 'toggle-' + (instance.id || CLS_DARKENER_DROPDOWN);\n\t var classList = this.container.classList;\n\t if (show) {\n\t classList.add(cls);\n\t } else {\n\t classList.remove(cls);\n\t }\n\t }\n\t\n\t /**\n\t * Closes Dropdown on current instance\n\t * @return {Boolean|Promise}\n\t */\n\t\n\t }, {\n\t key: 'close',\n\t value: function close() {\n\t var _this2 = this;\n\t\n\t var currentOpen = this.currentOpen;\n\t if (!currentOpen) {\n\t return false;\n\t }\n\t var darkenerInstance = currentOpen.flexDarkenerInstance || this.darkener;\n\t var thisCurrentOpen = currentOpen;\n\t\n\t var future = new Promise(function (resolve) {\n\t if (window.getComputedStyle(currentOpen).position === 'fixed') {\n\t _Util2.default.addEventOnce(_Settings2.default.getTransitionEvent(), currentOpen, function scheduler(e) {\n\t var _this = this;\n\t\n\t if (e.srcElement !== currentOpen) {\n\t return _Util2.default.addEventOnce(_Settings2.default.getTransitionEvent(), currentOpen, scheduler.bind(this));\n\t }\n\t requestAnimationFrame(function () {\n\t _Event2.default.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n\t // if a new dropdown has been opened in the meantime, do not remove darkener\n\t if (_this.currentOpen !== null) {\n\t return false;\n\t }\n\t _this.toggleDarkenerToggler(darkenerInstance, false);\n\t resolve(true);\n\t });\n\t }.bind(_this2));\n\t } else {\n\t resolve(true);\n\t _Event2.default.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n\t }\n\t });\n\t\n\t _FixedWindow2.default.getInstance().close();\n\t currentOpen.classList.remove(CLS_OPEN);\n\t\n\t if (currentOpen.flexDarkenerInstance) {\n\t currentOpen.flexDarkenerInstance.classList.remove(DARKENER_INIT);\n\t } else {\n\t this.darkener.classList.remove(DARKENER_INIT);\n\t }\n\t\n\t this.currentOpen = null;\n\t this.currentTarget = null;\n\t\n\t if (this.destroyOnClose) {\n\t this.destroy();\n\t }\n\t\n\t return future;\n\t }\n\t\n\t /**\n\t * Creates a dropdown on given target and opens it\n\t * @param {HTMLElement} target target where this dropdown is placed\n\t * @param {FlexCss.Widget} [thisWidget] if given will use widget instead of widget instance\n\t * @return {FlexCss.Dropdown}\n\t */\n\t\n\t }, {\n\t key: 'createDropdown',\n\t value: function createDropdown(target, thisWidget) {\n\t var _this3 = this;\n\t\n\t var doc = global.document;\n\t\n\t if (!target) {\n\t throw new Error('Dropdown target not found');\n\t }\n\t\n\t var widget = thisWidget || _Widget2.default.findWidget(target);\n\t var future = void 0;\n\t var data = target.getAttribute(ATTR_NAME);\n\t var dropdownContainerElement = doc.getElementById(data);\n\t var async = !dropdownContainerElement && _Widget2.default.isWidget(widget) ? widget.getAsync() : false;\n\t\n\t if (async) {\n\t target.classList.add(STATE_LOADING);\n\t target.isLoading = true;\n\t future = async.then(function (r) {\n\t if (r instanceof HTMLElement) {\n\t if (r.id) {\n\t target.setAttribute(ATTR_NAME, r.id);\n\t }\n\t return r;\n\t }\n\t // Create container Element:\n\t var element = doc.createElement('div');\n\t element.className = CLS_DROPDOWN;\n\t element.innerHTML = r;\n\t element.id = _Util2.default.guid();\n\t // Cache target for later use:\n\t target.setAttribute(ATTR_NAME, element.id);\n\t _this3.container.appendChild(element);\n\t return element;\n\t }).then(function (r) {\n\t target.isLoading = false;\n\t target.classList.remove(STATE_LOADING);\n\t return r;\n\t });\n\t } else {\n\t if (!dropdownContainerElement) {\n\t throw new Error('Could not found Dropdown container with ID \"' + data + '\"');\n\t }\n\t future = new Promise(function (r) {\n\t r(dropdownContainerElement);\n\t });\n\t }\n\t\n\t future.then(function (dropdownContent) {\n\t if (_this3.currentOpen) {\n\t _this3.close();\n\t }\n\t // Skip one frame to show animation\n\t target.dropdownContent = dropdownContent;\n\t var isAbsolute = global.getComputedStyle(dropdownContent).position === 'absolute';\n\t dropdownContent.hfWidgetInstance = _this3;\n\t\n\t if (!target.flexCollisionContainer) {\n\t var collisionC = target.getAttribute(ATTR_CC);\n\t target.flexCollisionContainer = collisionC ? doc.getElementById(collisionC) || document.documentElement : document.documentElement;\n\t }\n\t\n\t dropdownContent.classList.toggle(CLS_OPEN);\n\t if (dropdownContent.classList.contains(CLS_OPEN)) {\n\t _this3.currentOpen = dropdownContent;\n\t _this3.currentTarget = target;\n\t }\n\t _FixedWindow2.default.getInstance().open(_this3, dropdownContent);\n\t if (isAbsolute) {\n\t // Check collision:\n\t var selfTarget = target.getAttribute(ATTR_DATA_TARGET);\n\t selfTarget = selfTarget ? doc.getElementById(selfTarget) : target;\n\t _Util2.default.setupPositionNearby(selfTarget, dropdownContent, target.flexCollisionContainer);\n\t } else {\n\t // optionally get custom darkener container for target\n\t var d = target.getAttribute(ATTR_DARKENER);\n\t if (d) {\n\t dropdownContent.flexDarkenerInstance = doc.getElementById(d);\n\t (dropdownContent.flexDarkenerInstance || _this3.darkener).classList.toggle(DARKENER_INIT);\n\t } else {\n\t _this3.darkener.classList.toggle(DARKENER_INIT);\n\t }\n\t _this3.toggleDarkenerToggler(dropdownContent.flexDarkenerInstance || _this3.darkener, true);\n\t\n\t dropdownContent.style.left = '0';\n\t dropdownContent.style.top = 'auto';\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return Dropdown;\n\t}();\n\t\n\texports.default = Dropdown;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.LightBox\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/* global Image, TouchEvent*/\n\t\n\tvar _Modal = __webpack_require__(8);\n\t\n\tvar _Modal2 = _interopRequireDefault(_Modal);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar ATTR_MAX_WIDTH = 'data-original-width';\n\tvar ATTR_MAX_HEIGHT = 'data-original-height';\n\tvar ATTR_SRC = 'data-src';\n\t\n\tvar CLS_HAS_PREV = 'has-prev';\n\tvar CLS_HAS_NEXT = 'has-next';\n\tvar CLS_LOADING = 'loading';\n\t\n\tvar ATTR_NO_THUMBNAIL = 'data-no-thumbnail';\n\tvar ATTR_DATA_HREF = 'data-href';\n\tvar ATTR_HREF = 'href';\n\t\n\tvar KEY_NEXT = 39;\n\tvar KEY_PREV = 37;\n\tvar ATTR_CLOSE = 'data-close-modal';\n\t/**\n\t * A Simple LightBox\n\t */\n\t\n\tvar LightBox = function () {\n\t\n\t /**\n\t * Creates a new Lightbox\n\t * @param DelegateContainer\n\t * @param AttributeSelector\n\t * @param ModalAppend\n\t * @param [options]\n\t */\n\t\n\t function LightBox(DelegateContainer, AttributeSelector, ModalAppend, options) {\n\t _classCallCheck(this, LightBox);\n\t\n\t var thisDelegateContainer = DelegateContainer instanceof HTMLElement ? DelegateContainer : document.getElementById(DelegateContainer);\n\t\n\t this._modalAppend = ModalAppend || DelegateContainer;\n\t /**\n\t * @type {Function}\n\t */\n\t this._resizeEvent = null;\n\t /**\n\t * @type {Function}\n\t */\n\t this._keyboardNextEvent = null;\n\t /**\n\t * @type {Promise}\n\t */\n\t this._future = null;\n\t /**\n\t * @type {Promise}\n\t */\n\t this._nextFuture = this._future;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._imageContainer = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._modalContainerDiv = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._contentContainer = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._closerContainerDiv = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._delegateContainer = thisDelegateContainer;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._attributeSelector = AttributeSelector;\n\t /**\n\t * @type {Widget}\n\t */\n\t this._widget = null;\n\t /**\n\t * @type {boolean}\n\t */\n\t this._isOpen = false;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this.target = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this.img = null;\n\t /**\n\t * @type {boolean}\n\t */\n\t this._isLoading = false;\n\t\n\t /**\n\t * Default options\n\t */\n\t this.options = {\n\t // set if prev and next should be available\n\t registerPrevNextEvents: true,\n\t // set if modal should be closed after last image\n\t closeOnLast: true,\n\t // called when next image is requested (either by keyboard or click), return false to abort\n\t onNext: function onNext() {\n\t return true;\n\t },\n\t onClose: function onClose() {},\n\t getNext: null,\n\t getPrev: null,\n\t // called when underlying target changed\n\t onSwitchImage: function onSwitchImage() {}\n\t };\n\t\n\t Object.assign(this.options, options);\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} node\n\t * @returns {HTMLElement|null}\n\t */\n\t\n\t\n\t _createClass(LightBox, [{\n\t key: 'findImmediateNextTarget',\n\t value: function findImmediateNextTarget(node) {\n\t if (node && node.children[0].hasAttribute(this._attributeSelector)) {\n\t return node.children[0];\n\t }\n\t return null;\n\t }\n\t\n\t /**\n\t * Will fetch the next element of a lightBox\n\t * @param {HTMLElement} target\n\t * @returns {null|HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getNext',\n\t value: function getNext(target) {\n\t if (this.options.getNext) {\n\t return this.options.getNext.apply(this, [target]);\n\t }\n\t return this.findImmediateNextTarget(target.parentNode.nextElementSibling);\n\t }\n\t\n\t /**\n\t * Will fetch the previous element of a lightBox\n\t * @param {HTMLElement} target\n\t * @returns {null|HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getPrev',\n\t value: function getPrev(target) {\n\t if (this.options.getPrev) {\n\t return this.options.getPrev.apply(this, [target]);\n\t }\n\t return this.findImmediateNextTarget(target.parentNode.previousElementSibling);\n\t }\n\t\n\t /**\n\t * Registers events for delegate container\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents(onOpen) {\n\t var _this = this;\n\t\n\t this._delegateContainer.addEventListener(_Settings2.default.getTabEvent(), function (e) {\n\t var target = e.target;\n\t var parent = target.parentNode;\n\t var validTarget = target.hasAttribute(_this._attributeSelector);\n\t var parentIsValid = parent && parent.hasAttribute(_this._attributeSelector);\n\t\n\t if (!validTarget && parentIsValid) {\n\t validTarget = true;\n\t target = parent;\n\t }\n\t if (validTarget) {\n\t e.preventDefault();\n\t _this.open(target).then(function (r) {\n\t if (onOpen) {\n\t onOpen.apply(_this, [r, target]);\n\t }\n\t });\n\t }\n\t });\n\t }\n\t\n\t /**\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getContentContainer',\n\t value: function getContentContainer() {\n\t return this._contentContainer;\n\t }\n\t\n\t /**\n\t * Setup max-width and max-height\n\t * @param {HTMLElement} target\n\t * @param {HTMLElement} img\n\t * @param {HTMLElement} loadedImage\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'switchImageByDirection',\n\t\n\t\n\t /**\n\t * Switches to the next image\n\t * @param {boolean} direction\n\t */\n\t value: function switchImageByDirection(direction) {\n\t var next = direction ? this.getPrev(this.target) : this.getNext(this.target);\n\t if (this.options.onNext.apply(this, [next])) {\n\t return this.switchImage(next);\n\t }\n\t return new Promise(function (_, reject) {\n\t return reject(next);\n\t });\n\t }\n\t\n\t /**\n\t * Checks if lightbox is currently loading\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isLoading',\n\t value: function isLoading() {\n\t return this._isLoading;\n\t }\n\t\n\t /**\n\t * Checks if modal should be closed\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_runOptionalClose',\n\t value: function _runOptionalClose() {\n\t if (this.options.closeOnLast) {\n\t this.modal.close();\n\t }\n\t }\n\t }, {\n\t key: '_setupPrevNextStates',\n\t value: function _setupPrevNextStates() {\n\t var target = this.target;\n\t var hasPrev = this.getPrev(target);\n\t var hasNext = this.getNext(target);\n\t var hasPrevClass = CLS_HAS_PREV;\n\t var hasNextClass = CLS_HAS_NEXT;\n\t // because IE does not support the second toggle parameter, we need to do this manually\n\t if (hasPrev) {\n\t this._imageContainer.classList.add(hasPrevClass);\n\t } else {\n\t this._imageContainer.classList.remove(hasPrevClass);\n\t }\n\t if (hasNext) {\n\t this._imageContainer.classList.add(hasNextClass);\n\t } else {\n\t this._imageContainer.classList.remove(hasNextClass);\n\t }\n\t }\n\t\n\t /**\n\t * @param img\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_calculateContainer',\n\t value: function _calculateContainer(img) {\n\t var _this2 = this;\n\t\n\t if (_Settings2.default.isIE()) {\n\t setTimeout(function () {\n\t _this2._imageContainer.style.height = img.offsetHeight + 'px';\n\t }, 0);\n\t }\n\t }\n\t\n\t /**\n\t * Switch to a specific image\n\t * @param next\n\t * @returns {*}\n\t */\n\t\n\t }, {\n\t key: 'switchImage',\n\t value: function switchImage(next) {\n\t var _this3 = this;\n\t\n\t var self = this;\n\t var img = this.img;\n\t this._isLoading = true;\n\t self._nextFuture = new Promise(function (resolve, reject) {\n\t // notify observers about image switching\n\t self.options.onSwitchImage.apply(self, [self._nextFuture]);\n\t if (next) {\n\t var _ret = function () {\n\t var nextThumb = next.hasAttribute(ATTR_NO_THUMBNAIL) ? next : next.children[0] || next;\n\t var nextHighRes = next.getAttribute(ATTR_DATA_HREF) || next.getAttribute(ATTR_HREF);\n\t var nextSource = nextThumb.getAttribute(ATTR_SRC) || nextThumb.src || nextHighRes;\n\t var nextImgObject = new Image();\n\t\n\t if (!nextSource) {\n\t reject(next);\n\t return {\n\t v: void 0\n\t };\n\t }\n\t // set new target to next element\n\t _this3.target = next;\n\t nextImgObject.src = nextSource;\n\t self._imageContainer.classList.add(CLS_LOADING);\n\t nextImgObject.addEventListener('load', function () {\n\t img.src = nextSource;\n\t self._imageContainer.style.backgroundImage = 'url(' + nextSource + ')';\n\t LightBox._setupMaxWidthHeight(next, img, nextImgObject);\n\t self._calculateContainer(img);\n\t self.highRes(nextThumb, nextHighRes);\n\t self._setupPrevNextStates();\n\t self._imageContainer.classList.remove(CLS_LOADING);\n\t _this3._isLoading = false;\n\t resolve(nextSource, _this3.target);\n\t });\n\t }();\n\t\n\t if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === \"object\") return _ret.v;\n\t } else {\n\t reject(_this3);\n\t }\n\t });\n\t return self._nextFuture;\n\t }\n\t\n\t /**\n\t * Setup High-Resolution picture\n\t * @param {HTMLElement} thisThumbnail\n\t * @param {String} thisImgHighResolution\n\t */\n\t\n\t }, {\n\t key: 'highRes',\n\t value: function highRes(thisThumbnail, thisImgHighResolution) {\n\t var _this4 = this;\n\t\n\t if (thisImgHighResolution && thisThumbnail.src !== thisImgHighResolution) {\n\t var highImageObj = new Image();\n\t highImageObj.src = thisImgHighResolution;\n\t highImageObj.addEventListener('load', function () {\n\t // if current image is still available\n\t if (_this4._getSrc(thisThumbnail) === _this4.img.src) {\n\t _this4.img.src = thisImgHighResolution;\n\t _this4._imageContainer.style.backgroundImage = 'url(' + thisImgHighResolution + ')';\n\t }\n\t });\n\t }\n\t }\n\t\n\t /**\n\t * Extracts the source of an image\n\t * @param target\n\t * @returns {String|null}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_getSrc',\n\t value: function _getSrc(target) {\n\t return target.getAttribute(ATTR_SRC) || target.src;\n\t }\n\t\n\t /**\n\t * Will show a lightBox on given target\n\t * @param {HTMLElement} target\n\t * @returns {$.Deferred|*}\n\t */\n\t\n\t }, {\n\t key: 'open',\n\t value: function open(target) {\n\t var _this5 = this;\n\t\n\t var self = this;\n\t\n\t if (!target) {\n\t return false;\n\t }\n\t\n\t this.target = target;\n\t\n\t // if lightBox is open, we just switch to the new target image\n\t if (this._isOpen && target) {\n\t return this.switchImage(target).then(function () {\n\t return _this5;\n\t });\n\t }\n\t\n\t this._isOpen = true;\n\t\n\t /**\n\t * Setup Widget for modal\n\t * @type {Widget}\n\t */\n\t this._widget = new _Widget2.default().setAsync(function () {\n\t // thumbnail is either target itself or expected to be first childNode\n\t var thumbnail = target.hasAttribute(ATTR_NO_THUMBNAIL) ? target : target.children[0] || target;\n\t\n\t var imgHighResolution = target.getAttribute(ATTR_DATA_HREF) || target.getAttribute(ATTR_HREF);\n\t var imgSrc = _this5._getSrc(thumbnail) || imgHighResolution;\n\t\n\t var imageObj = new Image();\n\t imageObj.src = imgSrc;\n\t _this5._imageContainer = document.createElement('div');\n\t _this5._modalContainerDiv = document.createElement('div');\n\t _this5._closerContainerDiv = document.createElement('i');\n\t _this5._contentContainer = document.createElement('div');\n\t\n\t _this5._closerContainerDiv.className = 'modal-close modal-close-lightbox icon-cancel-1';\n\t _this5._closerContainerDiv.setAttribute(ATTR_CLOSE, ATTR_CLOSE);\n\t\n\t _this5._modalContainerDiv.className = 'modal image-modal';\n\t _this5._modalContainerDiv.appendChild(_this5._imageContainer);\n\t _this5._modalContainerDiv.appendChild(_this5._contentContainer);\n\t _this5._modalContainerDiv.appendChild(_this5._closerContainerDiv);\n\t _this5._contentContainer.className = 'content-container';\n\t _this5._isLoading = true;\n\t _this5._future = new Promise(function (resolve) {\n\t imageObj.addEventListener('load', function () {\n\t _this5._imageContainer.className = 'image-container';\n\t var img = document.createElement('img');\n\t // current image\n\t _this5.img = img;\n\t\n\t img.src = imgSrc;\n\t LightBox._setupMaxWidthHeight(target, img, imageObj);\n\t _this5._imageContainer.appendChild(img);\n\t _this5._imageContainer.style.backgroundImage = 'url(' + imgSrc + ')';\n\t\n\t resolve(self._modalContainerDiv);\n\t _this5._isLoading = false;\n\t\n\t if (_Settings2.default.isIE()) {\n\t self._resizeEvent = global.addEventListener('resize', function () {\n\t setTimeout(function () {\n\t self._imageContainer.style.height = img.offsetHeight + 'px';\n\t }, 0);\n\t });\n\t }\n\t\n\t if (self.options.registerPrevNextEvents) {\n\t self._setupPrevNextStates();\n\t // prev or next on touch/click\n\t self._imageContainer.addEventListener(_Settings2.default.getTabEvent(), function (e) {\n\t if (self.isLoading()) {\n\t return;\n\t }\n\t e.preventDefault();\n\t\n\t var ev = e;\n\t var pageX = global.TouchEvent && ev instanceof TouchEvent ? ev.changedTouches[0].pageX : ev.pageX;\n\t var rect = self._imageContainer.getBoundingClientRect();\n\t var imgX = rect.left;\n\t var wrapperWidth = rect.width;\n\t var posX = pageX - imgX;\n\t\n\t self.switchImageByDirection(wrapperWidth / 2 > posX).catch(function () {\n\t self._runOptionalClose();\n\t });\n\t });\n\t\n\t // register keyboard events\n\t self._keyboardNextEvent = function (e) {\n\t if (e.keyCode === KEY_NEXT || e.keyCode === KEY_PREV) {\n\t if (self.isLoading()) {\n\t return;\n\t }\n\t self.switchImageByDirection(e.keyCode === KEY_PREV).catch(function () {\n\t self._runOptionalClose();\n\t });\n\t }\n\t };\n\t global.addEventListener('keydown', self._keyboardNextEvent);\n\t } else {\n\t self._imageContainer.addEventListener(_Settings2.default.getTabEvent(), function () {\n\t self._runOptionalClose();\n\t });\n\t }\n\t\n\t self.highRes(thumbnail, imgHighResolution);\n\t });\n\t });\n\t\n\t _this5._future.then(function () {\n\t self._calculateContainer(_this5.img);\n\t });\n\t\n\t self._modalContainerDiv.addEventListener(_Modal.EVENT_MODAL_CLOSED, function () {\n\t // cleanup:\n\t _this5._modalContainerDiv.parentNode.removeChild(_this5._modalContainerDiv);\n\t _this5.options.onClose.apply(self);\n\t _this5._isOpen = false;\n\t _this5.modal.destroy();\n\t // unbind events\n\t if (_this5._keyboardNextEvent) {\n\t global.removeEventListener('keydown', self._keyboardNextEvent);\n\t }\n\t if (_this5._resizeEvent) {\n\t global.removeEventListener('resize', self._resizeEvent);\n\t }\n\t });\n\t\n\t return _this5._future;\n\t });\n\t\n\t this._nextFuture = this._future;\n\t\n\t if (self._widget) {\n\t this.modal = new _Modal2.default(this._modalAppend);\n\t // make sure we close stack before\n\t return this.modal.close().fromWidget(self._widget).then(function () {\n\t return self._future.then(function () {\n\t return self;\n\t });\n\t });\n\t }\n\t return false;\n\t }\n\t }], [{\n\t key: '_setupMaxWidthHeight',\n\t value: function _setupMaxWidthHeight(target, img, loadedImage) {\n\t var nextMaxWidth = target.getAttribute(ATTR_MAX_WIDTH);\n\t var nextMaxHeight = target.getAttribute(ATTR_MAX_HEIGHT);\n\t if (nextMaxWidth && nextMaxHeight) {\n\t img.style.maxWidth = nextMaxWidth + \"px\";\n\t img.style.maxHeight = nextMaxHeight + \"px\";\n\t } else {\n\t img.style.maxWidth = loadedImage.width + \"px\";\n\t img.style.maxHeight = loadedImage.height + \"px\";\n\t }\n\t }\n\t }]);\n\t\n\t return LightBox;\n\t}();\n\t\n\texports.default = LightBox;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_TOGGLE = undefined;\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.OffCanvas\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _FixedWindow = __webpack_require__(7);\n\t\n\tvar _FixedWindow2 = _interopRequireDefault(_FixedWindow);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_CLOSE_SIDEBAR = 'data-close-offcanvas';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_TARGET = 'data-offcanvas';\n\t/**\n\t * @type {string}\n\t */\n\tvar INIT_CLASS = 'init';\n\t/**\n\t * @type {string}\n\t */\n\tvar OPEN_CLASS = 'open';\n\t/**\n\t * @type {number}\n\t */\n\tvar HIDE_FACTOR = 3;\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar EVENT_TOGGLE = exports.EVENT_TOGGLE = 'flexcss.offcanvas.toggle';\n\t\n\t/**\n\t * A OffCanvas Implementation\n\t */\n\t\n\tvar OffCanvas = function () {\n\t\n\t /**\n\t * Creates an off-canvas navigation\n\t * @param {HTMLElement|String} NavigationId\n\t * @param {HTMLElement|String} Darkener\n\t * @param {int} factor positive will expect right sidebar, positive left\n\t * @param {bool} [disableTouch] if true all touch events are disabled\n\t * @constructor\n\t */\n\t\n\t function OffCanvas(NavigationId, Darkener, factor, disableTouch) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, OffCanvas);\n\t\n\t var doc = global.document;\n\t var touchedX = 0;\n\t var navigationContainer = NavigationId instanceof HTMLElement ? NavigationId : doc.getElementById(NavigationId);\n\t var darkener = Darkener instanceof HTMLElement ? Darkener : doc.getElementById(Darkener);\n\t var DARKENER_CLASS_TOGGLE = 'toggle-' + darkener.id || 'darkener';\n\t var DARKENER_CLASS_INSTANT_TOGGLE = DARKENER_CLASS_TOGGLE + '-open';\n\t\n\t var shouldNotTouch = function shouldNotTouch() {\n\t return window.innerWidth >= _Settings2.default.get().smallBreakpoint;\n\t };\n\t\n\t if (!darkener || !navigationContainer) {\n\t throw new Error('Could not find needed elements (Darkener and/or NavigationId)');\n\t }\n\t\n\t this.darkener = darkener;\n\t this.darkenerClassToggle = DARKENER_CLASS_TOGGLE;\n\t this.darkenerClassToggleInstant = DARKENER_CLASS_INSTANT_TOGGLE;\n\t this.globalToggleClass = _Settings2.default.get().canvasToggledClass;\n\t\n\t this.navigationContainer = navigationContainer;\n\t this.navigationContainerId = navigationContainer.id;\n\t\n\t // create id if id does not exist\n\t if (!this.navigationContainerId) {\n\t this.navigationContainerId = _Util2.default.guid();\n\t navigationContainer.id = this.navigationContainerId;\n\t }\n\t\n\t if (!disableTouch) {\n\t navigationContainer.addEventListener('touchstart', function (e) {\n\t if (shouldNotTouch()) {\n\t return;\n\t }\n\t touchedX = e.touches[0].clientX;\n\t navigationContainer.mustHide = false;\n\t });\n\t navigationContainer.addEventListener('touchmove', function (e) {\n\t if (shouldNotTouch()) {\n\t return;\n\t }\n\t var clientX = e.touches[0].clientX;\n\t\n\t var target = navigationContainer;\n\t var style = target.style;\n\t var calcX = touchedX - clientX;\n\t var bounds = target.getBoundingClientRect();\n\t var compare = factor > 0 ? calcX <= 0 : calcX >= 0;\n\t if (compare) {\n\t style.transition = 'transform 0s ease';\n\t style.webkitTransition = '-webkit-transform 0s ease';\n\t target.mustHide = factor > 0 ? calcX * -1 > bounds.width / HIDE_FACTOR : calcX > bounds.width / HIDE_FACTOR;\n\t var transform = 'translate3d(' + calcX * -1 + 'px,0,0)';\n\t style.transform = transform;\n\t style.webkitTransform = transform;\n\t }\n\t });\n\t navigationContainer.addEventListener('touchend', function () {\n\t if (shouldNotTouch()) {\n\t return;\n\t }\n\t var target = navigationContainer;\n\t var style = target.style;\n\t if (target.mustHide) {\n\t var width = target.getBoundingClientRect().width * factor;\n\t style.transition = 'transform .2s ease';\n\t style.webkitTransition = '-webkit-transform .2s ease';\n\t var transform = 'translate3d(' + width + 'px,0,0)';\n\t style.transform = transform;\n\t style.webkitTransform = transform;\n\t _this._remove().then(function () {\n\t _this.resetTransform(style);\n\t });\n\t _this._removeInstant();\n\t } else {\n\t _this.resetTransform(style);\n\t }\n\t });\n\t }\n\t }\n\t\n\t /**\n\t * @param {Object} s\n\t */\n\t\n\t\n\t _createClass(OffCanvas, [{\n\t key: 'resetTransform',\n\t value: function resetTransform(s) {\n\t s.transform = '';\n\t s.transition = '';\n\t s.webkitTransform = '';\n\t s.webkitTransition = '';\n\t }\n\t\n\t /**\n\t * @param {Object} [event]\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_remove',\n\t value: function _remove(event) {\n\t var _this2 = this;\n\t\n\t return new Promise(function (resolve) {\n\t _Util2.default.addEventOnce(_Settings2.default.getTransitionEvent(), _this2.navigationContainer, function scheduler(e) {\n\t var _this3 = this;\n\t\n\t if (e.target !== this.navigationContainer) {\n\t return _Util2.default.addEventOnce(_Settings2.default.getTransitionEvent(), this.navigationContainer, scheduler.bind(this));\n\t }\n\t requestAnimationFrame(function () {\n\t OffCanvas.currentOpen = null;\n\t var docCls = global.document.documentElement.classList;\n\t docCls.remove(_this3.darkenerClassToggle);\n\t docCls.remove(_this3.globalToggleClass);\n\t if (!!event) {\n\t _Event2.default.dispatchAndFire(_this3.navigationContainer, EVENT_TOGGLE);\n\t }\n\t resolve();\n\t });\n\t }.bind(_this2));\n\t });\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_removeInstant',\n\t value: function _removeInstant() {\n\t this.navigationContainer.classList.remove(OPEN_CLASS);\n\t global.document.documentElement.classList.remove(this.darkenerClassToggleInstant);\n\t this.darkener.classList.remove(INIT_CLASS);\n\t _FixedWindow2.default.getInstance().close();\n\t }\n\t\n\t /**\n\t * Toggles a an off-canvas element\n\t * @param [e]\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'toggle',\n\t value: function toggle(e) {\n\t var _this4 = this;\n\t\n\t if (e) {\n\t e.preventDefault();\n\t }\n\t this.resetTransform(this.navigationContainer.style);\n\t var darkenerClass = this.darkener.classList;\n\t var DARKENER_CLASS_TOGGLE = this.darkenerClassToggle;\n\t var DARKENER_CLASS_INSTANT_TOGGLE = this.darkenerClassToggleInstant;\n\t var navigationControllerClassList = this.navigationContainer.classList;\n\t if (!OffCanvas.currentOpen) {\n\t _Util2.default.addEventOnce(_Settings2.default.getTransitionEvent(), this.navigationContainer, function () {\n\t if (!!e) {\n\t _Event2.default.dispatchAndFire(_this4.navigationContainer, EVENT_TOGGLE);\n\t }\n\t });\n\t OffCanvas.currentOpen = this;\n\t _FixedWindow2.default.getInstance().open(this, this.navigationContainer);\n\t var docElementCls = global.document.documentElement.classList;\n\t docElementCls.add(this.globalToggleClass);\n\t docElementCls.add(DARKENER_CLASS_INSTANT_TOGGLE);\n\t docElementCls.add(DARKENER_CLASS_TOGGLE);\n\t darkenerClass.add(INIT_CLASS);\n\t navigationControllerClassList.add(OPEN_CLASS);\n\t } else {\n\t return this.close(e);\n\t }\n\t }\n\t }, {\n\t key: 'close',\n\t value: function close(event) {\n\t if (this.navigationContainer.classList.contains(OPEN_CLASS)) {\n\t var promise = this._remove(event);\n\t this._removeInstant();\n\t return promise;\n\t }\n\t return new Promise(function (r) {\n\t return r();\n\t });\n\t }\n\t\n\t /**\n\t * Register events\n\t * @param [delegate]\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents(delegate) {\n\t var _this5 = this;\n\t\n\t var thisDelegate = delegate || global.document;\n\t _FixedWindow2.default.getInstance().addScreenConstraint(OffCanvas, function (width) {\n\t return width < _Settings2.default.get().smallBreakpoint;\n\t });\n\t thisDelegate.addEventListener(_Settings2.default.getTabEvent(), function (e) {\n\t if (OffCanvas.currentOpen && OffCanvas.currentOpen !== _this5) {\n\t return;\n\t }\n\t var id = _this5.navigationContainerId;\n\t var validTarget = e.target.getAttribute(ATTR_TARGET) === id;\n\t if (!_Util2.default.isPartOfNode(e.target, _this5.navigationContainer)) {\n\t if (validTarget || OffCanvas.currentOpen === _this5 && e.target === _this5.darkener) {\n\t _this5.toggle(e);\n\t }\n\t } else {\n\t if (e.target.hasAttribute(ATTR_CLOSE_SIDEBAR)) {\n\t _this5.toggle(e);\n\t }\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return OffCanvas;\n\t}();\n\t\n\tOffCanvas.currentOpen = null;\n\t\n\texports.default = OffCanvas;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_TAB_OPENED = exports.EVENT_TAB_CLOSED = undefined;\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Toggleable\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t * Event that is fired when a tab is closed\n\t * @type {string}\n\t */\n\t\n\tvar EVENT_TAB_CLOSED = exports.EVENT_TAB_CLOSED = 'flexcss.tab.closed';\n\t\n\t/**\n\t * Event that is fired when a tab has been opened\n\t * @type {string}\n\t */\n\tvar EVENT_TAB_OPENED = exports.EVENT_TAB_OPENED = 'flexcss.tab.opened';\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_NAME = 'data-toggle';\n\t/**\n\t * @type {string}\n\t */\n\tvar ACTIVE_CLASS = 'active';\n\t/**\n\t * @type {string}\n\t */\n\tvar LOADING_CLASS = 'loading';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_TOGGLE_LIST = 'data-toggle-list';\n\t\n\t/**\n\t * Creates a toggleable element, either for tabs or a single toggle\n\t */\n\t\n\tvar Toggleable = function () {\n\t function Toggleable(ContainerId) {\n\t _classCallCheck(this, Toggleable);\n\t\n\t var doc = global.document;\n\t\n\t this.container = ContainerId instanceof HTMLElement ? ContainerId : doc.getElementById(ContainerId);\n\t\n\t this.loading = false;\n\t\n\t if (!this.container) {\n\t throw new Error('Toggleable container with id ' + ContainerId + ' not found');\n\t }\n\t }\n\t\n\t /**\n\t * Listener\n\t * @param {Event} e\n\t * @private\n\t */\n\t\n\t\n\t _createClass(Toggleable, [{\n\t key: '_listener',\n\t value: function _listener(e) {\n\t var target = e.target;\n\t var parent = target.parentNode;\n\t var doc = global.document;\n\t\n\t // support target child element to clicked\n\t if (!target.hasAttribute(ATTR_NAME)) {\n\t if (parent && parent.hasAttribute(ATTR_NAME)) {\n\t target = parent;\n\t } else {\n\t return;\n\t }\n\t }\n\t\n\t if (!target.hasAttribute(ATTR_NAME)) {\n\t return;\n\t }\n\t\n\t var refId = target.getAttribute(ATTR_NAME);\n\t var ref = doc.getElementById(refId);\n\t\n\t e.preventDefault();\n\t\n\t if (this.loading) {\n\t return;\n\t }\n\t\n\t this.toggleTarget(ref, target);\n\t }\n\t\n\t /**\n\t * Registers Events for this instance\n\t * @returns {Toggleable}\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents() {\n\t this.container.addEventListener(_Settings2.default.getTabEvent(), this._listener.bind(this));\n\t return this;\n\t }\n\t\n\t /**\n\t * Toggles given `ref`\n\t * @param {HTMLElement|Node} ref\n\t * @param {HTMLElement|Node} [selfTarget] optional target node\n\t */\n\t\n\t }, {\n\t key: 'toggleTarget',\n\t value: function toggleTarget(ref, selfTarget) {\n\t var _this = this;\n\t\n\t var target = selfTarget;\n\t if (!target && !ref) {\n\t return;\n\t }\n\t if (!target) {\n\t target = document.querySelector('[' + ATTR_NAME + '=\"' + ref.id + '\"]');\n\t }\n\t\n\t var future = void 0;\n\t var elClassList = target.classList;\n\t var parent = target.parentNode;\n\t var doc = global.document;\n\t\n\t future = new Promise(function (resolve, failure) {\n\t if (ref) {\n\t resolve(ref);\n\t } else {\n\t var widget = _Widget2.default.findWidget(target);\n\t var async = widget ? widget.getAsync() : null;\n\t if (_Widget2.default.isWidget(widget) && async) {\n\t future = async.then(function (r) {\n\t if (r instanceof HTMLElement) {\n\t var id = _Util2.default.guid();\n\t r.id = id;\n\t target.setAttribute(ATTR_NAME, id);\n\t resolve(r);\n\t } else {\n\t throw new Error('Dynamically creating toggle-content is not supported right now.\\n Return an HTMLElement instance');\n\t }\n\t });\n\t } else {\n\t failure('Target not given');\n\t }\n\t }\n\t });\n\t\n\t if (parent) {\n\t var maybeToggleNode = _Util2.default.parentsUntil(target, function (node) {\n\t return node && node.hasAttribute && node.hasAttribute(ATTR_TOGGLE_LIST);\n\t });\n\t\n\t var parentClassList = parent.classList;\n\t // Abort if element is already active and if is part of a toggle list\n\t if (maybeToggleNode) {\n\t if (!parentClassList.contains(ACTIVE_CLASS)) {\n\t parentClassList.toggle(ACTIVE_CLASS);\n\t parentClassList.add(LOADING_CLASS);\n\t } else {\n\t return;\n\t }\n\t }\n\t\n\t if (maybeToggleNode) {\n\t for (var i = 0; i < maybeToggleNode.children.length; i++) {\n\t var n = maybeToggleNode.children[i];\n\t var targetRef = n.children[0];\n\t if (n !== parent) {\n\t n.classList.remove(ACTIVE_CLASS);\n\t if (targetRef) {\n\t var attr = targetRef.getAttribute(ATTR_NAME);\n\t var el = attr ? doc.getElementById(attr) : null;\n\t if (el) {\n\t _Event2.default.dispatchAndFire(el, EVENT_TAB_CLOSED);\n\t el.classList.remove(ACTIVE_CLASS);\n\t targetRef.classList.remove(ACTIVE_CLASS);\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }\n\t if (elClassList) {\n\t elClassList.toggle(ACTIVE_CLASS);\n\t elClassList.add(LOADING_CLASS);\n\t }\n\t this.loading = true;\n\t future.then(function (r) {\n\t _Event2.default.dispatchAndFire(r, EVENT_TAB_OPENED);\n\t Toggleable._handleLoaded(target);\n\t r.classList.toggle(ACTIVE_CLASS);\n\t _this.loading = false;\n\t }).catch(function () {\n\t _this.loading = false;\n\t Toggleable._handleLoaded(target);\n\t });\n\t }\n\t\n\t /**\n\t * @param el\n\t * @private\n\t */\n\t\n\t }], [{\n\t key: '_handleLoaded',\n\t value: function _handleLoaded(el) {\n\t var parentClassList = el.parentNode.classList;\n\t el.classList.remove(LOADING_CLASS);\n\t if (parentClassList) {\n\t parentClassList.remove(LOADING_CLASS);\n\t }\n\t }\n\t }]);\n\t\n\t return Toggleable;\n\t}();\n\t\n\texports.default = Toggleable;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.LightBox = exports.Dropdown = exports.OffCanvas = exports.Toggleable = exports.Util = exports.Settings = exports.Widget = exports.Modal = exports.Tooltip = exports.Form = undefined;\n\t\n\tvar _Form = __webpack_require__(9);\n\t\n\tvar _Form2 = _interopRequireDefault(_Form);\n\t\n\tvar _Tooltip = __webpack_require__(6);\n\t\n\tvar _Tooltip2 = _interopRequireDefault(_Tooltip);\n\t\n\tvar _Modal = __webpack_require__(8);\n\t\n\tvar _Modal2 = _interopRequireDefault(_Modal);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Toggleable = __webpack_require__(16);\n\t\n\tvar _Toggleable2 = _interopRequireDefault(_Toggleable);\n\t\n\tvar _OffCanvas = __webpack_require__(15);\n\t\n\tvar _OffCanvas2 = _interopRequireDefault(_OffCanvas);\n\t\n\tvar _Dropdown = __webpack_require__(13);\n\t\n\tvar _Dropdown2 = _interopRequireDefault(_Dropdown);\n\t\n\tvar _LightBox = __webpack_require__(14);\n\t\n\tvar _LightBox2 = _interopRequireDefault(_LightBox);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.Form = _Form2.default;\n\texports.Tooltip = _Tooltip2.default;\n\texports.Modal = _Modal2.default;\n\texports.Widget = _Widget2.default;\n\texports.Settings = _Settings2.default;\n\texports.Util = _Util2.default;\n\texports.Toggleable = _Toggleable2.default;\n\texports.OffCanvas = _OffCanvas2.default;\n\texports.Dropdown = _Dropdown2.default;\n\texports.LightBox = _LightBox2.default;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** js/flexcss.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 13012788ed6358b638c7\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Widget\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/**\n * A Widget provides async content on a specific target (e.g. a modal link)\n */\nclass Widget {\n\n /**\n * Creates a new Widget\n * @param [element], optional define the content of widget\n */\n constructor(element) {\n /**\n *\n * @type {Promise}\n */\n this.asyncContent = null;\n\n /**\n * @type {boolean}\n */\n this._isWidget = true;\n\n if (element) {\n /**\n * @type {HTMLElement}\n */\n this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n if (this.element) {\n this.element.hfWidgetInstance = this;\n this.setAsync(() => {\n return new Promise((s) => {\n s(this.element);\n });\n });\n } else {\n throw new Error(`Could not found element with ID: ${element}`);\n }\n }\n /**\n * The final resulted content that a widget did create (e.g. a modal container)\n * @type {HTMLElement}\n */\n this.finalContent = null;\n }\n\n /**\n *\n * @returns {Promise}\n */\n getAsync() {\n return this.asyncContent();\n }\n\n /**\n * @param {Function.} async\n * @returns {Widget}\n */\n setAsync(async) {\n this.asyncContent = async;\n return this;\n }\n\n /**\n * @returns {HTMLElement}\n */\n getFinalContent() {\n return this.finalContent;\n }\n\n /**\n * @param {HTMLElement} element\n * @returns {Widget}\n */\n setElement(element) {\n this.element = element;\n return this;\n }\n\n /**\n * Destroys the generated content of this widget\n * @returns {boolean}\n */\n destroy() {\n if (this.finalContent && this.finalContent.parentNode) {\n this.finalContent.parentNode.removeChild(this.finalContent);\n return true;\n }\n\n delete this.element;\n delete this.asyncContent;\n delete this.finalContent;\n\n return false;\n }\n\n /**\n * Will find a widget on an Element\n * @param {HTMLElement} element\n * @returns {Widget|undefined}\n */\n static findWidget(element) {\n return element ? element.hfWidgetInstance : undefined;\n }\n\n /**\n * Checks if a given object is an instance\n * @param {Object} self\n * @returns {boolean}\n */\n static isWidget(self) {\n return self instanceof Widget || typeof self === 'object' && self.hasOwnProperty('_isWidget');\n }\n}\n\nexport default Widget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Widget.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Provides a Basic Widget\n */\nclass DestroyableWidget {\n\n constructor() {\n this.listeners = [];\n }\n\n /**\n * Destroys a Widget\n */\n destroy() {\n this.listeners.forEach((listener) => {\n listener.element.removeEventListener.apply(listener.element, listener.args);\n });\n this.listeners = [];\n }\n\n /**\n * Adds an event and registers it later to remove bindings\n * @param {HTMLElement} element\n * @param {String} name\n * @param {Function} listener\n * @param {boolean} [capture]\n * @returns {Function}\n */\n addEventListener(element, name, listener, capture) {\n this.listeners.push({\n element,\n args: [name, listener, capture]\n });\n\n element.addEventListener(name, listener, capture);\n return listener;\n }\n\n}\n\nexport default DestroyableWidget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/DestroyableWidget.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Tooltip\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport DestroyableWidget from './DestroyableWidget';\nimport Settings from './util/Settings';\n\n/**\n * @type {string}\n */\nconst CLASS_NAMES_TOOLTIP = 'tooltip-container';\n/**\n * @type {string}\n */\nconst CLASS_NAMES_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_CLASSNAME = 'data-class';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\n/**\n * @type {HTMLDocument}\n */\nconst doc = global.document;\n\n/**\n * Simple Tooltip\n */\nclass Tooltip extends DestroyableWidget {\n\n /**\n * Creates a Tooltip\n * @param {HTMLElement|String} DelegateContainer\n * @param {Object} [options]\n */\n constructor(DelegateContainer, options) {\n super();\n /**\n * The Container where possible events are captured\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n if (!this.container) {\n throw new Error('Could not create Tooltip, DelegateContainer not found');\n }\n\n /**\n * The Container where tooltips are stored for this instance\n * @type {HTMLElement}\n */\n this.tooltipContainer = null;\n\n /**\n * Default Options\n */\n this.options = {\n containerClass: '',\n selectorAttribute: 'data-tooltip',\n collisionContainer: this.container\n };\n\n Object.assign(this.options, options || {});\n }\n\n /**\n * Creates and shows a tooltip\n * @param {HTMLElement} target where is this tooltip positioned\n * @param {String} text text content in tooltip, will be NOT escaped\n * @param {Boolean} [removeTitle] removes title element if given\n * @param {Node} [positionRelative]\n */\n createTooltip(target, text, removeTitle, positionRelative) {\n // abort if text is empty\n if (!text || text && text.trim() === '') {\n return;\n }\n\n if (Settings.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n return;\n }\n\n let tooltipContainer = this.tooltipContainer;\n\n if (!tooltipContainer) {\n tooltipContainer = doc.createElement('div');\n this.container.appendChild(tooltipContainer);\n this.tooltipContainer = tooltipContainer;\n }\n this._restoreClassNames(tooltipContainer, target);\n\n tooltipContainer.style.left = 'auto';\n tooltipContainer.style.top = 'auto';\n tooltipContainer.innerHTML = text;\n tooltipContainer.flexTooltipCurrentTarget = target;\n if (removeTitle) {\n target.oldTitle = text;\n target.removeAttribute('title');\n }\n\n Util.setupPositionNearby(positionRelative || target, tooltipContainer,\n this.options.collisionContainer, true, true);\n\n tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n }\n\n _restoreClassNames(container, target) {\n // allow additional classname per tooltip on target element\n const classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n const maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n if (maybeTargetClass) {\n classNames.push(maybeTargetClass);\n }\n container.className = classNames.join(\" \");\n return this;\n }\n\n /**\n * @returns {HTMLElement|null}\n */\n getCurrentTarget() {\n return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n }\n\n /**\n * Destroys this Widget\n * @returns {boolean}\n */\n destroy() {\n super.destroy();\n\n if (this.tooltipContainer) {\n this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n return true;\n }\n return false;\n }\n\n /**\n * Removes a Tooltip on given target\n * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n */\n removeTooltip(target) {\n let selfTarget = target;\n if (!selfTarget && this.tooltipContainer) {\n selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (this.tooltipContainer) {\n if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n return;\n }\n this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n delete this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (selfTarget && selfTarget.oldTitle) {\n selfTarget.setAttribute('title', selfTarget.oldTitle);\n }\n }\n\n /**\n * Initilizes mouse events on container element\n */\n registerEvents() {\n const self = this;\n this.addEventListener(this.container, 'mouseover', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.createTooltip(e.target, e.target.getAttribute('title'), true);\n }\n });\n\n this.addEventListener(this.container, 'mouseout', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.removeTooltip(e.target);\n }\n });\n return this;\n }\n}\n\nexport default Tooltip;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Tooltip.js\n **/","import Settings from '../util/Settings';\nimport debounce from './debounce';\nimport Event from '../util/Event';\nimport Util from '../util/Util';\n\nconst CLS_FIXED_WINDOW = 'fixed-window-open';\n\nexport const EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\nexport const EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\n/**\n * @type {string}\n */\nexport const ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\n/**\n * @type {FixedWindow}\n */\nlet fixedWindowInstance;\n\nexport default class FixedWindow {\n\n constructor() {\n this.widgets = [];\n this.currentScrollTop = 0;\n this.fixedScreenConstraints = [];\n this.windowWidth = 0;\n this.isFixedWindowActive = false;\n this.touchListener = null;\n }\n\n /**\n * Adds a constraint to detect if the window needs to be changed when the screensize changes\n *\n * @param {Function} widget\n * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n */\n addScreenConstraint(widget, fixedBreakpointFn) {\n this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n }\n\n /**\n * @returns {null|DestroyableWidget}\n */\n getCurrentWidget() {\n return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n }\n\n /**\n * @private\n */\n _checkFixedNeeded() {\n if (this.widgets.length === 0) {\n return;\n }\n const widgets = new Set(this.widgets);\n const widgetsThatRequireFixedWindow = Array.from(widgets).some(({ widget }) => {\n return this.fixedScreenConstraints[widget] && this.fixedScreenConstraints[widget](this.windowWidth);\n });\n if (!widgetsThatRequireFixedWindow) {\n this._removeFixedContainer();\n } else {\n this._addFixedContainer();\n }\n }\n\n /**\n * @private\n */\n _addFixedContainer() {\n if (this.isFixedWindowActive) {\n return;\n }\n Event.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n detail: this.getCurrentWidget()\n });\n // this causes layout and should be optimized\n // At lest we write in a batch later\n Settings.get().scrollbarUpdateNodes.map((n) => {\n let foundProperty = 'paddingRight';\n let direction = 1;\n let node = n;\n if (n instanceof Array) {\n const [whatNode, property, d] = n;\n foundProperty = property;\n node = whatNode;\n direction = d || 1;\n }\n return {\n node,\n property: foundProperty,\n value: `${parseInt(global.getComputedStyle(node)[foundProperty], 10) +\n (!node.__fixedWindowMod__ ? (Settings.getScrollbarWidth() * direction) : 0)}px`\n };\n }).forEach((d) => {\n d.node.__fixedWindowMod__ = true;\n d.node.style[d.property] = d.value;\n });\n\n this.touchListener = (e) => {\n e.preventDefault();\n };\n\n let shouldNotMoveUp = false;\n let shouldNotMoveDown = false;\n let neverScroll = false;\n let lastClientY = 0;\n this.touchStartListener = (e) => {\n let { element } = this.getCurrentWidget();\n const closestOverflow = Util.closestCallback(e.target,\n (el) => el instanceof HTMLTextAreaElement ||\n (el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH)));\n if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n element = closestOverflow;\n }\n if (Util.isPartOfNode(e.target, element)) {\n neverScroll = element.scrollHeight === element.offsetHeight;\n lastClientY = e.touches[0].clientY;\n // never allow scrolling when there is nothing to scroll\n if (neverScroll) {\n return false;\n }\n if (element.scrollTop === 0) {\n element.scrollTop = 1;\n shouldNotMoveUp = true;\n } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n shouldNotMoveDown = true;\n element.scrollTop -= 1;\n }\n }\n };\n\n global.addEventListener('touchmove', this.touchListener);\n global.document.body.addEventListener('touchstart', this.touchStartListener);\n\n this.touchMoveListener = (e) => {\n const { element } = this.getCurrentWidget();\n if (Util.isPartOfNode(e.target, element)) {\n const { clientY } = e.touches[0];\n const isScrollingDown = (lastClientY - clientY) > 0;\n lastClientY = clientY;\n\n if (neverScroll) {\n neverScroll = false;\n return false;\n }\n\n if (!shouldNotMoveDown && isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n if (shouldNotMoveDown && !isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n if (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n shouldNotMoveUp = false;\n shouldNotMoveDown = false;\n }\n };\n global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\n global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n this.isFixedWindowActive = true;\n }\n\n /**\n * @private\n */\n _removeFixedContainer() {\n if (this.isFixedWindowActive) {\n // cleanup event listeners\n global.removeEventListener('touchmove', this.touchListener);\n global.document.body.removeEventListener('touchstart', this.touchStartListener);\n global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\n // reset scrollbar nodes\n Settings.get().scrollbarUpdateNodes.forEach((node) => {\n if (node instanceof Array) {\n const [whatNode, property] = node;\n delete whatNode.__fixedWindowMod__;\n whatNode.style[property] = '';\n } else {\n delete node.__fixedWindowMod__;\n node.style.paddingRight = '';\n }\n });\n global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n Event.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n this.isFixedWindowActive = false;\n }\n }\n\n /**\n * Will close a window when no widgets are opened that need one\n */\n resizeListener() {\n this.windowWidth = global.innerWidth;\n this._checkFixedNeeded();\n }\n\n /**\n * @returns {FixedWindow}\n */\n static getInstance() {\n if (!fixedWindowInstance) {\n fixedWindowInstance = new FixedWindow();\n fixedWindowInstance.windowWidth = global.innerWidth;\n const eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n global.addEventListener(\n 'resize',\n debounce(eventHandler, 500)\n );\n global.addEventListener('orientationchange', eventHandler);\n }\n return fixedWindowInstance;\n }\n\n /**\n * Request a close of the fixed window\n */\n close() {\n this.widgets.pop();\n if (this.widgets.length === 0) {\n this._removeFixedContainer();\n }\n }\n\n /**\n * Request to open a fixed windows\n * @param {Object|DestroyableWidget} instance\n * @param {HTMLElement} element\n */\n open(instance, element) {\n let fixed = false;\n if (typeof instance === 'object') {\n const widget = instance.constructor;\n const fixedWidget = this.fixedScreenConstraints[instance.constructor];\n if (widget && fixedWidget) {\n fixed = fixedWidget(this.windowWidth);\n }\n const length = this.widgets.length;\n this.widgets.push(\n {\n widget,\n element\n }\n );\n // open a new window if there is no window active\n if (length === 0) {\n if (fixed) {\n this._addFixedContainer();\n }\n }\n }\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/FixedWindow.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Modal\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global KeyboardEvent */\n\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\nconst KEY_ESC = 27;\n/* Attribute Names */\nconst ATTR_CREATE_NEW = 'data-new-instance';\nconst ATTR_CLOSE = 'data-close-modal';\nconst ATTR_NAME = 'data-modal';\n\n/* Class names */\nconst CLS_CONTAINER_CURRENT = 'front';\nconst CLS_OPEN = 'open';\nconst CLS_CURRENT = 'current';\nconst CLS_PART_OF_STACK = 'part-of-stack';\nconst CLS_MODAL_CONTAINER = 'modal-container';\nconst CLS_ANIM_END = 'modal-anim-end';\nconst CLS_LOADER_CONTAINER = 'loader-container';\nconst CLS_LOADER = 'loader';\nconst CLS_BACKDROP = 'backdrop';\n\n/* Events */\n\n/**\n * Event triggered when modal is closed\n * @type {string}\n */\nexport const EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n/**\n * Event triggered before a modal is closed, cancelable\n * @type {string}\n */\nexport const EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n/**\n * Event triggered when a modal is opened\n * @type {string}\n */\nexport const EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\n/**\n * Event triggered when modal is initilized, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_INIT = 'flexcss.modal.init';\n\n/**\n * Triggered when the content of an async modal on a target is loaded, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\n/**\n * A Modal Implementation\n */\nclass Modal {\n constructor(DelegateContainer, options) {\n const doc = global.document;\n const container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n // Instance vars:\n if (!container) {\n throw new Error(`Could not found container element by given ID/Element: ${DelegateContainer}`);\n }\n\n this.currentOpen = null;\n\n this.loading = false;\n\n this.container = container;\n\n /**\n * Default Options\n */\n this.options = {\n classNames: 'modal',\n closeOnEscape: true,\n closeOnBackgroundClick: true,\n destroyOnFinish: false,\n fixedContainer: true,\n containerClassNames: ''\n };\n\n Object.assign(this.options, options);\n\n // Container where events are delegated\n this.eventContainer = null;\n this.eventFunction = null;\n\n this.dataMainPageContainer = global.document.body;\n\n this.currentScrollTop = 0;\n\n this.modalContainer = null;\n\n // Destroy full modal instance when no dialogs are bind to?\n // Otherwise container is recycled\n this.destroyOnFinish = this.options.destroyOnFinish;\n }\n\n /**\n * Removes this modal from global stack\n * Will handle fixing main html element too\n * @private\n * @param n\n */\n _removeModalFromStack(n) {\n const t = Modal._modalInstances.indexOf(n);\n if (t > -1) {\n Modal._modalInstances.splice(t, 1);\n FixedWindow.getInstance().close();\n }\n }\n\n\n /**\n * Modal container that contains all `stacked` modals for this instance\n * @returns {HTMLElement}\n */\n getModalContainer() {\n return this.modalContainer;\n }\n\n /**\n * Closes the current open modal of this stack\n * @params [e], optional event\n * @returns {*}\n */\n close(e) {\n const self = this;\n\n const options = self.currentOpen ? Util.applyOptionsFromElement(\n self.currentOpen, Util.copy(self.options)) : self.options;\n\n // close only on keyboard if instance should\n if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n return false;\n }\n\n // close only on background if instance should\n if (!options.closeOnBackgroundClick && e &&\n e.type === Settings.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n\n // if an instance is currently loading, prevent from closing\n if (self.loading) {\n return false;\n }\n\n if (e) {\n e.preventDefault();\n }\n\n if (self.currentOpen) {\n // dispatch beforeClose event, if prevented prevent modal from closing\n const ev = Event.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n if (ev.defaultPrevented) {\n return false;\n }\n\n this._finishState(self.currentOpen);\n // if there is an previous modal\n if (self.currentOpen.prevModal) {\n // switch to the next modal\n return self.switchModals(self.currentOpen.prevModal,\n self.currentOpen.prevModal.prevModal || null);\n }\n\n // finally trigger closed event\n Event.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n }\n self._removeModalFromStack(self.currentOpen);\n\n // Full stack closed:\n self.currentOpen = null;\n if (self.modalContainer) {\n // setup next open\n const lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n const classList = self.modalContainer.classList;\n classList.remove(CLS_CONTAINER_CURRENT);\n classList.remove(CLS_BACKDROP);\n classList.remove(CLS_OPEN);\n // Remove all current classes from child-nodes\n for (let i = 0; i < self.modalContainer.childNodes.length; i++) {\n const node = self.modalContainer.childNodes[i];\n const cl = node.classList;\n // remove applied styles\n self._finishState(node);\n cl.remove(CLS_CURRENT);\n cl.remove(CLS_PART_OF_STACK);\n }\n if (lastContainer) {\n lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n }\n }\n\n if (self.destroyOnFinish) {\n self.destroy();\n }\n return self;\n }\n\n /**\n * Resets a target when newly initilizes\n * @param target\n * @private\n */\n _finishState(target) {\n target.classList.remove(CLS_ANIM_END);\n }\n\n /**\n * Handler called when a Modal has finished an animation\n * @param e\n * @param self\n * @private\n */\n _finishAnim(e, self) {\n e.target.classList.add(CLS_ANIM_END);\n e.target.removeEventListener(e.type, self, true);\n }\n\n /**\n * Brings the given modal to front\n * @param co\n * @param last\n */\n switchModals(co, last) {\n co.prevModal = last;\n Modal._modalInstances.push(co);\n FixedWindow.getInstance().open(this, this.modalContainer);\n if (last) {\n this._finishState(last);\n Util.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n last.classList.add(CLS_PART_OF_STACK);\n }\n // set new currentOpen\n this.currentOpen = co;\n\n // bring current container to the front\n const instances = Modal._modalInstances;\n\n for (let m = 0; m < instances.length; m++) {\n instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n }\n this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n // remove animations if animations has been completed, fixes various bugs:\n // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n Util.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\n for (let i = 0; i < this.modalContainer.childNodes.length; i++) {\n const n = this.modalContainer.childNodes[i];\n const isCurrent = n.classList.contains(CLS_CURRENT);\n if (n === co) {\n co.classList.add(CLS_CURRENT);\n co.classList.remove(CLS_PART_OF_STACK);\n this._finishState(co);\n } else {\n n.classList.remove(CLS_CURRENT);\n if (isCurrent) {\n this._removeModalFromStack(n);\n Event.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n }\n }\n }\n }\n\n /**\n * Creates a Modal and opens it (later)\n * @param e\n * @returns {Promise|boolean}\n */\n createWidget(e) {\n const self = this;\n if (this.loading) {\n return false;\n }\n\n // check if another modal has registered events on this dom path:\n if (e && e.target) {\n const foundInstance = Util.parentsUntil(e.target, (node) => {\n return node && node.flexModalInstance;\n });\n\n // if another instance has been found, abort\n if (foundInstance !== this.container) {\n return false;\n }\n }\n let targetContent;\n let future;\n let widget;\n let target;\n let hasTarget = true;\n const isHtmlElement = e instanceof HTMLElement;\n const isWidget = Widget.isWidget(e);\n if (isHtmlElement || isWidget) {\n if (isHtmlElement) {\n targetContent = e;\n } else {\n widget = e;\n targetContent = widget.element;\n }\n } else {\n target = e.target;\n if (!target) {\n throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n }\n hasTarget = target.hasAttribute(ATTR_NAME);\n targetContent = target.getAttribute(ATTR_NAME);\n widget = Widget.findWidget(target);\n if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n const newInstance = new Modal(this.container)\n .setDestroyOnFinish(true);\n e.newInstance = true;\n newInstance.fromEvent(e).then(() => {\n newInstance.registerEvents(newInstance.getModalContainer());\n });\n return false;\n }\n if (hasTarget) {\n e.stopImmediatePropagation();\n e.preventDefault();\n }\n }\n\n if (!hasTarget) {\n return false;\n }\n\n let modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\n // lazy create modal container\n if (!this.modalContainer) {\n this.modalContainer = global.document.createElement('div');\n this.modalContainer.className = `${CLS_MODAL_CONTAINER} ${this.options.containerClassNames} ${CLS_OPEN}`;\n const closeModalFunction = (ce) => {\n if (this.loading) {\n return false;\n }\n if (Util.isPartOfNode(ce.target, this.currentOpen)) {\n if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n }\n this.close(ce);\n };\n\n this.modalContainer.addEventListener(Settings.getTabEvent(), closeModalFunction, false);\n\n modalContainerClasses = this.modalContainer.classList;\n this.container.appendChild(this.modalContainer);\n } else {\n modalContainerClasses.add(CLS_OPEN);\n }\n\n let loader;\n const doc = global.document;\n const toggleLoader = (show) => {\n if (show) {\n loader = doc.createElement('div');\n loader.className = CLS_LOADER_CONTAINER;\n const loaderLoader = doc.createElement('div');\n loaderLoader.className = CLS_LOADER;\n loader.appendChild(loaderLoader);\n this.modalContainer.appendChild(loader);\n } else {\n loader.parentNode.removeChild(loader);\n }\n };\n modalContainerClasses.add('loading');\n modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n modalContainerClasses.add(CLS_BACKDROP);\n });\n });\n\n this.loading = true;\n toggleLoader(true);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n let result;\n if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n result = r;\n } else {\n // Create container Element:\n const element = doc.createElement('div');\n element.className = self.options.classNames;\n element.innerHTML = r;\n element.id = Util.guid();\n result = element;\n }\n widget.finalContent = result;\n Event.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n return result;\n });\n } else {\n const el = targetContent instanceof HTMLElement ||\n targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n if (el) {\n future = new Promise((resolve) => {\n resolve(el);\n });\n } else {\n throw new Error(`Could not found given modal element (content) with ID: ${targetContent}`);\n }\n }\n\n Event.dispatchAndFire(target, EVENT_MODAL_INIT);\n\n return future.then((thisEl) => {\n thisEl.hfWidgetInstance = this;\n this.modalContainer.appendChild(thisEl);\n modalContainerClasses.remove('loading');\n this.loading = false;\n toggleLoader(false);\n this.open(thisEl, true, e);\n return thisEl;\n });\n }\n\n /**\n * Open's an already rendered modal\n * @param {HTMLElement} modal\n * @param {Boolean} [internal], set to true to prevent container management\n * @param {Boolean} [maybeEvent], optional event-object that triggered open\n */\n open(modal, internal, maybeEvent) {\n if (!internal) {\n this.modalContainer.classList.add('open');\n }\n this.switchModals(modal, this.currentOpen);\n\n Event.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n }\n\n\n registerEvents(delegate) {\n const delegateContainer = delegate || this.container;\n // Modals should always be fixed\n FixedWindow.getInstance().addScreenConstraint(Modal, () => true);\n // register modal instance so we can detect multiple registrars\n delegateContainer.flexModalInstance = this;\n this.eventFunction = (...args) => {\n this.createWidget.apply(this, args);\n };\n delegateContainer.addEventListener(Settings.getTabEvent(), this.eventFunction, false);\n\n this.eventContainer = delegateContainer;\n return this;\n }\n\n\n /**\n * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n * @param {HTMLElement|Widget} widget instance or html element\n * @returns {Promise}\n */\n fromWidget(widget) {\n return this.createWidget(widget);\n }\n\n /**\n * Creates a Widget from event\n * @param e\n * @returns {Promise}\n */\n fromEvent(e) {\n return this.createWidget(e);\n }\n\n setDestroyOnFinish(v) {\n this.destroyOnFinish = v;\n return this;\n }\n\n /**\n * Destroy this widget instance, cleans empty DOM nodes\n * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n */\n destroy() {\n const modalContainer = this.modalContainer;\n const isEmptyContainer = modalContainer.childNodes.length === 0;\n // Remove event listener on destroy, do not remove DOM node\n if (this.eventContainer) {\n this.eventContainer.removeEventListener(Settings.getTabEvent(), this.eventFunction, true);\n }\n\n if (isEmptyContainer) {\n if (modalContainer.parentNode) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n }\n if (global.MutationObserver) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach(() => {\n if (modalContainer.childNodes.length === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n observer.disconnect();\n }\n });\n });\n observer.observe(modalContainer,\n {\n childList: true\n }\n );\n } else {\n modalContainer.addEventListener('DOMNodeRemoved', (e) => {\n if (e.target !== modalContainer && (modalContainer.childNodes.length - 1) === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n });\n }\n }\n}\n\n\n// Static variable that keeps track of all open modals\nModal._modalInstances = [];\n\n// Global keydown listener for modal\nglobal.addEventListener('keydown', (e) => {\n if (e.keyCode === KEY_ESC) {\n const lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n if (lastModal) {\n Widget.findWidget(lastModal).close(e);\n }\n }\n});\n\nexport default Modal;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Modal.js\n **/","/*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Form\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Tooltip from './Tooltip';\nimport 'isomorphic-fetch';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport DestroyableWidget from './DestroyableWidget';\n\nconst LOADING_CLASS = 'loading';\nconst DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\nconst REMOTE = 'data-remote';\nconst REMOTE_ACTION = 'data-remote-action';\nconst ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\nconst ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\nconst ATTR_VALIDATOR = 'data-validate';\nconst ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\nconst ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\nconst ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\nconst ATTR_ERROR_TARGET_ID = 'data-error-target';\nconst ATTR_DEPENDS = 'data-depends-selector';\nconst CONST_USE_JSON = 'json';\nconst CONST_REALTIME_EVENT = 'input';\nconst FOCUS_TOOLTIP_DELAY = 20;\nconst CLICK_TOOLTIP_DELAY = 150;\n\n/**\n * Triggered when form is fully initialized and handlers are binded\n * @type {string}\n */\nexport const EVENT_FORM_READY = 'flexcss.form.ready';\n/**\n * Fires when a form is submitted, cancelable\n * @type {string}\n */\nexport const EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n/**\n * Fired directly after the form has been submitted via ajax\n * @type {string}\n */\nexport const EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n/**\n * Fired when ajax events did complete\n * @type {string}\n */\nexport const EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\n/**\n * A HTML5 Form Validation replacement\n */\n\nclass Form extends DestroyableWidget {\n /**\n * @param {HTMLElement} form\n * @param [options] optional options\n */\n constructor(form, options) {\n super();\n\n if (!(form instanceof HTMLFormElement)) {\n throw 'argument {0} form needs to be an form element';\n }\n\n /**\n * The Form\n * @type {HTMLElement}\n */\n this.form = form;\n\n /**\n * @type {Tooltip}\n */\n this.tooltips = null;\n\n /**\n * @type {Promise}\n */\n this.currentValidationFuture = new Promise(() => {\n });\n\n /**\n * Default options\n * @type {Object}\n */\n this.options = {\n // if true creates tooltips above element, uses FlexCss Tooltips\n createTooltips: true,\n // if true appends error message after input element\n appendError: false,\n // type of ajax submit\n ajaxSubmitType: 'POST',\n // json content type if ajax method is set to json\n ajaxJsonContentType: 'application/json; charset=utf-8',\n // allow inline validation\n inlineValidation: true,\n // validate in realtime (on `input` event)\n realtime: true,\n // timeout when realtime event should be captured\n realtimeTimeout: 250,\n // formatting method for an error\n formatErrorTooltip: (error) => {\n return ' ' + error;\n },\n // the class that will be put on the element to mark it failed validation\n inputErrorClass: 'invalid',\n // the container class for error messages below an element\n containerErrorClass: 'form-error',\n // additional options for fetch\n fetchOptions: {\n credentials: 'include'\n },\n // the container for tooltips\n tooltipContainer: form,\n tooltipOptions: {\n containerClass: 'error-tooltip'\n },\n // if you have a fixed header, either set a number or function here\n scrollToElementDiff: 0\n };\n\n // overwrite default options\n Object.assign(this.options, options);\n\n // apply settings from attributes\n Util.applyOptionsFromElement(form, this.options);\n\n // set form class as widget\n // Forms are very different to classical widgets,\n // we will not use our base widget class for this but just self\n form.hfWidgetInstance = this;\n\n /**\n * A List of Validators\n * @type {Object}\n * @private\n */\n this._validators = Form.globalValidators;\n\n /**\n * @type {Function}\n * @private\n */\n this._remoteValidationFunction = null;\n\n this.initFormValidation();\n }\n\n destroy() {\n super.destroy();\n if (this.tooltips) {\n this.tooltips.destroy();\n }\n }\n\n /**\n * Submits this form, either via ajax or just classical (default)\n * @param {HTMLFormElement} thisForm\n * @param {Event} e\n * @private\n * @returns {Promise|boolean} returns false if submit is cancled\n */\n _submitFunction(thisForm, e) {\n var shouldUseAjax = thisForm.getAttribute(REMOTE), ajaxPostUrl =\n thisForm.getAttribute(REMOTE_ACTION) ||\n thisForm.getAttribute('action') || window.location.href,\n useJson = CONST_USE_JSON === shouldUseAjax, self = this;\n\n var ev = Event.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\n // abort execution is event was prevented\n if (ev.defaultPrevented) {\n self._formStopLoading();\n return false;\n }\n\n if (shouldUseAjax === null) {\n // submit\n return thisForm.submit();\n }\n // prevent form from submit normally\n e.preventDefault();\n\n // add information that this is an XMLHttpRequest request (used by some frameworks)\n let defaultHeaders = {\n 'X-Requested-With': 'XMLHttpRequest'\n };\n\n // setup default headers\n if (useJson) {\n Object.assign(defaultHeaders, {\n 'Content-Type': this.options.ajaxJsonContentType\n });\n }\n let defaultOptions = Object.assign(this.options.fetchOptions, {\n headers: defaultHeaders,\n method: this.options.ajaxSubmitType\n });\n\n // support either JSON request payload or normal payload submission\n var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: JSON.stringify(this.serialize())\n })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: new FormData(thisForm)\n }));\n\n Event.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\n return serverCall.then((r) => {\n (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\n Event.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n // always remove error class\n self._formStopLoading();\n });\n }\n\n /**\n * Serializes a form to a json object\n * @returns {Object}\n */\n serialize() {\n var selectors = [\n 'input[name]:not([type=\"radio\"]):enabled',\n 'input[type=\"radio\"][name]:checked',\n 'select[name]:enabled',\n 'textarea[name]:enabled'\n ], inputs = this.form.querySelectorAll(selectors.join(',')), result = {};\n\n Array.prototype.forEach.call(inputs, function (input) {\n var exists = result[input.name], value = input.value;\n if (exists instanceof Array) {\n exists.push(value);\n } else if (exists) {\n result[input.name] = [result[input.name], value];\n } else {\n result[input.name] = value;\n }\n });\n\n return result;\n }\n\n /**\n * Handles the chain of validation on given fields\n *\n * @param {HTMLElement|Array|NodeList} field\n * @param [focus] optional focus first error\n * @returns {Promise}\n */\n handleValidation(field, focus) {\n var fields = (field instanceof Array || field instanceof NodeList) ? field : [field];\n return this._handleValidation(fields, focus, true).then(((r) => {\n if (!r.foundAnyError) {\n // remove tooltips\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n }\n return r;\n }).bind(this));\n }\n\n /**\n * Handles errors on given node list\n * @param {NodeList} toValidateFields\n * @param {boolean} focus\n * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n * @returns {Promise}\n * @private\n */\n _handleValidation(toValidateFields, focus, scoped) {\n var self = this;\n var arr = Form._createArrayFromInvalidFieldList(toValidateFields), isLocalInvalid = arr.length > 0;\n // focus must appear in the same frame for iOS devices\n if (isLocalInvalid && focus) {\n self._focusElement(arr[0]);\n }\n var validation = scoped ? this._customValidationsForElements(toValidateFields) :\n self.validateCustomFields();\n return validation.then((r) => {\n if (isLocalInvalid) {\n // combine browser and custom validators\n r.foundAnyError = true;\n }\n // get a unique field list of all fields that need to be checked and rendered\n // it's possible that we have duplicates in non scoped mode\n let thisToValidateFields = scoped ? toValidateFields :\n Array.from(arr).concat(r.checkedFields);\n r.checkedFields = thisToValidateFields;\n let foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n firstInvalidField = foundInvalidFields[0];\n if (firstInvalidField) {\n if (focus) {\n self._focusElement(firstInvalidField);\n // if element could not be focused:\n if (document.activeElement !== firstInvalidField) {\n self._handleTooltipHideClickAfterChange();\n }\n } else {\n self._handleTooltipHideClickAfterChange();\n }\n self.showAndOrCreateTooltip(firstInvalidField);\n }\n return r;\n });\n }\n\n /**\n * @param {HTMLElement} field\n * @param {ValidityState} validity\n * @returns {*}\n * @private\n */\n\n _setupErrorMessages(field, validity) {\n return Form.globalErrorMessageHandler ?\n Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n }\n\n /**\n * Handles class labels for elements\n * @param {Object} fields\n * @private\n */\n _handleLabels(fields) {\n Object.keys(fields).forEach(function (id) {\n let labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'), invalid = fields[id];\n if (labels.length) {\n for (let labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n let labelEl = labels[labelsIndex];\n // we can't use toggle attribute, not supported in IE\n if (invalid) {\n this._markElementInvalid(labelEl);\n } else {\n this._markElementValid(labelEl);\n }\n }\n }\n }.bind(this));\n }\n\n /**\n * @param el\n * @private\n */\n _markElementInvalid(el) {\n el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n el.classList.add(this.options.inputErrorClass);\n }\n\n /**\n * @param el\n * @private\n */\n _markElementValid(el) {\n el.removeAttribute(DATA_ELEMENT_INVALID);\n el.classList.remove(this.options.inputErrorClass);\n }\n\n /**\n * A List of invalid elements (:invalid)\n * @returns {Array}\n * @private\n */\n _getInvalidElements() {\n return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n return !(r instanceof HTMLFieldSetElement);\n });\n }\n\n /**\n * @param {HTMLElement} thisParent\n * @private\n */\n _removeElementErrors(thisParent) {\n let errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass), inputsWithErrorClasses =\n thisParent.querySelectorAll(`[${DATA_ELEMENT_INVALID}]`);\n for (let elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n }\n for (let inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n let el = inputsWithErrorClasses[inputErrorIndex];\n this._markElementValid(el);\n }\n }\n\n\n /**\n * Registers a custom validator\n * @param {String} name\n * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n * we can't rely on that\n * @returns {Form}\n */\n registerValidator(name, validator) {\n this._validators[name] = validator;\n return this;\n }\n\n /**\n * Runs async validation\n * @param {String} validationRef\n * @param {HTMLElement} field\n * @returns {Promise}\n * @private\n */\n _runValidation(validationRef, field) {\n if (!this._validators[validationRef]) {\n throw 'Could not found validator: ' + validationRef;\n }\n var cl = field.classList, future = this._validators[validationRef].apply(this, [field, this.form]);\n cl.add(LOADING_CLASS);\n future.then(() => {\n cl.remove(LOADING_CLASS);\n });\n return future;\n }\n\n\n /**\n * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n *\n * @param {Array|NodeList} fields\n * @returns {Promise} contains either true if validations passed or false if something went wrong\n * @private\n */\n _customValidationsForElements(fields) {\n var futures = [], fieldsLength = fields.length, checkedFields = [];\n for (var iVal = 0; iVal < fieldsLength; iVal++) {\n var field = fields[iVal], validationRef = field.getAttribute(ATTR_VALIDATOR), validity = field.validity;\n if (this._validators[validationRef]) {\n // use local validation first and then continue with custom validations\n if (Form._shouldNotValidateField(field) || (validity && !validity.customError && !validity.valid)) {\n continue;\n }\n checkedFields.push(field);\n futures.push(this._runValidation(validationRef, field));\n } else {\n if (validationRef) {\n console.warn('data-validate was set but no validator was found');\n }\n }\n }\n return Promise.all(futures).then(function (allFutures) {\n let l = allFutures.length;\n let result = {\n checkedFields: checkedFields,\n foundAnyError: false\n };\n for (var fI = 0; fI < l; fI++) {\n if (!allFutures[fI]) {\n result.foundAnyError = true;\n break;\n }\n }\n return result;\n });\n }\n\n /**\n * Remove all errors for this form\n * @returns {Form}\n */\n removeErrors() {\n this._removeElementErrors(this.form);\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n return this;\n }\n\n /**\n * Will handle errors for given fields\n * @param {Array|NodeList} fields\n * @param {Boolean} removeAllErrors\n */\n prepareErrors(fields, removeAllErrors) {\n if (removeAllErrors) {\n this.removeErrors();\n }\n let labelGroups = {}, invalidFields = [];\n\n function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n let additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) ||\n field.id, group = thisLabelGroup[additionalLabels];\n if (additionalLabels) {\n // check additionally if field is currently marked as invalid\n // so the label is not marked as error if no field is marked as one\n group = group ? group : isInvalid;\n thisLabelGroup[additionalLabels] = group;\n }\n }\n\n // We save all validations in an extra property because we need to reset the validity due some\n // implementation errors in other browsers then chrome\n for (let i = 0; i < fields.length; i++) {\n let field = fields[i], errorTarget = Form._findErrorTarget(field), parent = errorTarget.parentNode,\n validity = field.validity, isInvalid = validity && !validity.valid;\n if (Form._shouldNotValidateField(field)) {\n continue;\n }\n field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n handleAdditionalLabels(isInvalid, labelGroups, field);\n if (isInvalid) {\n if (!removeAllErrors) {\n // Remove current errors:\n this._removeElementErrors(parent);\n }\n // setup custom error messages:\n this._setupErrorMessages(field, validity);\n let msg = field.validationMessage;\n\n // mark fields as invalid\n this._markElementInvalid(errorTarget);\n this._markElementInvalid(field);\n\n if (this.options.appendError) {\n parent.insertAdjacentHTML(\"beforeend\",\n `
${msg}
`);\n }\n invalidFields.push(field);\n field.flexFormsSavedValidationMessage = msg;\n } else {\n // restore invalid fields\n this._markElementValid(errorTarget);\n this._markElementValid(field);\n\n // cleanup\n delete field.flexFormsSavedValidationMessage;\n\n // remove error markup\n this._removeElementErrors(parent);\n }\n // We have to reset the custom validity here to allow native validations work again\n field.setCustomValidity('');\n }\n // if validates a single field we need to check the linked fields to a label:\n if (fields.length === 1) {\n let field = fields[0];\n let id = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id;\n if (id) {\n let linkedFields = Array.from(\n this.getForm().querySelectorAll(`[${ATTR_DATA_CUSTOM_LABEL}=\"${id}\"], #${id}`));\n linkedFields.forEach(function (thisField) {\n let validity = thisField.validity, isInvalid = validity && !validity.valid &&\n this._isElementInvalidElement(thisField);\n handleAdditionalLabels(isInvalid, labelGroups, thisField);\n }.bind(this));\n }\n }\n this._handleLabels(labelGroups);\n return invalidFields;\n }\n\n /**\n * Validates all custom fields\n * @returns {Promise}\n */\n validateCustomFields() {\n return this._customValidationsForElements(\n this.form.querySelectorAll(\"[data-validate]\"));\n }\n\n /**\n * Tests if a field should be validated\n * @param {HTMLElement} field\n * @returns {boolean}\n * @private\n */\n static _shouldNotValidateField(field) {\n var target = Form._findErrorTarget(field);\n return target instanceof HTMLFieldSetElement || field.validity === undefined ||\n (target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !Util.isVisible(target));\n }\n\n /**\n * Creates an array from a node list with invalid items\n * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n * @param list\n * @returns {Array}\n * @private\n */\n static _createArrayFromInvalidFieldList(list) {\n var arr = [];\n for (var i = 0; i < list.length; ++i) {\n var n = list[i];\n if (n.validity && !n.validity.valid) {\n if (!Form._shouldNotValidateField(n)) {\n arr.push(n);\n }\n }\n }\n return arr;\n }\n\n\n /**\n * This form\n * @returns {HTMLElement}\n */\n getForm() {\n return this.form;\n }\n\n /**\n * Registers a function that handles remote validation\n * @param {Function} func\n * @returns {Form}\n */\n registerRemoteValidation(func) {\n this._remoteValidationFunction = func;\n return this;\n }\n\n\n /**\n * Formats the error content for the tooltip\n * @param {String} error\n * @returns {String}\n * @private\n */\n _formatErrorTooltip(error) {\n return this.options.formatErrorTooltip.apply(this, [error]);\n }\n\n /**\n * Tries to find a custom error target on given target\n * @param target\n * @returns {HTMLElement}\n * @private\n */\n static _findErrorTarget(target) {\n var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n if (!foundTarget) {\n throw 'Given error target did not exsits:' + target;\n }\n return foundTarget;\n }\n\n /**\n * Creates a tooltip at given element, will only create a new instance if not created\n * @param {HTMLElement} target\n * @param {Boolean} [remove]\n */\n showAndOrCreateTooltip(target, remove) {\n var self = this;\n if (!this.tooltips && this.options.createTooltips) {\n this.tooltips = new Tooltip(this.options.tooltipContainer, this.options.tooltipOptions);\n }\n if (!this.options.createTooltips) {\n return false;\n }\n\n if (!target.flexFormsSavedValidity) {\n return false;\n }\n var errorTarget = Form._findErrorTarget(target);\n if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n self.tooltips.createTooltip(errorTarget,\n self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n return true;\n } else {\n if (remove) {\n self.tooltips.removeTooltip();\n }\n }\n return false;\n }\n\n /**\n * Checks if element is marked as invalid\n * @param {HTMLElement} el\n * @returns {boolean}\n * @private\n */\n _isElementInvalidElement(el) {\n return el.hasAttribute(DATA_ELEMENT_INVALID);\n }\n\n /**\n * Handles invalid event of a form\n * @param {Event} e\n * @returns {Promise|boolean}\n * @private\n */\n _checkIsInvalid(e) {\n e.preventDefault();\n var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n return this._handleValidation(invalidFields, true, false);\n }\n\n /**\n * Will query dependent fields (by selector) that should be validated with given field\n * @param field\n * @returns {NodeList|[]}\n * @private\n */\n _getDependentFields(field) {\n let fieldSelector = field.getAttribute(ATTR_DEPENDS), base = [field];\n if (fieldSelector) {\n base.push.apply(base, Array.prototype.slice.apply(\n this.getForm().querySelectorAll(fieldSelector)));\n }\n return base;\n }\n\n /**\n * @private\n * @param {HTMLElement} [target]\n */\n _handleTooltipInline(target) {\n if (this.tooltips) {\n this.tooltips.removeTooltip(target);\n }\n }\n\n /**\n * Initializes validation for a given form, registers event handlers\n */\n initFormValidation() {\n // Suppress the default bubbles\n var form = this.getForm(),\n self = this,\n invalidEvent = 'invalid';\n\n /**\n * Validates if is valid realtime element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidRealtimeElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n form.addEventListener(invalidEvent, function (e) {\n e.preventDefault();\n }, true);\n\n Util.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n self._formLoading();\n var result = self._checkIsInvalid(e);\n if (result) {\n self.currentValidationFuture = new Promise((resolve) => {\n result.then(function (r) {\n setTimeout(function () {\n Util.addEventOnce(invalidEvent, form, handleInvalid, true);\n }, 0);\n resolve(r);\n self._formStopLoading();\n if (!r.foundAnyError) {\n self._formLoading();\n self._handleSubmit(e);\n }\n });\n });\n }\n }, true);\n\n this.addEventListener(form, 'reset', () => {\n this.removeErrors();\n });\n\n // Timeout for keys:\n var TIMEOUT_KEYDOWN, KEYDOWN_RUNNING = false;\n\n // resets keydown events\n function clearKeyDownTimeout() {\n KEYDOWN_RUNNING = false;\n clearTimeout(TIMEOUT_KEYDOWN);\n }\n\n // setup custom realtime event if given\n if (self.options.realtime) {\n this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n if (self._formIsLoading()) {\n return;\n }\n var target = e.target;\n clearTimeout(TIMEOUT_KEYDOWN);\n if (KEYDOWN_RUNNING) {\n return;\n }\n TIMEOUT_KEYDOWN = setTimeout(() => {\n let isStillTarget = document.activeElement === e.target;\n if (!_checkIsValidRealtimeElement(target)) {\n return;\n }\n if (isStillTarget) {\n self._handleTooltipInline();\n }\n KEYDOWN_RUNNING = true;\n let dependentFields = self._getDependentFields(target);\n self._customValidationsForElements(dependentFields).then(function () {\n self.prepareErrors(dependentFields, false);\n if (isStillTarget) {\n self.showAndOrCreateTooltip(e.target);\n }\n // future must be resolved before another event can be started\n KEYDOWN_RUNNING = false;\n });\n }, self.options.realtimeTimeout);\n }, true);\n }\n\n /**\n * Validates if target is a valid input field to check blur and focus events\n *\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidBlurFocusElement(target) {\n let attr = target.getAttribute(\"type\");\n return (attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\");\n }\n\n /**\n * Validates if is valid inline-check element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidInlineCheckElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n this.addEventListener(form, 'blur', function (e) {\n // do not hide tooltip after change event\n if (!e.target.flexcssKeepTooltips) {\n self._handleTooltipInline(e.target);\n }\n delete e.target.flexcssKeepTooltips;\n }, true);\n\n // handle focus on input elements\n // will show an error if field is invalid\n this.addEventListener(form, \"focus\", function (e) {\n if (self._formIsLoading()) {\n return;\n }\n // do not track errors for checkbox and radios on focus:\n if (!_checkIsValidBlurFocusElement(e.target)) {\n return;\n }\n // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n // just have been hidden (on blur). Maybe fix this with a queue later\n setTimeout(function () {\n self.showAndOrCreateTooltip(e.target);\n }, FOCUS_TOOLTIP_DELAY);\n }, true);\n\n if (self.options.inlineValidation) {\n // Handle change for checkbox, radios and selects\n this.addEventListener(form, \"change\", function (e) {\n const target = e.target;\n if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n return;\n }\n clearKeyDownTimeout();\n const name = target.getAttribute('name');\n let inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n // we only support dependent fields for a single widgets right now\n if (inputs.length === 1) {\n inputs = self._getDependentFields(target);\n }\n self._customValidationsForElements(inputs).then(function () {\n self.prepareErrors(inputs, false);\n target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n if (target.flexcssKeepTooltips) {\n self._handleTooltipHideClickAfterChange();\n }\n });\n });\n }\n\n // prevent default if form is invalid\n this.addEventListener(form, \"submit\", function listener(e) {\n self._submitListener(e, listener);\n });\n\n Event.dispatchAndFire(form, EVENT_FORM_READY);\n }\n\n /* Loading states, unfortunately we can't check if a promise is pending :/*/\n /* TODO: Maybe wrap promise to extend this functionality */\n\n _formLoading() {\n this.getForm().classList.add(LOADING_CLASS);\n }\n\n _formStopLoading() {\n this.getForm().classList.remove(LOADING_CLASS);\n }\n\n _formIsLoading() {\n return this.getForm().classList.contains(LOADING_CLASS);\n }\n\n // this defines the logic after a change event when a tooltip is shown\n // because we call this method inside the change event, the click would be immeditally executed with the change\n // event when not using setTimeout(). There might be another solution for this...\n _handleTooltipHideClickAfterChange() {\n const self = this;\n if (this.options.createTooltips) {\n setTimeout(function () {\n Util.addEventOnce(Settings.getTabEvent(), global.document.body, function (t) {\n if (!self._isElementInvalidElement(t.target)) {\n self._handleTooltipInline();\n }\n });\n }, CLICK_TOOLTIP_DELAY);\n }\n }\n\n _focusElement(el) {\n el.focus();\n Util.scrollToElement(el, this.options.scrollToElementDiff);\n }\n\n /**\n * Listener that is executed on form submit\n * @param e\n * @param submitListener\n * @returns {boolean}\n * @private\n */\n _submitListener(e, submitListener) {\n\n const form = this.getForm(),\n self = this,\n submitEvent = 'submit';\n\n if (this._formIsLoading()) {\n e.preventDefault();\n return false;\n }\n this._formLoading();\n form.removeEventListener(submitEvent, submitListener);\n this.removeErrors();\n e.preventDefault();\n // reset:\n if (form.checkValidity()) {\n form.addEventListener(submitEvent, submitListener);\n // It's possible that the form is valid but the custom validations need to be checked again:\n self.currentValidationFuture = new Promise((resolve) => {\n var validation = self.validateCustomFields();\n validation.then(function (r) {\n // because custom validators may mark multiple fields as invalid, we get all of them in the form\n var fields = self._getInvalidElements(),\n errors = self.prepareErrors(fields, false), firstError = errors[0];\n if (firstError) {\n self._focusElement(firstError);\n self.showAndOrCreateTooltip(firstError, true);\n }\n resolve(r);\n });\n });\n self.currentValidationFuture.then(function (r) {\n if (!r.foundAnyError) {\n // Handle submitting the form to server:\n self._handleSubmit(e);\n } else {\n self._formStopLoading();\n }\n });\n } else {\n self._formStopLoading();\n form.addEventListener(submitEvent, submitListener);\n }\n }\n\n\n /**\n * Handles submitting, optionally allows to stop submitting\n * @param e\n * @private\n */\n _handleSubmit(e) {\n this._submitFunction(this.form, e);\n }\n\n\n /**\n * Registers a global event Handler\n * @param errorFunc\n */\n static registerErrorMessageHandler(errorFunc) {\n Form.globalErrorMessageHandler = errorFunc;\n }\n\n /**\n * Initialize forms for a specific selector\n * @param {String} selector\n * @param {Object} [options]\n * @return {array.}\n */\n static init(selector, options) {\n var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') :\n document.querySelectorAll(selector), instances = [];\n for (var i = 0; i < forms.length; i++) {\n instances.push(new Form(forms[i], options));\n }\n return instances;\n }\n\n\n /**\n * Registers a global validator that is usable on all form instances\n * @param {String} name\n * @param {Function} validator\n * @returns {Function}\n */\n static registerValidator(name, validator) {\n Form.globalValidators[name] = validator;\n return Form;\n }\n\n /**\n * Registers a global function that is called when a form should validate the response of a server\n * @param {Function} func\n * @returns {Form}\n */\n static registerGlobalRemoteValidationFunction(func) {\n Form.globalRemoteValidationFunction = func;\n return Form;\n }\n}\n\n\n/**\n * Global validators\n * @type {Array}\n */\nForm.globalValidators = [];\n\n/**\n * Global Remote validation function\n */\nForm.globalRemoteValidationFunction = function () {\n};\n\n/**\n * Handles custom error messages extracts custom message by default\n */\nForm.globalErrorMessageHandler = (field, validity) => {\n if (!validity.customError) {\n let customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n if (customMsg) {\n field.setCustomValidity(customMsg);\n }\n }\n};\n\nexport default Form;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Form.js\n **/","export default (fn, ms) => () => {\n clearTimeout(fn.timeout);\n fn.timeout = setTimeout(fn, ms);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/debounce.js\n **/","// the whatwg-fetch polyfill installs the fetch() function\n// on the global object (window or self)\n//\n// Return that as the export for use in Webpack, Browserify etc.\nrequire('whatwg-fetch');\nmodule.exports = self.fetch.bind(self);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/isomorphic-fetch/fetch-npm-browserify.js\n ** module id = 11\n ** module chunks = 0 1\n **/","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var list = this.map[name]\n if (!list) {\n list = []\n this.map[name] = list\n }\n list.push(value)\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n var values = this.map[normalizeName(name)]\n return values ? values[0] : null\n }\n\n Headers.prototype.getAll = function(name) {\n return this.map[normalizeName(name)] || []\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = [normalizeValue(value)]\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n Object.getOwnPropertyNames(this.map).forEach(function(name) {\n this.map[name].forEach(function(value) {\n callback.call(thisArg, value, name, this)\n }, this)\n }, this)\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n reader.readAsArrayBuffer(blob)\n return fileReaderReady(reader)\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n reader.readAsText(blob)\n return fileReaderReady(reader)\n }\n\n var support = {\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob();\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n function Body() {\n this.bodyUsed = false\n\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (!body) {\n this._bodyText = ''\n } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n // Only support ArrayBuffers for POST method.\n // Receiving ArrayBuffers happens via Blobs, instead.\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n } else {\n this.text = function() {\n var rejected = consumed(this)\n return rejected ? rejected : Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n if (Request.prototype.isPrototypeOf(input)) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = input\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this)\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function headers(xhr) {\n var head = new Headers()\n var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n pairs.forEach(function(header) {\n var split = header.trim().split(':')\n var key = split.shift().trim()\n var value = split.join(':').trim()\n head.append(key, value)\n })\n return head\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText\n this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request\n if (Request.prototype.isPrototypeOf(input) && !init) {\n request = input\n } else {\n request = new Request(input, init)\n }\n\n var xhr = new XMLHttpRequest()\n\n function responseURL() {\n if ('responseURL' in xhr) {\n return xhr.responseURL\n }\n\n // Avoid security warnings on getResponseHeader when not allowed by CORS\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL')\n }\n\n return;\n }\n\n xhr.onload = function() {\n var status = (xhr.status === 1223) ? 204 : xhr.status\n if (status < 100 || status > 599) {\n reject(new TypeError('Network request failed'))\n return\n }\n var options = {\n status: status,\n statusText: xhr.statusText,\n headers: headers(xhr),\n url: responseURL()\n }\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/whatwg-fetch/fetch.js\n ** module id = 12\n ** module chunks = 0 1\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Dropdown\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\n\n/**\n * @type {string}\n */\nconst ATTR_CC = 'data-collision-container';\n/**\n * @type {string}\n */\nconst ATTR_DARKENER = 'data-darkener-container';\n/**\n * @type {string}\n */\nconst DARKENER_INIT = 'init';\n/**\n * @type {string}\n */\nconst ATTR_DATA_TARGET = 'data-target';\n/**\n * @type {string}\n */\nconst ATTR_CLOSE_DROPDOWN = 'data-close-dropdown';\n/**\n * @type {string}\n */\nconst ATTR_NAME = 'data-dropdown';\n/**\n * @type {string}\n */\nconst STATE_LOADING = 'loading';\n\nconst CLS_DARKENER_DROPDOWN = 'darkener-dropdown';\n/**\n * @type {string}\n */\nconst CLS_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst CLS_DROPDOWN = 'dropdown';\n\n/**\n * @type {string}\n */\nexport const EVENT_DROPDOWN_CLOSED = 'flexcss.dropdown.closed';\n\n/**\n * A Dropdown\n */\nclass Dropdown {\n constructor(DelegateContainer, Darkener) {\n const doc = global.document;\n\n /**\n * Container Element\n * @type {HTMLElement}\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n this.currentOpen = null;\n this.currentTarget = null;\n /**\n * @type {HTMLElement}\n */\n this.darkener = Darkener instanceof HTMLElement ? Darkener : document.getElementById(Darkener);\n\n this.destroyOnClose = false;\n\n if (!this.darkener || !this.container) {\n throw new Error('required elements not found (darkener and container element)');\n }\n }\n\n /**\n * Method that handles delegation events for dropdowns\n * @param e\n * @returns {boolean}\n * @private\n */\n _delegateFunction(e) {\n const currentOpen = this.currentOpen;\n const target = Util.closestCallback(e.target, n => n instanceof HTMLElement && n.hasAttribute(ATTR_NAME));\n const targetIsCurrent = target === this.currentTarget;\n\n if (currentOpen && !Util.isPartOfNode(e.target, currentOpen) || targetIsCurrent) {\n this.close();\n if (targetIsCurrent) {\n e.preventDefault();\n }\n return targetIsCurrent ? false : this._delegateFunction(e);\n }\n\n if (target && !currentOpen) {\n e.preventDefault();\n e.stopImmediatePropagation();\n\n if (target.isLoading) {\n return false;\n }\n this.createDropdown(target);\n } else {\n if (currentOpen) {\n if (e.target.hasAttribute(ATTR_CLOSE_DROPDOWN)) {\n e.preventDefault();\n this.close();\n }\n if (!Util.isPartOfNode(e.target, currentOpen)) {\n this.close();\n }\n }\n }\n }\n\n /**\n * Register Events for this dropdown container\n * @returns {Dropdown}\n */\n registerEvents() {\n FixedWindow.getInstance().addScreenConstraint(Dropdown, (width) => width < Settings.get().smallBreakpoint);\n this.container.addEventListener(Settings.getTabEvent(), this._delegateFunction.bind(this), true);\n return this;\n }\n\n /**\n * Destroys this instance, unbinds events\n * @returns {Dropdown}\n */\n destroy() {\n this.container.removeEventListener(Settings.getTabEvent(), this._delegateFunction.bind(this), true);\n return this;\n }\n\n\n /**\n * Destroys instance on close of dropdown\n * @param v\n * @returns {Dropdown}\n */\n setDestroyOnClose(v) {\n this.destroyOnClose = v;\n return this;\n }\n\n\n /**\n * Will add the right class to container for specific darkener id\n * @param instance\n * @param show\n */\n toggleDarkenerToggler(instance, show) {\n const cls = `toggle-${(instance.id || CLS_DARKENER_DROPDOWN)}`;\n const classList = this.container.classList;\n if (show) {\n classList.add(cls);\n } else {\n classList.remove(cls);\n }\n }\n\n /**\n * Closes Dropdown on current instance\n * @return {Boolean|Promise}\n */\n close() {\n const currentOpen = this.currentOpen;\n if (!currentOpen) {\n return false;\n }\n const darkenerInstance = currentOpen.flexDarkenerInstance || this.darkener;\n const thisCurrentOpen = currentOpen;\n\n const future = new Promise((resolve) => {\n if (window.getComputedStyle(currentOpen).position === 'fixed') {\n Util.addEventOnce(Settings.getTransitionEvent(), currentOpen, function scheduler(e) {\n if (e.srcElement !== currentOpen) {\n return Util.addEventOnce(Settings.getTransitionEvent(), currentOpen, scheduler.bind(this));\n }\n requestAnimationFrame(() => {\n Event.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n // if a new dropdown has been opened in the meantime, do not remove darkener\n if (this.currentOpen !== null) {\n return false;\n }\n this.toggleDarkenerToggler(darkenerInstance, false);\n resolve(true);\n });\n }.bind(this));\n } else {\n resolve(true);\n Event.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n }\n });\n\n FixedWindow.getInstance().close();\n currentOpen.classList.remove(CLS_OPEN);\n\n if (currentOpen.flexDarkenerInstance) {\n currentOpen.flexDarkenerInstance.classList.remove(DARKENER_INIT);\n } else {\n this.darkener.classList.remove(DARKENER_INIT);\n }\n\n this.currentOpen = null;\n this.currentTarget = null;\n\n if (this.destroyOnClose) {\n this.destroy();\n }\n\n return future;\n }\n\n /**\n * Creates a dropdown on given target and opens it\n * @param {HTMLElement} target target where this dropdown is placed\n * @param {FlexCss.Widget} [thisWidget] if given will use widget instead of widget instance\n * @return {FlexCss.Dropdown}\n */\n createDropdown(target, thisWidget) {\n const doc = global.document;\n\n if (!target) {\n throw new Error('Dropdown target not found');\n }\n\n const widget = thisWidget || Widget.findWidget(target);\n let future;\n const data = target.getAttribute(ATTR_NAME);\n const dropdownContainerElement = doc.getElementById(data);\n const async = !dropdownContainerElement && Widget.isWidget(widget) ? widget.getAsync() : false;\n\n if (async) {\n target.classList.add(STATE_LOADING);\n target.isLoading = true;\n future = async.then((r) => {\n if (r instanceof HTMLElement) {\n if (r.id) {\n target.setAttribute(ATTR_NAME, r.id);\n }\n return r;\n }\n // Create container Element:\n const element = doc.createElement('div');\n element.className = CLS_DROPDOWN;\n element.innerHTML = r;\n element.id = Util.guid();\n // Cache target for later use:\n target.setAttribute(ATTR_NAME, element.id);\n this.container.appendChild(element);\n return element;\n }).then((r) => {\n target.isLoading = false;\n target.classList.remove(STATE_LOADING);\n return r;\n });\n } else {\n if (!dropdownContainerElement) {\n throw new Error(`Could not found Dropdown container with ID \"${data}\"`);\n }\n future = new Promise((r) => {\n r(dropdownContainerElement);\n });\n }\n\n future.then((dropdownContent) => {\n if (this.currentOpen) {\n this.close();\n }\n // Skip one frame to show animation\n target.dropdownContent = dropdownContent;\n const isAbsolute = global.getComputedStyle(dropdownContent).position === 'absolute';\n dropdownContent.hfWidgetInstance = this;\n\n if (!target.flexCollisionContainer) {\n const collisionC = target.getAttribute(ATTR_CC);\n target.flexCollisionContainer = collisionC ?\n doc.getElementById(collisionC) || document.documentElement : document.documentElement;\n }\n\n dropdownContent.classList.toggle(CLS_OPEN);\n if (dropdownContent.classList.contains(CLS_OPEN)) {\n this.currentOpen = dropdownContent;\n this.currentTarget = target;\n }\n FixedWindow.getInstance().open(this, dropdownContent);\n if (isAbsolute) {\n // Check collision:\n let selfTarget = target.getAttribute(ATTR_DATA_TARGET);\n selfTarget = selfTarget ? doc.getElementById(selfTarget) : target;\n Util.setupPositionNearby(selfTarget, dropdownContent, target.flexCollisionContainer);\n } else {\n // optionally get custom darkener container for target\n const d = target.getAttribute(ATTR_DARKENER);\n if (d) {\n dropdownContent.flexDarkenerInstance = doc.getElementById(d);\n (dropdownContent.flexDarkenerInstance || this.darkener).classList.toggle(DARKENER_INIT);\n } else {\n this.darkener.classList.toggle(DARKENER_INIT);\n }\n this.toggleDarkenerToggler(dropdownContent.flexDarkenerInstance || this.darkener, true);\n\n dropdownContent.style.left = '0';\n dropdownContent.style.top = 'auto';\n }\n });\n }\n\n}\n\nexport default Dropdown;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Dropdown.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.LightBox\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global Image, TouchEvent*/\n\nimport Modal, { EVENT_MODAL_CLOSED } from './Modal';\nimport Settings from './util/Settings';\nimport Widget from './Widget';\n\nconst ATTR_MAX_WIDTH = 'data-original-width';\nconst ATTR_MAX_HEIGHT = 'data-original-height';\nconst ATTR_SRC = 'data-src';\n\nconst CLS_HAS_PREV = 'has-prev';\nconst CLS_HAS_NEXT = 'has-next';\nconst CLS_LOADING = 'loading';\n\nconst ATTR_NO_THUMBNAIL = 'data-no-thumbnail';\nconst ATTR_DATA_HREF = 'data-href';\nconst ATTR_HREF = 'href';\n\nconst KEY_NEXT = 39;\nconst KEY_PREV = 37;\nconst ATTR_CLOSE = 'data-close-modal';\n/**\n * A Simple LightBox\n */\nclass LightBox {\n\n /**\n * Creates a new Lightbox\n * @param DelegateContainer\n * @param AttributeSelector\n * @param ModalAppend\n * @param [options]\n */\n constructor(DelegateContainer, AttributeSelector, ModalAppend, options) {\n const thisDelegateContainer = DelegateContainer instanceof HTMLElement ? DelegateContainer :\n document.getElementById(DelegateContainer);\n\n this._modalAppend = ModalAppend || DelegateContainer;\n /**\n * @type {Function}\n */\n this._resizeEvent = null;\n /**\n * @type {Function}\n */\n this._keyboardNextEvent = null;\n /**\n * @type {Promise}\n */\n this._future = null;\n /**\n * @type {Promise}\n */\n this._nextFuture = this._future;\n /**\n * @type {HTMLElement}\n */\n this._imageContainer = null;\n /**\n * @type {HTMLElement}\n */\n this._modalContainerDiv = null;\n /**\n * @type {HTMLElement}\n */\n this._contentContainer = null;\n /**\n * @type {HTMLElement}\n */\n this._closerContainerDiv = null;\n /**\n * @type {HTMLElement}\n */\n this._delegateContainer = thisDelegateContainer;\n /**\n * @type {HTMLElement}\n */\n this._attributeSelector = AttributeSelector;\n /**\n * @type {Widget}\n */\n this._widget = null;\n /**\n * @type {boolean}\n */\n this._isOpen = false;\n /**\n * @type {HTMLElement}\n */\n this.target = null;\n /**\n * @type {HTMLElement}\n */\n this.img = null;\n /**\n * @type {boolean}\n */\n this._isLoading = false;\n\n /**\n * Default options\n */\n this.options = {\n // set if prev and next should be available\n registerPrevNextEvents: true,\n // set if modal should be closed after last image\n closeOnLast: true,\n // called when next image is requested (either by keyboard or click), return false to abort\n onNext: () => {\n return true;\n },\n onClose: () => {\n },\n getNext: null,\n getPrev: null,\n // called when underlying target changed\n onSwitchImage: () => {\n }\n };\n\n Object.assign(this.options, options);\n }\n\n /**\n * @param {HTMLElement} node\n * @returns {HTMLElement|null}\n */\n findImmediateNextTarget(node) {\n if (node && node.children[0].hasAttribute(this._attributeSelector)) {\n return node.children[0];\n }\n return null;\n }\n\n /**\n * Will fetch the next element of a lightBox\n * @param {HTMLElement} target\n * @returns {null|HTMLElement}\n */\n getNext(target) {\n if (this.options.getNext) {\n return this.options.getNext.apply(this, [target]);\n }\n return this.findImmediateNextTarget(target.parentNode.nextElementSibling);\n }\n\n /**\n * Will fetch the previous element of a lightBox\n * @param {HTMLElement} target\n * @returns {null|HTMLElement}\n */\n getPrev(target) {\n if (this.options.getPrev) {\n return this.options.getPrev.apply(this, [target]);\n }\n return this.findImmediateNextTarget(target.parentNode.previousElementSibling);\n }\n\n /**\n * Registers events for delegate container\n */\n registerEvents(onOpen) {\n this._delegateContainer.addEventListener(Settings.getTabEvent(), (e) => {\n let target = e.target;\n const parent = target.parentNode;\n let validTarget = target.hasAttribute(this._attributeSelector);\n const parentIsValid = parent && parent.hasAttribute(this._attributeSelector);\n\n if (!validTarget && parentIsValid) {\n validTarget = true;\n target = parent;\n }\n if (validTarget) {\n e.preventDefault();\n this.open(target).then((r) => {\n if (onOpen) {\n onOpen.apply(this, [r, target]);\n }\n });\n }\n });\n }\n\n /**\n * @returns {HTMLElement}\n */\n getContentContainer() {\n return this._contentContainer;\n }\n\n /**\n * Setup max-width and max-height\n * @param {HTMLElement} target\n * @param {HTMLElement} img\n * @param {HTMLElement} loadedImage\n * @private\n */\n static _setupMaxWidthHeight(target, img, loadedImage) {\n const nextMaxWidth = target.getAttribute(ATTR_MAX_WIDTH);\n const nextMaxHeight = target.getAttribute(ATTR_MAX_HEIGHT);\n if (nextMaxWidth && nextMaxHeight) {\n img.style.maxWidth = nextMaxWidth + \"px\";\n img.style.maxHeight = nextMaxHeight + \"px\";\n } else {\n img.style.maxWidth = loadedImage.width + \"px\";\n img.style.maxHeight = loadedImage.height + \"px\";\n }\n }\n\n /**\n * Switches to the next image\n * @param {boolean} direction\n */\n switchImageByDirection(direction) {\n const next = direction ? this.getPrev(this.target) : this.getNext(this.target);\n if (this.options.onNext.apply(this, [next])) {\n return this.switchImage(next);\n }\n return new Promise((_, reject) => reject(next));\n }\n\n /**\n * Checks if lightbox is currently loading\n * @returns {boolean}\n */\n isLoading() {\n return this._isLoading;\n }\n\n /**\n * Checks if modal should be closed\n * @private\n */\n _runOptionalClose() {\n if (this.options.closeOnLast) {\n this.modal.close();\n }\n }\n\n _setupPrevNextStates() {\n const target = this.target;\n const hasPrev = this.getPrev(target);\n const hasNext = this.getNext(target);\n const hasPrevClass = CLS_HAS_PREV;\n const hasNextClass = CLS_HAS_NEXT;\n // because IE does not support the second toggle parameter, we need to do this manually\n if (hasPrev) {\n this._imageContainer.classList.add(hasPrevClass);\n } else {\n this._imageContainer.classList.remove(hasPrevClass);\n }\n if (hasNext) {\n this._imageContainer.classList.add(hasNextClass);\n } else {\n this._imageContainer.classList.remove(hasNextClass);\n }\n }\n\n /**\n * @param img\n * @private\n */\n _calculateContainer(img) {\n if (Settings.isIE()) {\n setTimeout(() => {\n this._imageContainer.style.height = img.offsetHeight + 'px';\n }, 0);\n }\n }\n\n /**\n * Switch to a specific image\n * @param next\n * @returns {*}\n */\n switchImage(next) {\n const self = this;\n const img = this.img;\n this._isLoading = true;\n self._nextFuture = new Promise((resolve, reject) => {\n // notify observers about image switching\n self.options.onSwitchImage.apply(self, [self._nextFuture]);\n if (next) {\n const nextThumb = next.hasAttribute(ATTR_NO_THUMBNAIL) ? next : (next.children[0] || next);\n const nextHighRes = next.getAttribute(ATTR_DATA_HREF) ||\n next.getAttribute(ATTR_HREF);\n const nextSource = nextThumb.getAttribute(ATTR_SRC) || nextThumb.src || nextHighRes;\n const nextImgObject = new Image();\n\n if (!nextSource) {\n reject(next);\n return;\n }\n // set new target to next element\n this.target = next;\n nextImgObject.src = nextSource;\n self._imageContainer.classList.add(CLS_LOADING);\n nextImgObject.addEventListener('load', () => {\n img.src = nextSource;\n self._imageContainer.style.backgroundImage = 'url(' + nextSource + ')';\n LightBox._setupMaxWidthHeight(next, img, nextImgObject);\n self._calculateContainer(img);\n self.highRes(nextThumb, nextHighRes);\n self._setupPrevNextStates();\n self._imageContainer.classList.remove(CLS_LOADING);\n this._isLoading = false;\n resolve(nextSource, this.target);\n });\n } else {\n reject(this);\n }\n });\n return self._nextFuture;\n }\n\n\n /**\n * Setup High-Resolution picture\n * @param {HTMLElement} thisThumbnail\n * @param {String} thisImgHighResolution\n */\n highRes(thisThumbnail, thisImgHighResolution) {\n if (thisImgHighResolution && thisThumbnail.src !== thisImgHighResolution) {\n const highImageObj = new Image();\n highImageObj.src = thisImgHighResolution;\n highImageObj.addEventListener('load', () => {\n // if current image is still available\n if (this._getSrc(thisThumbnail) === this.img.src) {\n this.img.src = thisImgHighResolution;\n this._imageContainer.style.backgroundImage = 'url(' + thisImgHighResolution + ')';\n }\n });\n }\n }\n\n /**\n * Extracts the source of an image\n * @param target\n * @returns {String|null}\n * @private\n */\n _getSrc(target) {\n return target.getAttribute(ATTR_SRC) || target.src;\n }\n\n /**\n * Will show a lightBox on given target\n * @param {HTMLElement} target\n * @returns {$.Deferred|*}\n */\n open(target) {\n const self = this;\n\n if (!target) {\n return false;\n }\n\n this.target = target;\n\n // if lightBox is open, we just switch to the new target image\n if (this._isOpen && target) {\n return this.switchImage(target).then(() => {\n return this;\n });\n }\n\n this._isOpen = true;\n\n /**\n * Setup Widget for modal\n * @type {Widget}\n */\n this._widget = new Widget().setAsync(() => {\n // thumbnail is either target itself or expected to be first childNode\n const thumbnail = target.hasAttribute(ATTR_NO_THUMBNAIL) ? target : (target.children[0] || target);\n\n const imgHighResolution = target.getAttribute(ATTR_DATA_HREF) || target.getAttribute(ATTR_HREF);\n const imgSrc = this._getSrc(thumbnail) || imgHighResolution;\n\n const imageObj = new Image();\n imageObj.src = imgSrc;\n this._imageContainer = document.createElement('div');\n this._modalContainerDiv = document.createElement('div');\n this._closerContainerDiv = document.createElement('i');\n this._contentContainer = document.createElement('div');\n\n this._closerContainerDiv.className = 'modal-close modal-close-lightbox icon-cancel-1';\n this._closerContainerDiv.setAttribute(ATTR_CLOSE, ATTR_CLOSE);\n\n this._modalContainerDiv.className = 'modal image-modal';\n this._modalContainerDiv.appendChild(this._imageContainer);\n this._modalContainerDiv.appendChild(this._contentContainer);\n this._modalContainerDiv.appendChild(this._closerContainerDiv);\n this._contentContainer.className = 'content-container';\n this._isLoading = true;\n this._future = new Promise((resolve) => {\n imageObj.addEventListener('load', () => {\n this._imageContainer.className = 'image-container';\n const img = document.createElement('img');\n // current image\n this.img = img;\n\n img.src = imgSrc;\n LightBox._setupMaxWidthHeight(target, img, imageObj);\n this._imageContainer.appendChild(img);\n this._imageContainer.style.backgroundImage = 'url(' + imgSrc + ')';\n\n resolve(self._modalContainerDiv);\n this._isLoading = false;\n\n if (Settings.isIE()) {\n self._resizeEvent = global.addEventListener('resize', () => {\n setTimeout(() => {\n self._imageContainer.style.height = img.offsetHeight + 'px';\n }, 0);\n });\n }\n\n if (self.options.registerPrevNextEvents) {\n self._setupPrevNextStates();\n // prev or next on touch/click\n self._imageContainer.addEventListener(Settings.getTabEvent(), (e) => {\n if (self.isLoading()) {\n return;\n }\n e.preventDefault();\n\n const ev = e;\n const pageX = global.TouchEvent && ev instanceof TouchEvent ?\n ev.changedTouches[0].pageX : ev.pageX;\n const rect = self._imageContainer.getBoundingClientRect();\n const imgX = rect.left;\n const wrapperWidth = rect.width;\n const posX = pageX - imgX;\n\n self.switchImageByDirection(wrapperWidth / 2 > posX).catch(() => {\n self._runOptionalClose();\n });\n });\n\n // register keyboard events\n self._keyboardNextEvent = (e) => {\n if (e.keyCode === KEY_NEXT || e.keyCode === KEY_PREV) {\n if (self.isLoading()) {\n return;\n }\n self.switchImageByDirection(e.keyCode === KEY_PREV).catch(() => {\n self._runOptionalClose();\n });\n }\n };\n global.addEventListener('keydown', self._keyboardNextEvent);\n } else {\n self._imageContainer.addEventListener(Settings.getTabEvent(), () => {\n self._runOptionalClose();\n });\n }\n\n self.highRes(thumbnail, imgHighResolution);\n });\n });\n\n this._future.then(() => {\n self._calculateContainer(this.img);\n });\n\n self._modalContainerDiv.addEventListener(EVENT_MODAL_CLOSED, () => {\n // cleanup:\n this._modalContainerDiv.parentNode.removeChild(this._modalContainerDiv);\n this.options.onClose.apply(self);\n this._isOpen = false;\n this.modal.destroy();\n // unbind events\n if (this._keyboardNextEvent) {\n global.removeEventListener('keydown', self._keyboardNextEvent);\n }\n if (this._resizeEvent) {\n global.removeEventListener('resize', self._resizeEvent);\n }\n });\n\n return this._future;\n });\n\n this._nextFuture = this._future;\n\n if (self._widget) {\n this.modal = new Modal(this._modalAppend);\n // make sure we close stack before\n return this.modal.close().fromWidget(self._widget).then(() => {\n return self._future.then(() => {\n return self;\n });\n });\n }\n return false;\n }\n\n}\n\nexport default LightBox;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/LightBox.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.OffCanvas\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Settings from './util/Settings';\nimport Util from './util/Util';\nimport Event from './util/Event';\nimport FixedWindow from './lib/FixedWindow';\n\n/**\n * @type {string}\n */\nconst ATTR_CLOSE_SIDEBAR = 'data-close-offcanvas';\n\n/**\n * @type {string}\n */\nconst ATTR_TARGET = 'data-offcanvas';\n/**\n * @type {string}\n */\nconst INIT_CLASS = 'init';\n/**\n * @type {string}\n */\nconst OPEN_CLASS = 'open';\n/**\n * @type {number}\n */\nconst HIDE_FACTOR = 3;\n\n/**\n * @type {string}\n */\nexport const EVENT_TOGGLE = 'flexcss.offcanvas.toggle';\n\n/**\n * A OffCanvas Implementation\n */\nclass OffCanvas {\n\n /**\n * Creates an off-canvas navigation\n * @param {HTMLElement|String} NavigationId\n * @param {HTMLElement|String} Darkener\n * @param {int} factor positive will expect right sidebar, positive left\n * @param {bool} [disableTouch] if true all touch events are disabled\n * @constructor\n */\n constructor(NavigationId, Darkener, factor, disableTouch) {\n const doc = global.document;\n let touchedX = 0;\n const navigationContainer = NavigationId instanceof HTMLElement ?\n NavigationId : doc.getElementById(NavigationId);\n const darkener = Darkener instanceof HTMLElement ? Darkener : doc.getElementById(Darkener);\n const DARKENER_CLASS_TOGGLE = `toggle-${darkener.id}` || 'darkener';\n const DARKENER_CLASS_INSTANT_TOGGLE = `${DARKENER_CLASS_TOGGLE}-open`;\n\n const shouldNotTouch = () => {\n return window.innerWidth >= Settings.get().smallBreakpoint;\n };\n\n if (!darkener || !navigationContainer) {\n throw new Error('Could not find needed elements (Darkener and/or NavigationId)');\n }\n\n this.darkener = darkener;\n this.darkenerClassToggle = DARKENER_CLASS_TOGGLE;\n this.darkenerClassToggleInstant = DARKENER_CLASS_INSTANT_TOGGLE;\n this.globalToggleClass = Settings.get().canvasToggledClass;\n\n this.navigationContainer = navigationContainer;\n this.navigationContainerId = navigationContainer.id;\n\n // create id if id does not exist\n if (!this.navigationContainerId) {\n this.navigationContainerId = Util.guid();\n navigationContainer.id = this.navigationContainerId;\n }\n\n if (!disableTouch) {\n navigationContainer.addEventListener('touchstart', (e) => {\n if (shouldNotTouch()) {\n return;\n }\n touchedX = e.touches[0].clientX;\n navigationContainer.mustHide = false;\n });\n navigationContainer.addEventListener('touchmove', (e) => {\n if (shouldNotTouch()) {\n return;\n }\n const { clientX } = e.touches[0];\n const target = navigationContainer;\n const style = target.style;\n const calcX = touchedX - clientX;\n const bounds = target.getBoundingClientRect();\n const compare = factor > 0 ? calcX <= 0 : calcX >= 0;\n if (compare) {\n style.transition = 'transform 0s ease';\n style.webkitTransition = '-webkit-transform 0s ease';\n target.mustHide = factor > 0 ? calcX * -1 >\n bounds.width / HIDE_FACTOR : calcX > bounds.width / HIDE_FACTOR;\n const transform = `translate3d(${calcX * -1}px,0,0)`;\n style.transform = transform;\n style.webkitTransform = transform;\n }\n });\n navigationContainer.addEventListener('touchend', () => {\n if (shouldNotTouch()) {\n return;\n }\n const target = navigationContainer;\n const style = target.style;\n if (target.mustHide) {\n const width = target.getBoundingClientRect().width * factor;\n style.transition = 'transform .2s ease';\n style.webkitTransition = '-webkit-transform .2s ease';\n const transform = `translate3d(${width}px,0,0)`;\n style.transform = transform;\n style.webkitTransform = transform;\n this._remove().then(() => {\n this.resetTransform(style);\n });\n this._removeInstant();\n } else {\n this.resetTransform(style);\n }\n });\n }\n }\n\n /**\n * @param {Object} s\n */\n resetTransform(s) {\n s.transform = '';\n s.transition = '';\n s.webkitTransform = '';\n s.webkitTransition = '';\n }\n\n /**\n * @param {Object} [event]\n * @private\n */\n _remove(event) {\n return new Promise((resolve) => {\n Util.addEventOnce(Settings.getTransitionEvent(), this.navigationContainer, function scheduler(e) {\n if (e.target !== this.navigationContainer) {\n return Util.addEventOnce(Settings.getTransitionEvent(),\n this.navigationContainer, scheduler.bind(this));\n }\n requestAnimationFrame(() => {\n OffCanvas.currentOpen = null;\n const docCls = global.document.documentElement.classList;\n docCls.remove(this.darkenerClassToggle);\n docCls.remove(this.globalToggleClass);\n if (!!event) {\n Event.dispatchAndFire(this.navigationContainer, EVENT_TOGGLE);\n }\n resolve();\n });\n }.bind(this));\n });\n }\n\n /**\n * @private\n */\n _removeInstant() {\n this.navigationContainer.classList.remove(OPEN_CLASS);\n global.document.documentElement.classList.remove(this.darkenerClassToggleInstant);\n this.darkener.classList.remove(INIT_CLASS);\n FixedWindow.getInstance().close();\n }\n\n /**\n * Toggles a an off-canvas element\n * @param [e]\n * @private\n */\n toggle(e) {\n if (e) {\n e.preventDefault();\n }\n this.resetTransform(this.navigationContainer.style);\n const darkenerClass = this.darkener.classList;\n const DARKENER_CLASS_TOGGLE = this.darkenerClassToggle;\n const DARKENER_CLASS_INSTANT_TOGGLE = this.darkenerClassToggleInstant;\n const navigationControllerClassList = this.navigationContainer.classList;\n if (!OffCanvas.currentOpen) {\n Util.addEventOnce(Settings.getTransitionEvent(), this.navigationContainer, () => {\n if (!!e) {\n Event.dispatchAndFire(this.navigationContainer, EVENT_TOGGLE);\n }\n });\n OffCanvas.currentOpen = this;\n FixedWindow.getInstance().open(this, this.navigationContainer);\n const docElementCls = global.document.documentElement.classList;\n docElementCls.add(this.globalToggleClass);\n docElementCls.add(DARKENER_CLASS_INSTANT_TOGGLE);\n docElementCls.add(DARKENER_CLASS_TOGGLE);\n darkenerClass.add(INIT_CLASS);\n navigationControllerClassList.add(OPEN_CLASS);\n } else {\n return this.close(e);\n }\n }\n\n close(event) {\n if (this.navigationContainer.classList.contains(OPEN_CLASS)) {\n const promise = this._remove(event);\n this._removeInstant();\n return promise;\n }\n return new Promise(r => r());\n }\n\n /**\n * Register events\n * @param [delegate]\n */\n registerEvents(delegate) {\n const thisDelegate = delegate || global.document;\n FixedWindow.getInstance().addScreenConstraint(OffCanvas, (width) => width < Settings.get().smallBreakpoint);\n thisDelegate.addEventListener(Settings.getTabEvent(), (e) => {\n if (OffCanvas.currentOpen && OffCanvas.currentOpen !== this) {\n return;\n }\n const id = this.navigationContainerId;\n const validTarget = e.target.getAttribute(ATTR_TARGET) === id;\n if (!Util.isPartOfNode(e.target, this.navigationContainer)) {\n if (validTarget || (OffCanvas.currentOpen === this && e.target === this.darkener)) {\n this.toggle(e);\n }\n } else {\n if (e.target.hasAttribute(ATTR_CLOSE_SIDEBAR)) {\n this.toggle(e);\n }\n }\n });\n }\n}\n\nOffCanvas.currentOpen = null;\n\nexport default OffCanvas;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/OffCanvas.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Toggleable\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Settings from './util/Settings';\nimport Widget from './Widget';\nimport Util from './util/Util';\nimport Event from './util/Event';\n\n/**\n * Event that is fired when a tab is closed\n * @type {string}\n */\n\nexport const EVENT_TAB_CLOSED = 'flexcss.tab.closed';\n\n/**\n * Event that is fired when a tab has been opened\n * @type {string}\n */\nexport const EVENT_TAB_OPENED = 'flexcss.tab.opened';\n/**\n * @type {string}\n */\nconst ATTR_NAME = 'data-toggle';\n/**\n * @type {string}\n */\nconst ACTIVE_CLASS = 'active';\n/**\n * @type {string}\n */\nconst LOADING_CLASS = 'loading';\n\n/**\n * @type {string}\n */\nconst ATTR_TOGGLE_LIST = 'data-toggle-list';\n\n/**\n * Creates a toggleable element, either for tabs or a single toggle\n */\nclass Toggleable {\n constructor(ContainerId) {\n const doc = global.document;\n\n this.container = ContainerId instanceof HTMLElement ? ContainerId :\n doc.getElementById(ContainerId);\n\n this.loading = false;\n\n if (!this.container) {\n throw new Error(`Toggleable container with id ${ContainerId} not found`);\n }\n }\n\n /**\n * Listener\n * @param {Event} e\n * @private\n */\n _listener(e) {\n let target = e.target;\n const parent = target.parentNode;\n const doc = global.document;\n\n // support target child element to clicked\n if (!target.hasAttribute(ATTR_NAME)) {\n if (parent && parent.hasAttribute(ATTR_NAME)) {\n target = parent;\n } else {\n return;\n }\n }\n\n if (!target.hasAttribute(ATTR_NAME)) {\n return;\n }\n\n const refId = target.getAttribute(ATTR_NAME);\n const ref = doc.getElementById(refId);\n\n e.preventDefault();\n\n if (this.loading) {\n return;\n }\n\n this.toggleTarget(ref, target);\n }\n\n /**\n * Registers Events for this instance\n * @returns {Toggleable}\n */\n registerEvents() {\n this.container.addEventListener(Settings.getTabEvent(), this._listener.bind(this));\n return this;\n }\n\n /**\n * Toggles given `ref`\n * @param {HTMLElement|Node} ref\n * @param {HTMLElement|Node} [selfTarget] optional target node\n */\n toggleTarget(ref, selfTarget) {\n let target = selfTarget;\n if (!target && !ref) {\n return;\n }\n if (!target) {\n target = document.querySelector(`[${ATTR_NAME}=\"${ref.id}\"]`);\n }\n\n let future;\n const elClassList = target.classList;\n const parent = target.parentNode;\n const doc = global.document;\n\n future = new Promise((resolve, failure) => {\n if (ref) {\n resolve(ref);\n } else {\n const widget = Widget.findWidget(target);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n if (r instanceof HTMLElement) {\n const id = Util.guid();\n r.id = id;\n target.setAttribute(ATTR_NAME, id);\n resolve(r);\n } else {\n throw new Error(`Dynamically creating toggle-content is not supported right now.\n Return an HTMLElement instance`);\n }\n });\n } else {\n failure('Target not given');\n }\n }\n });\n\n if (parent) {\n const maybeToggleNode = Util.parentsUntil(target, (node) => {\n return node && node.hasAttribute && node.hasAttribute(ATTR_TOGGLE_LIST);\n });\n\n const parentClassList = parent.classList;\n // Abort if element is already active and if is part of a toggle list\n if (maybeToggleNode) {\n if (!parentClassList.contains(ACTIVE_CLASS)) {\n parentClassList.toggle(ACTIVE_CLASS);\n parentClassList.add(LOADING_CLASS);\n } else {\n return;\n }\n }\n\n if (maybeToggleNode) {\n for (let i = 0; i < maybeToggleNode.children.length; i++) {\n const n = maybeToggleNode.children[i];\n const targetRef = n.children[0];\n if (n !== parent) {\n n.classList.remove(ACTIVE_CLASS);\n if (targetRef) {\n const attr = targetRef.getAttribute(ATTR_NAME);\n const el = attr ? doc.getElementById(attr) : null;\n if (el) {\n Event.dispatchAndFire(el, EVENT_TAB_CLOSED);\n el.classList.remove(ACTIVE_CLASS);\n targetRef.classList.remove(ACTIVE_CLASS);\n }\n }\n }\n }\n }\n }\n if (elClassList) {\n elClassList.toggle(ACTIVE_CLASS);\n elClassList.add(LOADING_CLASS);\n }\n this.loading = true;\n future.then((r) => {\n Event.dispatchAndFire(r, EVENT_TAB_OPENED);\n Toggleable._handleLoaded(target);\n r.classList.toggle(ACTIVE_CLASS);\n this.loading = false;\n }).catch(() => {\n this.loading = false;\n Toggleable._handleLoaded(target);\n });\n }\n\n /**\n * @param el\n * @private\n */\n static _handleLoaded(el) {\n const parentClassList = el.parentNode.classList;\n el.classList.remove(LOADING_CLASS);\n if (parentClassList) {\n parentClassList.remove(LOADING_CLASS);\n }\n }\n}\n\nexport default Toggleable;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Toggleable.js\n **/","import Form from '../Form';\nimport Tooltip from '../Tooltip';\nimport Modal from '../Modal';\nimport Widget from '../Widget';\nimport Settings from '../util/Settings';\nimport Toggleable from '../Toggleable';\nimport OffCanvas from '../OffCanvas';\nimport Dropdown from '../Dropdown';\nimport LightBox from '../LightBox';\nimport Util from '../util/Util';\n\nexport { Form, Tooltip, Modal, Widget, Settings, Util, Toggleable, OffCanvas, Dropdown, LightBox };\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/All.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///js/flexcss.min.js","webpack:///webpack/bootstrap a138c665fa30c31cdbad","webpack:///./src/main/util/Util.js","webpack:///./src/main/util/Settings.js","webpack:///./src/main/util/Event.js","webpack:///./src/main/Widget.js","webpack:///./src/main/DestroyableWidget.js","webpack:///./src/main/Tooltip.js","webpack:///./src/main/lib/FixedWindow.js","webpack:///./src/main/Modal.js","webpack:///./src/main/Form.js","webpack:///./src/main/lib/debounce.js","webpack:///./~/isomorphic-fetch/fetch-npm-browserify.js","webpack:///./~/whatwg-fetch/fetch.js","webpack:///./src/main/Dropdown.js","webpack:///./src/main/LightBox.js","webpack:///./src/main/OffCanvas.js","webpack:///./src/main/Toggleable.js","webpack:///./src/main/modules/All.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","global","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","PFX","COL_LEFT_CLASS","COL_RIGHT_CLASS","COL_BOTTOM_CLASS","Util","element","type","callback","thisFunction","e","apply","thisType","toLowerCase","name","addEventListener","t","el","document","createElement","transitions","transition","OTransition","MozTransition","WebkitTransition","undefined","style","parent","now","parentNode","func","s4","Math","floor","random","toString","substring","doc","inner","width","height","outer","position","top","left","visibility","overflow","appendChild","body","w1","offsetWidth","w2","clientWidth","removeChild","ev","capture","event","removeEventListener","offsetHeight","str","replace","g","toUpperCase","input","JSON","parse","stringify","base","attrs","attributes","attr","s","dashToCamelCase","nodeName","val","nodeValue","hasOwnProperty","parseInt","elementToPosition","collisionContainer","centerHorizontal","positionTop","amountTop","amountLeft","parentsUntil","HTMLElement","window","getComputedStyle","isPartOfNode","offsetTop","offsetLeft","targetPosition","getBoundingClientRect","elementRect","colRect","targetTop","targetRight","right","isCollisionTop","isCollisionBottom","innerHeight","isCollisionLeft","targetLeft","isCollisionRight","classList","remove","calcTop","calcLeft","add","rightPosition","leftCentered","collisionCentered","cssText","optionalOffset","scrollIntoView","thisOffset","scrolledY","pageYOffset","scroll","_interopRequireDefault","obj","__esModule","default","_Util","_Util2","FLEXCSS_GLOBAL_SETTINGS","smallBreakpoint","scrollbarUpdateNodes","darkenerFadeDelay","canvasToggledClass","FLEXCSS_CONST_IS_IOS","FLEXCSS_CONST_IS_TOUCH","FLEXCSS_CONST_IS_IE","FLEXCSS_CONST_TAB_EVENT","FLEXCSS_IS_SMALL_SCREEN","init","FLEXCSS_CONST_SCROLLBAR_WIDTH","getScrollBarWidth","FLEXCSS_CONST_TRANSITION_EVENT","whichTransitionEndEvent","readyState","Settings","settings","assign","navigator","userAgent","match","innerWidth","get","msMaxTouchPoints","CustomEvent","_CustomEvent","params","thisParams","bubbles","cancelable","detail","evt","createEvent","initCustomEvent","Event","EventHandler","defaultOptions","options","withDetail","originalEvent","o","dispatchEvent","withOptions","fire","_typeof","Symbol","iterator","constructor","Widget","_this","asyncContent","_isWidget","getElementById","Error","hfWidgetInstance","setAsync","Promise","finalContent","async","self","DestroyableWidget","listeners","forEach","listener","args","push","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","create","setPrototypeOf","__proto__","_get","object","property","receiver","Function","desc","getOwnPropertyDescriptor","getPrototypeOf","getter","_DestroyableWidget2","_DestroyableWidget3","_Settings","_Settings2","CLASS_NAMES_TOOLTIP","CLASS_NAMES_OPEN","ATTR_DATA_CLASSNAME","ATTR_DATA_NO_TOUCH","Tooltip","_DestroyableWidget","DelegateContainer","container","tooltipContainer","containerClass","selectorAttribute","text","removeTitle","positionRelative","trim","isTouchDevice","hasAttribute","_restoreClassNames","innerHTML","flexTooltipCurrentTarget","oldTitle","removeAttribute","setupPositionNearby","classNames","maybeTargetClass","getAttribute","className","join","selfTarget","setAttribute","createTooltip","removeTooltip","ALLOW_ELEMENT_OVERFLOW_TOUCH","EVENT_AFTER_FIXED_REMOVE","EVENT_BEFORE_FIXED_ADD","_slicedToArray","sliceIterator","arr","_arr","_n","_d","_e","_s","_i","next","done","err","Array","isArray","_debounce","_debounce2","_Event","_Event2","CLS_FIXED_WINDOW","fixedWindowInstance","FixedWindow","widgets","currentScrollTop","fixedScreenConstraints","windowWidth","isFixedWindowActive","touchListener","widget","fixedBreakpointFn","Set","widgetsThatRequireFixedWindow","from","some","_ref","_addFixedContainer","_removeFixedContainer","_this2","dispatchAndFire","getCurrentWidget","map","n","foundProperty","direction","node","whatNode","d","__fixedWindowMod__","getScrollbarWidth","preventDefault","shouldNotMoveUp","shouldNotMoveDown","neverScroll","lastClientY","touchStartListener","_getCurrentWidget","closestOverflow","closestCallback","HTMLTextAreaElement","scrollHeight","touches","clientY","scrollTop","touchMoveListener","_getCurrentWidget2","isScrollingDown","stopImmediatePropagation","documentElement","_node","paddingRight","_checkFixedNeeded","pop","fixed","fixedWidget","eventHandler","resizeListener","bind","EVENT_MODAL_ASYNC_TARGET_LOADED","EVENT_MODAL_INIT","EVENT_MODAL_OPENED","EVENT_MODAL_BEFORE_CLOSED","EVENT_MODAL_CLOSED","_Widget","_Widget2","_FixedWindow","_FixedWindow2","KEY_ESC","ATTR_CREATE_NEW","ATTR_CLOSE","ATTR_NAME","CLS_CONTAINER_CURRENT","CLS_OPEN","CLS_CURRENT","CLS_PART_OF_STACK","CLS_MODAL_CONTAINER","CLS_ANIM_END","CLS_LOADER_CONTAINER","CLS_LOADER","CLS_BACKDROP","Modal","currentOpen","loading","closeOnEscape","closeOnBackgroundClick","destroyOnFinish","fixedContainer","containerClassNames","eventContainer","eventFunction","dataMainPageContainer","modalContainer","_modalInstances","indexOf","splice","getInstance","close","applyOptionsFromElement","copy","KeyboardEvent","getTabEvent","defaultPrevented","_finishState","prevModal","switchModals","dispatch","withOriginal","_removeModalFromStack","lastContainer","childNodes","cl","destroy","co","last","open","prefixedAnimateEvent","_finishAnim","instances","isCurrent","contains","foundInstance","flexModalInstance","targetContent","future","hasTarget","isHtmlElement","isWidget","findWidget","newInstance","_ret","setDestroyOnFinish","fromEvent","then","registerEvents","getModalContainer","v","modalContainerClasses","closeModalFunction","ce","loader","toggleLoader","show","loaderLoader","requestAnimationFrame","getAsync","r","result","DocumentFragment","guid","resolve","thisEl","modal","internal","maybeEvent","delegate","delegateContainer","addScreenConstraint","_len","arguments","_key","createWidget","isEmptyContainer","MutationObserver","observer","mutations","disconnect","observe","childList","keyCode","lastModal","EVENT_FORM_AJAX_COMPLETED","EVENT_FORM_AFTER_AJAX_SUBMIT","EVENT_FORM_SUBMIT","EVENT_FORM_READY","_Tooltip","_Tooltip2","LOADING_CLASS","DATA_ELEMENT_INVALID","REMOTE","REMOTE_ACTION","ATTR_DISABLE_INLINE","ATTR_DISABLE_REALTIME","ATTR_VALIDATOR","ATTR_DATA_CUSTOM_MESSAGE","ATTR_DATA_CUSTOM_LABEL","ATTR_VALIDATE_VISIBILITY","ATTR_ERROR_TARGET_ID","ATTR_DEPENDS","CONST_USE_JSON","CONST_REALTIME_EVENT","FOCUS_TOOLTIP_DELAY","CLICK_TOOLTIP_DELAY","Form","form","HTMLFormElement","tooltips","currentValidationFuture","createTooltips","appendError","ajaxSubmitType","ajaxJsonContentType","inlineValidation","realtime","realtimeTimeout","formatErrorTooltip","error","inputErrorClass","containerErrorClass","fetchOptions","credentials","tooltipOptions","scrollToElementDiff","_validators","globalValidators","_remoteValidationFunction","initFormValidation","thisForm","shouldUseAjax","ajaxPostUrl","location","href","useJson","_formStopLoading","submit","defaultHeaders","X-Requested-With","Content-Type","headers","method","serverCall","fetch","serialize","FormData","globalRemoteValidationFunction","response","selectors","inputs","querySelectorAll","exists","field","focus","fields","NodeList","_handleValidation","foundAnyError","toValidateFields","scoped","_createArrayFromInvalidFieldList","isLocalInvalid","_focusElement","validation","_customValidationsForElements","validateCustomFields","thisToValidateFields","concat","checkedFields","foundInvalidFields","prepareErrors","firstInvalidField","activeElement","_handleTooltipHideClickAfterChange","showAndOrCreateTooltip","validity","globalErrorMessageHandler","keys","labels","getForm","invalid","labelsIndex","labelEl","_markElementInvalid","_markElementValid","filter","HTMLFieldSetElement","thisParent","errors","inputsWithErrorClasses","elementErrorIndex","inputErrorIndex","validator","validationRef","futures","fieldsLength","iVal","_shouldNotValidateField","customError","valid","_runValidation","console","warn","all","allFutures","l","fI","_removeElementErrors","removeAllErrors","handleAdditionalLabels","isInvalid","thisLabelGroup","additionalLabels","group","removeErrors","labelGroups","invalidFields","errorTarget","_findErrorTarget","flexFormsSavedValidity","_setupErrorMessages","msg","validationMessage","insertAdjacentHTML","flexFormsSavedValidationMessage","setCustomValidity","_field","linkedFields","thisField","_isElementInvalidElement","_handleLabels","_formatErrorTooltip","fieldSelector","slice","_checkIsValidRealtimeElement","clearKeyDownTimeout","KEYDOWN_RUNNING","clearTimeout","TIMEOUT_KEYDOWN","_checkIsValidBlurFocusElement","_checkIsValidInlineCheckElement","_this3","invalidEvent","addEventOnce","handleInvalid","_formLoading","_checkIsInvalid","setTimeout","_handleSubmit","_formIsLoading","isStillTarget","_handleTooltipInline","dependentFields","_getDependentFields","flexcssKeepTooltips","_submitListener","scrollToElement","submitListener","submitEvent","checkValidity","_getInvalidElements","firstError","_submitFunction","isVisible","list","foundTarget","errorFunc","selector","forms","customMsg","fn","ms","timeout","normalizeName","String","test","normalizeValue","Headers","append","getOwnPropertyNames","consumed","bodyUsed","reject","fileReaderReady","reader","onload","onerror","readBlobAsArrayBuffer","blob","FileReader","readAsArrayBuffer","readBlobAsText","readAsText","Body","_initBody","_bodyInit","_bodyText","support","Blob","isPrototypeOf","_bodyBlob","formData","_bodyFormData","arrayBuffer","ArrayBuffer","set","rejected","decode","json","normalizeMethod","upcased","methods","Request","url","mode","referrer","split","bytes","shift","decodeURIComponent","xhr","head","pairs","getAllResponseHeaders","header","Response","bodyInit","status","ok","statusText","values","getAll","has","thisArg","clone","redirectStatuses","redirect","RangeError","responseURL","getResponseHeader","request","XMLHttpRequest","responseText","withCredentials","responseType","setRequestHeader","send","polyfill","EVENT_DROPDOWN_CLOSED","ATTR_CC","ATTR_DARKENER","DARKENER_INIT","ATTR_DATA_TARGET","ATTR_CLOSE_DROPDOWN","STATE_LOADING","CLS_DARKENER_DROPDOWN","CLS_DROPDOWN","Dropdown","Darkener","currentTarget","darkener","destroyOnClose","targetIsCurrent","_delegateFunction","isLoading","createDropdown","cls","darkenerInstance","flexDarkenerInstance","thisCurrentOpen","getTransitionEvent","scheduler","srcElement","toggleDarkenerToggler","thisWidget","data","dropdownContainerElement","dropdownContent","isAbsolute","flexCollisionContainer","collisionC","toggle","_Modal","_Modal2","ATTR_MAX_WIDTH","ATTR_MAX_HEIGHT","ATTR_SRC","CLS_HAS_PREV","CLS_HAS_NEXT","CLS_LOADING","ATTR_NO_THUMBNAIL","ATTR_DATA_HREF","ATTR_HREF","KEY_NEXT","KEY_PREV","LightBox","AttributeSelector","ModalAppend","thisDelegateContainer","_modalAppend","_resizeEvent","_keyboardNextEvent","_future","_nextFuture","_imageContainer","_modalContainerDiv","_contentContainer","_closerContainerDiv","_delegateContainer","_attributeSelector","_widget","_isOpen","img","_isLoading","registerPrevNextEvents","closeOnLast","onNext","onClose","getNext","getPrev","onSwitchImage","children","findImmediateNextTarget","nextElementSibling","previousElementSibling","onOpen","validTarget","parentIsValid","switchImage","_","hasPrev","hasNext","hasPrevClass","hasNextClass","isIE","nextThumb","nextHighRes","nextSource","src","nextImgObject","Image","backgroundImage","_setupMaxWidthHeight","_calculateContainer","highRes","_setupPrevNextStates","thisThumbnail","thisImgHighResolution","_this4","highImageObj","_getSrc","_this5","thumbnail","imgHighResolution","imgSrc","imageObj","pageX","TouchEvent","changedTouches","rect","imgX","wrapperWidth","posX","switchImageByDirection","_runOptionalClose","fromWidget","loadedImage","nextMaxWidth","nextMaxHeight","maxWidth","maxHeight","EVENT_TOGGLE","ATTR_CLOSE_SIDEBAR","ATTR_TARGET","INIT_CLASS","OPEN_CLASS","HIDE_FACTOR","OffCanvas","NavigationId","factor","disableTouch","touchedX","navigationContainer","DARKENER_CLASS_TOGGLE","DARKENER_CLASS_INSTANT_TOGGLE","shouldNotTouch","darkenerClassToggle","darkenerClassToggleInstant","globalToggleClass","navigationContainerId","clientX","mustHide","calcX","bounds","compare","webkitTransition","transform","webkitTransform","_remove","resetTransform","_removeInstant","docCls","darkenerClass","navigationControllerClassList","docElementCls","promise","thisDelegate","EVENT_TAB_OPENED","EVENT_TAB_CLOSED","ACTIVE_CLASS","ATTR_TOGGLE_LIST","Toggleable","ContainerId","refId","ref","toggleTarget","_listener","querySelector","elClassList","failure","maybeToggleNode","parentClassList","targetRef","_handleLoaded","_Form","_Form2","_Toggleable","_Toggleable2","_OffCanvas","_OffCanvas2","_Dropdown","_Dropdown2","_LightBox","_LightBox2"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,I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84B,EAAezvB,EAAuBwvB,GAEtCE,EAAa/4B,EAAoB,IAEjCg5B,EAAc3vB,EAAuB0vB,GAErCE,EAAYj5B,EAAoB,IAEhCk5B,EAAa7vB,EAAuB4vB,GAEpCE,EAAYn5B,EAAoB,IAEhCo5B,EAAa/vB,EAAuB8vB,GAEpC1vB,EAAQzJ,EAAoB,GAE5B0J,EAASL,EAAuBI,EAIpC/J,GkBxpLQ8e,KAAAoa,alBypLRl5B,EkBzpLc6P,QAAAgO,alB0pLd7d,EkB1pLuB8X,MAAAsY,alB2pLvBpwB,EkB3pL8BkN,OAAA4J,alB4pL9B9W,EkB5pLsCiL,SAAAuE,alB6pLtCxP,EkB7pLgDyC,KAAAuH,alB8pLhDhK,EkB9pLsDo4B,WAAAgB,alB+pLtDp5B,EkB/pLkEk2B,UAAAoD,alBgqLlEt5B,EkBhqL6E0uB,SAAA8K,alBiqL7Ex5B,EkBjqLuFgxB,SAAA0I","file":"js/flexcss.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"../\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(17);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\tvar PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\t\n\tvar COL_LEFT_CLASS = 'is-collision-left';\n\t\n\tvar COL_RIGHT_CLASS = 'is-collision-right';\n\t\n\tvar COL_BOTTOM_CLASS = 'is-collision-bottom';\n\t\n\t/**\n\t * Provides shared DOM-Utility functions\n\t */\n\t\n\tvar Util = function () {\n\t function Util() {\n\t _classCallCheck(this, Util);\n\t }\n\t\n\t _createClass(Util, null, [{\n\t key: \"prefixedAnimateEvent\",\n\t\n\t\n\t /**\n\t * Will register the right animation event based on browser\n\t * @param element\n\t * @param type\n\t * @param callback\n\t */\n\t value: function prefixedAnimateEvent(element, type, callback) {\n\t var thisFunction = function thisFunction(e) {\n\t callback.apply(element, [e, thisFunction]);\n\t };\n\t\n\t for (var p = 0; p < PFX.length; p++) {\n\t var thisType = type;\n\t if (!PFX[p]) {\n\t thisType = type.toLowerCase();\n\t }\n\t var name = PFX[p] + thisType;\n\t element.addEventListener(name, thisFunction, true);\n\t }\n\t }\n\t\n\t /**\n\t * Get correct transitionend event\n\t * @returns {String}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"whichTransitionEndEvent\",\n\t value: function whichTransitionEndEvent() {\n\t var t = void 0;\n\t var el = document.createElement('fake');\n\t\n\t var transitions = {\n\t transition: 'transitionend',\n\t OTransition: 'oTransitionEnd',\n\t MozTransition: 'transitionend',\n\t WebkitTransition: 'webkitTransitionEnd'\n\t };\n\t\n\t for (t in transitions) {\n\t if (el.style[t] !== undefined) {\n\t return transitions[t];\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Check if target is part of parent node\n\t * @param target\n\t * @param parent\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: \"isPartOfNode\",\n\t value: function isPartOfNode(target, parent) {\n\t if (!target || !parent) {\n\t return false;\n\t }\n\t var now = target;\n\t while (now !== parent && now !== null) {\n\t if (now === parent) {\n\t break;\n\t }\n\t now = now.parentNode;\n\t }\n\t return now !== null;\n\t }\n\t\n\t /**\n\t * Finds the closest element including itself matching a callback\n\t * @param {Node} el\n\t * @param {Function} callback\n\t * @returns {Node|boolean}\n\t */\n\t\n\t }, {\n\t key: \"closestCallback\",\n\t value: function closestCallback(el, callback) {\n\t var element = el;\n\t while (element !== null) {\n\t if (callback(element)) {\n\t return element;\n\t }\n\t element = element.parentNode;\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Walks the tree until func returns true for given argument\n\t * @param target\n\t * @param func\n\t * @returns {boolean|HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"parentsUntil\",\n\t value: function parentsUntil(target, func) {\n\t if (!target) {\n\t return false;\n\t }\n\t var now = target;\n\t while (!func(now) && now !== null) {\n\t now = now.parentNode;\n\t }\n\t\n\t return now;\n\t }\n\t\n\t /**\n\t * Generates a unique id\n\t * @return {String}\n\t */\n\t\n\t }, {\n\t key: \"guid\",\n\t value: function guid() {\n\t function s4() {\n\t return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n\t }\n\t\n\t return s4() + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + (s4() + s4() + s4());\n\t }\n\t\n\t /**\n\t * Detects scrollbar width\n\t * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n\t * @returns {number}\n\t */\n\t\n\t }, {\n\t key: \"getScrollBarWidth\",\n\t value: function getScrollBarWidth() {\n\t var doc = global.document;\n\t var inner = doc.createElement('p');\n\t\n\t inner.style.width = \"100%\";\n\t inner.style.height = \"200px\";\n\t\n\t var outer = doc.createElement('div');\n\t outer.style.position = \"absolute\";\n\t outer.style.top = \"0px\";\n\t outer.style.left = \"0px\";\n\t outer.style.visibility = \"hidden\";\n\t outer.style.width = \"200px\";\n\t outer.style.height = \"150px\";\n\t outer.style.overflow = \"hidden\";\n\t outer.appendChild(inner);\n\t\n\t doc.body.appendChild(outer);\n\t var w1 = inner.offsetWidth;\n\t outer.style.overflow = 'scroll';\n\t var w2 = inner.offsetWidth;\n\t if (w1 === w2) {\n\t w2 = outer.clientWidth;\n\t }\n\t doc.body.removeChild(outer);\n\t\n\t return w1 - w2;\n\t }\n\t\n\t /**\n\t * Run an event once\n\t * @param {String} ev\n\t * @param {HTMLElement|HTMLDocument} target\n\t * @param {Function} func\n\t * @param {boolean} [capture]\n\t * @return Function created listener\n\t */\n\t\n\t }, {\n\t key: \"addEventOnce\",\n\t value: function addEventOnce(ev, target, func, capture) {\n\t var thisFunction = function thisFunction(event) {\n\t func(event, func);\n\t target.removeEventListener(ev, thisFunction, capture);\n\t };\n\t target.addEventListener(ev, thisFunction, capture);\n\t return thisFunction;\n\t }\n\t\n\t /**\n\t * Checks if an element is visible\n\t * @param {HTMLElement} element\n\t * @returns bool\n\t */\n\t\n\t }, {\n\t key: \"isVisible\",\n\t value: function isVisible(element) {\n\t return element.offsetWidth > 0 && element.offsetHeight > 0;\n\t }\n\t\n\t /**\n\t * Creates a camelCaseRepresentation of a dashed string\n\t * @param {String} str\n\t * @returns String\n\t */\n\t\n\t }, {\n\t key: \"dashToCamelCase\",\n\t value: function dashToCamelCase(str) {\n\t return str.replace(/-([a-z])/g, function (g) {\n\t return g[1].toUpperCase();\n\t });\n\t }\n\t\n\t /**\n\t * Creates a copy of `input`\n\t * @param {*} input\n\t * @return *\n\t */\n\t\n\t }, {\n\t key: \"copy\",\n\t value: function copy(input) {\n\t return JSON.parse(JSON.stringify(input));\n\t }\n\t\n\t /**\n\t * Reads options from element (data attributes) and applies to base\n\t * @param {HTMLElement} element\n\t * @param {Object} base\n\t * @return {Object}\n\t */\n\t\n\t }, {\n\t key: \"applyOptionsFromElement\",\n\t value: function applyOptionsFromElement(element, base) {\n\t if (!element) {\n\t return base;\n\t }\n\t var attrs = element.attributes;\n\t for (var i = 0; i < attrs.length; i++) {\n\t var attr = attrs[i];\n\t if (attr) {\n\t var s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n\t var val = attr.nodeValue;\n\t if (base.hasOwnProperty(s)) {\n\t // skip functions\n\t if (typeof base[s] === 'function') {\n\t continue;\n\t }\n\t if (typeof base[s] === 'boolean') {\n\t base[s] = parseInt(val || 1, 10) === 1;\n\t } else {\n\t base[s] = val;\n\t }\n\t }\n\t }\n\t }\n\t return base;\n\t }\n\t\n\t /**\n\t * Will position an element directly at given target\n\t * Is aware of a given collision container to detect edges\n\t * Will put elementToPosition either to left, center or right edge (prefer right)\n\t * and either to bottom or top (prefers bottom)\n\t *\n\t * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n\t *\n\t * @param {HTMLElement|ClientRect} target the target container to align to\n\t * @param {HTMLElement} elementToPosition the element to position\n\t * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n\t * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n\t * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"setupPositionNearby\",\n\t value: function setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n\t // determine relative offsets\n\t var amountTop = 0;\n\t var amountLeft = 0;\n\t Util.parentsUntil(target.parentNode, function (el) {\n\t if (!(el instanceof HTMLElement)) {\n\t return false;\n\t }\n\t var style = window.getComputedStyle(el);\n\t if (Util.isPartOfNode(elementToPosition, el)) {\n\t if (style && style.position === 'relative') {\n\t amountTop += el.offsetTop || 0;\n\t amountLeft += el.offsetLeft || 0;\n\t }\n\t return false;\n\t }\n\t return true;\n\t });\n\t\n\t var targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n\t var elementRect = elementToPosition.getBoundingClientRect();\n\t var colRect = collisionContainer.getBoundingClientRect();\n\t var targetTop = targetPosition.top - amountTop;\n\t var targetRight = targetPosition.right;\n\t var isCollisionTop = targetTop - elementRect.height <= 0;\n\t var isCollisionBottom = window.innerHeight < targetTop + amountTop + targetPosition.height + elementRect.height;\n\t var isCollisionLeft = targetRight < elementRect.width;\n\t var targetLeft = targetPosition.left;\n\t var isCollisionRight = targetLeft + elementRect.width > colRect.width;\n\t var classList = elementToPosition.classList;\n\t\n\t classList.remove(COL_RIGHT_CLASS);\n\t classList.remove(COL_LEFT_CLASS);\n\t classList.remove(COL_BOTTOM_CLASS);\n\t\n\t var calcTop = void 0;\n\t var calcLeft = void 0;\n\t if (isCollisionLeft && !isCollisionRight) {\n\t // put element to left if collision with left\n\t calcLeft = targetPosition.left - colRect.left - amountLeft + \"px\";\n\t classList.add(COL_LEFT_CLASS);\n\t } else {\n\t // maybe center if no collision with either side\n\t var rightPosition = targetRight - elementRect.width - colRect.left - amountLeft + \"px\";\n\t var leftCentered = (targetLeft + targetPosition.width / 2 - elementRect.width / 2 || 0) - colRect.left;\n\t var collisionCentered = leftCentered + elementRect.width > colRect.width;\n\t if (centerHorizontal && !collisionCentered) {\n\t calcLeft = leftCentered + \"px\";\n\t } else {\n\t classList.add(COL_RIGHT_CLASS);\n\t calcLeft = rightPosition;\n\t }\n\t }\n\t\n\t if (isCollisionBottom || positionTop && !isCollisionTop) {\n\t // Put Element on top if collision\n\t calcTop = targetTop - elementRect.height - colRect.top + \"px\";\n\t classList.add(COL_BOTTOM_CLASS);\n\t } else {\n\t calcTop = targetTop + targetPosition.height - colRect.top + \"px\";\n\t }\n\t\n\t elementToPosition.style.cssText = \"top:\" + calcTop + \";left:\" + calcLeft + \";\";\n\t\n\t return elementToPosition;\n\t }\n\t\n\t /**\n\t * Brings a given element into viewport\n\t * @param {HTMLElement} el\n\t * @param {int|function}[optionalOffset]\n\t */\n\t\n\t }, {\n\t key: \"scrollToElement\",\n\t value: function scrollToElement(el, optionalOffset) {\n\t el.scrollIntoView();\n\t var thisOffset = optionalOffset;\n\t // optionally use a additional scrollDif\n\t if (thisOffset) {\n\t if (typeof thisOffset === 'function') {\n\t thisOffset = optionalOffset();\n\t }\n\t if (thisOffset > 0) {\n\t var scrolledY = window.pageYOffset;\n\t if (scrolledY) {\n\t window.scroll(0, scrolledY - thisOffset);\n\t }\n\t }\n\t }\n\t }\n\t }]);\n\t\n\t return Util;\n\t}();\n\t\n\texports.default = Util;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t// we attach global settings to global once because settings might be shared a lot of times trough the application\n\t// Maybe find a better way to handle that scenario\n\tif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n\t (function () {\n\t global.FLEXCSS_GLOBAL_SETTINGS = {\n\t // defined breakpoint for small devices < n\n\t smallBreakpoint: 768,\n\t // nodes that should be updated when no scrollbar is expected\n\t scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n\t // additional Delay until darkener is fully hidden\n\t darkenerFadeDelay: 100,\n\t // class that is added if canvas has been toggled\n\t canvasToggledClass: 'toggled-canvas'\n\t };\n\t\n\t global.FLEXCSS_CONST_IS_IOS = null;\n\t\n\t global.FLEXCSS_CONST_IS_TOUCH = null;\n\t\n\t global.FLEXCSS_CONST_IS_IE = null;\n\t\n\t global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\t\n\t global.FLEXCSS_IS_SMALL_SCREEN = false;\n\t\n\t var init = function init() {\n\t // Measure scrollbar width\n\t global.FLEXCSS_CONST_SCROLLBAR_WIDTH = _Util2.default.getScrollBarWidth();\n\t // detect right transition end event\n\t global.FLEXCSS_CONST_TRANSITION_EVENT = _Util2.default.whichTransitionEndEvent();\n\t };\n\t\n\t if (global.document.readyState !== 'loading') {\n\t init();\n\t } else {\n\t // it's possible that global.document.body is not available if the document is not\n\t // loaded completely\n\t document.addEventListener('DOMContentLoaded', function () {\n\t init();\n\t });\n\t }\n\t })();\n\t}\n\t\n\t/**\n\t * Utility class that setups global settings\n\t */\n\t\n\tvar Settings = function () {\n\t function Settings() {\n\t _classCallCheck(this, Settings);\n\t }\n\t\n\t _createClass(Settings, null, [{\n\t key: 'setup',\n\t\n\t\n\t /**\n\t * Setup global settings, overwrite default values\n\t * @param {Object} settings\n\t */\n\t value: function setup(settings) {\n\t Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n\t }\n\t\n\t /**\n\t * Access to global settings\n\t * @returns {Object}\n\t */\n\t\n\t }, {\n\t key: 'get',\n\t value: function get() {\n\t return global.FLEXCSS_GLOBAL_SETTINGS;\n\t }\n\t\n\t /**\n\t * Detects a IOS Device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isIosDevice',\n\t value: function isIosDevice() {\n\t if (!global.FLEXCSS_CONST_IS_IOS) {\n\t global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n\t }\n\t\n\t return global.FLEXCSS_CONST_IS_IOS;\n\t }\n\t\n\t /**\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isSmallScreen',\n\t value: function isSmallScreen() {\n\t return window.innerWidth < Settings.get().smallBreakpoint;\n\t }\n\t\n\t /**\n\t * Detects a touch device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isTouchDevice',\n\t value: function isTouchDevice() {\n\t if (!global.FLEXCSS_CONST_IS_TOUCH) {\n\t global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!global.navigator.msMaxTouchPoints;\n\t }\n\t return global.FLEXCSS_CONST_IS_TOUCH;\n\t }\n\t\n\t /**\n\t * Checks if current browser is Internet Explorer\n\t * @returns {boolean|*}\n\t */\n\t\n\t }, {\n\t key: 'isIE',\n\t value: function isIE() {\n\t if (!global.FLEXCSS_CONST_IS_IE) {\n\t global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n\t }\n\t return global.FLEXCSS_CONST_IS_IE;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTransitionEvent',\n\t value: function getTransitionEvent() {\n\t return global.FLEXCSS_CONST_TRANSITION_EVENT;\n\t }\n\t\n\t /**\n\t * @returns {int}\n\t */\n\t\n\t }, {\n\t key: 'getScrollbarWidth',\n\t value: function getScrollbarWidth() {\n\t return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTabEvent',\n\t value: function getTabEvent() {\n\t return global.FLEXCSS_CONST_TAB_EVENT;\n\t }\n\t }]);\n\t\n\t return Settings;\n\t}();\n\t\n\texports.default = Settings;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/* global CustomEvent */\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t// polyfill for custom events to make thinks work in IE\n\t// The needed polyfill is so small that I embedded it here\n\t(function poly() {\n\t if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n\t var _CustomEvent = function CustomEvent(event, params) {\n\t var thisParams = params || {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: undefined\n\t };\n\t var evt = document.createEvent(\"CustomEvent\");\n\t evt.initCustomEvent(event, thisParams.bubbles, thisParams.cancelable, thisParams.detail);\n\t return evt;\n\t };\n\t _CustomEvent.prototype = global.Event.prototype;\n\t global.CustomEvent = _CustomEvent;\n\t }\n\t})();\n\t/**\n\t * Simpler Event dispatching\n\t */\n\t\n\tvar EventHandler = function () {\n\t\n\t /**\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t */\n\t\n\t function EventHandler(target, name) {\n\t _classCallCheck(this, EventHandler);\n\t\n\t this.target = target;\n\t this.defaultOptions = {\n\t bubbles: true,\n\t cancelable: true\n\t };\n\t\n\t this.name = name;\n\t }\n\t\n\t /**\n\t * Set more options\n\t * @param {Object} options\n\t * @returns {EventHandler}\n\t */\n\t\n\t\n\t _createClass(EventHandler, [{\n\t key: \"withOptions\",\n\t value: function withOptions(options) {\n\t Object.assign(this.defaultOptions, options || {});\n\t return this;\n\t }\n\t\n\t /**\n\t * Call with the originalEvent\n\t * @param {Event} e\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withOriginal\",\n\t value: function withOriginal(e) {\n\t return this.withDetail({\n\t originalEvent: e\n\t });\n\t }\n\t\n\t /**\n\t * Extends the detail part of the event\n\t * @param {Object} o\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withDetail\",\n\t value: function withDetail(o) {\n\t if (!this.defaultOptions.detail) {\n\t this.defaultOptions.detail = {};\n\t }\n\t Object.assign(this.defaultOptions.detail, o);\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"fire\",\n\t value: function fire() {\n\t var e = new CustomEvent(this.name, this.defaultOptions);\n\t if (this.target) {\n\t this.target.dispatchEvent(e);\n\t }\n\t return e;\n\t }\n\t }]);\n\t\n\t return EventHandler;\n\t}();\n\t\n\tvar Event = function () {\n\t function Event() {\n\t _classCallCheck(this, Event);\n\t }\n\t\n\t _createClass(Event, null, [{\n\t key: \"dispatch\",\n\t\n\t /**\n\t * Prepares to dispatch a custom event (without firing)\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @returns {EventHandler}\n\t */\n\t value: function dispatch(target, name) {\n\t return new EventHandler(target, name);\n\t }\n\t\n\t /**\n\t * Dispatches a custom event and fires it directly\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @param {Object} [options]\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"dispatchAndFire\",\n\t value: function dispatchAndFire(target, name, options) {\n\t return new EventHandler(target, name).withOptions(options).fire();\n\t }\n\t }]);\n\t\n\t return Event;\n\t}();\n\t\n\texports.default = Event;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Widget\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/**\n\t * A Widget provides async content on a specific target (e.g. a modal link)\n\t */\n\t\n\tvar Widget = function () {\n\t\n\t /**\n\t * Creates a new Widget\n\t * @param [element], optional define the content of widget\n\t */\n\t\n\t function Widget(element) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, Widget);\n\t\n\t /**\n\t *\n\t * @type {Promise}\n\t */\n\t this.asyncContent = null;\n\t\n\t /**\n\t * @type {boolean}\n\t */\n\t this._isWidget = true;\n\t\n\t if (element) {\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n\t if (this.element) {\n\t this.element.hfWidgetInstance = this;\n\t this.setAsync(function () {\n\t return new Promise(function (s) {\n\t s(_this.element);\n\t });\n\t });\n\t } else {\n\t throw new Error('Could not found element with ID: ' + element);\n\t }\n\t }\n\t /**\n\t * The final resulted content that a widget did create (e.g. a modal container)\n\t * @type {HTMLElement}\n\t */\n\t this.finalContent = null;\n\t }\n\t\n\t /**\n\t *\n\t * @returns {Promise}\n\t */\n\t\n\t\n\t _createClass(Widget, [{\n\t key: 'getAsync',\n\t value: function getAsync() {\n\t return this.asyncContent();\n\t }\n\t\n\t /**\n\t * @param {Function.} async\n\t * @returns {Widget}\n\t */\n\t\n\t }, {\n\t key: 'setAsync',\n\t value: function setAsync(async) {\n\t this.asyncContent = async;\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getFinalContent',\n\t value: function getFinalContent() {\n\t return this.finalContent;\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} element\n\t * @returns {Widget}\n\t */\n\t\n\t }, {\n\t key: 'setElement',\n\t value: function setElement(element) {\n\t this.element = element;\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroys the generated content of this widget\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t if (this.finalContent && this.finalContent.parentNode) {\n\t this.finalContent.parentNode.removeChild(this.finalContent);\n\t return true;\n\t }\n\t\n\t delete this.element;\n\t delete this.asyncContent;\n\t delete this.finalContent;\n\t\n\t return false;\n\t }\n\t\n\t /**\n\t * Will find a widget on an Element\n\t * @param {HTMLElement} element\n\t * @returns {Widget|undefined}\n\t */\n\t\n\t }], [{\n\t key: 'findWidget',\n\t value: function findWidget(element) {\n\t return element ? element.hfWidgetInstance : undefined;\n\t }\n\t\n\t /**\n\t * Checks if a given object is an instance\n\t * @param {Object} self\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isWidget',\n\t value: function isWidget(self) {\n\t return self instanceof Widget || (typeof self === 'undefined' ? 'undefined' : _typeof(self)) === 'object' && self.hasOwnProperty('_isWidget');\n\t }\n\t }]);\n\t\n\t return Widget;\n\t}();\n\t\n\texports.default = Widget;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/**\n\t * Provides a Basic Widget\n\t */\n\t\n\tvar DestroyableWidget = function () {\n\t function DestroyableWidget() {\n\t _classCallCheck(this, DestroyableWidget);\n\t\n\t this.listeners = [];\n\t }\n\t\n\t /**\n\t * Destroys a Widget\n\t */\n\t\n\t\n\t _createClass(DestroyableWidget, [{\n\t key: \"destroy\",\n\t value: function destroy() {\n\t this.listeners.forEach(function (listener) {\n\t listener.element.removeEventListener.apply(listener.element, listener.args);\n\t });\n\t this.listeners = [];\n\t }\n\t\n\t /**\n\t * Adds an event and registers it later to remove bindings\n\t * @param {HTMLElement} element\n\t * @param {String} name\n\t * @param {Function} listener\n\t * @param {boolean} [capture]\n\t * @returns {Function}\n\t */\n\t\n\t }, {\n\t key: \"addEventListener\",\n\t value: function addEventListener(element, name, listener, capture) {\n\t this.listeners.push({\n\t element: element,\n\t args: [name, listener, capture]\n\t });\n\t\n\t element.addEventListener(name, listener, capture);\n\t return listener;\n\t }\n\t }]);\n\t\n\t return DestroyableWidget;\n\t}();\n\t\n\texports.default = DestroyableWidget;\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _DestroyableWidget2 = __webpack_require__(5);\n\t\n\tvar _DestroyableWidget3 = _interopRequireDefault(_DestroyableWidget2);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Tooltip\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar CLASS_NAMES_TOOLTIP = 'tooltip-container';\n\t/**\n\t * @type {string}\n\t */\n\tvar CLASS_NAMES_OPEN = 'open';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DATA_CLASSNAME = 'data-class';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\t\n\t/**\n\t * @type {HTMLDocument}\n\t */\n\tvar doc = global.document;\n\t\n\t/**\n\t * Simple Tooltip\n\t */\n\t\n\tvar Tooltip = function (_DestroyableWidget) {\n\t _inherits(Tooltip, _DestroyableWidget);\n\t\n\t /**\n\t * Creates a Tooltip\n\t * @param {HTMLElement|String} DelegateContainer\n\t * @param {Object} [options]\n\t */\n\t\n\t function Tooltip(DelegateContainer, options) {\n\t _classCallCheck(this, Tooltip);\n\t\n\t /**\n\t * The Container where possible events are captured\n\t */\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Tooltip).call(this));\n\t\n\t _this.container = DelegateContainer instanceof HTMLElement ? DelegateContainer : doc.getElementById(DelegateContainer);\n\t\n\t if (!_this.container) {\n\t throw new Error('Could not create Tooltip, DelegateContainer not found');\n\t }\n\t\n\t /**\n\t * The Container where tooltips are stored for this instance\n\t * @type {HTMLElement}\n\t */\n\t _this.tooltipContainer = null;\n\t\n\t /**\n\t * Default Options\n\t */\n\t _this.options = {\n\t containerClass: '',\n\t selectorAttribute: 'data-tooltip',\n\t collisionContainer: _this.container\n\t };\n\t\n\t Object.assign(_this.options, options || {});\n\t return _this;\n\t }\n\t\n\t /**\n\t * Creates and shows a tooltip\n\t * @param {HTMLElement} target where is this tooltip positioned\n\t * @param {String} text text content in tooltip, will be NOT escaped\n\t * @param {Boolean} [removeTitle] removes title element if given\n\t * @param {Node} [positionRelative]\n\t */\n\t\n\t\n\t _createClass(Tooltip, [{\n\t key: 'createTooltip',\n\t value: function createTooltip(target, text, removeTitle, positionRelative) {\n\t // abort if text is empty\n\t if (!text || text && text.trim() === '') {\n\t return;\n\t }\n\t\n\t if (_Settings2.default.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n\t return;\n\t }\n\t\n\t var tooltipContainer = this.tooltipContainer;\n\t\n\t if (!tooltipContainer) {\n\t tooltipContainer = doc.createElement('div');\n\t this.container.appendChild(tooltipContainer);\n\t this.tooltipContainer = tooltipContainer;\n\t }\n\t this._restoreClassNames(tooltipContainer, target);\n\t\n\t tooltipContainer.style.left = 'auto';\n\t tooltipContainer.style.top = 'auto';\n\t tooltipContainer.innerHTML = text;\n\t tooltipContainer.flexTooltipCurrentTarget = target;\n\t if (removeTitle) {\n\t target.oldTitle = text;\n\t target.removeAttribute('title');\n\t }\n\t\n\t _Util2.default.setupPositionNearby(positionRelative || target, tooltipContainer, this.options.collisionContainer, true, true);\n\t\n\t tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n\t }\n\t }, {\n\t key: '_restoreClassNames',\n\t value: function _restoreClassNames(container, target) {\n\t // allow additional classname per tooltip on target element\n\t var classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n\t var maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n\t if (maybeTargetClass) {\n\t classNames.push(maybeTargetClass);\n\t }\n\t container.className = classNames.join(\" \");\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {HTMLElement|null}\n\t */\n\t\n\t }, {\n\t key: 'getCurrentTarget',\n\t value: function getCurrentTarget() {\n\t return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n\t }\n\t\n\t /**\n\t * Destroys this Widget\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t _get(Object.getPrototypeOf(Tooltip.prototype), 'destroy', this).call(this);\n\t\n\t if (this.tooltipContainer) {\n\t this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n\t return true;\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Removes a Tooltip on given target\n\t * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n\t */\n\t\n\t }, {\n\t key: 'removeTooltip',\n\t value: function removeTooltip(target) {\n\t var selfTarget = target;\n\t if (!selfTarget && this.tooltipContainer) {\n\t selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n\t }\n\t if (this.tooltipContainer) {\n\t if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n\t return;\n\t }\n\t this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n\t delete this.tooltipContainer.flexTooltipCurrentTarget;\n\t }\n\t if (selfTarget && selfTarget.oldTitle) {\n\t selfTarget.setAttribute('title', selfTarget.oldTitle);\n\t }\n\t }\n\t\n\t /**\n\t * Initilizes mouse events on container element\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents() {\n\t var self = this;\n\t this.addEventListener(this.container, 'mouseover', function (e) {\n\t if (e.target.hasAttribute(self.options.selectorAttribute)) {\n\t self.createTooltip(e.target, e.target.getAttribute('title'), true);\n\t }\n\t });\n\t\n\t this.addEventListener(this.container, 'mouseout', function (e) {\n\t if (e.target.hasAttribute(self.options.selectorAttribute)) {\n\t self.removeTooltip(e.target);\n\t }\n\t });\n\t return this;\n\t }\n\t }]);\n\t\n\t return Tooltip;\n\t}(_DestroyableWidget3.default);\n\t\n\texports.default = Tooltip;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.ALLOW_ELEMENT_OVERFLOW_TOUCH = exports.EVENT_AFTER_FIXED_REMOVE = exports.EVENT_BEFORE_FIXED_ADD = undefined;\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _debounce = __webpack_require__(10);\n\t\n\tvar _debounce2 = _interopRequireDefault(_debounce);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar CLS_FIXED_WINDOW = 'fixed-window-open';\n\t\n\tvar EVENT_BEFORE_FIXED_ADD = exports.EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\n\tvar EVENT_AFTER_FIXED_REMOVE = exports.EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ALLOW_ELEMENT_OVERFLOW_TOUCH = exports.ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\t\n\t/**\n\t * @type {FixedWindow}\n\t */\n\tvar fixedWindowInstance = void 0;\n\t\n\tvar FixedWindow = function () {\n\t function FixedWindow() {\n\t _classCallCheck(this, FixedWindow);\n\t\n\t this.widgets = [];\n\t this.currentScrollTop = 0;\n\t this.fixedScreenConstraints = [];\n\t this.windowWidth = 0;\n\t this.isFixedWindowActive = false;\n\t this.touchListener = null;\n\t }\n\t\n\t /**\n\t * Adds a constraint to detect if the window needs to be changed when the screensize changes\n\t *\n\t * @param {Function} widget\n\t * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n\t */\n\t\n\t\n\t _createClass(FixedWindow, [{\n\t key: 'addScreenConstraint',\n\t value: function addScreenConstraint(widget, fixedBreakpointFn) {\n\t this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n\t }\n\t\n\t /**\n\t * @returns {null|DestroyableWidget}\n\t */\n\t\n\t }, {\n\t key: 'getCurrentWidget',\n\t value: function getCurrentWidget() {\n\t return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_checkFixedNeeded',\n\t value: function _checkFixedNeeded() {\n\t var _this = this;\n\t\n\t if (this.widgets.length === 0) {\n\t return;\n\t }\n\t var widgets = new Set(this.widgets);\n\t var widgetsThatRequireFixedWindow = Array.from(widgets).some(function (_ref) {\n\t var widget = _ref.widget;\n\t\n\t return _this.fixedScreenConstraints[widget] && _this.fixedScreenConstraints[widget](_this.windowWidth);\n\t });\n\t if (!widgetsThatRequireFixedWindow) {\n\t this._removeFixedContainer();\n\t } else {\n\t this._addFixedContainer();\n\t }\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_addFixedContainer',\n\t value: function _addFixedContainer() {\n\t var _this2 = this;\n\t\n\t if (this.isFixedWindowActive) {\n\t return;\n\t }\n\t _Event2.default.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n\t detail: this.getCurrentWidget()\n\t });\n\t // this causes layout and should be optimized\n\t // At lest we write in a batch later\n\t _Settings2.default.get().scrollbarUpdateNodes.map(function (n) {\n\t var foundProperty = 'paddingRight';\n\t var direction = 1;\n\t var node = n;\n\t if (n instanceof Array) {\n\t var _n = _slicedToArray(n, 3);\n\t\n\t var whatNode = _n[0];\n\t var property = _n[1];\n\t var d = _n[2];\n\t\n\t foundProperty = property;\n\t node = whatNode;\n\t direction = d || 1;\n\t }\n\t return {\n\t node: node,\n\t property: foundProperty,\n\t value: parseInt(global.getComputedStyle(node)[foundProperty], 10) + (!node.__fixedWindowMod__ ? _Settings2.default.getScrollbarWidth() * direction : 0) + 'px'\n\t };\n\t }).forEach(function (d) {\n\t d.node.__fixedWindowMod__ = true;\n\t d.node.style[d.property] = d.value;\n\t });\n\t\n\t this.touchListener = function (e) {\n\t e.preventDefault();\n\t };\n\t\n\t var shouldNotMoveUp = false;\n\t var shouldNotMoveDown = false;\n\t var neverScroll = false;\n\t var lastClientY = 0;\n\t this.touchStartListener = function (e) {\n\t var _getCurrentWidget = _this2.getCurrentWidget();\n\t\n\t var element = _getCurrentWidget.element;\n\t\n\t var closestOverflow = _Util2.default.closestCallback(e.target, function (el) {\n\t return el instanceof HTMLTextAreaElement || el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH);\n\t });\n\t if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n\t element = closestOverflow;\n\t }\n\t if (_Util2.default.isPartOfNode(e.target, element)) {\n\t neverScroll = element.scrollHeight === element.offsetHeight;\n\t lastClientY = e.touches[0].clientY;\n\t // never allow scrolling when there is nothing to scroll\n\t if (neverScroll) {\n\t return false;\n\t }\n\t if (element.scrollTop === 0) {\n\t element.scrollTop = 1;\n\t shouldNotMoveUp = true;\n\t } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n\t shouldNotMoveDown = true;\n\t element.scrollTop -= 1;\n\t }\n\t }\n\t };\n\t\n\t global.addEventListener('touchmove', this.touchListener);\n\t global.document.body.addEventListener('touchstart', this.touchStartListener);\n\t\n\t this.touchMoveListener = function (e) {\n\t var _getCurrentWidget2 = _this2.getCurrentWidget();\n\t\n\t var element = _getCurrentWidget2.element;\n\t\n\t if (_Util2.default.isPartOfNode(e.target, element)) {\n\t var clientY = e.touches[0].clientY;\n\t\n\t var isScrollingDown = lastClientY - clientY > 0;\n\t lastClientY = clientY;\n\t\n\t if (neverScroll) {\n\t neverScroll = false;\n\t return false;\n\t }\n\t\n\t if (!shouldNotMoveDown && isScrollingDown || shouldNotMoveDown && !isScrollingDown || !shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown || shouldNotMoveDown && shouldNotMoveUp && isScrollingDown) {\n\t e.stopImmediatePropagation();\n\t }\n\t\n\t shouldNotMoveUp = false;\n\t shouldNotMoveDown = false;\n\t }\n\t };\n\t global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\t\n\t global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n\t this.isFixedWindowActive = true;\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_removeFixedContainer',\n\t value: function _removeFixedContainer() {\n\t if (this.isFixedWindowActive) {\n\t // cleanup event listeners\n\t global.removeEventListener('touchmove', this.touchListener);\n\t global.document.body.removeEventListener('touchstart', this.touchStartListener);\n\t global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\t\n\t // reset scrollbar nodes\n\t _Settings2.default.get().scrollbarUpdateNodes.forEach(function (node) {\n\t if (node instanceof Array) {\n\t var _node = _slicedToArray(node, 2);\n\t\n\t var whatNode = _node[0];\n\t var property = _node[1];\n\t\n\t delete whatNode.__fixedWindowMod__;\n\t whatNode.style[property] = '';\n\t } else {\n\t delete node.__fixedWindowMod__;\n\t node.style.paddingRight = '';\n\t }\n\t });\n\t global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n\t _Event2.default.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n\t this.isFixedWindowActive = false;\n\t }\n\t }\n\t\n\t /**\n\t * Will close a window when no widgets are opened that need one\n\t */\n\t\n\t }, {\n\t key: 'resizeListener',\n\t value: function resizeListener() {\n\t this.windowWidth = global.innerWidth;\n\t this._checkFixedNeeded();\n\t }\n\t\n\t /**\n\t * @returns {FixedWindow}\n\t */\n\t\n\t }, {\n\t key: 'close',\n\t\n\t\n\t /**\n\t * Request a close of the fixed window\n\t */\n\t value: function close() {\n\t this.widgets.pop();\n\t if (this.widgets.length === 0) {\n\t this._removeFixedContainer();\n\t }\n\t }\n\t\n\t /**\n\t * Request to open a fixed windows\n\t * @param {Object|DestroyableWidget} instance\n\t * @param {HTMLElement} element\n\t */\n\t\n\t }, {\n\t key: 'open',\n\t value: function open(instance, element) {\n\t var fixed = false;\n\t if ((typeof instance === 'undefined' ? 'undefined' : _typeof(instance)) === 'object') {\n\t var widget = instance.constructor;\n\t var fixedWidget = this.fixedScreenConstraints[instance.constructor];\n\t if (widget && fixedWidget) {\n\t fixed = fixedWidget(this.windowWidth);\n\t }\n\t var length = this.widgets.length;\n\t this.widgets.push({\n\t widget: widget,\n\t element: element\n\t });\n\t // open a new window if there is no window active\n\t if (length === 0) {\n\t if (fixed) {\n\t this._addFixedContainer();\n\t }\n\t }\n\t }\n\t }\n\t }], [{\n\t key: 'getInstance',\n\t value: function getInstance() {\n\t if (!fixedWindowInstance) {\n\t fixedWindowInstance = new FixedWindow();\n\t fixedWindowInstance.windowWidth = global.innerWidth;\n\t var eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n\t global.addEventListener('resize', (0, _debounce2.default)(eventHandler, 500));\n\t global.addEventListener('orientationchange', eventHandler);\n\t }\n\t return fixedWindowInstance;\n\t }\n\t }]);\n\t\n\t return FixedWindow;\n\t}();\n\n\texports.default = FixedWindow;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_MODAL_ASYNC_TARGET_LOADED = exports.EVENT_MODAL_INIT = exports.EVENT_MODAL_OPENED = exports.EVENT_MODAL_BEFORE_CLOSED = exports.EVENT_MODAL_CLOSED = undefined;\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Modal\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/* global KeyboardEvent */\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tvar _FixedWindow = __webpack_require__(7);\n\t\n\tvar _FixedWindow2 = _interopRequireDefault(_FixedWindow);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar KEY_ESC = 27;\n\t/* Attribute Names */\n\tvar ATTR_CREATE_NEW = 'data-new-instance';\n\tvar ATTR_CLOSE = 'data-close-modal';\n\tvar ATTR_NAME = 'data-modal';\n\t\n\t/* Class names */\n\tvar CLS_CONTAINER_CURRENT = 'front';\n\tvar CLS_OPEN = 'open';\n\tvar CLS_CURRENT = 'current';\n\tvar CLS_PART_OF_STACK = 'part-of-stack';\n\tvar CLS_MODAL_CONTAINER = 'modal-container';\n\tvar CLS_ANIM_END = 'modal-anim-end';\n\tvar CLS_LOADER_CONTAINER = 'loader-container';\n\tvar CLS_LOADER = 'loader';\n\tvar CLS_BACKDROP = 'backdrop';\n\t\n\t/* Events */\n\t\n\t/**\n\t * Event triggered when modal is closed\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_CLOSED = exports.EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n\t/**\n\t * Event triggered before a modal is closed, cancelable\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_BEFORE_CLOSED = exports.EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n\t/**\n\t * Event triggered when a modal is opened\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_OPENED = exports.EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\t\n\t/**\n\t * Event triggered when modal is initilized, called on target\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_INIT = exports.EVENT_MODAL_INIT = 'flexcss.modal.init';\n\t\n\t/**\n\t * Triggered when the content of an async modal on a target is loaded, called on target\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_ASYNC_TARGET_LOADED = exports.EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\t\n\t/**\n\t * A Modal Implementation\n\t */\n\t\n\tvar Modal = function () {\n\t function Modal(DelegateContainer, options) {\n\t _classCallCheck(this, Modal);\n\t\n\t var doc = global.document;\n\t var container = DelegateContainer instanceof HTMLElement ? DelegateContainer : doc.getElementById(DelegateContainer);\n\t\n\t // Instance vars:\n\t if (!container) {\n\t throw new Error('Could not found container element by given ID/Element: ' + DelegateContainer);\n\t }\n\t\n\t this.currentOpen = null;\n\t\n\t this.loading = false;\n\t\n\t this.container = container;\n\t\n\t /**\n\t * Default Options\n\t */\n\t this.options = {\n\t classNames: 'modal',\n\t closeOnEscape: true,\n\t closeOnBackgroundClick: true,\n\t destroyOnFinish: false,\n\t fixedContainer: true,\n\t containerClassNames: ''\n\t };\n\t\n\t Object.assign(this.options, options);\n\t\n\t // Container where events are delegated\n\t this.eventContainer = null;\n\t this.eventFunction = null;\n\t\n\t this.dataMainPageContainer = global.document.body;\n\t\n\t this.currentScrollTop = 0;\n\t\n\t this.modalContainer = null;\n\t\n\t // Destroy full modal instance when no dialogs are bind to?\n\t // Otherwise container is recycled\n\t this.destroyOnFinish = this.options.destroyOnFinish;\n\t }\n\t\n\t /**\n\t * Removes this modal from global stack\n\t * Will handle fixing main html element too\n\t * @private\n\t * @param n\n\t */\n\t\n\t\n\t _createClass(Modal, [{\n\t key: '_removeModalFromStack',\n\t value: function _removeModalFromStack(n) {\n\t var t = Modal._modalInstances.indexOf(n);\n\t if (t > -1) {\n\t Modal._modalInstances.splice(t, 1);\n\t _FixedWindow2.default.getInstance().close();\n\t }\n\t }\n\t\n\t /**\n\t * Modal container that contains all `stacked` modals for this instance\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getModalContainer',\n\t value: function getModalContainer() {\n\t return this.modalContainer;\n\t }\n\t\n\t /**\n\t * Closes the current open modal of this stack\n\t * @params [e], optional event\n\t * @returns {*}\n\t */\n\t\n\t }, {\n\t key: 'close',\n\t value: function close(e) {\n\t var self = this;\n\t\n\t var options = self.currentOpen ? _Util2.default.applyOptionsFromElement(self.currentOpen, _Util2.default.copy(self.options)) : self.options;\n\t\n\t // close only on keyboard if instance should\n\t if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n\t return false;\n\t }\n\t\n\t // close only on background if instance should\n\t if (!options.closeOnBackgroundClick && e && e.type === _Settings2.default.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n\t return false;\n\t }\n\t\n\t // if an instance is currently loading, prevent from closing\n\t if (self.loading) {\n\t return false;\n\t }\n\t\n\t if (e) {\n\t e.preventDefault();\n\t }\n\t\n\t if (self.currentOpen) {\n\t // dispatch beforeClose event, if prevented prevent modal from closing\n\t var ev = _Event2.default.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n\t if (ev.defaultPrevented) {\n\t return false;\n\t }\n\t\n\t this._finishState(self.currentOpen);\n\t // if there is an previous modal\n\t if (self.currentOpen.prevModal) {\n\t // switch to the next modal\n\t return self.switchModals(self.currentOpen.prevModal, self.currentOpen.prevModal.prevModal || null);\n\t }\n\t\n\t // finally trigger closed event\n\t _Event2.default.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n\t }\n\t self._removeModalFromStack(self.currentOpen);\n\t\n\t // Full stack closed:\n\t self.currentOpen = null;\n\t if (self.modalContainer) {\n\t // setup next open\n\t var lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n\t var classList = self.modalContainer.classList;\n\t classList.remove(CLS_CONTAINER_CURRENT);\n\t classList.remove(CLS_BACKDROP);\n\t classList.remove(CLS_OPEN);\n\t // Remove all current classes from child-nodes\n\t for (var i = 0; i < self.modalContainer.childNodes.length; i++) {\n\t var node = self.modalContainer.childNodes[i];\n\t var cl = node.classList;\n\t // remove applied styles\n\t self._finishState(node);\n\t cl.remove(CLS_CURRENT);\n\t cl.remove(CLS_PART_OF_STACK);\n\t }\n\t if (lastContainer) {\n\t lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n\t }\n\t }\n\t\n\t if (self.destroyOnFinish) {\n\t self.destroy();\n\t }\n\t return self;\n\t }\n\t\n\t /**\n\t * Resets a target when newly initilizes\n\t * @param target\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_finishState',\n\t value: function _finishState(target) {\n\t target.classList.remove(CLS_ANIM_END);\n\t }\n\t\n\t /**\n\t * Handler called when a Modal has finished an animation\n\t * @param e\n\t * @param self\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_finishAnim',\n\t value: function _finishAnim(e, self) {\n\t e.target.classList.add(CLS_ANIM_END);\n\t e.target.removeEventListener(e.type, self, true);\n\t }\n\t\n\t /**\n\t * Brings the given modal to front\n\t * @param co\n\t * @param last\n\t */\n\t\n\t }, {\n\t key: 'switchModals',\n\t value: function switchModals(co, last) {\n\t co.prevModal = last;\n\t Modal._modalInstances.push(co);\n\t _FixedWindow2.default.getInstance().open(this, this.modalContainer);\n\t if (last) {\n\t this._finishState(last);\n\t _Util2.default.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n\t last.classList.add(CLS_PART_OF_STACK);\n\t }\n\t // set new currentOpen\n\t this.currentOpen = co;\n\t\n\t // bring current container to the front\n\t var instances = Modal._modalInstances;\n\t\n\t for (var m = 0; m < instances.length; m++) {\n\t instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n\t }\n\t this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n\t // remove animations if animations has been completed, fixes various bugs:\n\t // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n\t _Util2.default.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\t\n\t for (var i = 0; i < this.modalContainer.childNodes.length; i++) {\n\t var n = this.modalContainer.childNodes[i];\n\t var isCurrent = n.classList.contains(CLS_CURRENT);\n\t if (n === co) {\n\t co.classList.add(CLS_CURRENT);\n\t co.classList.remove(CLS_PART_OF_STACK);\n\t this._finishState(co);\n\t } else {\n\t n.classList.remove(CLS_CURRENT);\n\t if (isCurrent) {\n\t this._removeModalFromStack(n);\n\t _Event2.default.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n\t }\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Creates a Modal and opens it (later)\n\t * @param e\n\t * @returns {Promise|boolean}\n\t */\n\t\n\t }, {\n\t key: 'createWidget',\n\t value: function createWidget(e) {\n\t var _this = this;\n\t\n\t var self = this;\n\t if (this.loading) {\n\t return false;\n\t }\n\t\n\t // check if another modal has registered events on this dom path:\n\t if (e && e.target) {\n\t var foundInstance = _Util2.default.parentsUntil(e.target, function (node) {\n\t return node && node.flexModalInstance;\n\t });\n\t\n\t // if another instance has been found, abort\n\t if (foundInstance !== this.container) {\n\t return false;\n\t }\n\t }\n\t var targetContent = void 0;\n\t var future = void 0;\n\t var widget = void 0;\n\t var target = void 0;\n\t var hasTarget = true;\n\t var isHtmlElement = e instanceof HTMLElement;\n\t var isWidget = _Widget2.default.isWidget(e);\n\t if (isHtmlElement || isWidget) {\n\t if (isHtmlElement) {\n\t targetContent = e;\n\t } else {\n\t widget = e;\n\t targetContent = widget.element;\n\t }\n\t } else {\n\t target = e.target;\n\t if (!target) {\n\t throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n\t }\n\t hasTarget = target.hasAttribute(ATTR_NAME);\n\t targetContent = target.getAttribute(ATTR_NAME);\n\t widget = _Widget2.default.findWidget(target);\n\t if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n\t var _ret = function () {\n\t var newInstance = new Modal(_this.container).setDestroyOnFinish(true);\n\t e.newInstance = true;\n\t newInstance.fromEvent(e).then(function () {\n\t newInstance.registerEvents(newInstance.getModalContainer());\n\t });\n\t return {\n\t v: false\n\t };\n\t }();\n\t\n\t if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === \"object\") return _ret.v;\n\t }\n\t if (hasTarget) {\n\t e.stopImmediatePropagation();\n\t e.preventDefault();\n\t }\n\t }\n\t\n\t if (!hasTarget) {\n\t return false;\n\t }\n\t\n\t var modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\t\n\t // lazy create modal container\n\t if (!this.modalContainer) {\n\t this.modalContainer = global.document.createElement('div');\n\t this.modalContainer.className = CLS_MODAL_CONTAINER + ' ' + this.options.containerClassNames + ' ' + CLS_OPEN;\n\t var closeModalFunction = function closeModalFunction(ce) {\n\t if (_this.loading) {\n\t return false;\n\t }\n\t if (_Util2.default.isPartOfNode(ce.target, _this.currentOpen)) {\n\t if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n\t return false;\n\t }\n\t }\n\t _this.close(ce);\n\t };\n\t\n\t this.modalContainer.addEventListener(_Settings2.default.getTabEvent(), closeModalFunction, false);\n\t\n\t modalContainerClasses = this.modalContainer.classList;\n\t this.container.appendChild(this.modalContainer);\n\t } else {\n\t modalContainerClasses.add(CLS_OPEN);\n\t }\n\t\n\t var loader = void 0;\n\t var doc = global.document;\n\t var toggleLoader = function toggleLoader(show) {\n\t if (show) {\n\t loader = doc.createElement('div');\n\t loader.className = CLS_LOADER_CONTAINER;\n\t var loaderLoader = doc.createElement('div');\n\t loaderLoader.className = CLS_LOADER;\n\t loader.appendChild(loaderLoader);\n\t _this.modalContainer.appendChild(loader);\n\t } else {\n\t loader.parentNode.removeChild(loader);\n\t }\n\t };\n\t modalContainerClasses.add('loading');\n\t modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\t\n\t requestAnimationFrame(function () {\n\t requestAnimationFrame(function () {\n\t modalContainerClasses.add(CLS_BACKDROP);\n\t });\n\t });\n\t\n\t this.loading = true;\n\t toggleLoader(true);\n\t var async = widget ? widget.getAsync() : null;\n\t if (_Widget2.default.isWidget(widget) && async) {\n\t future = async.then(function (r) {\n\t var result = void 0;\n\t if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n\t result = r;\n\t } else {\n\t // Create container Element:\n\t var element = doc.createElement('div');\n\t element.className = self.options.classNames;\n\t element.innerHTML = r;\n\t element.id = _Util2.default.guid();\n\t result = element;\n\t }\n\t widget.finalContent = result;\n\t _Event2.default.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n\t return result;\n\t });\n\t } else {\n\t (function () {\n\t var el = targetContent instanceof HTMLElement || targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n\t if (el) {\n\t future = new Promise(function (resolve) {\n\t resolve(el);\n\t });\n\t } else {\n\t throw new Error('Could not found given modal element (content) with ID: ' + targetContent);\n\t }\n\t })();\n\t }\n\t\n\t _Event2.default.dispatchAndFire(target, EVENT_MODAL_INIT);\n\t\n\t return future.then(function (thisEl) {\n\t thisEl.hfWidgetInstance = _this;\n\t _this.modalContainer.appendChild(thisEl);\n\t modalContainerClasses.remove('loading');\n\t _this.loading = false;\n\t toggleLoader(false);\n\t _this.open(thisEl, true, e);\n\t return thisEl;\n\t });\n\t }\n\t\n\t /**\n\t * Open's an already rendered modal\n\t * @param {HTMLElement} modal\n\t * @param {Boolean} [internal], set to true to prevent container management\n\t * @param {Boolean} [maybeEvent], optional event-object that triggered open\n\t */\n\t\n\t }, {\n\t key: 'open',\n\t value: function open(modal, internal, maybeEvent) {\n\t if (!internal) {\n\t this.modalContainer.classList.add('open');\n\t }\n\t this.switchModals(modal, this.currentOpen);\n\t\n\t _Event2.default.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n\t }\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents(delegate) {\n\t var _this2 = this;\n\t\n\t var delegateContainer = delegate || this.container;\n\t // Modals should always be fixed\n\t _FixedWindow2.default.getInstance().addScreenConstraint(Modal, function () {\n\t return true;\n\t });\n\t // register modal instance so we can detect multiple registrars\n\t delegateContainer.flexModalInstance = this;\n\t this.eventFunction = function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t _this2.createWidget.apply(_this2, args);\n\t };\n\t delegateContainer.addEventListener(_Settings2.default.getTabEvent(), this.eventFunction, false);\n\t\n\t this.eventContainer = delegateContainer;\n\t return this;\n\t }\n\t\n\t /**\n\t * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n\t * @param {HTMLElement|Widget} widget instance or html element\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'fromWidget',\n\t value: function fromWidget(widget) {\n\t return this.createWidget(widget);\n\t }\n\t\n\t /**\n\t * Creates a Widget from event\n\t * @param e\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'fromEvent',\n\t value: function fromEvent(e) {\n\t return this.createWidget(e);\n\t }\n\t }, {\n\t key: 'setDestroyOnFinish',\n\t value: function setDestroyOnFinish(v) {\n\t this.destroyOnFinish = v;\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroy this widget instance, cleans empty DOM nodes\n\t * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t var modalContainer = this.modalContainer;\n\t var isEmptyContainer = modalContainer.childNodes.length === 0;\n\t // Remove event listener on destroy, do not remove DOM node\n\t if (this.eventContainer) {\n\t this.eventContainer.removeEventListener(_Settings2.default.getTabEvent(), this.eventFunction, true);\n\t }\n\t\n\t if (isEmptyContainer) {\n\t if (modalContainer.parentNode) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t }\n\t }\n\t if (global.MutationObserver) {\n\t (function () {\n\t var observer = new MutationObserver(function (mutations) {\n\t mutations.forEach(function () {\n\t if (modalContainer.childNodes.length === 0) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t observer.disconnect();\n\t }\n\t });\n\t });\n\t observer.observe(modalContainer, {\n\t childList: true\n\t });\n\t })();\n\t } else {\n\t modalContainer.addEventListener('DOMNodeRemoved', function (e) {\n\t if (e.target !== modalContainer && modalContainer.childNodes.length - 1 === 0) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t }\n\t });\n\t }\n\t }\n\t }]);\n\t\n\t return Modal;\n\t}();\n\t\n\t// Static variable that keeps track of all open modals\n\t\n\t\n\tModal._modalInstances = [];\n\t\n\t// Global keydown listener for modal\n\tglobal.addEventListener('keydown', function (e) {\n\t if (e.keyCode === KEY_ESC) {\n\t var lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n\t if (lastModal) {\n\t _Widget2.default.findWidget(lastModal).close(e);\n\t }\n\t }\n\t});\n\t\n\texports.default = Modal;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_FORM_AJAX_COMPLETED = exports.EVENT_FORM_AFTER_AJAX_SUBMIT = exports.EVENT_FORM_SUBMIT = exports.EVENT_FORM_READY = undefined;\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _Tooltip = __webpack_require__(6);\n\t\n\tvar _Tooltip2 = _interopRequireDefault(_Tooltip);\n\t\n\t__webpack_require__(11);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _DestroyableWidget2 = __webpack_require__(5);\n\t\n\tvar _DestroyableWidget3 = _interopRequireDefault(_DestroyableWidget2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Form\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\tvar LOADING_CLASS = 'loading';\n\tvar DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\n\tvar REMOTE = 'data-remote';\n\tvar REMOTE_ACTION = 'data-remote-action';\n\tvar ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\n\tvar ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\n\tvar ATTR_VALIDATOR = 'data-validate';\n\tvar ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\n\tvar ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\n\tvar ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\n\tvar ATTR_ERROR_TARGET_ID = 'data-error-target';\n\tvar ATTR_DEPENDS = 'data-depends-selector';\n\tvar CONST_USE_JSON = 'json';\n\tvar CONST_REALTIME_EVENT = 'input';\n\tvar FOCUS_TOOLTIP_DELAY = 20;\n\tvar CLICK_TOOLTIP_DELAY = 150;\n\t\n\t/**\n\t * Triggered when form is fully initialized and handlers are binded\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_READY = exports.EVENT_FORM_READY = 'flexcss.form.ready';\n\t/**\n\t * Fires when a form is submitted, cancelable\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_SUBMIT = exports.EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n\t/**\n\t * Fired directly after the form has been submitted via ajax\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_AFTER_AJAX_SUBMIT = exports.EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n\t/**\n\t * Fired when ajax events did complete\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_AJAX_COMPLETED = exports.EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\t\n\t/**\n\t * A HTML5 Form Validation replacement\n\t */\n\t\n\tvar Form = function (_DestroyableWidget) {\n\t _inherits(Form, _DestroyableWidget);\n\t\n\t /**\n\t * @param {HTMLElement} form\n\t * @param [options] optional options\n\t */\n\t\n\t function Form(form, options) {\n\t _classCallCheck(this, Form);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Form).call(this));\n\t\n\t if (!(form instanceof HTMLFormElement)) {\n\t throw 'argument {0} form needs to be an form element';\n\t }\n\t\n\t /**\n\t * The Form\n\t * @type {HTMLElement}\n\t */\n\t _this.form = form;\n\t\n\t /**\n\t * @type {Tooltip}\n\t */\n\t _this.tooltips = null;\n\t\n\t /**\n\t * @type {Promise}\n\t */\n\t _this.currentValidationFuture = new Promise(function () {});\n\t\n\t /**\n\t * Default options\n\t * @type {Object}\n\t */\n\t _this.options = {\n\t // if true creates tooltips above element, uses FlexCss Tooltips\n\t createTooltips: true,\n\t // if true appends error message after input element\n\t appendError: false,\n\t // type of ajax submit\n\t ajaxSubmitType: 'POST',\n\t // json content type if ajax method is set to json\n\t ajaxJsonContentType: 'application/json; charset=utf-8',\n\t // allow inline validation\n\t inlineValidation: true,\n\t // validate in realtime (on `input` event)\n\t realtime: true,\n\t // timeout when realtime event should be captured\n\t realtimeTimeout: 250,\n\t // formatting method for an error\n\t formatErrorTooltip: function formatErrorTooltip(error) {\n\t return ' ' + error;\n\t },\n\t // the class that will be put on the element to mark it failed validation\n\t inputErrorClass: 'invalid',\n\t // the container class for error messages below an element\n\t containerErrorClass: 'form-error',\n\t // additional options for fetch\n\t fetchOptions: {\n\t credentials: 'include'\n\t },\n\t // the container for tooltips\n\t tooltipContainer: form,\n\t tooltipOptions: {\n\t containerClass: 'error-tooltip'\n\t },\n\t // if you have a fixed header, either set a number or function here\n\t scrollToElementDiff: 0\n\t };\n\t\n\t // overwrite default options\n\t Object.assign(_this.options, options);\n\t\n\t // apply settings from attributes\n\t _Util2.default.applyOptionsFromElement(form, _this.options);\n\t\n\t // set form class as widget\n\t // Forms are very different to classical widgets,\n\t // we will not use our base widget class for this but just self\n\t form.hfWidgetInstance = _this;\n\t\n\t /**\n\t * A List of Validators\n\t * @type {Object}\n\t * @private\n\t */\n\t _this._validators = Form.globalValidators;\n\t\n\t /**\n\t * @type {Function}\n\t * @private\n\t */\n\t _this._remoteValidationFunction = null;\n\t\n\t _this.initFormValidation();\n\t return _this;\n\t }\n\t\n\t _createClass(Form, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t _get(Object.getPrototypeOf(Form.prototype), 'destroy', this).call(this);\n\t if (this.tooltips) {\n\t this.tooltips.destroy();\n\t }\n\t }\n\t\n\t /**\n\t * Submits this form, either via ajax or just classical (default)\n\t * @param {HTMLFormElement} thisForm\n\t * @param {Event} e\n\t * @private\n\t * @returns {Promise|boolean} returns false if submit is cancled\n\t */\n\t\n\t }, {\n\t key: '_submitFunction',\n\t value: function _submitFunction(thisForm, e) {\n\t var shouldUseAjax = thisForm.getAttribute(REMOTE),\n\t ajaxPostUrl = thisForm.getAttribute(REMOTE_ACTION) || thisForm.getAttribute('action') || window.location.href,\n\t useJson = CONST_USE_JSON === shouldUseAjax,\n\t self = this;\n\t\n\t var ev = _Event2.default.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\t\n\t // abort execution is event was prevented\n\t if (ev.defaultPrevented) {\n\t self._formStopLoading();\n\t return false;\n\t }\n\t\n\t if (shouldUseAjax === null) {\n\t // submit\n\t return thisForm.submit();\n\t }\n\t // prevent form from submit normally\n\t e.preventDefault();\n\t\n\t // add information that this is an XMLHttpRequest request (used by some frameworks)\n\t var defaultHeaders = {\n\t 'X-Requested-With': 'XMLHttpRequest'\n\t };\n\t\n\t // setup default headers\n\t if (useJson) {\n\t Object.assign(defaultHeaders, {\n\t 'Content-Type': this.options.ajaxJsonContentType\n\t });\n\t }\n\t var defaultOptions = Object.assign(this.options.fetchOptions, {\n\t headers: defaultHeaders,\n\t method: this.options.ajaxSubmitType\n\t });\n\t\n\t // support either JSON request payload or normal payload submission\n\t var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n\t body: JSON.stringify(this.serialize())\n\t })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n\t body: new FormData(thisForm)\n\t }));\n\t\n\t _Event2.default.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\t\n\t return serverCall.then(function (r) {\n\t (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\t\n\t _Event2.default.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n\t // always remove error class\n\t self._formStopLoading();\n\t });\n\t }\n\t\n\t /**\n\t * Serializes a form to a json object\n\t * @returns {Object}\n\t */\n\t\n\t }, {\n\t key: 'serialize',\n\t value: function serialize() {\n\t var selectors = ['input[name]:not([type=\"radio\"]):enabled', 'input[type=\"radio\"][name]:checked', 'select[name]:enabled', 'textarea[name]:enabled'],\n\t inputs = this.form.querySelectorAll(selectors.join(',')),\n\t result = {};\n\t\n\t Array.prototype.forEach.call(inputs, function (input) {\n\t var exists = result[input.name],\n\t value = input.value;\n\t if (exists instanceof Array) {\n\t exists.push(value);\n\t } else if (exists) {\n\t result[input.name] = [result[input.name], value];\n\t } else {\n\t result[input.name] = value;\n\t }\n\t });\n\t\n\t return result;\n\t }\n\t\n\t /**\n\t * Handles the chain of validation on given fields\n\t *\n\t * @param {HTMLElement|Array|NodeList} field\n\t * @param [focus] optional focus first error\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'handleValidation',\n\t value: function handleValidation(field, focus) {\n\t var _this2 = this;\n\t\n\t var fields = field instanceof Array || field instanceof NodeList ? field : [field];\n\t return this._handleValidation(fields, focus, true).then(function (r) {\n\t if (!r.foundAnyError) {\n\t // remove tooltips\n\t if (_this2.tooltips) {\n\t _this2.tooltips.removeTooltip();\n\t }\n\t }\n\t return r;\n\t }.bind(this));\n\t }\n\t\n\t /**\n\t * Handles errors on given node list\n\t * @param {NodeList} toValidateFields\n\t * @param {boolean} focus\n\t * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n\t * @returns {Promise}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleValidation',\n\t value: function _handleValidation(toValidateFields, focus, scoped) {\n\t var self = this;\n\t var arr = Form._createArrayFromInvalidFieldList(toValidateFields),\n\t isLocalInvalid = arr.length > 0;\n\t // focus must appear in the same frame for iOS devices\n\t if (isLocalInvalid && focus) {\n\t self._focusElement(arr[0]);\n\t }\n\t var validation = scoped ? this._customValidationsForElements(toValidateFields) : self.validateCustomFields();\n\t return validation.then(function (r) {\n\t if (isLocalInvalid) {\n\t // combine browser and custom validators\n\t r.foundAnyError = true;\n\t }\n\t // get a unique field list of all fields that need to be checked and rendered\n\t // it's possible that we have duplicates in non scoped mode\n\t var thisToValidateFields = scoped ? toValidateFields : Array.from(arr).concat(r.checkedFields);\n\t r.checkedFields = thisToValidateFields;\n\t var foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n\t firstInvalidField = foundInvalidFields[0];\n\t if (firstInvalidField) {\n\t if (focus) {\n\t self._focusElement(firstInvalidField);\n\t // if element could not be focused:\n\t if (document.activeElement !== firstInvalidField) {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t } else {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t self.showAndOrCreateTooltip(firstInvalidField);\n\t }\n\t return r;\n\t });\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} field\n\t * @param {ValidityState} validity\n\t * @returns {*}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_setupErrorMessages',\n\t value: function _setupErrorMessages(field, validity) {\n\t return Form.globalErrorMessageHandler ? Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n\t }\n\t\n\t /**\n\t * Handles class labels for elements\n\t * @param {Object} fields\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleLabels',\n\t value: function _handleLabels(fields) {\n\t Object.keys(fields).forEach(function (id) {\n\t var labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'),\n\t invalid = fields[id];\n\t if (labels.length) {\n\t for (var labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n\t var labelEl = labels[labelsIndex];\n\t // we can't use toggle attribute, not supported in IE\n\t if (invalid) {\n\t this._markElementInvalid(labelEl);\n\t } else {\n\t this._markElementValid(labelEl);\n\t }\n\t }\n\t }\n\t }.bind(this));\n\t }\n\t\n\t /**\n\t * @param el\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_markElementInvalid',\n\t value: function _markElementInvalid(el) {\n\t el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n\t el.classList.add(this.options.inputErrorClass);\n\t }\n\t\n\t /**\n\t * @param el\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_markElementValid',\n\t value: function _markElementValid(el) {\n\t el.removeAttribute(DATA_ELEMENT_INVALID);\n\t el.classList.remove(this.options.inputErrorClass);\n\t }\n\t\n\t /**\n\t * A List of invalid elements (:invalid)\n\t * @returns {Array}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_getInvalidElements',\n\t value: function _getInvalidElements() {\n\t return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n\t return !(r instanceof HTMLFieldSetElement);\n\t });\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} thisParent\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_removeElementErrors',\n\t value: function _removeElementErrors(thisParent) {\n\t var errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass),\n\t inputsWithErrorClasses = thisParent.querySelectorAll('[' + DATA_ELEMENT_INVALID + ']');\n\t for (var elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n\t errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n\t }\n\t for (var inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n\t var el = inputsWithErrorClasses[inputErrorIndex];\n\t this._markElementValid(el);\n\t }\n\t }\n\t\n\t /**\n\t * Registers a custom validator\n\t * @param {String} name\n\t * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n\t * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n\t * we can't rely on that\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerValidator',\n\t value: function registerValidator(name, validator) {\n\t this._validators[name] = validator;\n\t return this;\n\t }\n\t\n\t /**\n\t * Runs async validation\n\t * @param {String} validationRef\n\t * @param {HTMLElement} field\n\t * @returns {Promise}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_runValidation',\n\t value: function _runValidation(validationRef, field) {\n\t if (!this._validators[validationRef]) {\n\t throw 'Could not found validator: ' + validationRef;\n\t }\n\t var cl = field.classList,\n\t future = this._validators[validationRef].apply(this, [field, this.form]);\n\t cl.add(LOADING_CLASS);\n\t future.then(function () {\n\t cl.remove(LOADING_CLASS);\n\t });\n\t return future;\n\t }\n\t\n\t /**\n\t * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n\t *\n\t * @param {Array|NodeList} fields\n\t * @returns {Promise} contains either true if validations passed or false if something went wrong\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_customValidationsForElements',\n\t value: function _customValidationsForElements(fields) {\n\t var futures = [],\n\t fieldsLength = fields.length,\n\t checkedFields = [];\n\t for (var iVal = 0; iVal < fieldsLength; iVal++) {\n\t var field = fields[iVal],\n\t validationRef = field.getAttribute(ATTR_VALIDATOR),\n\t validity = field.validity;\n\t if (this._validators[validationRef]) {\n\t // use local validation first and then continue with custom validations\n\t if (Form._shouldNotValidateField(field) || validity && !validity.customError && !validity.valid) {\n\t continue;\n\t }\n\t checkedFields.push(field);\n\t futures.push(this._runValidation(validationRef, field));\n\t } else {\n\t if (validationRef) {\n\t console.warn('data-validate was set but no validator was found');\n\t }\n\t }\n\t }\n\t return Promise.all(futures).then(function (allFutures) {\n\t var l = allFutures.length;\n\t var result = {\n\t checkedFields: checkedFields,\n\t foundAnyError: false\n\t };\n\t for (var fI = 0; fI < l; fI++) {\n\t if (!allFutures[fI]) {\n\t result.foundAnyError = true;\n\t break;\n\t }\n\t }\n\t return result;\n\t });\n\t }\n\t\n\t /**\n\t * Remove all errors for this form\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'removeErrors',\n\t value: function removeErrors() {\n\t this._removeElementErrors(this.form);\n\t if (this.tooltips) {\n\t this.tooltips.removeTooltip();\n\t }\n\t return this;\n\t }\n\t\n\t /**\n\t * Will handle errors for given fields\n\t * @param {Array|NodeList} fields\n\t * @param {Boolean} removeAllErrors\n\t */\n\t\n\t }, {\n\t key: 'prepareErrors',\n\t value: function prepareErrors(fields, removeAllErrors) {\n\t if (removeAllErrors) {\n\t this.removeErrors();\n\t }\n\t var labelGroups = {},\n\t invalidFields = [];\n\t\n\t function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n\t var additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id,\n\t group = thisLabelGroup[additionalLabels];\n\t if (additionalLabels) {\n\t // check additionally if field is currently marked as invalid\n\t // so the label is not marked as error if no field is marked as one\n\t group = group ? group : isInvalid;\n\t thisLabelGroup[additionalLabels] = group;\n\t }\n\t }\n\t\n\t // We save all validations in an extra property because we need to reset the validity due some\n\t // implementation errors in other browsers then chrome\n\t for (var i = 0; i < fields.length; i++) {\n\t var field = fields[i],\n\t errorTarget = Form._findErrorTarget(field),\n\t parent = errorTarget.parentNode,\n\t validity = field.validity,\n\t isInvalid = validity && !validity.valid;\n\t if (Form._shouldNotValidateField(field)) {\n\t continue;\n\t }\n\t field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n\t handleAdditionalLabels(isInvalid, labelGroups, field);\n\t if (isInvalid) {\n\t if (!removeAllErrors) {\n\t // Remove current errors:\n\t this._removeElementErrors(parent);\n\t }\n\t // setup custom error messages:\n\t this._setupErrorMessages(field, validity);\n\t var msg = field.validationMessage;\n\t\n\t // mark fields as invalid\n\t this._markElementInvalid(errorTarget);\n\t this._markElementInvalid(field);\n\t\n\t if (this.options.appendError) {\n\t parent.insertAdjacentHTML(\"beforeend\", '
' + msg + '
');\n\t }\n\t invalidFields.push(field);\n\t field.flexFormsSavedValidationMessage = msg;\n\t } else {\n\t // restore invalid fields\n\t this._markElementValid(errorTarget);\n\t this._markElementValid(field);\n\t\n\t // cleanup\n\t delete field.flexFormsSavedValidationMessage;\n\t\n\t // remove error markup\n\t this._removeElementErrors(parent);\n\t }\n\t // We have to reset the custom validity here to allow native validations work again\n\t field.setCustomValidity('');\n\t }\n\t // if validates a single field we need to check the linked fields to a label:\n\t if (fields.length === 1) {\n\t var _field = fields[0];\n\t var id = _field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || _field.id;\n\t if (id) {\n\t var linkedFields = Array.from(this.getForm().querySelectorAll('[' + ATTR_DATA_CUSTOM_LABEL + '=\"' + id + '\"], #' + id));\n\t linkedFields.forEach(function (thisField) {\n\t var validity = thisField.validity,\n\t isInvalid = validity && !validity.valid && this._isElementInvalidElement(thisField);\n\t handleAdditionalLabels(isInvalid, labelGroups, thisField);\n\t }.bind(this));\n\t }\n\t }\n\t this._handleLabels(labelGroups);\n\t return invalidFields;\n\t }\n\t\n\t /**\n\t * Validates all custom fields\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'validateCustomFields',\n\t value: function validateCustomFields() {\n\t return this._customValidationsForElements(this.form.querySelectorAll(\"[data-validate]\"));\n\t }\n\t\n\t /**\n\t * Tests if a field should be validated\n\t * @param {HTMLElement} field\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'getForm',\n\t\n\t\n\t /**\n\t * This form\n\t * @returns {HTMLElement}\n\t */\n\t value: function getForm() {\n\t return this.form;\n\t }\n\t\n\t /**\n\t * Registers a function that handles remote validation\n\t * @param {Function} func\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerRemoteValidation',\n\t value: function registerRemoteValidation(func) {\n\t this._remoteValidationFunction = func;\n\t return this;\n\t }\n\t\n\t /**\n\t * Formats the error content for the tooltip\n\t * @param {String} error\n\t * @returns {String}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_formatErrorTooltip',\n\t value: function _formatErrorTooltip(error) {\n\t return this.options.formatErrorTooltip.apply(this, [error]);\n\t }\n\t\n\t /**\n\t * Tries to find a custom error target on given target\n\t * @param target\n\t * @returns {HTMLElement}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'showAndOrCreateTooltip',\n\t\n\t\n\t /**\n\t * Creates a tooltip at given element, will only create a new instance if not created\n\t * @param {HTMLElement} target\n\t * @param {Boolean} [remove]\n\t */\n\t value: function showAndOrCreateTooltip(target, remove) {\n\t var self = this;\n\t if (!this.tooltips && this.options.createTooltips) {\n\t this.tooltips = new _Tooltip2.default(this.options.tooltipContainer, this.options.tooltipOptions);\n\t }\n\t if (!this.options.createTooltips) {\n\t return false;\n\t }\n\t\n\t if (!target.flexFormsSavedValidity) {\n\t return false;\n\t }\n\t var errorTarget = Form._findErrorTarget(target);\n\t if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n\t self.tooltips.createTooltip(errorTarget, self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n\t return true;\n\t } else {\n\t if (remove) {\n\t self.tooltips.removeTooltip();\n\t }\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Checks if element is marked as invalid\n\t * @param {HTMLElement} el\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_isElementInvalidElement',\n\t value: function _isElementInvalidElement(el) {\n\t return el.hasAttribute(DATA_ELEMENT_INVALID);\n\t }\n\t\n\t /**\n\t * Handles invalid event of a form\n\t * @param {Event} e\n\t * @returns {Promise|boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_checkIsInvalid',\n\t value: function _checkIsInvalid(e) {\n\t e.preventDefault();\n\t var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n\t return this._handleValidation(invalidFields, true, false);\n\t }\n\t\n\t /**\n\t * Will query dependent fields (by selector) that should be validated with given field\n\t * @param field\n\t * @returns {NodeList|[]}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_getDependentFields',\n\t value: function _getDependentFields(field) {\n\t var fieldSelector = field.getAttribute(ATTR_DEPENDS),\n\t base = [field];\n\t if (fieldSelector) {\n\t base.push.apply(base, Array.prototype.slice.apply(this.getForm().querySelectorAll(fieldSelector)));\n\t }\n\t return base;\n\t }\n\t\n\t /**\n\t * @private\n\t * @param {HTMLElement} [target]\n\t */\n\t\n\t }, {\n\t key: '_handleTooltipInline',\n\t value: function _handleTooltipInline(target) {\n\t if (this.tooltips) {\n\t this.tooltips.removeTooltip(target);\n\t }\n\t }\n\t\n\t /**\n\t * Initializes validation for a given form, registers event handlers\n\t */\n\t\n\t }, {\n\t key: 'initFormValidation',\n\t value: function initFormValidation() {\n\t var _this3 = this;\n\t\n\t // Suppress the default bubbles\n\t var form = this.getForm(),\n\t self = this,\n\t invalidEvent = 'invalid';\n\t\n\t /**\n\t * Validates if is valid realtime element\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidRealtimeElement(target) {\n\t return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n\t }\n\t\n\t form.addEventListener(invalidEvent, function (e) {\n\t e.preventDefault();\n\t }, true);\n\t\n\t _Util2.default.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n\t self._formLoading();\n\t var result = self._checkIsInvalid(e);\n\t if (result) {\n\t self.currentValidationFuture = new Promise(function (resolve) {\n\t result.then(function (r) {\n\t setTimeout(function () {\n\t _Util2.default.addEventOnce(invalidEvent, form, handleInvalid, true);\n\t }, 0);\n\t resolve(r);\n\t self._formStopLoading();\n\t if (!r.foundAnyError) {\n\t self._formLoading();\n\t self._handleSubmit(e);\n\t }\n\t });\n\t });\n\t }\n\t }, true);\n\t\n\t this.addEventListener(form, 'reset', function () {\n\t _this3.removeErrors();\n\t });\n\t\n\t // Timeout for keys:\n\t var TIMEOUT_KEYDOWN,\n\t KEYDOWN_RUNNING = false;\n\t\n\t // resets keydown events\n\t function clearKeyDownTimeout() {\n\t KEYDOWN_RUNNING = false;\n\t clearTimeout(TIMEOUT_KEYDOWN);\n\t }\n\t\n\t // setup custom realtime event if given\n\t if (self.options.realtime) {\n\t this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n\t if (self._formIsLoading()) {\n\t return;\n\t }\n\t var target = e.target;\n\t clearTimeout(TIMEOUT_KEYDOWN);\n\t if (KEYDOWN_RUNNING) {\n\t return;\n\t }\n\t TIMEOUT_KEYDOWN = setTimeout(function () {\n\t var isStillTarget = document.activeElement === e.target;\n\t if (!_checkIsValidRealtimeElement(target)) {\n\t return;\n\t }\n\t if (isStillTarget) {\n\t self._handleTooltipInline();\n\t }\n\t KEYDOWN_RUNNING = true;\n\t var dependentFields = self._getDependentFields(target);\n\t self._customValidationsForElements(dependentFields).then(function () {\n\t self.prepareErrors(dependentFields, false);\n\t if (isStillTarget) {\n\t self.showAndOrCreateTooltip(e.target);\n\t }\n\t // future must be resolved before another event can be started\n\t KEYDOWN_RUNNING = false;\n\t });\n\t }, self.options.realtimeTimeout);\n\t }, true);\n\t }\n\t\n\t /**\n\t * Validates if target is a valid input field to check blur and focus events\n\t *\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidBlurFocusElement(target) {\n\t var attr = target.getAttribute(\"type\");\n\t return attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\";\n\t }\n\t\n\t /**\n\t * Validates if is valid inline-check element\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidInlineCheckElement(target) {\n\t return !target.hasAttribute(ATTR_DISABLE_INLINE);\n\t }\n\t\n\t this.addEventListener(form, 'blur', function (e) {\n\t // do not hide tooltip after change event\n\t if (!e.target.flexcssKeepTooltips) {\n\t self._handleTooltipInline(e.target);\n\t }\n\t delete e.target.flexcssKeepTooltips;\n\t }, true);\n\t\n\t // handle focus on input elements\n\t // will show an error if field is invalid\n\t this.addEventListener(form, \"focus\", function (e) {\n\t if (self._formIsLoading()) {\n\t return;\n\t }\n\t // do not track errors for checkbox and radios on focus:\n\t if (!_checkIsValidBlurFocusElement(e.target)) {\n\t return;\n\t }\n\t // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n\t // just have been hidden (on blur). Maybe fix this with a queue later\n\t setTimeout(function () {\n\t self.showAndOrCreateTooltip(e.target);\n\t }, FOCUS_TOOLTIP_DELAY);\n\t }, true);\n\t\n\t if (self.options.inlineValidation) {\n\t // Handle change for checkbox, radios and selects\n\t this.addEventListener(form, \"change\", function (e) {\n\t var target = e.target;\n\t if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n\t return;\n\t }\n\t clearKeyDownTimeout();\n\t var name = target.getAttribute('name');\n\t var inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n\t // we only support dependent fields for a single widgets right now\n\t if (inputs.length === 1) {\n\t inputs = self._getDependentFields(target);\n\t }\n\t self._customValidationsForElements(inputs).then(function () {\n\t self.prepareErrors(inputs, false);\n\t target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n\t if (target.flexcssKeepTooltips) {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t });\n\t });\n\t }\n\t\n\t // prevent default if form is invalid\n\t this.addEventListener(form, \"submit\", function listener(e) {\n\t self._submitListener(e, listener);\n\t });\n\t\n\t _Event2.default.dispatchAndFire(form, EVENT_FORM_READY);\n\t }\n\t\n\t /* Loading states, unfortunately we can't check if a promise is pending :/*/\n\t /* TODO: Maybe wrap promise to extend this functionality */\n\t\n\t }, {\n\t key: '_formLoading',\n\t value: function _formLoading() {\n\t this.getForm().classList.add(LOADING_CLASS);\n\t }\n\t }, {\n\t key: '_formStopLoading',\n\t value: function _formStopLoading() {\n\t this.getForm().classList.remove(LOADING_CLASS);\n\t }\n\t }, {\n\t key: '_formIsLoading',\n\t value: function _formIsLoading() {\n\t return this.getForm().classList.contains(LOADING_CLASS);\n\t }\n\t\n\t // this defines the logic after a change event when a tooltip is shown\n\t // because we call this method inside the change event, the click would be immeditally executed with the change\n\t // event when not using setTimeout(). There might be another solution for this...\n\t\n\t }, {\n\t key: '_handleTooltipHideClickAfterChange',\n\t value: function _handleTooltipHideClickAfterChange() {\n\t var self = this;\n\t if (this.options.createTooltips) {\n\t setTimeout(function () {\n\t _Util2.default.addEventOnce(_Settings2.default.getTabEvent(), global.document.body, function (t) {\n\t if (!self._isElementInvalidElement(t.target)) {\n\t self._handleTooltipInline();\n\t }\n\t });\n\t }, CLICK_TOOLTIP_DELAY);\n\t }\n\t }\n\t }, {\n\t key: '_focusElement',\n\t value: function _focusElement(el) {\n\t el.focus();\n\t _Util2.default.scrollToElement(el, this.options.scrollToElementDiff);\n\t }\n\t\n\t /**\n\t * Listener that is executed on form submit\n\t * @param e\n\t * @param submitListener\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_submitListener',\n\t value: function _submitListener(e, submitListener) {\n\t\n\t var form = this.getForm(),\n\t self = this,\n\t submitEvent = 'submit';\n\t\n\t if (this._formIsLoading()) {\n\t e.preventDefault();\n\t return false;\n\t }\n\t this._formLoading();\n\t form.removeEventListener(submitEvent, submitListener);\n\t this.removeErrors();\n\t e.preventDefault();\n\t // reset:\n\t if (form.checkValidity()) {\n\t form.addEventListener(submitEvent, submitListener);\n\t // It's possible that the form is valid but the custom validations need to be checked again:\n\t self.currentValidationFuture = new Promise(function (resolve) {\n\t var validation = self.validateCustomFields();\n\t validation.then(function (r) {\n\t // because custom validators may mark multiple fields as invalid, we get all of them in the form\n\t var fields = self._getInvalidElements(),\n\t errors = self.prepareErrors(fields, false),\n\t firstError = errors[0];\n\t if (firstError) {\n\t self._focusElement(firstError);\n\t self.showAndOrCreateTooltip(firstError, true);\n\t }\n\t resolve(r);\n\t });\n\t });\n\t self.currentValidationFuture.then(function (r) {\n\t if (!r.foundAnyError) {\n\t // Handle submitting the form to server:\n\t self._handleSubmit(e);\n\t } else {\n\t self._formStopLoading();\n\t }\n\t });\n\t } else {\n\t self._formStopLoading();\n\t form.addEventListener(submitEvent, submitListener);\n\t }\n\t }\n\t\n\t /**\n\t * Handles submitting, optionally allows to stop submitting\n\t * @param e\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleSubmit',\n\t value: function _handleSubmit(e) {\n\t this._submitFunction(this.form, e);\n\t }\n\t\n\t /**\n\t * Registers a global event Handler\n\t * @param errorFunc\n\t */\n\t\n\t }], [{\n\t key: '_shouldNotValidateField',\n\t value: function _shouldNotValidateField(field) {\n\t var target = Form._findErrorTarget(field);\n\t return target instanceof HTMLFieldSetElement || field.validity === undefined || target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !_Util2.default.isVisible(target);\n\t }\n\t\n\t /**\n\t * Creates an array from a node list with invalid items\n\t * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n\t * @param list\n\t * @returns {Array}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_createArrayFromInvalidFieldList',\n\t value: function _createArrayFromInvalidFieldList(list) {\n\t var arr = [];\n\t for (var i = 0; i < list.length; ++i) {\n\t var n = list[i];\n\t if (n.validity && !n.validity.valid) {\n\t if (!Form._shouldNotValidateField(n)) {\n\t arr.push(n);\n\t }\n\t }\n\t }\n\t return arr;\n\t }\n\t }, {\n\t key: '_findErrorTarget',\n\t value: function _findErrorTarget(target) {\n\t var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n\t foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n\t if (!foundTarget) {\n\t throw 'Given error target did not exsits:' + target;\n\t }\n\t return foundTarget;\n\t }\n\t }, {\n\t key: 'registerErrorMessageHandler',\n\t value: function registerErrorMessageHandler(errorFunc) {\n\t Form.globalErrorMessageHandler = errorFunc;\n\t }\n\t\n\t /**\n\t * Initialize forms for a specific selector\n\t * @param {String} selector\n\t * @param {Object} [options]\n\t * @return {array.}\n\t */\n\t\n\t }, {\n\t key: 'init',\n\t value: function init(selector, options) {\n\t var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') : document.querySelectorAll(selector),\n\t instances = [];\n\t for (var i = 0; i < forms.length; i++) {\n\t instances.push(new Form(forms[i], options));\n\t }\n\t return instances;\n\t }\n\t\n\t /**\n\t * Registers a global validator that is usable on all form instances\n\t * @param {String} name\n\t * @param {Function} validator\n\t * @returns {Function}\n\t */\n\t\n\t }, {\n\t key: 'registerValidator',\n\t value: function registerValidator(name, validator) {\n\t Form.globalValidators[name] = validator;\n\t return Form;\n\t }\n\t\n\t /**\n\t * Registers a global function that is called when a form should validate the response of a server\n\t * @param {Function} func\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerGlobalRemoteValidationFunction',\n\t value: function registerGlobalRemoteValidationFunction(func) {\n\t Form.globalRemoteValidationFunction = func;\n\t return Form;\n\t }\n\t }]);\n\t\n\t return Form;\n\t}(_DestroyableWidget3.default);\n\t\n\t/**\n\t * Global validators\n\t * @type {Array}\n\t */\n\t\n\t\n\tForm.globalValidators = [];\n\t\n\t/**\n\t * Global Remote validation function\n\t */\n\tForm.globalRemoteValidationFunction = function () {};\n\t\n\t/**\n\t * Handles custom error messages extracts custom message by default\n\t */\n\tForm.globalErrorMessageHandler = function (field, validity) {\n\t if (!validity.customError) {\n\t var customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n\t if (customMsg) {\n\t field.setCustomValidity(customMsg);\n\t }\n\t }\n\t};\n\t\n\texports.default = Form;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 10 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (fn, ms) {\n\t return function () {\n\t clearTimeout(fn.timeout);\n\t fn.timeout = setTimeout(fn, ms);\n\t };\n\t};\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// the whatwg-fetch polyfill installs the fetch() function\n\t// on the global object (window or self)\n\t//\n\t// Return that as the export for use in Webpack, Browserify etc.\n\t__webpack_require__(12);\n\tmodule.exports = self.fetch.bind(self);\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports) {\n\n\t(function(self) {\n\t 'use strict';\n\t\n\t if (self.fetch) {\n\t return\n\t }\n\t\n\t function normalizeName(name) {\n\t if (typeof name !== 'string') {\n\t name = String(name)\n\t }\n\t if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n\t throw new TypeError('Invalid character in header field name')\n\t }\n\t return name.toLowerCase()\n\t }\n\t\n\t function normalizeValue(value) {\n\t if (typeof value !== 'string') {\n\t value = String(value)\n\t }\n\t return value\n\t }\n\t\n\t function Headers(headers) {\n\t this.map = {}\n\t\n\t if (headers instanceof Headers) {\n\t headers.forEach(function(value, name) {\n\t this.append(name, value)\n\t }, this)\n\t\n\t } else if (headers) {\n\t Object.getOwnPropertyNames(headers).forEach(function(name) {\n\t this.append(name, headers[name])\n\t }, this)\n\t }\n\t }\n\t\n\t Headers.prototype.append = function(name, value) {\n\t name = normalizeName(name)\n\t value = normalizeValue(value)\n\t var list = this.map[name]\n\t if (!list) {\n\t list = []\n\t this.map[name] = list\n\t }\n\t list.push(value)\n\t }\n\t\n\t Headers.prototype['delete'] = function(name) {\n\t delete this.map[normalizeName(name)]\n\t }\n\t\n\t Headers.prototype.get = function(name) {\n\t var values = this.map[normalizeName(name)]\n\t return values ? values[0] : null\n\t }\n\t\n\t Headers.prototype.getAll = function(name) {\n\t return this.map[normalizeName(name)] || []\n\t }\n\t\n\t Headers.prototype.has = function(name) {\n\t return this.map.hasOwnProperty(normalizeName(name))\n\t }\n\t\n\t Headers.prototype.set = function(name, value) {\n\t this.map[normalizeName(name)] = [normalizeValue(value)]\n\t }\n\t\n\t Headers.prototype.forEach = function(callback, thisArg) {\n\t Object.getOwnPropertyNames(this.map).forEach(function(name) {\n\t this.map[name].forEach(function(value) {\n\t callback.call(thisArg, value, name, this)\n\t }, this)\n\t }, this)\n\t }\n\t\n\t function consumed(body) {\n\t if (body.bodyUsed) {\n\t return Promise.reject(new TypeError('Already read'))\n\t }\n\t body.bodyUsed = true\n\t }\n\t\n\t function fileReaderReady(reader) {\n\t return new Promise(function(resolve, reject) {\n\t reader.onload = function() {\n\t resolve(reader.result)\n\t }\n\t reader.onerror = function() {\n\t reject(reader.error)\n\t }\n\t })\n\t }\n\t\n\t function readBlobAsArrayBuffer(blob) {\n\t var reader = new FileReader()\n\t reader.readAsArrayBuffer(blob)\n\t return fileReaderReady(reader)\n\t }\n\t\n\t function readBlobAsText(blob) {\n\t var reader = new FileReader()\n\t reader.readAsText(blob)\n\t return fileReaderReady(reader)\n\t }\n\t\n\t var support = {\n\t blob: 'FileReader' in self && 'Blob' in self && (function() {\n\t try {\n\t new Blob();\n\t return true\n\t } catch(e) {\n\t return false\n\t }\n\t })(),\n\t formData: 'FormData' in self,\n\t arrayBuffer: 'ArrayBuffer' in self\n\t }\n\t\n\t function Body() {\n\t this.bodyUsed = false\n\t\n\t\n\t this._initBody = function(body) {\n\t this._bodyInit = body\n\t if (typeof body === 'string') {\n\t this._bodyText = body\n\t } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n\t this._bodyBlob = body\n\t } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n\t this._bodyFormData = body\n\t } else if (!body) {\n\t this._bodyText = ''\n\t } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n\t // Only support ArrayBuffers for POST method.\n\t // Receiving ArrayBuffers happens via Blobs, instead.\n\t } else {\n\t throw new Error('unsupported BodyInit type')\n\t }\n\t\n\t if (!this.headers.get('content-type')) {\n\t if (typeof body === 'string') {\n\t this.headers.set('content-type', 'text/plain;charset=UTF-8')\n\t } else if (this._bodyBlob && this._bodyBlob.type) {\n\t this.headers.set('content-type', this._bodyBlob.type)\n\t }\n\t }\n\t }\n\t\n\t if (support.blob) {\n\t this.blob = function() {\n\t var rejected = consumed(this)\n\t if (rejected) {\n\t return rejected\n\t }\n\t\n\t if (this._bodyBlob) {\n\t return Promise.resolve(this._bodyBlob)\n\t } else if (this._bodyFormData) {\n\t throw new Error('could not read FormData body as blob')\n\t } else {\n\t return Promise.resolve(new Blob([this._bodyText]))\n\t }\n\t }\n\t\n\t this.arrayBuffer = function() {\n\t return this.blob().then(readBlobAsArrayBuffer)\n\t }\n\t\n\t this.text = function() {\n\t var rejected = consumed(this)\n\t if (rejected) {\n\t return rejected\n\t }\n\t\n\t if (this._bodyBlob) {\n\t return readBlobAsText(this._bodyBlob)\n\t } else if (this._bodyFormData) {\n\t throw new Error('could not read FormData body as text')\n\t } else {\n\t return Promise.resolve(this._bodyText)\n\t }\n\t }\n\t } else {\n\t this.text = function() {\n\t var rejected = consumed(this)\n\t return rejected ? rejected : Promise.resolve(this._bodyText)\n\t }\n\t }\n\t\n\t if (support.formData) {\n\t this.formData = function() {\n\t return this.text().then(decode)\n\t }\n\t }\n\t\n\t this.json = function() {\n\t return this.text().then(JSON.parse)\n\t }\n\t\n\t return this\n\t }\n\t\n\t // HTTP methods whose capitalization should be normalized\n\t var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\t\n\t function normalizeMethod(method) {\n\t var upcased = method.toUpperCase()\n\t return (methods.indexOf(upcased) > -1) ? upcased : method\n\t }\n\t\n\t function Request(input, options) {\n\t options = options || {}\n\t var body = options.body\n\t if (Request.prototype.isPrototypeOf(input)) {\n\t if (input.bodyUsed) {\n\t throw new TypeError('Already read')\n\t }\n\t this.url = input.url\n\t this.credentials = input.credentials\n\t if (!options.headers) {\n\t this.headers = new Headers(input.headers)\n\t }\n\t this.method = input.method\n\t this.mode = input.mode\n\t if (!body) {\n\t body = input._bodyInit\n\t input.bodyUsed = true\n\t }\n\t } else {\n\t this.url = input\n\t }\n\t\n\t this.credentials = options.credentials || this.credentials || 'omit'\n\t if (options.headers || !this.headers) {\n\t this.headers = new Headers(options.headers)\n\t }\n\t this.method = normalizeMethod(options.method || this.method || 'GET')\n\t this.mode = options.mode || this.mode || null\n\t this.referrer = null\n\t\n\t if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n\t throw new TypeError('Body not allowed for GET or HEAD requests')\n\t }\n\t this._initBody(body)\n\t }\n\t\n\t Request.prototype.clone = function() {\n\t return new Request(this)\n\t }\n\t\n\t function decode(body) {\n\t var form = new FormData()\n\t body.trim().split('&').forEach(function(bytes) {\n\t if (bytes) {\n\t var split = bytes.split('=')\n\t var name = split.shift().replace(/\\+/g, ' ')\n\t var value = split.join('=').replace(/\\+/g, ' ')\n\t form.append(decodeURIComponent(name), decodeURIComponent(value))\n\t }\n\t })\n\t return form\n\t }\n\t\n\t function headers(xhr) {\n\t var head = new Headers()\n\t var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n\t pairs.forEach(function(header) {\n\t var split = header.trim().split(':')\n\t var key = split.shift().trim()\n\t var value = split.join(':').trim()\n\t head.append(key, value)\n\t })\n\t return head\n\t }\n\t\n\t Body.call(Request.prototype)\n\t\n\t function Response(bodyInit, options) {\n\t if (!options) {\n\t options = {}\n\t }\n\t\n\t this.type = 'default'\n\t this.status = options.status\n\t this.ok = this.status >= 200 && this.status < 300\n\t this.statusText = options.statusText\n\t this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n\t this.url = options.url || ''\n\t this._initBody(bodyInit)\n\t }\n\t\n\t Body.call(Response.prototype)\n\t\n\t Response.prototype.clone = function() {\n\t return new Response(this._bodyInit, {\n\t status: this.status,\n\t statusText: this.statusText,\n\t headers: new Headers(this.headers),\n\t url: this.url\n\t })\n\t }\n\t\n\t Response.error = function() {\n\t var response = new Response(null, {status: 0, statusText: ''})\n\t response.type = 'error'\n\t return response\n\t }\n\t\n\t var redirectStatuses = [301, 302, 303, 307, 308]\n\t\n\t Response.redirect = function(url, status) {\n\t if (redirectStatuses.indexOf(status) === -1) {\n\t throw new RangeError('Invalid status code')\n\t }\n\t\n\t return new Response(null, {status: status, headers: {location: url}})\n\t }\n\t\n\t self.Headers = Headers;\n\t self.Request = Request;\n\t self.Response = Response;\n\t\n\t self.fetch = function(input, init) {\n\t return new Promise(function(resolve, reject) {\n\t var request\n\t if (Request.prototype.isPrototypeOf(input) && !init) {\n\t request = input\n\t } else {\n\t request = new Request(input, init)\n\t }\n\t\n\t var xhr = new XMLHttpRequest()\n\t\n\t function responseURL() {\n\t if ('responseURL' in xhr) {\n\t return xhr.responseURL\n\t }\n\t\n\t // Avoid security warnings on getResponseHeader when not allowed by CORS\n\t if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n\t return xhr.getResponseHeader('X-Request-URL')\n\t }\n\t\n\t return;\n\t }\n\t\n\t xhr.onload = function() {\n\t var status = (xhr.status === 1223) ? 204 : xhr.status\n\t if (status < 100 || status > 599) {\n\t reject(new TypeError('Network request failed'))\n\t return\n\t }\n\t var options = {\n\t status: status,\n\t statusText: xhr.statusText,\n\t headers: headers(xhr),\n\t url: responseURL()\n\t }\n\t var body = 'response' in xhr ? xhr.response : xhr.responseText;\n\t resolve(new Response(body, options))\n\t }\n\t\n\t xhr.onerror = function() {\n\t reject(new TypeError('Network request failed'))\n\t }\n\t\n\t xhr.open(request.method, request.url, true)\n\t\n\t if (request.credentials === 'include') {\n\t xhr.withCredentials = true\n\t }\n\t\n\t if ('responseType' in xhr && support.blob) {\n\t xhr.responseType = 'blob'\n\t }\n\t\n\t request.headers.forEach(function(value, name) {\n\t xhr.setRequestHeader(name, value)\n\t })\n\t\n\t xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n\t })\n\t }\n\t self.fetch.polyfill = true\n\t})(typeof self !== 'undefined' ? self : this);\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_DROPDOWN_CLOSED = undefined;\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Dropdown\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tvar _FixedWindow = __webpack_require__(7);\n\t\n\tvar _FixedWindow2 = _interopRequireDefault(_FixedWindow);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_CC = 'data-collision-container';\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DARKENER = 'data-darkener-container';\n\t/**\n\t * @type {string}\n\t */\n\tvar DARKENER_INIT = 'init';\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DATA_TARGET = 'data-target';\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_CLOSE_DROPDOWN = 'data-close-dropdown';\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_NAME = 'data-dropdown';\n\t/**\n\t * @type {string}\n\t */\n\tvar STATE_LOADING = 'loading';\n\t\n\tvar CLS_DARKENER_DROPDOWN = 'darkener-dropdown';\n\t/**\n\t * @type {string}\n\t */\n\tvar CLS_OPEN = 'open';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar CLS_DROPDOWN = 'dropdown';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar EVENT_DROPDOWN_CLOSED = exports.EVENT_DROPDOWN_CLOSED = 'flexcss.dropdown.closed';\n\t\n\t/**\n\t * A Dropdown\n\t */\n\t\n\tvar Dropdown = function () {\n\t function Dropdown(DelegateContainer, Darkener) {\n\t _classCallCheck(this, Dropdown);\n\t\n\t var doc = global.document;\n\t\n\t /**\n\t * Container Element\n\t * @type {HTMLElement}\n\t */\n\t this.container = DelegateContainer instanceof HTMLElement ? DelegateContainer : doc.getElementById(DelegateContainer);\n\t\n\t this.currentOpen = null;\n\t this.currentTarget = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this.darkener = Darkener instanceof HTMLElement ? Darkener : document.getElementById(Darkener);\n\t\n\t this.destroyOnClose = false;\n\t\n\t if (!this.darkener || !this.container) {\n\t throw new Error('required elements not found (darkener and container element)');\n\t }\n\t }\n\t\n\t /**\n\t * Method that handles delegation events for dropdowns\n\t * @param e\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t\n\t _createClass(Dropdown, [{\n\t key: '_delegateFunction',\n\t value: function _delegateFunction(e) {\n\t var currentOpen = this.currentOpen;\n\t var target = _Util2.default.closestCallback(e.target, function (n) {\n\t return n instanceof HTMLElement && n.hasAttribute(ATTR_NAME);\n\t });\n\t var targetIsCurrent = target === this.currentTarget;\n\t\n\t if (currentOpen && !_Util2.default.isPartOfNode(e.target, currentOpen) || targetIsCurrent) {\n\t this.close();\n\t if (targetIsCurrent) {\n\t e.preventDefault();\n\t }\n\t return targetIsCurrent ? false : this._delegateFunction(e);\n\t }\n\t\n\t if (target && !currentOpen) {\n\t e.preventDefault();\n\t e.stopImmediatePropagation();\n\t\n\t if (target.isLoading) {\n\t return false;\n\t }\n\t this.createDropdown(target);\n\t } else {\n\t if (currentOpen) {\n\t if (e.target.hasAttribute(ATTR_CLOSE_DROPDOWN)) {\n\t e.preventDefault();\n\t this.close();\n\t }\n\t if (!_Util2.default.isPartOfNode(e.target, currentOpen)) {\n\t this.close();\n\t }\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Register Events for this dropdown container\n\t * @returns {Dropdown}\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents() {\n\t _FixedWindow2.default.getInstance().addScreenConstraint(Dropdown, function (width) {\n\t return width < _Settings2.default.get().smallBreakpoint;\n\t });\n\t this.container.addEventListener(_Settings2.default.getTabEvent(), this._delegateFunction.bind(this), true);\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroys this instance, unbinds events\n\t * @returns {Dropdown}\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t this.container.removeEventListener(_Settings2.default.getTabEvent(), this._delegateFunction.bind(this), true);\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroys instance on close of dropdown\n\t * @param v\n\t * @returns {Dropdown}\n\t */\n\t\n\t }, {\n\t key: 'setDestroyOnClose',\n\t value: function setDestroyOnClose(v) {\n\t this.destroyOnClose = v;\n\t return this;\n\t }\n\t\n\t /**\n\t * Will add the right class to container for specific darkener id\n\t * @param instance\n\t * @param show\n\t */\n\t\n\t }, {\n\t key: 'toggleDarkenerToggler',\n\t value: function toggleDarkenerToggler(instance, show) {\n\t var cls = 'toggle-' + (instance.id || CLS_DARKENER_DROPDOWN);\n\t var classList = this.container.classList;\n\t if (show) {\n\t classList.add(cls);\n\t } else {\n\t classList.remove(cls);\n\t }\n\t }\n\t\n\t /**\n\t * Closes Dropdown on current instance\n\t * @return {Boolean|Promise}\n\t */\n\t\n\t }, {\n\t key: 'close',\n\t value: function close() {\n\t var _this2 = this;\n\t\n\t var currentOpen = this.currentOpen;\n\t if (!currentOpen) {\n\t return false;\n\t }\n\t var darkenerInstance = currentOpen.flexDarkenerInstance || this.darkener;\n\t var thisCurrentOpen = currentOpen;\n\t\n\t var future = new Promise(function (resolve) {\n\t if (window.getComputedStyle(currentOpen).position === 'fixed') {\n\t _Util2.default.addEventOnce(_Settings2.default.getTransitionEvent(), currentOpen, function scheduler(e) {\n\t var _this = this;\n\t\n\t if (e.srcElement !== currentOpen) {\n\t return _Util2.default.addEventOnce(_Settings2.default.getTransitionEvent(), currentOpen, scheduler.bind(this));\n\t }\n\t requestAnimationFrame(function () {\n\t _Event2.default.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n\t // if a new dropdown has been opened in the meantime, do not remove darkener\n\t if (_this.currentOpen !== null) {\n\t return false;\n\t }\n\t _this.toggleDarkenerToggler(darkenerInstance, false);\n\t resolve(true);\n\t });\n\t }.bind(_this2));\n\t } else {\n\t resolve(true);\n\t _Event2.default.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n\t }\n\t });\n\t\n\t _FixedWindow2.default.getInstance().close();\n\t currentOpen.classList.remove(CLS_OPEN);\n\t\n\t if (currentOpen.flexDarkenerInstance) {\n\t currentOpen.flexDarkenerInstance.classList.remove(DARKENER_INIT);\n\t } else {\n\t this.darkener.classList.remove(DARKENER_INIT);\n\t }\n\t\n\t this.currentOpen = null;\n\t this.currentTarget = null;\n\t\n\t if (this.destroyOnClose) {\n\t this.destroy();\n\t }\n\t\n\t return future;\n\t }\n\t\n\t /**\n\t * Creates a dropdown on given target and opens it\n\t * @param {HTMLElement} target target where this dropdown is placed\n\t * @param {FlexCss.Widget} [thisWidget] if given will use widget instead of widget instance\n\t * @return {FlexCss.Dropdown}\n\t */\n\t\n\t }, {\n\t key: 'createDropdown',\n\t value: function createDropdown(target, thisWidget) {\n\t var _this3 = this;\n\t\n\t var doc = global.document;\n\t\n\t if (!target) {\n\t throw new Error('Dropdown target not found');\n\t }\n\t\n\t var widget = thisWidget || _Widget2.default.findWidget(target);\n\t var future = void 0;\n\t var data = target.getAttribute(ATTR_NAME);\n\t var dropdownContainerElement = doc.getElementById(data);\n\t var async = !dropdownContainerElement && _Widget2.default.isWidget(widget) ? widget.getAsync() : false;\n\t\n\t if (async) {\n\t target.classList.add(STATE_LOADING);\n\t target.isLoading = true;\n\t future = async.then(function (r) {\n\t if (r instanceof HTMLElement) {\n\t if (r.id) {\n\t target.setAttribute(ATTR_NAME, r.id);\n\t }\n\t return r;\n\t }\n\t // Create container Element:\n\t var element = doc.createElement('div');\n\t element.className = CLS_DROPDOWN;\n\t element.innerHTML = r;\n\t element.id = _Util2.default.guid();\n\t // Cache target for later use:\n\t target.setAttribute(ATTR_NAME, element.id);\n\t _this3.container.appendChild(element);\n\t return element;\n\t }).then(function (r) {\n\t target.isLoading = false;\n\t target.classList.remove(STATE_LOADING);\n\t return r;\n\t });\n\t } else {\n\t if (!dropdownContainerElement) {\n\t throw new Error('Could not found Dropdown container with ID \"' + data + '\"');\n\t }\n\t future = new Promise(function (r) {\n\t r(dropdownContainerElement);\n\t });\n\t }\n\t\n\t future.then(function (dropdownContent) {\n\t if (_this3.currentOpen) {\n\t _this3.close();\n\t }\n\t // Skip one frame to show animation\n\t target.dropdownContent = dropdownContent;\n\t var isAbsolute = global.getComputedStyle(dropdownContent).position === 'absolute';\n\t dropdownContent.hfWidgetInstance = _this3;\n\t\n\t if (!target.flexCollisionContainer) {\n\t var collisionC = target.getAttribute(ATTR_CC);\n\t target.flexCollisionContainer = collisionC ? doc.getElementById(collisionC) || document.documentElement : document.documentElement;\n\t }\n\t\n\t dropdownContent.classList.toggle(CLS_OPEN);\n\t if (dropdownContent.classList.contains(CLS_OPEN)) {\n\t _this3.currentOpen = dropdownContent;\n\t _this3.currentTarget = target;\n\t }\n\t _FixedWindow2.default.getInstance().open(_this3, dropdownContent);\n\t if (isAbsolute) {\n\t // Check collision:\n\t var selfTarget = target.getAttribute(ATTR_DATA_TARGET);\n\t selfTarget = selfTarget ? doc.getElementById(selfTarget) : target;\n\t _Util2.default.setupPositionNearby(selfTarget, dropdownContent, target.flexCollisionContainer);\n\t } else {\n\t // optionally get custom darkener container for target\n\t var d = target.getAttribute(ATTR_DARKENER);\n\t if (d) {\n\t dropdownContent.flexDarkenerInstance = doc.getElementById(d);\n\t (dropdownContent.flexDarkenerInstance || _this3.darkener).classList.toggle(DARKENER_INIT);\n\t } else {\n\t _this3.darkener.classList.toggle(DARKENER_INIT);\n\t }\n\t _this3.toggleDarkenerToggler(dropdownContent.flexDarkenerInstance || _this3.darkener, true);\n\t\n\t dropdownContent.style.left = '0';\n\t dropdownContent.style.top = 'auto';\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return Dropdown;\n\t}();\n\t\n\texports.default = Dropdown;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.LightBox\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/* global Image, TouchEvent*/\n\t\n\tvar _Modal = __webpack_require__(8);\n\t\n\tvar _Modal2 = _interopRequireDefault(_Modal);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar ATTR_MAX_WIDTH = 'data-original-width';\n\tvar ATTR_MAX_HEIGHT = 'data-original-height';\n\tvar ATTR_SRC = 'data-src';\n\t\n\tvar CLS_HAS_PREV = 'has-prev';\n\tvar CLS_HAS_NEXT = 'has-next';\n\tvar CLS_LOADING = 'loading';\n\t\n\tvar ATTR_NO_THUMBNAIL = 'data-no-thumbnail';\n\tvar ATTR_DATA_HREF = 'data-href';\n\tvar ATTR_HREF = 'href';\n\t\n\tvar KEY_NEXT = 39;\n\tvar KEY_PREV = 37;\n\tvar ATTR_CLOSE = 'data-close-modal';\n\t/**\n\t * A Simple LightBox\n\t */\n\t\n\tvar LightBox = function () {\n\t\n\t /**\n\t * Creates a new Lightbox\n\t * @param DelegateContainer\n\t * @param AttributeSelector\n\t * @param ModalAppend\n\t * @param [options]\n\t */\n\t\n\t function LightBox(DelegateContainer, AttributeSelector, ModalAppend, options) {\n\t _classCallCheck(this, LightBox);\n\t\n\t var thisDelegateContainer = DelegateContainer instanceof HTMLElement ? DelegateContainer : document.getElementById(DelegateContainer);\n\t\n\t this._modalAppend = ModalAppend || DelegateContainer;\n\t /**\n\t * @type {Function}\n\t */\n\t this._resizeEvent = null;\n\t /**\n\t * @type {Function}\n\t */\n\t this._keyboardNextEvent = null;\n\t /**\n\t * @type {Promise}\n\t */\n\t this._future = null;\n\t /**\n\t * @type {Promise}\n\t */\n\t this._nextFuture = this._future;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._imageContainer = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._modalContainerDiv = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._contentContainer = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._closerContainerDiv = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._delegateContainer = thisDelegateContainer;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this._attributeSelector = AttributeSelector;\n\t /**\n\t * @type {Widget}\n\t */\n\t this._widget = null;\n\t /**\n\t * @type {boolean}\n\t */\n\t this._isOpen = false;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this.target = null;\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this.img = null;\n\t /**\n\t * @type {boolean}\n\t */\n\t this._isLoading = false;\n\t\n\t /**\n\t * Default options\n\t */\n\t this.options = {\n\t // set if prev and next should be available\n\t registerPrevNextEvents: true,\n\t // set if modal should be closed after last image\n\t closeOnLast: true,\n\t // called when next image is requested (either by keyboard or click), return false to abort\n\t onNext: function onNext() {\n\t return true;\n\t },\n\t onClose: function onClose() {},\n\t getNext: null,\n\t getPrev: null,\n\t // called when underlying target changed\n\t onSwitchImage: function onSwitchImage() {}\n\t };\n\t\n\t Object.assign(this.options, options);\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} node\n\t * @returns {HTMLElement|null}\n\t */\n\t\n\t\n\t _createClass(LightBox, [{\n\t key: 'findImmediateNextTarget',\n\t value: function findImmediateNextTarget(node) {\n\t if (node && node.children[0].hasAttribute(this._attributeSelector)) {\n\t return node.children[0];\n\t }\n\t return null;\n\t }\n\t\n\t /**\n\t * Will fetch the next element of a lightBox\n\t * @param {HTMLElement} target\n\t * @returns {null|HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getNext',\n\t value: function getNext(target) {\n\t if (this.options.getNext) {\n\t return this.options.getNext.apply(this, [target]);\n\t }\n\t return this.findImmediateNextTarget(target.parentNode.nextElementSibling);\n\t }\n\t\n\t /**\n\t * Will fetch the previous element of a lightBox\n\t * @param {HTMLElement} target\n\t * @returns {null|HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getPrev',\n\t value: function getPrev(target) {\n\t if (this.options.getPrev) {\n\t return this.options.getPrev.apply(this, [target]);\n\t }\n\t return this.findImmediateNextTarget(target.parentNode.previousElementSibling);\n\t }\n\t\n\t /**\n\t * Registers events for delegate container\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents(onOpen) {\n\t var _this = this;\n\t\n\t this._delegateContainer.addEventListener(_Settings2.default.getTabEvent(), function (e) {\n\t var target = e.target;\n\t var parent = target.parentNode;\n\t var validTarget = target.hasAttribute(_this._attributeSelector);\n\t var parentIsValid = parent && parent.hasAttribute(_this._attributeSelector);\n\t\n\t if (!validTarget && parentIsValid) {\n\t validTarget = true;\n\t target = parent;\n\t }\n\t if (validTarget) {\n\t e.preventDefault();\n\t _this.open(target).then(function (r) {\n\t if (onOpen) {\n\t onOpen.apply(_this, [r, target]);\n\t }\n\t });\n\t }\n\t });\n\t }\n\t\n\t /**\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getContentContainer',\n\t value: function getContentContainer() {\n\t return this._contentContainer;\n\t }\n\t\n\t /**\n\t * Setup max-width and max-height\n\t * @param {HTMLElement} target\n\t * @param {HTMLElement} img\n\t * @param {HTMLElement} loadedImage\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'switchImageByDirection',\n\t\n\t\n\t /**\n\t * Switches to the next image\n\t * @param {boolean} direction\n\t */\n\t value: function switchImageByDirection(direction) {\n\t var next = direction ? this.getPrev(this.target) : this.getNext(this.target);\n\t if (this.options.onNext.apply(this, [next])) {\n\t return this.switchImage(next);\n\t }\n\t return new Promise(function (_, reject) {\n\t return reject(next);\n\t });\n\t }\n\t\n\t /**\n\t * Checks if lightbox is currently loading\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isLoading',\n\t value: function isLoading() {\n\t return this._isLoading;\n\t }\n\t\n\t /**\n\t * Checks if modal should be closed\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_runOptionalClose',\n\t value: function _runOptionalClose() {\n\t if (this.options.closeOnLast) {\n\t this.modal.close();\n\t }\n\t }\n\t }, {\n\t key: '_setupPrevNextStates',\n\t value: function _setupPrevNextStates() {\n\t var target = this.target;\n\t var hasPrev = this.getPrev(target);\n\t var hasNext = this.getNext(target);\n\t var hasPrevClass = CLS_HAS_PREV;\n\t var hasNextClass = CLS_HAS_NEXT;\n\t // because IE does not support the second toggle parameter, we need to do this manually\n\t if (hasPrev) {\n\t this._imageContainer.classList.add(hasPrevClass);\n\t } else {\n\t this._imageContainer.classList.remove(hasPrevClass);\n\t }\n\t if (hasNext) {\n\t this._imageContainer.classList.add(hasNextClass);\n\t } else {\n\t this._imageContainer.classList.remove(hasNextClass);\n\t }\n\t }\n\t\n\t /**\n\t * @param img\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_calculateContainer',\n\t value: function _calculateContainer(img) {\n\t var _this2 = this;\n\t\n\t if (_Settings2.default.isIE()) {\n\t setTimeout(function () {\n\t _this2._imageContainer.style.height = img.offsetHeight + 'px';\n\t }, 0);\n\t }\n\t }\n\t\n\t /**\n\t * Switch to a specific image\n\t * @param next\n\t * @returns {*}\n\t */\n\t\n\t }, {\n\t key: 'switchImage',\n\t value: function switchImage(next) {\n\t var _this3 = this;\n\t\n\t var self = this;\n\t var img = this.img;\n\t this._isLoading = true;\n\t self._nextFuture = new Promise(function (resolve, reject) {\n\t // notify observers about image switching\n\t self.options.onSwitchImage.apply(self, [self._nextFuture]);\n\t if (next) {\n\t var _ret = function () {\n\t var nextThumb = next.hasAttribute(ATTR_NO_THUMBNAIL) ? next : next.children[0] || next;\n\t var nextHighRes = next.getAttribute(ATTR_DATA_HREF) || next.getAttribute(ATTR_HREF);\n\t var nextSource = nextThumb.getAttribute(ATTR_SRC) || nextThumb.src || nextHighRes;\n\t var nextImgObject = new Image();\n\t\n\t if (!nextSource) {\n\t reject(next);\n\t return {\n\t v: void 0\n\t };\n\t }\n\t // set new target to next element\n\t _this3.target = next;\n\t nextImgObject.src = nextSource;\n\t self._imageContainer.classList.add(CLS_LOADING);\n\t nextImgObject.addEventListener('load', function () {\n\t img.src = nextSource;\n\t self._imageContainer.style.backgroundImage = 'url(' + nextSource + ')';\n\t LightBox._setupMaxWidthHeight(next, img, nextImgObject);\n\t self._calculateContainer(img);\n\t self.highRes(nextThumb, nextHighRes);\n\t self._setupPrevNextStates();\n\t self._imageContainer.classList.remove(CLS_LOADING);\n\t _this3._isLoading = false;\n\t resolve(nextSource, _this3.target);\n\t });\n\t }();\n\t\n\t if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === \"object\") return _ret.v;\n\t } else {\n\t reject(_this3);\n\t }\n\t });\n\t return self._nextFuture;\n\t }\n\t\n\t /**\n\t * Setup High-Resolution picture\n\t * @param {HTMLElement} thisThumbnail\n\t * @param {String} thisImgHighResolution\n\t */\n\t\n\t }, {\n\t key: 'highRes',\n\t value: function highRes(thisThumbnail, thisImgHighResolution) {\n\t var _this4 = this;\n\t\n\t if (thisImgHighResolution && thisThumbnail.src !== thisImgHighResolution) {\n\t var highImageObj = new Image();\n\t highImageObj.src = thisImgHighResolution;\n\t highImageObj.addEventListener('load', function () {\n\t // if current image is still available\n\t if (_this4._getSrc(thisThumbnail) === _this4.img.src) {\n\t _this4.img.src = thisImgHighResolution;\n\t _this4._imageContainer.style.backgroundImage = 'url(' + thisImgHighResolution + ')';\n\t }\n\t });\n\t }\n\t }\n\t\n\t /**\n\t * Extracts the source of an image\n\t * @param target\n\t * @returns {String|null}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_getSrc',\n\t value: function _getSrc(target) {\n\t return target.getAttribute(ATTR_SRC) || target.src;\n\t }\n\t\n\t /**\n\t * Will show a lightBox on given target\n\t * @param {HTMLElement} target\n\t * @returns {$.Deferred|*}\n\t */\n\t\n\t }, {\n\t key: 'open',\n\t value: function open(target) {\n\t var _this5 = this;\n\t\n\t var self = this;\n\t\n\t if (!target) {\n\t return false;\n\t }\n\t\n\t this.target = target;\n\t\n\t // if lightBox is open, we just switch to the new target image\n\t if (this._isOpen && target) {\n\t return this.switchImage(target).then(function () {\n\t return _this5;\n\t });\n\t }\n\t\n\t this._isOpen = true;\n\t\n\t /**\n\t * Setup Widget for modal\n\t * @type {Widget}\n\t */\n\t this._widget = new _Widget2.default().setAsync(function () {\n\t // thumbnail is either target itself or expected to be first childNode\n\t var thumbnail = target.hasAttribute(ATTR_NO_THUMBNAIL) ? target : target.children[0] || target;\n\t\n\t var imgHighResolution = target.getAttribute(ATTR_DATA_HREF) || target.getAttribute(ATTR_HREF);\n\t var imgSrc = _this5._getSrc(thumbnail) || imgHighResolution;\n\t\n\t var imageObj = new Image();\n\t imageObj.src = imgSrc;\n\t _this5._imageContainer = document.createElement('div');\n\t _this5._modalContainerDiv = document.createElement('div');\n\t _this5._closerContainerDiv = document.createElement('i');\n\t _this5._contentContainer = document.createElement('div');\n\t\n\t _this5._closerContainerDiv.className = 'modal-close modal-close-lightbox icon-cancel-1';\n\t _this5._closerContainerDiv.setAttribute(ATTR_CLOSE, ATTR_CLOSE);\n\t\n\t _this5._modalContainerDiv.className = 'modal image-modal';\n\t _this5._modalContainerDiv.appendChild(_this5._imageContainer);\n\t _this5._modalContainerDiv.appendChild(_this5._contentContainer);\n\t _this5._modalContainerDiv.appendChild(_this5._closerContainerDiv);\n\t _this5._contentContainer.className = 'content-container';\n\t _this5._isLoading = true;\n\t _this5._future = new Promise(function (resolve) {\n\t imageObj.addEventListener('load', function () {\n\t _this5._imageContainer.className = 'image-container';\n\t var img = document.createElement('img');\n\t // current image\n\t _this5.img = img;\n\t\n\t img.src = imgSrc;\n\t LightBox._setupMaxWidthHeight(target, img, imageObj);\n\t _this5._imageContainer.appendChild(img);\n\t _this5._imageContainer.style.backgroundImage = 'url(' + imgSrc + ')';\n\t\n\t resolve(self._modalContainerDiv);\n\t _this5._isLoading = false;\n\t\n\t if (_Settings2.default.isIE()) {\n\t self._resizeEvent = global.addEventListener('resize', function () {\n\t setTimeout(function () {\n\t self._imageContainer.style.height = img.offsetHeight + 'px';\n\t }, 0);\n\t });\n\t }\n\t\n\t if (self.options.registerPrevNextEvents) {\n\t self._setupPrevNextStates();\n\t // prev or next on touch/click\n\t self._imageContainer.addEventListener(_Settings2.default.getTabEvent(), function (e) {\n\t if (self.isLoading()) {\n\t return;\n\t }\n\t e.preventDefault();\n\t\n\t var ev = e;\n\t var pageX = global.TouchEvent && ev instanceof TouchEvent ? ev.changedTouches[0].pageX : ev.pageX;\n\t var rect = self._imageContainer.getBoundingClientRect();\n\t var imgX = rect.left;\n\t var wrapperWidth = rect.width;\n\t var posX = pageX - imgX;\n\t\n\t self.switchImageByDirection(wrapperWidth / 2 > posX).catch(function () {\n\t self._runOptionalClose();\n\t });\n\t });\n\t\n\t // register keyboard events\n\t self._keyboardNextEvent = function (e) {\n\t if (e.keyCode === KEY_NEXT || e.keyCode === KEY_PREV) {\n\t if (self.isLoading()) {\n\t return;\n\t }\n\t self.switchImageByDirection(e.keyCode === KEY_PREV).catch(function () {\n\t self._runOptionalClose();\n\t });\n\t }\n\t };\n\t global.addEventListener('keydown', self._keyboardNextEvent);\n\t } else {\n\t self._imageContainer.addEventListener(_Settings2.default.getTabEvent(), function () {\n\t self._runOptionalClose();\n\t });\n\t }\n\t\n\t self.highRes(thumbnail, imgHighResolution);\n\t });\n\t });\n\t\n\t _this5._future.then(function () {\n\t self._calculateContainer(_this5.img);\n\t });\n\t\n\t self._modalContainerDiv.addEventListener(_Modal.EVENT_MODAL_CLOSED, function () {\n\t // cleanup:\n\t _this5._modalContainerDiv.parentNode.removeChild(_this5._modalContainerDiv);\n\t _this5.options.onClose.apply(self);\n\t _this5._isOpen = false;\n\t _this5.modal.destroy();\n\t // unbind events\n\t if (_this5._keyboardNextEvent) {\n\t global.removeEventListener('keydown', self._keyboardNextEvent);\n\t }\n\t if (_this5._resizeEvent) {\n\t global.removeEventListener('resize', self._resizeEvent);\n\t }\n\t });\n\t\n\t return _this5._future;\n\t });\n\t\n\t this._nextFuture = this._future;\n\t\n\t if (self._widget) {\n\t this.modal = new _Modal2.default(this._modalAppend);\n\t // make sure we close stack before\n\t return this.modal.close().fromWidget(self._widget).then(function () {\n\t return self._future.then(function () {\n\t return self;\n\t });\n\t });\n\t }\n\t return false;\n\t }\n\t }], [{\n\t key: '_setupMaxWidthHeight',\n\t value: function _setupMaxWidthHeight(target, img, loadedImage) {\n\t var nextMaxWidth = target.getAttribute(ATTR_MAX_WIDTH);\n\t var nextMaxHeight = target.getAttribute(ATTR_MAX_HEIGHT);\n\t if (nextMaxWidth && nextMaxHeight) {\n\t img.style.maxWidth = nextMaxWidth + \"px\";\n\t img.style.maxHeight = nextMaxHeight + \"px\";\n\t } else {\n\t img.style.maxWidth = loadedImage.width + \"px\";\n\t img.style.maxHeight = loadedImage.height + \"px\";\n\t }\n\t }\n\t }]);\n\t\n\t return LightBox;\n\t}();\n\t\n\texports.default = LightBox;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_TOGGLE = undefined;\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.OffCanvas\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _FixedWindow = __webpack_require__(7);\n\t\n\tvar _FixedWindow2 = _interopRequireDefault(_FixedWindow);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_CLOSE_SIDEBAR = 'data-close-offcanvas';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_TARGET = 'data-offcanvas';\n\t/**\n\t * @type {string}\n\t */\n\tvar INIT_CLASS = 'init';\n\t/**\n\t * @type {string}\n\t */\n\tvar OPEN_CLASS = 'open';\n\t/**\n\t * @type {number}\n\t */\n\tvar HIDE_FACTOR = 3;\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar EVENT_TOGGLE = exports.EVENT_TOGGLE = 'flexcss.offcanvas.toggle';\n\t\n\t/**\n\t * A OffCanvas Implementation\n\t */\n\t\n\tvar OffCanvas = function () {\n\t\n\t /**\n\t * Creates an off-canvas navigation\n\t * @param {HTMLElement|String} NavigationId\n\t * @param {HTMLElement|String} Darkener\n\t * @param {int} factor positive will expect right sidebar, positive left\n\t * @param {bool} [disableTouch] if true all touch events are disabled\n\t * @constructor\n\t */\n\t\n\t function OffCanvas(NavigationId, Darkener, factor, disableTouch) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, OffCanvas);\n\t\n\t var doc = global.document;\n\t var touchedX = 0;\n\t var navigationContainer = NavigationId instanceof HTMLElement ? NavigationId : doc.getElementById(NavigationId);\n\t var darkener = Darkener instanceof HTMLElement ? Darkener : doc.getElementById(Darkener);\n\t var DARKENER_CLASS_TOGGLE = 'toggle-' + darkener.id || 'darkener';\n\t var DARKENER_CLASS_INSTANT_TOGGLE = DARKENER_CLASS_TOGGLE + '-open';\n\t\n\t var shouldNotTouch = function shouldNotTouch() {\n\t return window.innerWidth >= _Settings2.default.get().smallBreakpoint;\n\t };\n\t\n\t if (!darkener || !navigationContainer) {\n\t throw new Error('Could not find needed elements (Darkener and/or NavigationId)');\n\t }\n\t\n\t this.darkener = darkener;\n\t this.darkenerClassToggle = DARKENER_CLASS_TOGGLE;\n\t this.darkenerClassToggleInstant = DARKENER_CLASS_INSTANT_TOGGLE;\n\t this.globalToggleClass = _Settings2.default.get().canvasToggledClass;\n\t\n\t this.navigationContainer = navigationContainer;\n\t this.navigationContainerId = navigationContainer.id;\n\t\n\t // create id if id does not exist\n\t if (!this.navigationContainerId) {\n\t this.navigationContainerId = _Util2.default.guid();\n\t navigationContainer.id = this.navigationContainerId;\n\t }\n\t\n\t if (!disableTouch) {\n\t navigationContainer.addEventListener('touchstart', function (e) {\n\t if (shouldNotTouch()) {\n\t return;\n\t }\n\t touchedX = e.touches[0].clientX;\n\t navigationContainer.mustHide = false;\n\t });\n\t navigationContainer.addEventListener('touchmove', function (e) {\n\t if (shouldNotTouch()) {\n\t return;\n\t }\n\t var clientX = e.touches[0].clientX;\n\t\n\t var target = navigationContainer;\n\t var style = target.style;\n\t var calcX = touchedX - clientX;\n\t var bounds = target.getBoundingClientRect();\n\t var compare = factor > 0 ? calcX <= 0 : calcX >= 0;\n\t if (compare) {\n\t e.preventDefault();\n\t style.transition = 'transform 0s ease';\n\t style.webkitTransition = '-webkit-transform 0s ease';\n\t target.mustHide = factor > 0 ? calcX * -1 > bounds.width / HIDE_FACTOR : calcX > bounds.width / HIDE_FACTOR;\n\t var transform = 'translate3d(' + calcX * -1 + 'px,0,0)';\n\t style.transform = transform;\n\t style.webkitTransform = transform;\n\t }\n\t });\n\t navigationContainer.addEventListener('touchend', function () {\n\t if (shouldNotTouch()) {\n\t return;\n\t }\n\t var target = navigationContainer;\n\t var style = target.style;\n\t if (target.mustHide) {\n\t var width = target.getBoundingClientRect().width * factor;\n\t style.transition = 'transform .2s ease';\n\t style.webkitTransition = '-webkit-transform .2s ease';\n\t var transform = 'translate3d(' + width + 'px,0,0)';\n\t style.transform = transform;\n\t style.webkitTransform = transform;\n\t _this._remove().then(function () {\n\t _this.resetTransform(style);\n\t });\n\t _this._removeInstant();\n\t } else {\n\t _this.resetTransform(style);\n\t }\n\t });\n\t }\n\t }\n\t\n\t /**\n\t * @param {Object} s\n\t */\n\t\n\t\n\t _createClass(OffCanvas, [{\n\t key: 'resetTransform',\n\t value: function resetTransform(s) {\n\t s.transform = '';\n\t s.transition = '';\n\t s.webkitTransform = '';\n\t s.webkitTransition = '';\n\t }\n\t\n\t /**\n\t * @param {Object} [event]\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_remove',\n\t value: function _remove(event) {\n\t var _this2 = this;\n\t\n\t return new Promise(function (resolve) {\n\t _Util2.default.addEventOnce(_Settings2.default.getTransitionEvent(), _this2.navigationContainer, function scheduler(e) {\n\t var _this3 = this;\n\t\n\t if (e.target !== this.navigationContainer) {\n\t return _Util2.default.addEventOnce(_Settings2.default.getTransitionEvent(), this.navigationContainer, scheduler.bind(this));\n\t }\n\t requestAnimationFrame(function () {\n\t OffCanvas.currentOpen = null;\n\t var docCls = global.document.documentElement.classList;\n\t docCls.remove(_this3.darkenerClassToggle);\n\t docCls.remove(_this3.globalToggleClass);\n\t if (!!event) {\n\t _Event2.default.dispatchAndFire(_this3.navigationContainer, EVENT_TOGGLE);\n\t }\n\t resolve();\n\t });\n\t }.bind(_this2));\n\t });\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_removeInstant',\n\t value: function _removeInstant() {\n\t this.navigationContainer.classList.remove(OPEN_CLASS);\n\t global.document.documentElement.classList.remove(this.darkenerClassToggleInstant);\n\t this.darkener.classList.remove(INIT_CLASS);\n\t _FixedWindow2.default.getInstance().close();\n\t }\n\t\n\t /**\n\t * Toggles a an off-canvas element\n\t * @param [e]\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'toggle',\n\t value: function toggle(e) {\n\t var _this4 = this;\n\t\n\t if (e) {\n\t e.preventDefault();\n\t }\n\t this.resetTransform(this.navigationContainer.style);\n\t var darkenerClass = this.darkener.classList;\n\t var DARKENER_CLASS_TOGGLE = this.darkenerClassToggle;\n\t var DARKENER_CLASS_INSTANT_TOGGLE = this.darkenerClassToggleInstant;\n\t var navigationControllerClassList = this.navigationContainer.classList;\n\t if (!OffCanvas.currentOpen) {\n\t _Util2.default.addEventOnce(_Settings2.default.getTransitionEvent(), this.navigationContainer, function () {\n\t if (!!e) {\n\t _Event2.default.dispatchAndFire(_this4.navigationContainer, EVENT_TOGGLE);\n\t }\n\t });\n\t OffCanvas.currentOpen = this;\n\t _FixedWindow2.default.getInstance().open(this, this.navigationContainer);\n\t var docElementCls = global.document.documentElement.classList;\n\t docElementCls.add(this.globalToggleClass);\n\t docElementCls.add(DARKENER_CLASS_INSTANT_TOGGLE);\n\t docElementCls.add(DARKENER_CLASS_TOGGLE);\n\t darkenerClass.add(INIT_CLASS);\n\t navigationControllerClassList.add(OPEN_CLASS);\n\t } else {\n\t return this.close(e);\n\t }\n\t }\n\t }, {\n\t key: 'close',\n\t value: function close(event) {\n\t if (this.navigationContainer.classList.contains(OPEN_CLASS)) {\n\t var promise = this._remove(event);\n\t this._removeInstant();\n\t return promise;\n\t }\n\t return new Promise(function (r) {\n\t return r();\n\t });\n\t }\n\t\n\t /**\n\t * Register events\n\t * @param [delegate]\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents(delegate) {\n\t var _this5 = this;\n\t\n\t var thisDelegate = delegate || global.document;\n\t _FixedWindow2.default.getInstance().addScreenConstraint(OffCanvas, function (width) {\n\t return width < _Settings2.default.get().smallBreakpoint;\n\t });\n\t thisDelegate.addEventListener(_Settings2.default.getTabEvent(), function (e) {\n\t if (OffCanvas.currentOpen && OffCanvas.currentOpen !== _this5) {\n\t return;\n\t }\n\t var id = _this5.navigationContainerId;\n\t var validTarget = e.target.getAttribute(ATTR_TARGET) === id;\n\t if (!_Util2.default.isPartOfNode(e.target, _this5.navigationContainer)) {\n\t if (validTarget || OffCanvas.currentOpen === _this5 && e.target === _this5.darkener) {\n\t _this5.toggle(e);\n\t }\n\t } else {\n\t if (e.target.hasAttribute(ATTR_CLOSE_SIDEBAR)) {\n\t _this5.toggle(e);\n\t }\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return OffCanvas;\n\t}();\n\t\n\tOffCanvas.currentOpen = null;\n\t\n\texports.default = OffCanvas;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_TAB_OPENED = exports.EVENT_TAB_CLOSED = undefined;\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Toggleable\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t * Event that is fired when a tab is closed\n\t * @type {string}\n\t */\n\t\n\tvar EVENT_TAB_CLOSED = exports.EVENT_TAB_CLOSED = 'flexcss.tab.closed';\n\t\n\t/**\n\t * Event that is fired when a tab has been opened\n\t * @type {string}\n\t */\n\tvar EVENT_TAB_OPENED = exports.EVENT_TAB_OPENED = 'flexcss.tab.opened';\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_NAME = 'data-toggle';\n\t/**\n\t * @type {string}\n\t */\n\tvar ACTIVE_CLASS = 'active';\n\t/**\n\t * @type {string}\n\t */\n\tvar LOADING_CLASS = 'loading';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_TOGGLE_LIST = 'data-toggle-list';\n\t\n\t/**\n\t * Creates a toggleable element, either for tabs or a single toggle\n\t */\n\t\n\tvar Toggleable = function () {\n\t function Toggleable(ContainerId) {\n\t _classCallCheck(this, Toggleable);\n\t\n\t var doc = global.document;\n\t\n\t this.container = ContainerId instanceof HTMLElement ? ContainerId : doc.getElementById(ContainerId);\n\t\n\t this.loading = false;\n\t\n\t if (!this.container) {\n\t throw new Error('Toggleable container with id ' + ContainerId + ' not found');\n\t }\n\t }\n\t\n\t /**\n\t * Listener\n\t * @param {Event} e\n\t * @private\n\t */\n\t\n\t\n\t _createClass(Toggleable, [{\n\t key: '_listener',\n\t value: function _listener(e) {\n\t var target = e.target;\n\t var parent = target.parentNode;\n\t var doc = global.document;\n\t\n\t // support target child element to clicked\n\t if (!target.hasAttribute(ATTR_NAME)) {\n\t if (parent && parent.hasAttribute(ATTR_NAME)) {\n\t target = parent;\n\t } else {\n\t return;\n\t }\n\t }\n\t\n\t if (!target.hasAttribute(ATTR_NAME)) {\n\t return;\n\t }\n\t\n\t var refId = target.getAttribute(ATTR_NAME);\n\t var ref = doc.getElementById(refId);\n\t\n\t e.preventDefault();\n\t\n\t if (this.loading) {\n\t return;\n\t }\n\t\n\t this.toggleTarget(ref, target);\n\t }\n\t\n\t /**\n\t * Registers Events for this instance\n\t * @returns {Toggleable}\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents() {\n\t this.container.addEventListener(_Settings2.default.getTabEvent(), this._listener.bind(this));\n\t return this;\n\t }\n\t\n\t /**\n\t * Toggles given `ref`\n\t * @param {HTMLElement|Node} ref\n\t * @param {HTMLElement|Node} [selfTarget] optional target node\n\t */\n\t\n\t }, {\n\t key: 'toggleTarget',\n\t value: function toggleTarget(ref, selfTarget) {\n\t var _this = this;\n\t\n\t var target = selfTarget;\n\t if (!target && !ref) {\n\t return;\n\t }\n\t if (!target) {\n\t target = document.querySelector('[' + ATTR_NAME + '=\"' + ref.id + '\"]');\n\t }\n\t\n\t var future = void 0;\n\t var elClassList = target.classList;\n\t var parent = target.parentNode;\n\t var doc = global.document;\n\t\n\t future = new Promise(function (resolve, failure) {\n\t if (ref) {\n\t resolve(ref);\n\t } else {\n\t var widget = _Widget2.default.findWidget(target);\n\t var async = widget ? widget.getAsync() : null;\n\t if (_Widget2.default.isWidget(widget) && async) {\n\t future = async.then(function (r) {\n\t if (r instanceof HTMLElement) {\n\t var id = _Util2.default.guid();\n\t r.id = id;\n\t target.setAttribute(ATTR_NAME, id);\n\t resolve(r);\n\t } else {\n\t throw new Error('Dynamically creating toggle-content is not supported right now.\\n Return an HTMLElement instance');\n\t }\n\t });\n\t } else {\n\t failure('Target not given');\n\t }\n\t }\n\t });\n\t\n\t if (parent) {\n\t var maybeToggleNode = _Util2.default.parentsUntil(target, function (node) {\n\t return node && node.hasAttribute && node.hasAttribute(ATTR_TOGGLE_LIST);\n\t });\n\t\n\t var parentClassList = parent.classList;\n\t // Abort if element is already active and if is part of a toggle list\n\t if (maybeToggleNode) {\n\t if (!parentClassList.contains(ACTIVE_CLASS)) {\n\t parentClassList.toggle(ACTIVE_CLASS);\n\t parentClassList.add(LOADING_CLASS);\n\t } else {\n\t return;\n\t }\n\t }\n\t\n\t if (maybeToggleNode) {\n\t for (var i = 0; i < maybeToggleNode.children.length; i++) {\n\t var n = maybeToggleNode.children[i];\n\t var targetRef = n.children[0];\n\t if (n !== parent) {\n\t n.classList.remove(ACTIVE_CLASS);\n\t if (targetRef) {\n\t var attr = targetRef.getAttribute(ATTR_NAME);\n\t var el = attr ? doc.getElementById(attr) : null;\n\t if (el) {\n\t _Event2.default.dispatchAndFire(el, EVENT_TAB_CLOSED);\n\t el.classList.remove(ACTIVE_CLASS);\n\t targetRef.classList.remove(ACTIVE_CLASS);\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }\n\t if (elClassList) {\n\t elClassList.toggle(ACTIVE_CLASS);\n\t elClassList.add(LOADING_CLASS);\n\t }\n\t this.loading = true;\n\t future.then(function (r) {\n\t _Event2.default.dispatchAndFire(r, EVENT_TAB_OPENED);\n\t Toggleable._handleLoaded(target);\n\t r.classList.toggle(ACTIVE_CLASS);\n\t _this.loading = false;\n\t }).catch(function () {\n\t _this.loading = false;\n\t Toggleable._handleLoaded(target);\n\t });\n\t }\n\t\n\t /**\n\t * @param el\n\t * @private\n\t */\n\t\n\t }], [{\n\t key: '_handleLoaded',\n\t value: function _handleLoaded(el) {\n\t var parentClassList = el.parentNode.classList;\n\t el.classList.remove(LOADING_CLASS);\n\t if (parentClassList) {\n\t parentClassList.remove(LOADING_CLASS);\n\t }\n\t }\n\t }]);\n\t\n\t return Toggleable;\n\t}();\n\t\n\texports.default = Toggleable;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.LightBox = exports.Dropdown = exports.OffCanvas = exports.Toggleable = exports.Util = exports.Settings = exports.Widget = exports.Modal = exports.Tooltip = exports.Form = undefined;\n\t\n\tvar _Form = __webpack_require__(9);\n\t\n\tvar _Form2 = _interopRequireDefault(_Form);\n\t\n\tvar _Tooltip = __webpack_require__(6);\n\t\n\tvar _Tooltip2 = _interopRequireDefault(_Tooltip);\n\t\n\tvar _Modal = __webpack_require__(8);\n\t\n\tvar _Modal2 = _interopRequireDefault(_Modal);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Toggleable = __webpack_require__(16);\n\t\n\tvar _Toggleable2 = _interopRequireDefault(_Toggleable);\n\t\n\tvar _OffCanvas = __webpack_require__(15);\n\t\n\tvar _OffCanvas2 = _interopRequireDefault(_OffCanvas);\n\t\n\tvar _Dropdown = __webpack_require__(13);\n\t\n\tvar _Dropdown2 = _interopRequireDefault(_Dropdown);\n\t\n\tvar _LightBox = __webpack_require__(14);\n\t\n\tvar _LightBox2 = _interopRequireDefault(_LightBox);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.Form = _Form2.default;\n\texports.Tooltip = _Tooltip2.default;\n\texports.Modal = _Modal2.default;\n\texports.Widget = _Widget2.default;\n\texports.Settings = _Settings2.default;\n\texports.Util = _Util2.default;\n\texports.Toggleable = _Toggleable2.default;\n\texports.OffCanvas = _OffCanvas2.default;\n\texports.Dropdown = _Dropdown2.default;\n\texports.LightBox = _LightBox2.default;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** js/flexcss.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap a138c665fa30c31cdbad\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Widget\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/**\n * A Widget provides async content on a specific target (e.g. a modal link)\n */\nclass Widget {\n\n /**\n * Creates a new Widget\n * @param [element], optional define the content of widget\n */\n constructor(element) {\n /**\n *\n * @type {Promise}\n */\n this.asyncContent = null;\n\n /**\n * @type {boolean}\n */\n this._isWidget = true;\n\n if (element) {\n /**\n * @type {HTMLElement}\n */\n this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n if (this.element) {\n this.element.hfWidgetInstance = this;\n this.setAsync(() => {\n return new Promise((s) => {\n s(this.element);\n });\n });\n } else {\n throw new Error(`Could not found element with ID: ${element}`);\n }\n }\n /**\n * The final resulted content that a widget did create (e.g. a modal container)\n * @type {HTMLElement}\n */\n this.finalContent = null;\n }\n\n /**\n *\n * @returns {Promise}\n */\n getAsync() {\n return this.asyncContent();\n }\n\n /**\n * @param {Function.} async\n * @returns {Widget}\n */\n setAsync(async) {\n this.asyncContent = async;\n return this;\n }\n\n /**\n * @returns {HTMLElement}\n */\n getFinalContent() {\n return this.finalContent;\n }\n\n /**\n * @param {HTMLElement} element\n * @returns {Widget}\n */\n setElement(element) {\n this.element = element;\n return this;\n }\n\n /**\n * Destroys the generated content of this widget\n * @returns {boolean}\n */\n destroy() {\n if (this.finalContent && this.finalContent.parentNode) {\n this.finalContent.parentNode.removeChild(this.finalContent);\n return true;\n }\n\n delete this.element;\n delete this.asyncContent;\n delete this.finalContent;\n\n return false;\n }\n\n /**\n * Will find a widget on an Element\n * @param {HTMLElement} element\n * @returns {Widget|undefined}\n */\n static findWidget(element) {\n return element ? element.hfWidgetInstance : undefined;\n }\n\n /**\n * Checks if a given object is an instance\n * @param {Object} self\n * @returns {boolean}\n */\n static isWidget(self) {\n return self instanceof Widget || typeof self === 'object' && self.hasOwnProperty('_isWidget');\n }\n}\n\nexport default Widget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Widget.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Provides a Basic Widget\n */\nclass DestroyableWidget {\n\n constructor() {\n this.listeners = [];\n }\n\n /**\n * Destroys a Widget\n */\n destroy() {\n this.listeners.forEach((listener) => {\n listener.element.removeEventListener.apply(listener.element, listener.args);\n });\n this.listeners = [];\n }\n\n /**\n * Adds an event and registers it later to remove bindings\n * @param {HTMLElement} element\n * @param {String} name\n * @param {Function} listener\n * @param {boolean} [capture]\n * @returns {Function}\n */\n addEventListener(element, name, listener, capture) {\n this.listeners.push({\n element,\n args: [name, listener, capture]\n });\n\n element.addEventListener(name, listener, capture);\n return listener;\n }\n\n}\n\nexport default DestroyableWidget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/DestroyableWidget.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Tooltip\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport DestroyableWidget from './DestroyableWidget';\nimport Settings from './util/Settings';\n\n/**\n * @type {string}\n */\nconst CLASS_NAMES_TOOLTIP = 'tooltip-container';\n/**\n * @type {string}\n */\nconst CLASS_NAMES_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_CLASSNAME = 'data-class';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\n/**\n * @type {HTMLDocument}\n */\nconst doc = global.document;\n\n/**\n * Simple Tooltip\n */\nclass Tooltip extends DestroyableWidget {\n\n /**\n * Creates a Tooltip\n * @param {HTMLElement|String} DelegateContainer\n * @param {Object} [options]\n */\n constructor(DelegateContainer, options) {\n super();\n /**\n * The Container where possible events are captured\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n if (!this.container) {\n throw new Error('Could not create Tooltip, DelegateContainer not found');\n }\n\n /**\n * The Container where tooltips are stored for this instance\n * @type {HTMLElement}\n */\n this.tooltipContainer = null;\n\n /**\n * Default Options\n */\n this.options = {\n containerClass: '',\n selectorAttribute: 'data-tooltip',\n collisionContainer: this.container\n };\n\n Object.assign(this.options, options || {});\n }\n\n /**\n * Creates and shows a tooltip\n * @param {HTMLElement} target where is this tooltip positioned\n * @param {String} text text content in tooltip, will be NOT escaped\n * @param {Boolean} [removeTitle] removes title element if given\n * @param {Node} [positionRelative]\n */\n createTooltip(target, text, removeTitle, positionRelative) {\n // abort if text is empty\n if (!text || text && text.trim() === '') {\n return;\n }\n\n if (Settings.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n return;\n }\n\n let tooltipContainer = this.tooltipContainer;\n\n if (!tooltipContainer) {\n tooltipContainer = doc.createElement('div');\n this.container.appendChild(tooltipContainer);\n this.tooltipContainer = tooltipContainer;\n }\n this._restoreClassNames(tooltipContainer, target);\n\n tooltipContainer.style.left = 'auto';\n tooltipContainer.style.top = 'auto';\n tooltipContainer.innerHTML = text;\n tooltipContainer.flexTooltipCurrentTarget = target;\n if (removeTitle) {\n target.oldTitle = text;\n target.removeAttribute('title');\n }\n\n Util.setupPositionNearby(positionRelative || target, tooltipContainer,\n this.options.collisionContainer, true, true);\n\n tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n }\n\n _restoreClassNames(container, target) {\n // allow additional classname per tooltip on target element\n const classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n const maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n if (maybeTargetClass) {\n classNames.push(maybeTargetClass);\n }\n container.className = classNames.join(\" \");\n return this;\n }\n\n /**\n * @returns {HTMLElement|null}\n */\n getCurrentTarget() {\n return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n }\n\n /**\n * Destroys this Widget\n * @returns {boolean}\n */\n destroy() {\n super.destroy();\n\n if (this.tooltipContainer) {\n this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n return true;\n }\n return false;\n }\n\n /**\n * Removes a Tooltip on given target\n * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n */\n removeTooltip(target) {\n let selfTarget = target;\n if (!selfTarget && this.tooltipContainer) {\n selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (this.tooltipContainer) {\n if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n return;\n }\n this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n delete this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (selfTarget && selfTarget.oldTitle) {\n selfTarget.setAttribute('title', selfTarget.oldTitle);\n }\n }\n\n /**\n * Initilizes mouse events on container element\n */\n registerEvents() {\n const self = this;\n this.addEventListener(this.container, 'mouseover', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.createTooltip(e.target, e.target.getAttribute('title'), true);\n }\n });\n\n this.addEventListener(this.container, 'mouseout', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.removeTooltip(e.target);\n }\n });\n return this;\n }\n}\n\nexport default Tooltip;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Tooltip.js\n **/","import Settings from '../util/Settings';\nimport debounce from './debounce';\nimport Event from '../util/Event';\nimport Util from '../util/Util';\n\nconst CLS_FIXED_WINDOW = 'fixed-window-open';\n\nexport const EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\nexport const EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\n/**\n * @type {string}\n */\nexport const ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\n/**\n * @type {FixedWindow}\n */\nlet fixedWindowInstance;\n\nexport default class FixedWindow {\n\n constructor() {\n this.widgets = [];\n this.currentScrollTop = 0;\n this.fixedScreenConstraints = [];\n this.windowWidth = 0;\n this.isFixedWindowActive = false;\n this.touchListener = null;\n }\n\n /**\n * Adds a constraint to detect if the window needs to be changed when the screensize changes\n *\n * @param {Function} widget\n * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n */\n addScreenConstraint(widget, fixedBreakpointFn) {\n this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n }\n\n /**\n * @returns {null|DestroyableWidget}\n */\n getCurrentWidget() {\n return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n }\n\n /**\n * @private\n */\n _checkFixedNeeded() {\n if (this.widgets.length === 0) {\n return;\n }\n const widgets = new Set(this.widgets);\n const widgetsThatRequireFixedWindow = Array.from(widgets).some(({ widget }) => {\n return this.fixedScreenConstraints[widget] && this.fixedScreenConstraints[widget](this.windowWidth);\n });\n if (!widgetsThatRequireFixedWindow) {\n this._removeFixedContainer();\n } else {\n this._addFixedContainer();\n }\n }\n\n /**\n * @private\n */\n _addFixedContainer() {\n if (this.isFixedWindowActive) {\n return;\n }\n Event.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n detail: this.getCurrentWidget()\n });\n // this causes layout and should be optimized\n // At lest we write in a batch later\n Settings.get().scrollbarUpdateNodes.map((n) => {\n let foundProperty = 'paddingRight';\n let direction = 1;\n let node = n;\n if (n instanceof Array) {\n const [whatNode, property, d] = n;\n foundProperty = property;\n node = whatNode;\n direction = d || 1;\n }\n return {\n node,\n property: foundProperty,\n value: `${parseInt(global.getComputedStyle(node)[foundProperty], 10) +\n (!node.__fixedWindowMod__ ? (Settings.getScrollbarWidth() * direction) : 0)}px`\n };\n }).forEach((d) => {\n d.node.__fixedWindowMod__ = true;\n d.node.style[d.property] = d.value;\n });\n\n this.touchListener = (e) => {\n e.preventDefault();\n };\n\n let shouldNotMoveUp = false;\n let shouldNotMoveDown = false;\n let neverScroll = false;\n let lastClientY = 0;\n this.touchStartListener = (e) => {\n let { element } = this.getCurrentWidget();\n const closestOverflow = Util.closestCallback(e.target,\n (el) => el instanceof HTMLTextAreaElement ||\n (el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH)));\n if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n element = closestOverflow;\n }\n if (Util.isPartOfNode(e.target, element)) {\n neverScroll = element.scrollHeight === element.offsetHeight;\n lastClientY = e.touches[0].clientY;\n // never allow scrolling when there is nothing to scroll\n if (neverScroll) {\n return false;\n }\n if (element.scrollTop === 0) {\n element.scrollTop = 1;\n shouldNotMoveUp = true;\n } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n shouldNotMoveDown = true;\n element.scrollTop -= 1;\n }\n }\n };\n\n global.addEventListener('touchmove', this.touchListener);\n global.document.body.addEventListener('touchstart', this.touchStartListener);\n\n this.touchMoveListener = (e) => {\n const { element } = this.getCurrentWidget();\n if (Util.isPartOfNode(e.target, element)) {\n const { clientY } = e.touches[0];\n const isScrollingDown = (lastClientY - clientY) > 0;\n lastClientY = clientY;\n\n if (neverScroll) {\n neverScroll = false;\n return false;\n }\n\n if ((!shouldNotMoveDown && isScrollingDown) ||\n (shouldNotMoveDown && !isScrollingDown) ||\n (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) ||\n (shouldNotMoveDown && shouldNotMoveUp && isScrollingDown)\n ) {\n e.stopImmediatePropagation();\n }\n\n shouldNotMoveUp = false;\n shouldNotMoveDown = false;\n }\n };\n global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\n global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n this.isFixedWindowActive = true;\n }\n\n /**\n * @private\n */\n _removeFixedContainer() {\n if (this.isFixedWindowActive) {\n // cleanup event listeners\n global.removeEventListener('touchmove', this.touchListener);\n global.document.body.removeEventListener('touchstart', this.touchStartListener);\n global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\n // reset scrollbar nodes\n Settings.get().scrollbarUpdateNodes.forEach((node) => {\n if (node instanceof Array) {\n const [whatNode, property] = node;\n delete whatNode.__fixedWindowMod__;\n whatNode.style[property] = '';\n } else {\n delete node.__fixedWindowMod__;\n node.style.paddingRight = '';\n }\n });\n global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n Event.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n this.isFixedWindowActive = false;\n }\n }\n\n /**\n * Will close a window when no widgets are opened that need one\n */\n resizeListener() {\n this.windowWidth = global.innerWidth;\n this._checkFixedNeeded();\n }\n\n /**\n * @returns {FixedWindow}\n */\n static getInstance() {\n if (!fixedWindowInstance) {\n fixedWindowInstance = new FixedWindow();\n fixedWindowInstance.windowWidth = global.innerWidth;\n const eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n global.addEventListener(\n 'resize',\n debounce(eventHandler, 500)\n );\n global.addEventListener('orientationchange', eventHandler);\n }\n return fixedWindowInstance;\n }\n\n /**\n * Request a close of the fixed window\n */\n close() {\n this.widgets.pop();\n if (this.widgets.length === 0) {\n this._removeFixedContainer();\n }\n }\n\n /**\n * Request to open a fixed windows\n * @param {Object|DestroyableWidget} instance\n * @param {HTMLElement} element\n */\n open(instance, element) {\n let fixed = false;\n if (typeof instance === 'object') {\n const widget = instance.constructor;\n const fixedWidget = this.fixedScreenConstraints[instance.constructor];\n if (widget && fixedWidget) {\n fixed = fixedWidget(this.windowWidth);\n }\n const length = this.widgets.length;\n this.widgets.push(\n {\n widget,\n element\n }\n );\n // open a new window if there is no window active\n if (length === 0) {\n if (fixed) {\n this._addFixedContainer();\n }\n }\n }\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/FixedWindow.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Modal\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global KeyboardEvent */\n\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\nconst KEY_ESC = 27;\n/* Attribute Names */\nconst ATTR_CREATE_NEW = 'data-new-instance';\nconst ATTR_CLOSE = 'data-close-modal';\nconst ATTR_NAME = 'data-modal';\n\n/* Class names */\nconst CLS_CONTAINER_CURRENT = 'front';\nconst CLS_OPEN = 'open';\nconst CLS_CURRENT = 'current';\nconst CLS_PART_OF_STACK = 'part-of-stack';\nconst CLS_MODAL_CONTAINER = 'modal-container';\nconst CLS_ANIM_END = 'modal-anim-end';\nconst CLS_LOADER_CONTAINER = 'loader-container';\nconst CLS_LOADER = 'loader';\nconst CLS_BACKDROP = 'backdrop';\n\n/* Events */\n\n/**\n * Event triggered when modal is closed\n * @type {string}\n */\nexport const EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n/**\n * Event triggered before a modal is closed, cancelable\n * @type {string}\n */\nexport const EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n/**\n * Event triggered when a modal is opened\n * @type {string}\n */\nexport const EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\n/**\n * Event triggered when modal is initilized, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_INIT = 'flexcss.modal.init';\n\n/**\n * Triggered when the content of an async modal on a target is loaded, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\n/**\n * A Modal Implementation\n */\nclass Modal {\n constructor(DelegateContainer, options) {\n const doc = global.document;\n const container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n // Instance vars:\n if (!container) {\n throw new Error(`Could not found container element by given ID/Element: ${DelegateContainer}`);\n }\n\n this.currentOpen = null;\n\n this.loading = false;\n\n this.container = container;\n\n /**\n * Default Options\n */\n this.options = {\n classNames: 'modal',\n closeOnEscape: true,\n closeOnBackgroundClick: true,\n destroyOnFinish: false,\n fixedContainer: true,\n containerClassNames: ''\n };\n\n Object.assign(this.options, options);\n\n // Container where events are delegated\n this.eventContainer = null;\n this.eventFunction = null;\n\n this.dataMainPageContainer = global.document.body;\n\n this.currentScrollTop = 0;\n\n this.modalContainer = null;\n\n // Destroy full modal instance when no dialogs are bind to?\n // Otherwise container is recycled\n this.destroyOnFinish = this.options.destroyOnFinish;\n }\n\n /**\n * Removes this modal from global stack\n * Will handle fixing main html element too\n * @private\n * @param n\n */\n _removeModalFromStack(n) {\n const t = Modal._modalInstances.indexOf(n);\n if (t > -1) {\n Modal._modalInstances.splice(t, 1);\n FixedWindow.getInstance().close();\n }\n }\n\n\n /**\n * Modal container that contains all `stacked` modals for this instance\n * @returns {HTMLElement}\n */\n getModalContainer() {\n return this.modalContainer;\n }\n\n /**\n * Closes the current open modal of this stack\n * @params [e], optional event\n * @returns {*}\n */\n close(e) {\n const self = this;\n\n const options = self.currentOpen ? Util.applyOptionsFromElement(\n self.currentOpen, Util.copy(self.options)) : self.options;\n\n // close only on keyboard if instance should\n if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n return false;\n }\n\n // close only on background if instance should\n if (!options.closeOnBackgroundClick && e &&\n e.type === Settings.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n\n // if an instance is currently loading, prevent from closing\n if (self.loading) {\n return false;\n }\n\n if (e) {\n e.preventDefault();\n }\n\n if (self.currentOpen) {\n // dispatch beforeClose event, if prevented prevent modal from closing\n const ev = Event.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n if (ev.defaultPrevented) {\n return false;\n }\n\n this._finishState(self.currentOpen);\n // if there is an previous modal\n if (self.currentOpen.prevModal) {\n // switch to the next modal\n return self.switchModals(self.currentOpen.prevModal,\n self.currentOpen.prevModal.prevModal || null);\n }\n\n // finally trigger closed event\n Event.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n }\n self._removeModalFromStack(self.currentOpen);\n\n // Full stack closed:\n self.currentOpen = null;\n if (self.modalContainer) {\n // setup next open\n const lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n const classList = self.modalContainer.classList;\n classList.remove(CLS_CONTAINER_CURRENT);\n classList.remove(CLS_BACKDROP);\n classList.remove(CLS_OPEN);\n // Remove all current classes from child-nodes\n for (let i = 0; i < self.modalContainer.childNodes.length; i++) {\n const node = self.modalContainer.childNodes[i];\n const cl = node.classList;\n // remove applied styles\n self._finishState(node);\n cl.remove(CLS_CURRENT);\n cl.remove(CLS_PART_OF_STACK);\n }\n if (lastContainer) {\n lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n }\n }\n\n if (self.destroyOnFinish) {\n self.destroy();\n }\n return self;\n }\n\n /**\n * Resets a target when newly initilizes\n * @param target\n * @private\n */\n _finishState(target) {\n target.classList.remove(CLS_ANIM_END);\n }\n\n /**\n * Handler called when a Modal has finished an animation\n * @param e\n * @param self\n * @private\n */\n _finishAnim(e, self) {\n e.target.classList.add(CLS_ANIM_END);\n e.target.removeEventListener(e.type, self, true);\n }\n\n /**\n * Brings the given modal to front\n * @param co\n * @param last\n */\n switchModals(co, last) {\n co.prevModal = last;\n Modal._modalInstances.push(co);\n FixedWindow.getInstance().open(this, this.modalContainer);\n if (last) {\n this._finishState(last);\n Util.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n last.classList.add(CLS_PART_OF_STACK);\n }\n // set new currentOpen\n this.currentOpen = co;\n\n // bring current container to the front\n const instances = Modal._modalInstances;\n\n for (let m = 0; m < instances.length; m++) {\n instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n }\n this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n // remove animations if animations has been completed, fixes various bugs:\n // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n Util.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\n for (let i = 0; i < this.modalContainer.childNodes.length; i++) {\n const n = this.modalContainer.childNodes[i];\n const isCurrent = n.classList.contains(CLS_CURRENT);\n if (n === co) {\n co.classList.add(CLS_CURRENT);\n co.classList.remove(CLS_PART_OF_STACK);\n this._finishState(co);\n } else {\n n.classList.remove(CLS_CURRENT);\n if (isCurrent) {\n this._removeModalFromStack(n);\n Event.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n }\n }\n }\n }\n\n /**\n * Creates a Modal and opens it (later)\n * @param e\n * @returns {Promise|boolean}\n */\n createWidget(e) {\n const self = this;\n if (this.loading) {\n return false;\n }\n\n // check if another modal has registered events on this dom path:\n if (e && e.target) {\n const foundInstance = Util.parentsUntil(e.target, (node) => {\n return node && node.flexModalInstance;\n });\n\n // if another instance has been found, abort\n if (foundInstance !== this.container) {\n return false;\n }\n }\n let targetContent;\n let future;\n let widget;\n let target;\n let hasTarget = true;\n const isHtmlElement = e instanceof HTMLElement;\n const isWidget = Widget.isWidget(e);\n if (isHtmlElement || isWidget) {\n if (isHtmlElement) {\n targetContent = e;\n } else {\n widget = e;\n targetContent = widget.element;\n }\n } else {\n target = e.target;\n if (!target) {\n throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n }\n hasTarget = target.hasAttribute(ATTR_NAME);\n targetContent = target.getAttribute(ATTR_NAME);\n widget = Widget.findWidget(target);\n if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n const newInstance = new Modal(this.container)\n .setDestroyOnFinish(true);\n e.newInstance = true;\n newInstance.fromEvent(e).then(() => {\n newInstance.registerEvents(newInstance.getModalContainer());\n });\n return false;\n }\n if (hasTarget) {\n e.stopImmediatePropagation();\n e.preventDefault();\n }\n }\n\n if (!hasTarget) {\n return false;\n }\n\n let modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\n // lazy create modal container\n if (!this.modalContainer) {\n this.modalContainer = global.document.createElement('div');\n this.modalContainer.className = `${CLS_MODAL_CONTAINER} ${this.options.containerClassNames} ${CLS_OPEN}`;\n const closeModalFunction = (ce) => {\n if (this.loading) {\n return false;\n }\n if (Util.isPartOfNode(ce.target, this.currentOpen)) {\n if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n }\n this.close(ce);\n };\n\n this.modalContainer.addEventListener(Settings.getTabEvent(), closeModalFunction, false);\n\n modalContainerClasses = this.modalContainer.classList;\n this.container.appendChild(this.modalContainer);\n } else {\n modalContainerClasses.add(CLS_OPEN);\n }\n\n let loader;\n const doc = global.document;\n const toggleLoader = (show) => {\n if (show) {\n loader = doc.createElement('div');\n loader.className = CLS_LOADER_CONTAINER;\n const loaderLoader = doc.createElement('div');\n loaderLoader.className = CLS_LOADER;\n loader.appendChild(loaderLoader);\n this.modalContainer.appendChild(loader);\n } else {\n loader.parentNode.removeChild(loader);\n }\n };\n modalContainerClasses.add('loading');\n modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n modalContainerClasses.add(CLS_BACKDROP);\n });\n });\n\n this.loading = true;\n toggleLoader(true);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n let result;\n if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n result = r;\n } else {\n // Create container Element:\n const element = doc.createElement('div');\n element.className = self.options.classNames;\n element.innerHTML = r;\n element.id = Util.guid();\n result = element;\n }\n widget.finalContent = result;\n Event.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n return result;\n });\n } else {\n const el = targetContent instanceof HTMLElement ||\n targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n if (el) {\n future = new Promise((resolve) => {\n resolve(el);\n });\n } else {\n throw new Error(`Could not found given modal element (content) with ID: ${targetContent}`);\n }\n }\n\n Event.dispatchAndFire(target, EVENT_MODAL_INIT);\n\n return future.then((thisEl) => {\n thisEl.hfWidgetInstance = this;\n this.modalContainer.appendChild(thisEl);\n modalContainerClasses.remove('loading');\n this.loading = false;\n toggleLoader(false);\n this.open(thisEl, true, e);\n return thisEl;\n });\n }\n\n /**\n * Open's an already rendered modal\n * @param {HTMLElement} modal\n * @param {Boolean} [internal], set to true to prevent container management\n * @param {Boolean} [maybeEvent], optional event-object that triggered open\n */\n open(modal, internal, maybeEvent) {\n if (!internal) {\n this.modalContainer.classList.add('open');\n }\n this.switchModals(modal, this.currentOpen);\n\n Event.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n }\n\n\n registerEvents(delegate) {\n const delegateContainer = delegate || this.container;\n // Modals should always be fixed\n FixedWindow.getInstance().addScreenConstraint(Modal, () => true);\n // register modal instance so we can detect multiple registrars\n delegateContainer.flexModalInstance = this;\n this.eventFunction = (...args) => {\n this.createWidget.apply(this, args);\n };\n delegateContainer.addEventListener(Settings.getTabEvent(), this.eventFunction, false);\n\n this.eventContainer = delegateContainer;\n return this;\n }\n\n\n /**\n * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n * @param {HTMLElement|Widget} widget instance or html element\n * @returns {Promise}\n */\n fromWidget(widget) {\n return this.createWidget(widget);\n }\n\n /**\n * Creates a Widget from event\n * @param e\n * @returns {Promise}\n */\n fromEvent(e) {\n return this.createWidget(e);\n }\n\n setDestroyOnFinish(v) {\n this.destroyOnFinish = v;\n return this;\n }\n\n /**\n * Destroy this widget instance, cleans empty DOM nodes\n * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n */\n destroy() {\n const modalContainer = this.modalContainer;\n const isEmptyContainer = modalContainer.childNodes.length === 0;\n // Remove event listener on destroy, do not remove DOM node\n if (this.eventContainer) {\n this.eventContainer.removeEventListener(Settings.getTabEvent(), this.eventFunction, true);\n }\n\n if (isEmptyContainer) {\n if (modalContainer.parentNode) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n }\n if (global.MutationObserver) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach(() => {\n if (modalContainer.childNodes.length === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n observer.disconnect();\n }\n });\n });\n observer.observe(modalContainer,\n {\n childList: true\n }\n );\n } else {\n modalContainer.addEventListener('DOMNodeRemoved', (e) => {\n if (e.target !== modalContainer && (modalContainer.childNodes.length - 1) === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n });\n }\n }\n}\n\n\n// Static variable that keeps track of all open modals\nModal._modalInstances = [];\n\n// Global keydown listener for modal\nglobal.addEventListener('keydown', (e) => {\n if (e.keyCode === KEY_ESC) {\n const lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n if (lastModal) {\n Widget.findWidget(lastModal).close(e);\n }\n }\n});\n\nexport default Modal;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Modal.js\n **/","/*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Form\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Tooltip from './Tooltip';\nimport 'isomorphic-fetch';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport DestroyableWidget from './DestroyableWidget';\n\nconst LOADING_CLASS = 'loading';\nconst DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\nconst REMOTE = 'data-remote';\nconst REMOTE_ACTION = 'data-remote-action';\nconst ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\nconst ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\nconst ATTR_VALIDATOR = 'data-validate';\nconst ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\nconst ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\nconst ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\nconst ATTR_ERROR_TARGET_ID = 'data-error-target';\nconst ATTR_DEPENDS = 'data-depends-selector';\nconst CONST_USE_JSON = 'json';\nconst CONST_REALTIME_EVENT = 'input';\nconst FOCUS_TOOLTIP_DELAY = 20;\nconst CLICK_TOOLTIP_DELAY = 150;\n\n/**\n * Triggered when form is fully initialized and handlers are binded\n * @type {string}\n */\nexport const EVENT_FORM_READY = 'flexcss.form.ready';\n/**\n * Fires when a form is submitted, cancelable\n * @type {string}\n */\nexport const EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n/**\n * Fired directly after the form has been submitted via ajax\n * @type {string}\n */\nexport const EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n/**\n * Fired when ajax events did complete\n * @type {string}\n */\nexport const EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\n/**\n * A HTML5 Form Validation replacement\n */\n\nclass Form extends DestroyableWidget {\n /**\n * @param {HTMLElement} form\n * @param [options] optional options\n */\n constructor(form, options) {\n super();\n\n if (!(form instanceof HTMLFormElement)) {\n throw 'argument {0} form needs to be an form element';\n }\n\n /**\n * The Form\n * @type {HTMLElement}\n */\n this.form = form;\n\n /**\n * @type {Tooltip}\n */\n this.tooltips = null;\n\n /**\n * @type {Promise}\n */\n this.currentValidationFuture = new Promise(() => {\n });\n\n /**\n * Default options\n * @type {Object}\n */\n this.options = {\n // if true creates tooltips above element, uses FlexCss Tooltips\n createTooltips: true,\n // if true appends error message after input element\n appendError: false,\n // type of ajax submit\n ajaxSubmitType: 'POST',\n // json content type if ajax method is set to json\n ajaxJsonContentType: 'application/json; charset=utf-8',\n // allow inline validation\n inlineValidation: true,\n // validate in realtime (on `input` event)\n realtime: true,\n // timeout when realtime event should be captured\n realtimeTimeout: 250,\n // formatting method for an error\n formatErrorTooltip: (error) => {\n return ' ' + error;\n },\n // the class that will be put on the element to mark it failed validation\n inputErrorClass: 'invalid',\n // the container class for error messages below an element\n containerErrorClass: 'form-error',\n // additional options for fetch\n fetchOptions: {\n credentials: 'include'\n },\n // the container for tooltips\n tooltipContainer: form,\n tooltipOptions: {\n containerClass: 'error-tooltip'\n },\n // if you have a fixed header, either set a number or function here\n scrollToElementDiff: 0\n };\n\n // overwrite default options\n Object.assign(this.options, options);\n\n // apply settings from attributes\n Util.applyOptionsFromElement(form, this.options);\n\n // set form class as widget\n // Forms are very different to classical widgets,\n // we will not use our base widget class for this but just self\n form.hfWidgetInstance = this;\n\n /**\n * A List of Validators\n * @type {Object}\n * @private\n */\n this._validators = Form.globalValidators;\n\n /**\n * @type {Function}\n * @private\n */\n this._remoteValidationFunction = null;\n\n this.initFormValidation();\n }\n\n destroy() {\n super.destroy();\n if (this.tooltips) {\n this.tooltips.destroy();\n }\n }\n\n /**\n * Submits this form, either via ajax or just classical (default)\n * @param {HTMLFormElement} thisForm\n * @param {Event} e\n * @private\n * @returns {Promise|boolean} returns false if submit is cancled\n */\n _submitFunction(thisForm, e) {\n var shouldUseAjax = thisForm.getAttribute(REMOTE), ajaxPostUrl =\n thisForm.getAttribute(REMOTE_ACTION) ||\n thisForm.getAttribute('action') || window.location.href,\n useJson = CONST_USE_JSON === shouldUseAjax, self = this;\n\n var ev = Event.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\n // abort execution is event was prevented\n if (ev.defaultPrevented) {\n self._formStopLoading();\n return false;\n }\n\n if (shouldUseAjax === null) {\n // submit\n return thisForm.submit();\n }\n // prevent form from submit normally\n e.preventDefault();\n\n // add information that this is an XMLHttpRequest request (used by some frameworks)\n let defaultHeaders = {\n 'X-Requested-With': 'XMLHttpRequest'\n };\n\n // setup default headers\n if (useJson) {\n Object.assign(defaultHeaders, {\n 'Content-Type': this.options.ajaxJsonContentType\n });\n }\n let defaultOptions = Object.assign(this.options.fetchOptions, {\n headers: defaultHeaders,\n method: this.options.ajaxSubmitType\n });\n\n // support either JSON request payload or normal payload submission\n var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: JSON.stringify(this.serialize())\n })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: new FormData(thisForm)\n }));\n\n Event.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\n return serverCall.then((r) => {\n (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\n Event.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n // always remove error class\n self._formStopLoading();\n });\n }\n\n /**\n * Serializes a form to a json object\n * @returns {Object}\n */\n serialize() {\n var selectors = [\n 'input[name]:not([type=\"radio\"]):enabled',\n 'input[type=\"radio\"][name]:checked',\n 'select[name]:enabled',\n 'textarea[name]:enabled'\n ], inputs = this.form.querySelectorAll(selectors.join(',')), result = {};\n\n Array.prototype.forEach.call(inputs, function (input) {\n var exists = result[input.name], value = input.value;\n if (exists instanceof Array) {\n exists.push(value);\n } else if (exists) {\n result[input.name] = [result[input.name], value];\n } else {\n result[input.name] = value;\n }\n });\n\n return result;\n }\n\n /**\n * Handles the chain of validation on given fields\n *\n * @param {HTMLElement|Array|NodeList} field\n * @param [focus] optional focus first error\n * @returns {Promise}\n */\n handleValidation(field, focus) {\n var fields = (field instanceof Array || field instanceof NodeList) ? field : [field];\n return this._handleValidation(fields, focus, true).then(((r) => {\n if (!r.foundAnyError) {\n // remove tooltips\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n }\n return r;\n }).bind(this));\n }\n\n /**\n * Handles errors on given node list\n * @param {NodeList} toValidateFields\n * @param {boolean} focus\n * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n * @returns {Promise}\n * @private\n */\n _handleValidation(toValidateFields, focus, scoped) {\n var self = this;\n var arr = Form._createArrayFromInvalidFieldList(toValidateFields), isLocalInvalid = arr.length > 0;\n // focus must appear in the same frame for iOS devices\n if (isLocalInvalid && focus) {\n self._focusElement(arr[0]);\n }\n var validation = scoped ? this._customValidationsForElements(toValidateFields) :\n self.validateCustomFields();\n return validation.then((r) => {\n if (isLocalInvalid) {\n // combine browser and custom validators\n r.foundAnyError = true;\n }\n // get a unique field list of all fields that need to be checked and rendered\n // it's possible that we have duplicates in non scoped mode\n let thisToValidateFields = scoped ? toValidateFields :\n Array.from(arr).concat(r.checkedFields);\n r.checkedFields = thisToValidateFields;\n let foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n firstInvalidField = foundInvalidFields[0];\n if (firstInvalidField) {\n if (focus) {\n self._focusElement(firstInvalidField);\n // if element could not be focused:\n if (document.activeElement !== firstInvalidField) {\n self._handleTooltipHideClickAfterChange();\n }\n } else {\n self._handleTooltipHideClickAfterChange();\n }\n self.showAndOrCreateTooltip(firstInvalidField);\n }\n return r;\n });\n }\n\n /**\n * @param {HTMLElement} field\n * @param {ValidityState} validity\n * @returns {*}\n * @private\n */\n\n _setupErrorMessages(field, validity) {\n return Form.globalErrorMessageHandler ?\n Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n }\n\n /**\n * Handles class labels for elements\n * @param {Object} fields\n * @private\n */\n _handleLabels(fields) {\n Object.keys(fields).forEach(function (id) {\n let labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'), invalid = fields[id];\n if (labels.length) {\n for (let labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n let labelEl = labels[labelsIndex];\n // we can't use toggle attribute, not supported in IE\n if (invalid) {\n this._markElementInvalid(labelEl);\n } else {\n this._markElementValid(labelEl);\n }\n }\n }\n }.bind(this));\n }\n\n /**\n * @param el\n * @private\n */\n _markElementInvalid(el) {\n el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n el.classList.add(this.options.inputErrorClass);\n }\n\n /**\n * @param el\n * @private\n */\n _markElementValid(el) {\n el.removeAttribute(DATA_ELEMENT_INVALID);\n el.classList.remove(this.options.inputErrorClass);\n }\n\n /**\n * A List of invalid elements (:invalid)\n * @returns {Array}\n * @private\n */\n _getInvalidElements() {\n return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n return !(r instanceof HTMLFieldSetElement);\n });\n }\n\n /**\n * @param {HTMLElement} thisParent\n * @private\n */\n _removeElementErrors(thisParent) {\n let errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass), inputsWithErrorClasses =\n thisParent.querySelectorAll(`[${DATA_ELEMENT_INVALID}]`);\n for (let elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n }\n for (let inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n let el = inputsWithErrorClasses[inputErrorIndex];\n this._markElementValid(el);\n }\n }\n\n\n /**\n * Registers a custom validator\n * @param {String} name\n * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n * we can't rely on that\n * @returns {Form}\n */\n registerValidator(name, validator) {\n this._validators[name] = validator;\n return this;\n }\n\n /**\n * Runs async validation\n * @param {String} validationRef\n * @param {HTMLElement} field\n * @returns {Promise}\n * @private\n */\n _runValidation(validationRef, field) {\n if (!this._validators[validationRef]) {\n throw 'Could not found validator: ' + validationRef;\n }\n var cl = field.classList, future = this._validators[validationRef].apply(this, [field, this.form]);\n cl.add(LOADING_CLASS);\n future.then(() => {\n cl.remove(LOADING_CLASS);\n });\n return future;\n }\n\n\n /**\n * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n *\n * @param {Array|NodeList} fields\n * @returns {Promise} contains either true if validations passed or false if something went wrong\n * @private\n */\n _customValidationsForElements(fields) {\n var futures = [], fieldsLength = fields.length, checkedFields = [];\n for (var iVal = 0; iVal < fieldsLength; iVal++) {\n var field = fields[iVal], validationRef = field.getAttribute(ATTR_VALIDATOR), validity = field.validity;\n if (this._validators[validationRef]) {\n // use local validation first and then continue with custom validations\n if (Form._shouldNotValidateField(field) || (validity && !validity.customError && !validity.valid)) {\n continue;\n }\n checkedFields.push(field);\n futures.push(this._runValidation(validationRef, field));\n } else {\n if (validationRef) {\n console.warn('data-validate was set but no validator was found');\n }\n }\n }\n return Promise.all(futures).then(function (allFutures) {\n let l = allFutures.length;\n let result = {\n checkedFields: checkedFields,\n foundAnyError: false\n };\n for (var fI = 0; fI < l; fI++) {\n if (!allFutures[fI]) {\n result.foundAnyError = true;\n break;\n }\n }\n return result;\n });\n }\n\n /**\n * Remove all errors for this form\n * @returns {Form}\n */\n removeErrors() {\n this._removeElementErrors(this.form);\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n return this;\n }\n\n /**\n * Will handle errors for given fields\n * @param {Array|NodeList} fields\n * @param {Boolean} removeAllErrors\n */\n prepareErrors(fields, removeAllErrors) {\n if (removeAllErrors) {\n this.removeErrors();\n }\n let labelGroups = {}, invalidFields = [];\n\n function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n let additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) ||\n field.id, group = thisLabelGroup[additionalLabels];\n if (additionalLabels) {\n // check additionally if field is currently marked as invalid\n // so the label is not marked as error if no field is marked as one\n group = group ? group : isInvalid;\n thisLabelGroup[additionalLabels] = group;\n }\n }\n\n // We save all validations in an extra property because we need to reset the validity due some\n // implementation errors in other browsers then chrome\n for (let i = 0; i < fields.length; i++) {\n let field = fields[i], errorTarget = Form._findErrorTarget(field), parent = errorTarget.parentNode,\n validity = field.validity, isInvalid = validity && !validity.valid;\n if (Form._shouldNotValidateField(field)) {\n continue;\n }\n field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n handleAdditionalLabels(isInvalid, labelGroups, field);\n if (isInvalid) {\n if (!removeAllErrors) {\n // Remove current errors:\n this._removeElementErrors(parent);\n }\n // setup custom error messages:\n this._setupErrorMessages(field, validity);\n let msg = field.validationMessage;\n\n // mark fields as invalid\n this._markElementInvalid(errorTarget);\n this._markElementInvalid(field);\n\n if (this.options.appendError) {\n parent.insertAdjacentHTML(\"beforeend\",\n `
${msg}
`);\n }\n invalidFields.push(field);\n field.flexFormsSavedValidationMessage = msg;\n } else {\n // restore invalid fields\n this._markElementValid(errorTarget);\n this._markElementValid(field);\n\n // cleanup\n delete field.flexFormsSavedValidationMessage;\n\n // remove error markup\n this._removeElementErrors(parent);\n }\n // We have to reset the custom validity here to allow native validations work again\n field.setCustomValidity('');\n }\n // if validates a single field we need to check the linked fields to a label:\n if (fields.length === 1) {\n let field = fields[0];\n let id = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id;\n if (id) {\n let linkedFields = Array.from(\n this.getForm().querySelectorAll(`[${ATTR_DATA_CUSTOM_LABEL}=\"${id}\"], #${id}`));\n linkedFields.forEach(function (thisField) {\n let validity = thisField.validity, isInvalid = validity && !validity.valid &&\n this._isElementInvalidElement(thisField);\n handleAdditionalLabels(isInvalid, labelGroups, thisField);\n }.bind(this));\n }\n }\n this._handleLabels(labelGroups);\n return invalidFields;\n }\n\n /**\n * Validates all custom fields\n * @returns {Promise}\n */\n validateCustomFields() {\n return this._customValidationsForElements(\n this.form.querySelectorAll(\"[data-validate]\"));\n }\n\n /**\n * Tests if a field should be validated\n * @param {HTMLElement} field\n * @returns {boolean}\n * @private\n */\n static _shouldNotValidateField(field) {\n var target = Form._findErrorTarget(field);\n return target instanceof HTMLFieldSetElement || field.validity === undefined ||\n (target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !Util.isVisible(target));\n }\n\n /**\n * Creates an array from a node list with invalid items\n * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n * @param list\n * @returns {Array}\n * @private\n */\n static _createArrayFromInvalidFieldList(list) {\n var arr = [];\n for (var i = 0; i < list.length; ++i) {\n var n = list[i];\n if (n.validity && !n.validity.valid) {\n if (!Form._shouldNotValidateField(n)) {\n arr.push(n);\n }\n }\n }\n return arr;\n }\n\n\n /**\n * This form\n * @returns {HTMLElement}\n */\n getForm() {\n return this.form;\n }\n\n /**\n * Registers a function that handles remote validation\n * @param {Function} func\n * @returns {Form}\n */\n registerRemoteValidation(func) {\n this._remoteValidationFunction = func;\n return this;\n }\n\n\n /**\n * Formats the error content for the tooltip\n * @param {String} error\n * @returns {String}\n * @private\n */\n _formatErrorTooltip(error) {\n return this.options.formatErrorTooltip.apply(this, [error]);\n }\n\n /**\n * Tries to find a custom error target on given target\n * @param target\n * @returns {HTMLElement}\n * @private\n */\n static _findErrorTarget(target) {\n var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n if (!foundTarget) {\n throw 'Given error target did not exsits:' + target;\n }\n return foundTarget;\n }\n\n /**\n * Creates a tooltip at given element, will only create a new instance if not created\n * @param {HTMLElement} target\n * @param {Boolean} [remove]\n */\n showAndOrCreateTooltip(target, remove) {\n var self = this;\n if (!this.tooltips && this.options.createTooltips) {\n this.tooltips = new Tooltip(this.options.tooltipContainer, this.options.tooltipOptions);\n }\n if (!this.options.createTooltips) {\n return false;\n }\n\n if (!target.flexFormsSavedValidity) {\n return false;\n }\n var errorTarget = Form._findErrorTarget(target);\n if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n self.tooltips.createTooltip(errorTarget,\n self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n return true;\n } else {\n if (remove) {\n self.tooltips.removeTooltip();\n }\n }\n return false;\n }\n\n /**\n * Checks if element is marked as invalid\n * @param {HTMLElement} el\n * @returns {boolean}\n * @private\n */\n _isElementInvalidElement(el) {\n return el.hasAttribute(DATA_ELEMENT_INVALID);\n }\n\n /**\n * Handles invalid event of a form\n * @param {Event} e\n * @returns {Promise|boolean}\n * @private\n */\n _checkIsInvalid(e) {\n e.preventDefault();\n var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n return this._handleValidation(invalidFields, true, false);\n }\n\n /**\n * Will query dependent fields (by selector) that should be validated with given field\n * @param field\n * @returns {NodeList|[]}\n * @private\n */\n _getDependentFields(field) {\n let fieldSelector = field.getAttribute(ATTR_DEPENDS), base = [field];\n if (fieldSelector) {\n base.push.apply(base, Array.prototype.slice.apply(\n this.getForm().querySelectorAll(fieldSelector)));\n }\n return base;\n }\n\n /**\n * @private\n * @param {HTMLElement} [target]\n */\n _handleTooltipInline(target) {\n if (this.tooltips) {\n this.tooltips.removeTooltip(target);\n }\n }\n\n /**\n * Initializes validation for a given form, registers event handlers\n */\n initFormValidation() {\n // Suppress the default bubbles\n var form = this.getForm(),\n self = this,\n invalidEvent = 'invalid';\n\n /**\n * Validates if is valid realtime element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidRealtimeElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n form.addEventListener(invalidEvent, function (e) {\n e.preventDefault();\n }, true);\n\n Util.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n self._formLoading();\n var result = self._checkIsInvalid(e);\n if (result) {\n self.currentValidationFuture = new Promise((resolve) => {\n result.then(function (r) {\n setTimeout(function () {\n Util.addEventOnce(invalidEvent, form, handleInvalid, true);\n }, 0);\n resolve(r);\n self._formStopLoading();\n if (!r.foundAnyError) {\n self._formLoading();\n self._handleSubmit(e);\n }\n });\n });\n }\n }, true);\n\n this.addEventListener(form, 'reset', () => {\n this.removeErrors();\n });\n\n // Timeout for keys:\n var TIMEOUT_KEYDOWN, KEYDOWN_RUNNING = false;\n\n // resets keydown events\n function clearKeyDownTimeout() {\n KEYDOWN_RUNNING = false;\n clearTimeout(TIMEOUT_KEYDOWN);\n }\n\n // setup custom realtime event if given\n if (self.options.realtime) {\n this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n if (self._formIsLoading()) {\n return;\n }\n var target = e.target;\n clearTimeout(TIMEOUT_KEYDOWN);\n if (KEYDOWN_RUNNING) {\n return;\n }\n TIMEOUT_KEYDOWN = setTimeout(() => {\n let isStillTarget = document.activeElement === e.target;\n if (!_checkIsValidRealtimeElement(target)) {\n return;\n }\n if (isStillTarget) {\n self._handleTooltipInline();\n }\n KEYDOWN_RUNNING = true;\n let dependentFields = self._getDependentFields(target);\n self._customValidationsForElements(dependentFields).then(function () {\n self.prepareErrors(dependentFields, false);\n if (isStillTarget) {\n self.showAndOrCreateTooltip(e.target);\n }\n // future must be resolved before another event can be started\n KEYDOWN_RUNNING = false;\n });\n }, self.options.realtimeTimeout);\n }, true);\n }\n\n /**\n * Validates if target is a valid input field to check blur and focus events\n *\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidBlurFocusElement(target) {\n let attr = target.getAttribute(\"type\");\n return (attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\");\n }\n\n /**\n * Validates if is valid inline-check element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidInlineCheckElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n this.addEventListener(form, 'blur', function (e) {\n // do not hide tooltip after change event\n if (!e.target.flexcssKeepTooltips) {\n self._handleTooltipInline(e.target);\n }\n delete e.target.flexcssKeepTooltips;\n }, true);\n\n // handle focus on input elements\n // will show an error if field is invalid\n this.addEventListener(form, \"focus\", function (e) {\n if (self._formIsLoading()) {\n return;\n }\n // do not track errors for checkbox and radios on focus:\n if (!_checkIsValidBlurFocusElement(e.target)) {\n return;\n }\n // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n // just have been hidden (on blur). Maybe fix this with a queue later\n setTimeout(function () {\n self.showAndOrCreateTooltip(e.target);\n }, FOCUS_TOOLTIP_DELAY);\n }, true);\n\n if (self.options.inlineValidation) {\n // Handle change for checkbox, radios and selects\n this.addEventListener(form, \"change\", function (e) {\n const target = e.target;\n if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n return;\n }\n clearKeyDownTimeout();\n const name = target.getAttribute('name');\n let inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n // we only support dependent fields for a single widgets right now\n if (inputs.length === 1) {\n inputs = self._getDependentFields(target);\n }\n self._customValidationsForElements(inputs).then(function () {\n self.prepareErrors(inputs, false);\n target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n if (target.flexcssKeepTooltips) {\n self._handleTooltipHideClickAfterChange();\n }\n });\n });\n }\n\n // prevent default if form is invalid\n this.addEventListener(form, \"submit\", function listener(e) {\n self._submitListener(e, listener);\n });\n\n Event.dispatchAndFire(form, EVENT_FORM_READY);\n }\n\n /* Loading states, unfortunately we can't check if a promise is pending :/*/\n /* TODO: Maybe wrap promise to extend this functionality */\n\n _formLoading() {\n this.getForm().classList.add(LOADING_CLASS);\n }\n\n _formStopLoading() {\n this.getForm().classList.remove(LOADING_CLASS);\n }\n\n _formIsLoading() {\n return this.getForm().classList.contains(LOADING_CLASS);\n }\n\n // this defines the logic after a change event when a tooltip is shown\n // because we call this method inside the change event, the click would be immeditally executed with the change\n // event when not using setTimeout(). There might be another solution for this...\n _handleTooltipHideClickAfterChange() {\n const self = this;\n if (this.options.createTooltips) {\n setTimeout(function () {\n Util.addEventOnce(Settings.getTabEvent(), global.document.body, function (t) {\n if (!self._isElementInvalidElement(t.target)) {\n self._handleTooltipInline();\n }\n });\n }, CLICK_TOOLTIP_DELAY);\n }\n }\n\n _focusElement(el) {\n el.focus();\n Util.scrollToElement(el, this.options.scrollToElementDiff);\n }\n\n /**\n * Listener that is executed on form submit\n * @param e\n * @param submitListener\n * @returns {boolean}\n * @private\n */\n _submitListener(e, submitListener) {\n\n const form = this.getForm(),\n self = this,\n submitEvent = 'submit';\n\n if (this._formIsLoading()) {\n e.preventDefault();\n return false;\n }\n this._formLoading();\n form.removeEventListener(submitEvent, submitListener);\n this.removeErrors();\n e.preventDefault();\n // reset:\n if (form.checkValidity()) {\n form.addEventListener(submitEvent, submitListener);\n // It's possible that the form is valid but the custom validations need to be checked again:\n self.currentValidationFuture = new Promise((resolve) => {\n var validation = self.validateCustomFields();\n validation.then(function (r) {\n // because custom validators may mark multiple fields as invalid, we get all of them in the form\n var fields = self._getInvalidElements(),\n errors = self.prepareErrors(fields, false), firstError = errors[0];\n if (firstError) {\n self._focusElement(firstError);\n self.showAndOrCreateTooltip(firstError, true);\n }\n resolve(r);\n });\n });\n self.currentValidationFuture.then(function (r) {\n if (!r.foundAnyError) {\n // Handle submitting the form to server:\n self._handleSubmit(e);\n } else {\n self._formStopLoading();\n }\n });\n } else {\n self._formStopLoading();\n form.addEventListener(submitEvent, submitListener);\n }\n }\n\n\n /**\n * Handles submitting, optionally allows to stop submitting\n * @param e\n * @private\n */\n _handleSubmit(e) {\n this._submitFunction(this.form, e);\n }\n\n\n /**\n * Registers a global event Handler\n * @param errorFunc\n */\n static registerErrorMessageHandler(errorFunc) {\n Form.globalErrorMessageHandler = errorFunc;\n }\n\n /**\n * Initialize forms for a specific selector\n * @param {String} selector\n * @param {Object} [options]\n * @return {array.}\n */\n static init(selector, options) {\n var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') :\n document.querySelectorAll(selector), instances = [];\n for (var i = 0; i < forms.length; i++) {\n instances.push(new Form(forms[i], options));\n }\n return instances;\n }\n\n\n /**\n * Registers a global validator that is usable on all form instances\n * @param {String} name\n * @param {Function} validator\n * @returns {Function}\n */\n static registerValidator(name, validator) {\n Form.globalValidators[name] = validator;\n return Form;\n }\n\n /**\n * Registers a global function that is called when a form should validate the response of a server\n * @param {Function} func\n * @returns {Form}\n */\n static registerGlobalRemoteValidationFunction(func) {\n Form.globalRemoteValidationFunction = func;\n return Form;\n }\n}\n\n\n/**\n * Global validators\n * @type {Array}\n */\nForm.globalValidators = [];\n\n/**\n * Global Remote validation function\n */\nForm.globalRemoteValidationFunction = function () {\n};\n\n/**\n * Handles custom error messages extracts custom message by default\n */\nForm.globalErrorMessageHandler = (field, validity) => {\n if (!validity.customError) {\n let customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n if (customMsg) {\n field.setCustomValidity(customMsg);\n }\n }\n};\n\nexport default Form;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Form.js\n **/","export default (fn, ms) => () => {\n clearTimeout(fn.timeout);\n fn.timeout = setTimeout(fn, ms);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/debounce.js\n **/","// the whatwg-fetch polyfill installs the fetch() function\n// on the global object (window or self)\n//\n// Return that as the export for use in Webpack, Browserify etc.\nrequire('whatwg-fetch');\nmodule.exports = self.fetch.bind(self);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/isomorphic-fetch/fetch-npm-browserify.js\n ** module id = 11\n ** module chunks = 0 1\n **/","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var list = this.map[name]\n if (!list) {\n list = []\n this.map[name] = list\n }\n list.push(value)\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n var values = this.map[normalizeName(name)]\n return values ? values[0] : null\n }\n\n Headers.prototype.getAll = function(name) {\n return this.map[normalizeName(name)] || []\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = [normalizeValue(value)]\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n Object.getOwnPropertyNames(this.map).forEach(function(name) {\n this.map[name].forEach(function(value) {\n callback.call(thisArg, value, name, this)\n }, this)\n }, this)\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n reader.readAsArrayBuffer(blob)\n return fileReaderReady(reader)\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n reader.readAsText(blob)\n return fileReaderReady(reader)\n }\n\n var support = {\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob();\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n function Body() {\n this.bodyUsed = false\n\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (!body) {\n this._bodyText = ''\n } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n // Only support ArrayBuffers for POST method.\n // Receiving ArrayBuffers happens via Blobs, instead.\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n } else {\n this.text = function() {\n var rejected = consumed(this)\n return rejected ? rejected : Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n if (Request.prototype.isPrototypeOf(input)) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = input\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this)\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function headers(xhr) {\n var head = new Headers()\n var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n pairs.forEach(function(header) {\n var split = header.trim().split(':')\n var key = split.shift().trim()\n var value = split.join(':').trim()\n head.append(key, value)\n })\n return head\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText\n this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request\n if (Request.prototype.isPrototypeOf(input) && !init) {\n request = input\n } else {\n request = new Request(input, init)\n }\n\n var xhr = new XMLHttpRequest()\n\n function responseURL() {\n if ('responseURL' in xhr) {\n return xhr.responseURL\n }\n\n // Avoid security warnings on getResponseHeader when not allowed by CORS\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL')\n }\n\n return;\n }\n\n xhr.onload = function() {\n var status = (xhr.status === 1223) ? 204 : xhr.status\n if (status < 100 || status > 599) {\n reject(new TypeError('Network request failed'))\n return\n }\n var options = {\n status: status,\n statusText: xhr.statusText,\n headers: headers(xhr),\n url: responseURL()\n }\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/whatwg-fetch/fetch.js\n ** module id = 12\n ** module chunks = 0 1\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Dropdown\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\n\n/**\n * @type {string}\n */\nconst ATTR_CC = 'data-collision-container';\n/**\n * @type {string}\n */\nconst ATTR_DARKENER = 'data-darkener-container';\n/**\n * @type {string}\n */\nconst DARKENER_INIT = 'init';\n/**\n * @type {string}\n */\nconst ATTR_DATA_TARGET = 'data-target';\n/**\n * @type {string}\n */\nconst ATTR_CLOSE_DROPDOWN = 'data-close-dropdown';\n/**\n * @type {string}\n */\nconst ATTR_NAME = 'data-dropdown';\n/**\n * @type {string}\n */\nconst STATE_LOADING = 'loading';\n\nconst CLS_DARKENER_DROPDOWN = 'darkener-dropdown';\n/**\n * @type {string}\n */\nconst CLS_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst CLS_DROPDOWN = 'dropdown';\n\n/**\n * @type {string}\n */\nexport const EVENT_DROPDOWN_CLOSED = 'flexcss.dropdown.closed';\n\n/**\n * A Dropdown\n */\nclass Dropdown {\n constructor(DelegateContainer, Darkener) {\n const doc = global.document;\n\n /**\n * Container Element\n * @type {HTMLElement}\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n this.currentOpen = null;\n this.currentTarget = null;\n /**\n * @type {HTMLElement}\n */\n this.darkener = Darkener instanceof HTMLElement ? Darkener : document.getElementById(Darkener);\n\n this.destroyOnClose = false;\n\n if (!this.darkener || !this.container) {\n throw new Error('required elements not found (darkener and container element)');\n }\n }\n\n /**\n * Method that handles delegation events for dropdowns\n * @param e\n * @returns {boolean}\n * @private\n */\n _delegateFunction(e) {\n const currentOpen = this.currentOpen;\n const target = Util.closestCallback(e.target, n => n instanceof HTMLElement && n.hasAttribute(ATTR_NAME));\n const targetIsCurrent = target === this.currentTarget;\n\n if (currentOpen && !Util.isPartOfNode(e.target, currentOpen) || targetIsCurrent) {\n this.close();\n if (targetIsCurrent) {\n e.preventDefault();\n }\n return targetIsCurrent ? false : this._delegateFunction(e);\n }\n\n if (target && !currentOpen) {\n e.preventDefault();\n e.stopImmediatePropagation();\n\n if (target.isLoading) {\n return false;\n }\n this.createDropdown(target);\n } else {\n if (currentOpen) {\n if (e.target.hasAttribute(ATTR_CLOSE_DROPDOWN)) {\n e.preventDefault();\n this.close();\n }\n if (!Util.isPartOfNode(e.target, currentOpen)) {\n this.close();\n }\n }\n }\n }\n\n /**\n * Register Events for this dropdown container\n * @returns {Dropdown}\n */\n registerEvents() {\n FixedWindow.getInstance().addScreenConstraint(Dropdown, (width) => width < Settings.get().smallBreakpoint);\n this.container.addEventListener(Settings.getTabEvent(), this._delegateFunction.bind(this), true);\n return this;\n }\n\n /**\n * Destroys this instance, unbinds events\n * @returns {Dropdown}\n */\n destroy() {\n this.container.removeEventListener(Settings.getTabEvent(), this._delegateFunction.bind(this), true);\n return this;\n }\n\n\n /**\n * Destroys instance on close of dropdown\n * @param v\n * @returns {Dropdown}\n */\n setDestroyOnClose(v) {\n this.destroyOnClose = v;\n return this;\n }\n\n\n /**\n * Will add the right class to container for specific darkener id\n * @param instance\n * @param show\n */\n toggleDarkenerToggler(instance, show) {\n const cls = `toggle-${(instance.id || CLS_DARKENER_DROPDOWN)}`;\n const classList = this.container.classList;\n if (show) {\n classList.add(cls);\n } else {\n classList.remove(cls);\n }\n }\n\n /**\n * Closes Dropdown on current instance\n * @return {Boolean|Promise}\n */\n close() {\n const currentOpen = this.currentOpen;\n if (!currentOpen) {\n return false;\n }\n const darkenerInstance = currentOpen.flexDarkenerInstance || this.darkener;\n const thisCurrentOpen = currentOpen;\n\n const future = new Promise((resolve) => {\n if (window.getComputedStyle(currentOpen).position === 'fixed') {\n Util.addEventOnce(Settings.getTransitionEvent(), currentOpen, function scheduler(e) {\n if (e.srcElement !== currentOpen) {\n return Util.addEventOnce(Settings.getTransitionEvent(), currentOpen, scheduler.bind(this));\n }\n requestAnimationFrame(() => {\n Event.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n // if a new dropdown has been opened in the meantime, do not remove darkener\n if (this.currentOpen !== null) {\n return false;\n }\n this.toggleDarkenerToggler(darkenerInstance, false);\n resolve(true);\n });\n }.bind(this));\n } else {\n resolve(true);\n Event.dispatchAndFire(thisCurrentOpen, EVENT_DROPDOWN_CLOSED);\n }\n });\n\n FixedWindow.getInstance().close();\n currentOpen.classList.remove(CLS_OPEN);\n\n if (currentOpen.flexDarkenerInstance) {\n currentOpen.flexDarkenerInstance.classList.remove(DARKENER_INIT);\n } else {\n this.darkener.classList.remove(DARKENER_INIT);\n }\n\n this.currentOpen = null;\n this.currentTarget = null;\n\n if (this.destroyOnClose) {\n this.destroy();\n }\n\n return future;\n }\n\n /**\n * Creates a dropdown on given target and opens it\n * @param {HTMLElement} target target where this dropdown is placed\n * @param {FlexCss.Widget} [thisWidget] if given will use widget instead of widget instance\n * @return {FlexCss.Dropdown}\n */\n createDropdown(target, thisWidget) {\n const doc = global.document;\n\n if (!target) {\n throw new Error('Dropdown target not found');\n }\n\n const widget = thisWidget || Widget.findWidget(target);\n let future;\n const data = target.getAttribute(ATTR_NAME);\n const dropdownContainerElement = doc.getElementById(data);\n const async = !dropdownContainerElement && Widget.isWidget(widget) ? widget.getAsync() : false;\n\n if (async) {\n target.classList.add(STATE_LOADING);\n target.isLoading = true;\n future = async.then((r) => {\n if (r instanceof HTMLElement) {\n if (r.id) {\n target.setAttribute(ATTR_NAME, r.id);\n }\n return r;\n }\n // Create container Element:\n const element = doc.createElement('div');\n element.className = CLS_DROPDOWN;\n element.innerHTML = r;\n element.id = Util.guid();\n // Cache target for later use:\n target.setAttribute(ATTR_NAME, element.id);\n this.container.appendChild(element);\n return element;\n }).then((r) => {\n target.isLoading = false;\n target.classList.remove(STATE_LOADING);\n return r;\n });\n } else {\n if (!dropdownContainerElement) {\n throw new Error(`Could not found Dropdown container with ID \"${data}\"`);\n }\n future = new Promise((r) => {\n r(dropdownContainerElement);\n });\n }\n\n future.then((dropdownContent) => {\n if (this.currentOpen) {\n this.close();\n }\n // Skip one frame to show animation\n target.dropdownContent = dropdownContent;\n const isAbsolute = global.getComputedStyle(dropdownContent).position === 'absolute';\n dropdownContent.hfWidgetInstance = this;\n\n if (!target.flexCollisionContainer) {\n const collisionC = target.getAttribute(ATTR_CC);\n target.flexCollisionContainer = collisionC ?\n doc.getElementById(collisionC) || document.documentElement : document.documentElement;\n }\n\n dropdownContent.classList.toggle(CLS_OPEN);\n if (dropdownContent.classList.contains(CLS_OPEN)) {\n this.currentOpen = dropdownContent;\n this.currentTarget = target;\n }\n FixedWindow.getInstance().open(this, dropdownContent);\n if (isAbsolute) {\n // Check collision:\n let selfTarget = target.getAttribute(ATTR_DATA_TARGET);\n selfTarget = selfTarget ? doc.getElementById(selfTarget) : target;\n Util.setupPositionNearby(selfTarget, dropdownContent, target.flexCollisionContainer);\n } else {\n // optionally get custom darkener container for target\n const d = target.getAttribute(ATTR_DARKENER);\n if (d) {\n dropdownContent.flexDarkenerInstance = doc.getElementById(d);\n (dropdownContent.flexDarkenerInstance || this.darkener).classList.toggle(DARKENER_INIT);\n } else {\n this.darkener.classList.toggle(DARKENER_INIT);\n }\n this.toggleDarkenerToggler(dropdownContent.flexDarkenerInstance || this.darkener, true);\n\n dropdownContent.style.left = '0';\n dropdownContent.style.top = 'auto';\n }\n });\n }\n\n}\n\nexport default Dropdown;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Dropdown.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.LightBox\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global Image, TouchEvent*/\n\nimport Modal, { EVENT_MODAL_CLOSED } from './Modal';\nimport Settings from './util/Settings';\nimport Widget from './Widget';\n\nconst ATTR_MAX_WIDTH = 'data-original-width';\nconst ATTR_MAX_HEIGHT = 'data-original-height';\nconst ATTR_SRC = 'data-src';\n\nconst CLS_HAS_PREV = 'has-prev';\nconst CLS_HAS_NEXT = 'has-next';\nconst CLS_LOADING = 'loading';\n\nconst ATTR_NO_THUMBNAIL = 'data-no-thumbnail';\nconst ATTR_DATA_HREF = 'data-href';\nconst ATTR_HREF = 'href';\n\nconst KEY_NEXT = 39;\nconst KEY_PREV = 37;\nconst ATTR_CLOSE = 'data-close-modal';\n/**\n * A Simple LightBox\n */\nclass LightBox {\n\n /**\n * Creates a new Lightbox\n * @param DelegateContainer\n * @param AttributeSelector\n * @param ModalAppend\n * @param [options]\n */\n constructor(DelegateContainer, AttributeSelector, ModalAppend, options) {\n const thisDelegateContainer = DelegateContainer instanceof HTMLElement ? DelegateContainer :\n document.getElementById(DelegateContainer);\n\n this._modalAppend = ModalAppend || DelegateContainer;\n /**\n * @type {Function}\n */\n this._resizeEvent = null;\n /**\n * @type {Function}\n */\n this._keyboardNextEvent = null;\n /**\n * @type {Promise}\n */\n this._future = null;\n /**\n * @type {Promise}\n */\n this._nextFuture = this._future;\n /**\n * @type {HTMLElement}\n */\n this._imageContainer = null;\n /**\n * @type {HTMLElement}\n */\n this._modalContainerDiv = null;\n /**\n * @type {HTMLElement}\n */\n this._contentContainer = null;\n /**\n * @type {HTMLElement}\n */\n this._closerContainerDiv = null;\n /**\n * @type {HTMLElement}\n */\n this._delegateContainer = thisDelegateContainer;\n /**\n * @type {HTMLElement}\n */\n this._attributeSelector = AttributeSelector;\n /**\n * @type {Widget}\n */\n this._widget = null;\n /**\n * @type {boolean}\n */\n this._isOpen = false;\n /**\n * @type {HTMLElement}\n */\n this.target = null;\n /**\n * @type {HTMLElement}\n */\n this.img = null;\n /**\n * @type {boolean}\n */\n this._isLoading = false;\n\n /**\n * Default options\n */\n this.options = {\n // set if prev and next should be available\n registerPrevNextEvents: true,\n // set if modal should be closed after last image\n closeOnLast: true,\n // called when next image is requested (either by keyboard or click), return false to abort\n onNext: () => {\n return true;\n },\n onClose: () => {\n },\n getNext: null,\n getPrev: null,\n // called when underlying target changed\n onSwitchImage: () => {\n }\n };\n\n Object.assign(this.options, options);\n }\n\n /**\n * @param {HTMLElement} node\n * @returns {HTMLElement|null}\n */\n findImmediateNextTarget(node) {\n if (node && node.children[0].hasAttribute(this._attributeSelector)) {\n return node.children[0];\n }\n return null;\n }\n\n /**\n * Will fetch the next element of a lightBox\n * @param {HTMLElement} target\n * @returns {null|HTMLElement}\n */\n getNext(target) {\n if (this.options.getNext) {\n return this.options.getNext.apply(this, [target]);\n }\n return this.findImmediateNextTarget(target.parentNode.nextElementSibling);\n }\n\n /**\n * Will fetch the previous element of a lightBox\n * @param {HTMLElement} target\n * @returns {null|HTMLElement}\n */\n getPrev(target) {\n if (this.options.getPrev) {\n return this.options.getPrev.apply(this, [target]);\n }\n return this.findImmediateNextTarget(target.parentNode.previousElementSibling);\n }\n\n /**\n * Registers events for delegate container\n */\n registerEvents(onOpen) {\n this._delegateContainer.addEventListener(Settings.getTabEvent(), (e) => {\n let target = e.target;\n const parent = target.parentNode;\n let validTarget = target.hasAttribute(this._attributeSelector);\n const parentIsValid = parent && parent.hasAttribute(this._attributeSelector);\n\n if (!validTarget && parentIsValid) {\n validTarget = true;\n target = parent;\n }\n if (validTarget) {\n e.preventDefault();\n this.open(target).then((r) => {\n if (onOpen) {\n onOpen.apply(this, [r, target]);\n }\n });\n }\n });\n }\n\n /**\n * @returns {HTMLElement}\n */\n getContentContainer() {\n return this._contentContainer;\n }\n\n /**\n * Setup max-width and max-height\n * @param {HTMLElement} target\n * @param {HTMLElement} img\n * @param {HTMLElement} loadedImage\n * @private\n */\n static _setupMaxWidthHeight(target, img, loadedImage) {\n const nextMaxWidth = target.getAttribute(ATTR_MAX_WIDTH);\n const nextMaxHeight = target.getAttribute(ATTR_MAX_HEIGHT);\n if (nextMaxWidth && nextMaxHeight) {\n img.style.maxWidth = nextMaxWidth + \"px\";\n img.style.maxHeight = nextMaxHeight + \"px\";\n } else {\n img.style.maxWidth = loadedImage.width + \"px\";\n img.style.maxHeight = loadedImage.height + \"px\";\n }\n }\n\n /**\n * Switches to the next image\n * @param {boolean} direction\n */\n switchImageByDirection(direction) {\n const next = direction ? this.getPrev(this.target) : this.getNext(this.target);\n if (this.options.onNext.apply(this, [next])) {\n return this.switchImage(next);\n }\n return new Promise((_, reject) => reject(next));\n }\n\n /**\n * Checks if lightbox is currently loading\n * @returns {boolean}\n */\n isLoading() {\n return this._isLoading;\n }\n\n /**\n * Checks if modal should be closed\n * @private\n */\n _runOptionalClose() {\n if (this.options.closeOnLast) {\n this.modal.close();\n }\n }\n\n _setupPrevNextStates() {\n const target = this.target;\n const hasPrev = this.getPrev(target);\n const hasNext = this.getNext(target);\n const hasPrevClass = CLS_HAS_PREV;\n const hasNextClass = CLS_HAS_NEXT;\n // because IE does not support the second toggle parameter, we need to do this manually\n if (hasPrev) {\n this._imageContainer.classList.add(hasPrevClass);\n } else {\n this._imageContainer.classList.remove(hasPrevClass);\n }\n if (hasNext) {\n this._imageContainer.classList.add(hasNextClass);\n } else {\n this._imageContainer.classList.remove(hasNextClass);\n }\n }\n\n /**\n * @param img\n * @private\n */\n _calculateContainer(img) {\n if (Settings.isIE()) {\n setTimeout(() => {\n this._imageContainer.style.height = img.offsetHeight + 'px';\n }, 0);\n }\n }\n\n /**\n * Switch to a specific image\n * @param next\n * @returns {*}\n */\n switchImage(next) {\n const self = this;\n const img = this.img;\n this._isLoading = true;\n self._nextFuture = new Promise((resolve, reject) => {\n // notify observers about image switching\n self.options.onSwitchImage.apply(self, [self._nextFuture]);\n if (next) {\n const nextThumb = next.hasAttribute(ATTR_NO_THUMBNAIL) ? next : (next.children[0] || next);\n const nextHighRes = next.getAttribute(ATTR_DATA_HREF) ||\n next.getAttribute(ATTR_HREF);\n const nextSource = nextThumb.getAttribute(ATTR_SRC) || nextThumb.src || nextHighRes;\n const nextImgObject = new Image();\n\n if (!nextSource) {\n reject(next);\n return;\n }\n // set new target to next element\n this.target = next;\n nextImgObject.src = nextSource;\n self._imageContainer.classList.add(CLS_LOADING);\n nextImgObject.addEventListener('load', () => {\n img.src = nextSource;\n self._imageContainer.style.backgroundImage = 'url(' + nextSource + ')';\n LightBox._setupMaxWidthHeight(next, img, nextImgObject);\n self._calculateContainer(img);\n self.highRes(nextThumb, nextHighRes);\n self._setupPrevNextStates();\n self._imageContainer.classList.remove(CLS_LOADING);\n this._isLoading = false;\n resolve(nextSource, this.target);\n });\n } else {\n reject(this);\n }\n });\n return self._nextFuture;\n }\n\n\n /**\n * Setup High-Resolution picture\n * @param {HTMLElement} thisThumbnail\n * @param {String} thisImgHighResolution\n */\n highRes(thisThumbnail, thisImgHighResolution) {\n if (thisImgHighResolution && thisThumbnail.src !== thisImgHighResolution) {\n const highImageObj = new Image();\n highImageObj.src = thisImgHighResolution;\n highImageObj.addEventListener('load', () => {\n // if current image is still available\n if (this._getSrc(thisThumbnail) === this.img.src) {\n this.img.src = thisImgHighResolution;\n this._imageContainer.style.backgroundImage = 'url(' + thisImgHighResolution + ')';\n }\n });\n }\n }\n\n /**\n * Extracts the source of an image\n * @param target\n * @returns {String|null}\n * @private\n */\n _getSrc(target) {\n return target.getAttribute(ATTR_SRC) || target.src;\n }\n\n /**\n * Will show a lightBox on given target\n * @param {HTMLElement} target\n * @returns {$.Deferred|*}\n */\n open(target) {\n const self = this;\n\n if (!target) {\n return false;\n }\n\n this.target = target;\n\n // if lightBox is open, we just switch to the new target image\n if (this._isOpen && target) {\n return this.switchImage(target).then(() => {\n return this;\n });\n }\n\n this._isOpen = true;\n\n /**\n * Setup Widget for modal\n * @type {Widget}\n */\n this._widget = new Widget().setAsync(() => {\n // thumbnail is either target itself or expected to be first childNode\n const thumbnail = target.hasAttribute(ATTR_NO_THUMBNAIL) ? target : (target.children[0] || target);\n\n const imgHighResolution = target.getAttribute(ATTR_DATA_HREF) || target.getAttribute(ATTR_HREF);\n const imgSrc = this._getSrc(thumbnail) || imgHighResolution;\n\n const imageObj = new Image();\n imageObj.src = imgSrc;\n this._imageContainer = document.createElement('div');\n this._modalContainerDiv = document.createElement('div');\n this._closerContainerDiv = document.createElement('i');\n this._contentContainer = document.createElement('div');\n\n this._closerContainerDiv.className = 'modal-close modal-close-lightbox icon-cancel-1';\n this._closerContainerDiv.setAttribute(ATTR_CLOSE, ATTR_CLOSE);\n\n this._modalContainerDiv.className = 'modal image-modal';\n this._modalContainerDiv.appendChild(this._imageContainer);\n this._modalContainerDiv.appendChild(this._contentContainer);\n this._modalContainerDiv.appendChild(this._closerContainerDiv);\n this._contentContainer.className = 'content-container';\n this._isLoading = true;\n this._future = new Promise((resolve) => {\n imageObj.addEventListener('load', () => {\n this._imageContainer.className = 'image-container';\n const img = document.createElement('img');\n // current image\n this.img = img;\n\n img.src = imgSrc;\n LightBox._setupMaxWidthHeight(target, img, imageObj);\n this._imageContainer.appendChild(img);\n this._imageContainer.style.backgroundImage = 'url(' + imgSrc + ')';\n\n resolve(self._modalContainerDiv);\n this._isLoading = false;\n\n if (Settings.isIE()) {\n self._resizeEvent = global.addEventListener('resize', () => {\n setTimeout(() => {\n self._imageContainer.style.height = img.offsetHeight + 'px';\n }, 0);\n });\n }\n\n if (self.options.registerPrevNextEvents) {\n self._setupPrevNextStates();\n // prev or next on touch/click\n self._imageContainer.addEventListener(Settings.getTabEvent(), (e) => {\n if (self.isLoading()) {\n return;\n }\n e.preventDefault();\n\n const ev = e;\n const pageX = global.TouchEvent && ev instanceof TouchEvent ?\n ev.changedTouches[0].pageX : ev.pageX;\n const rect = self._imageContainer.getBoundingClientRect();\n const imgX = rect.left;\n const wrapperWidth = rect.width;\n const posX = pageX - imgX;\n\n self.switchImageByDirection(wrapperWidth / 2 > posX).catch(() => {\n self._runOptionalClose();\n });\n });\n\n // register keyboard events\n self._keyboardNextEvent = (e) => {\n if (e.keyCode === KEY_NEXT || e.keyCode === KEY_PREV) {\n if (self.isLoading()) {\n return;\n }\n self.switchImageByDirection(e.keyCode === KEY_PREV).catch(() => {\n self._runOptionalClose();\n });\n }\n };\n global.addEventListener('keydown', self._keyboardNextEvent);\n } else {\n self._imageContainer.addEventListener(Settings.getTabEvent(), () => {\n self._runOptionalClose();\n });\n }\n\n self.highRes(thumbnail, imgHighResolution);\n });\n });\n\n this._future.then(() => {\n self._calculateContainer(this.img);\n });\n\n self._modalContainerDiv.addEventListener(EVENT_MODAL_CLOSED, () => {\n // cleanup:\n this._modalContainerDiv.parentNode.removeChild(this._modalContainerDiv);\n this.options.onClose.apply(self);\n this._isOpen = false;\n this.modal.destroy();\n // unbind events\n if (this._keyboardNextEvent) {\n global.removeEventListener('keydown', self._keyboardNextEvent);\n }\n if (this._resizeEvent) {\n global.removeEventListener('resize', self._resizeEvent);\n }\n });\n\n return this._future;\n });\n\n this._nextFuture = this._future;\n\n if (self._widget) {\n this.modal = new Modal(this._modalAppend);\n // make sure we close stack before\n return this.modal.close().fromWidget(self._widget).then(() => {\n return self._future.then(() => {\n return self;\n });\n });\n }\n return false;\n }\n\n}\n\nexport default LightBox;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/LightBox.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.OffCanvas\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Settings from './util/Settings';\nimport Util from './util/Util';\nimport Event from './util/Event';\nimport FixedWindow from './lib/FixedWindow';\n\n/**\n * @type {string}\n */\nconst ATTR_CLOSE_SIDEBAR = 'data-close-offcanvas';\n\n/**\n * @type {string}\n */\nconst ATTR_TARGET = 'data-offcanvas';\n/**\n * @type {string}\n */\nconst INIT_CLASS = 'init';\n/**\n * @type {string}\n */\nconst OPEN_CLASS = 'open';\n/**\n * @type {number}\n */\nconst HIDE_FACTOR = 3;\n\n/**\n * @type {string}\n */\nexport const EVENT_TOGGLE = 'flexcss.offcanvas.toggle';\n\n/**\n * A OffCanvas Implementation\n */\nclass OffCanvas {\n\n /**\n * Creates an off-canvas navigation\n * @param {HTMLElement|String} NavigationId\n * @param {HTMLElement|String} Darkener\n * @param {int} factor positive will expect right sidebar, positive left\n * @param {bool} [disableTouch] if true all touch events are disabled\n * @constructor\n */\n constructor(NavigationId, Darkener, factor, disableTouch) {\n const doc = global.document;\n let touchedX = 0;\n const navigationContainer = NavigationId instanceof HTMLElement ?\n NavigationId : doc.getElementById(NavigationId);\n const darkener = Darkener instanceof HTMLElement ? Darkener : doc.getElementById(Darkener);\n const DARKENER_CLASS_TOGGLE = `toggle-${darkener.id}` || 'darkener';\n const DARKENER_CLASS_INSTANT_TOGGLE = `${DARKENER_CLASS_TOGGLE}-open`;\n\n const shouldNotTouch = () => {\n return window.innerWidth >= Settings.get().smallBreakpoint;\n };\n\n if (!darkener || !navigationContainer) {\n throw new Error('Could not find needed elements (Darkener and/or NavigationId)');\n }\n\n this.darkener = darkener;\n this.darkenerClassToggle = DARKENER_CLASS_TOGGLE;\n this.darkenerClassToggleInstant = DARKENER_CLASS_INSTANT_TOGGLE;\n this.globalToggleClass = Settings.get().canvasToggledClass;\n\n this.navigationContainer = navigationContainer;\n this.navigationContainerId = navigationContainer.id;\n\n // create id if id does not exist\n if (!this.navigationContainerId) {\n this.navigationContainerId = Util.guid();\n navigationContainer.id = this.navigationContainerId;\n }\n\n if (!disableTouch) {\n navigationContainer.addEventListener('touchstart', (e) => {\n if (shouldNotTouch()) {\n return;\n }\n touchedX = e.touches[0].clientX;\n navigationContainer.mustHide = false;\n });\n navigationContainer.addEventListener('touchmove', (e) => {\n if (shouldNotTouch()) {\n return;\n }\n const { clientX } = e.touches[0];\n const target = navigationContainer;\n const style = target.style;\n const calcX = touchedX - clientX;\n const bounds = target.getBoundingClientRect();\n const compare = factor > 0 ? calcX <= 0 : calcX >= 0;\n if (compare) {\n e.preventDefault();\n style.transition = 'transform 0s ease';\n style.webkitTransition = '-webkit-transform 0s ease';\n target.mustHide = factor > 0 ? calcX * -1 >\n bounds.width / HIDE_FACTOR : calcX > bounds.width / HIDE_FACTOR;\n const transform = `translate3d(${calcX * -1}px,0,0)`;\n style.transform = transform;\n style.webkitTransform = transform;\n }\n });\n navigationContainer.addEventListener('touchend', () => {\n if (shouldNotTouch()) {\n return;\n }\n const target = navigationContainer;\n const style = target.style;\n if (target.mustHide) {\n const width = target.getBoundingClientRect().width * factor;\n style.transition = 'transform .2s ease';\n style.webkitTransition = '-webkit-transform .2s ease';\n const transform = `translate3d(${width}px,0,0)`;\n style.transform = transform;\n style.webkitTransform = transform;\n this._remove().then(() => {\n this.resetTransform(style);\n });\n this._removeInstant();\n } else {\n this.resetTransform(style);\n }\n });\n }\n }\n\n /**\n * @param {Object} s\n */\n resetTransform(s) {\n s.transform = '';\n s.transition = '';\n s.webkitTransform = '';\n s.webkitTransition = '';\n }\n\n /**\n * @param {Object} [event]\n * @private\n */\n _remove(event) {\n return new Promise((resolve) => {\n Util.addEventOnce(Settings.getTransitionEvent(), this.navigationContainer, function scheduler(e) {\n if (e.target !== this.navigationContainer) {\n return Util.addEventOnce(Settings.getTransitionEvent(),\n this.navigationContainer, scheduler.bind(this));\n }\n requestAnimationFrame(() => {\n OffCanvas.currentOpen = null;\n const docCls = global.document.documentElement.classList;\n docCls.remove(this.darkenerClassToggle);\n docCls.remove(this.globalToggleClass);\n if (!!event) {\n Event.dispatchAndFire(this.navigationContainer, EVENT_TOGGLE);\n }\n resolve();\n });\n }.bind(this));\n });\n }\n\n /**\n * @private\n */\n _removeInstant() {\n this.navigationContainer.classList.remove(OPEN_CLASS);\n global.document.documentElement.classList.remove(this.darkenerClassToggleInstant);\n this.darkener.classList.remove(INIT_CLASS);\n FixedWindow.getInstance().close();\n }\n\n /**\n * Toggles a an off-canvas element\n * @param [e]\n * @private\n */\n toggle(e) {\n if (e) {\n e.preventDefault();\n }\n this.resetTransform(this.navigationContainer.style);\n const darkenerClass = this.darkener.classList;\n const DARKENER_CLASS_TOGGLE = this.darkenerClassToggle;\n const DARKENER_CLASS_INSTANT_TOGGLE = this.darkenerClassToggleInstant;\n const navigationControllerClassList = this.navigationContainer.classList;\n if (!OffCanvas.currentOpen) {\n Util.addEventOnce(Settings.getTransitionEvent(), this.navigationContainer, () => {\n if (!!e) {\n Event.dispatchAndFire(this.navigationContainer, EVENT_TOGGLE);\n }\n });\n OffCanvas.currentOpen = this;\n FixedWindow.getInstance().open(this, this.navigationContainer);\n const docElementCls = global.document.documentElement.classList;\n docElementCls.add(this.globalToggleClass);\n docElementCls.add(DARKENER_CLASS_INSTANT_TOGGLE);\n docElementCls.add(DARKENER_CLASS_TOGGLE);\n darkenerClass.add(INIT_CLASS);\n navigationControllerClassList.add(OPEN_CLASS);\n } else {\n return this.close(e);\n }\n }\n\n close(event) {\n if (this.navigationContainer.classList.contains(OPEN_CLASS)) {\n const promise = this._remove(event);\n this._removeInstant();\n return promise;\n }\n return new Promise(r => r());\n }\n\n /**\n * Register events\n * @param [delegate]\n */\n registerEvents(delegate) {\n const thisDelegate = delegate || global.document;\n FixedWindow.getInstance().addScreenConstraint(OffCanvas, (width) => width < Settings.get().smallBreakpoint);\n thisDelegate.addEventListener(Settings.getTabEvent(), (e) => {\n if (OffCanvas.currentOpen && OffCanvas.currentOpen !== this) {\n return;\n }\n const id = this.navigationContainerId;\n const validTarget = e.target.getAttribute(ATTR_TARGET) === id;\n if (!Util.isPartOfNode(e.target, this.navigationContainer)) {\n if (validTarget || (OffCanvas.currentOpen === this && e.target === this.darkener)) {\n this.toggle(e);\n }\n } else {\n if (e.target.hasAttribute(ATTR_CLOSE_SIDEBAR)) {\n this.toggle(e);\n }\n }\n });\n }\n}\n\nOffCanvas.currentOpen = null;\n\nexport default OffCanvas;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/OffCanvas.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Toggleable\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Settings from './util/Settings';\nimport Widget from './Widget';\nimport Util from './util/Util';\nimport Event from './util/Event';\n\n/**\n * Event that is fired when a tab is closed\n * @type {string}\n */\n\nexport const EVENT_TAB_CLOSED = 'flexcss.tab.closed';\n\n/**\n * Event that is fired when a tab has been opened\n * @type {string}\n */\nexport const EVENT_TAB_OPENED = 'flexcss.tab.opened';\n/**\n * @type {string}\n */\nconst ATTR_NAME = 'data-toggle';\n/**\n * @type {string}\n */\nconst ACTIVE_CLASS = 'active';\n/**\n * @type {string}\n */\nconst LOADING_CLASS = 'loading';\n\n/**\n * @type {string}\n */\nconst ATTR_TOGGLE_LIST = 'data-toggle-list';\n\n/**\n * Creates a toggleable element, either for tabs or a single toggle\n */\nclass Toggleable {\n constructor(ContainerId) {\n const doc = global.document;\n\n this.container = ContainerId instanceof HTMLElement ? ContainerId :\n doc.getElementById(ContainerId);\n\n this.loading = false;\n\n if (!this.container) {\n throw new Error(`Toggleable container with id ${ContainerId} not found`);\n }\n }\n\n /**\n * Listener\n * @param {Event} e\n * @private\n */\n _listener(e) {\n let target = e.target;\n const parent = target.parentNode;\n const doc = global.document;\n\n // support target child element to clicked\n if (!target.hasAttribute(ATTR_NAME)) {\n if (parent && parent.hasAttribute(ATTR_NAME)) {\n target = parent;\n } else {\n return;\n }\n }\n\n if (!target.hasAttribute(ATTR_NAME)) {\n return;\n }\n\n const refId = target.getAttribute(ATTR_NAME);\n const ref = doc.getElementById(refId);\n\n e.preventDefault();\n\n if (this.loading) {\n return;\n }\n\n this.toggleTarget(ref, target);\n }\n\n /**\n * Registers Events for this instance\n * @returns {Toggleable}\n */\n registerEvents() {\n this.container.addEventListener(Settings.getTabEvent(), this._listener.bind(this));\n return this;\n }\n\n /**\n * Toggles given `ref`\n * @param {HTMLElement|Node} ref\n * @param {HTMLElement|Node} [selfTarget] optional target node\n */\n toggleTarget(ref, selfTarget) {\n let target = selfTarget;\n if (!target && !ref) {\n return;\n }\n if (!target) {\n target = document.querySelector(`[${ATTR_NAME}=\"${ref.id}\"]`);\n }\n\n let future;\n const elClassList = target.classList;\n const parent = target.parentNode;\n const doc = global.document;\n\n future = new Promise((resolve, failure) => {\n if (ref) {\n resolve(ref);\n } else {\n const widget = Widget.findWidget(target);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n if (r instanceof HTMLElement) {\n const id = Util.guid();\n r.id = id;\n target.setAttribute(ATTR_NAME, id);\n resolve(r);\n } else {\n throw new Error(`Dynamically creating toggle-content is not supported right now.\n Return an HTMLElement instance`);\n }\n });\n } else {\n failure('Target not given');\n }\n }\n });\n\n if (parent) {\n const maybeToggleNode = Util.parentsUntil(target, (node) => {\n return node && node.hasAttribute && node.hasAttribute(ATTR_TOGGLE_LIST);\n });\n\n const parentClassList = parent.classList;\n // Abort if element is already active and if is part of a toggle list\n if (maybeToggleNode) {\n if (!parentClassList.contains(ACTIVE_CLASS)) {\n parentClassList.toggle(ACTIVE_CLASS);\n parentClassList.add(LOADING_CLASS);\n } else {\n return;\n }\n }\n\n if (maybeToggleNode) {\n for (let i = 0; i < maybeToggleNode.children.length; i++) {\n const n = maybeToggleNode.children[i];\n const targetRef = n.children[0];\n if (n !== parent) {\n n.classList.remove(ACTIVE_CLASS);\n if (targetRef) {\n const attr = targetRef.getAttribute(ATTR_NAME);\n const el = attr ? doc.getElementById(attr) : null;\n if (el) {\n Event.dispatchAndFire(el, EVENT_TAB_CLOSED);\n el.classList.remove(ACTIVE_CLASS);\n targetRef.classList.remove(ACTIVE_CLASS);\n }\n }\n }\n }\n }\n }\n if (elClassList) {\n elClassList.toggle(ACTIVE_CLASS);\n elClassList.add(LOADING_CLASS);\n }\n this.loading = true;\n future.then((r) => {\n Event.dispatchAndFire(r, EVENT_TAB_OPENED);\n Toggleable._handleLoaded(target);\n r.classList.toggle(ACTIVE_CLASS);\n this.loading = false;\n }).catch(() => {\n this.loading = false;\n Toggleable._handleLoaded(target);\n });\n }\n\n /**\n * @param el\n * @private\n */\n static _handleLoaded(el) {\n const parentClassList = el.parentNode.classList;\n el.classList.remove(LOADING_CLASS);\n if (parentClassList) {\n parentClassList.remove(LOADING_CLASS);\n }\n }\n}\n\nexport default Toggleable;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Toggleable.js\n **/","import Form from '../Form';\nimport Tooltip from '../Tooltip';\nimport Modal from '../Modal';\nimport Widget from '../Widget';\nimport Settings from '../util/Settings';\nimport Toggleable from '../Toggleable';\nimport OffCanvas from '../OffCanvas';\nimport Dropdown from '../Dropdown';\nimport LightBox from '../LightBox';\nimport Util from '../util/Util';\n\nexport { Form, Tooltip, Modal, Widget, Settings, Util, Toggleable, OffCanvas, Dropdown, LightBox };\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/All.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/build/maps/form.map b/build/maps/form.map index 1b60c416..ee0a6d47 100644 --- a/build/maps/form.map +++ b/build/maps/form.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6**","webpack:///webpack/bootstrap e25fe34d2bc7e7cf2068?8d0c**","webpack:///./src/main/Form.js?18a8","webpack:///./src/main/Tooltip.js?3890","webpack:///./src/main/util/Util.js?5bc4","webpack:///./src/main/DestroyableWidget.js?8d9b","webpack:///./src/main/util/Settings.js?b01f","webpack:///./~/isomorphic-fetch/fetch-npm-browserify.js?7723","webpack:///./~/whatwg-fetch/fetch.js?1c20","webpack:///./src/main/util/Event.js?68bf","webpack:///./src/main/modules/Form.js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A;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA,wDAAuD;AACvD,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA,wCAAuC,0BAA0B;AACjE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,gCAA+B,0BAA0B,eAAe;AACxE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AAC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AAL,CAAgB;AACnB,gCAAe,CAAf;cADG,CAAP,CADY;;;;;;;;;;;oCAWL,GAAG;AACV,iBAAI,CAAC,KAAK,cAAL,CAAoB,MAApB,EAA4B;AAC7B,sBAAK,cAAL,CAAoB,MAApB,GAA6B,EAA7B,CAD6B;cAAjC;AAGA,oBAAO,MAAP,CAAc,KAAK,cAAL,CAAoB,MAApB,EAA4B,CAA1C,EAJU;AAKV,oBAAO,IAAP,CALU;;;;;;;;;gCAWP;AACH,iBAAM,IAAI,IAAI,WAAJ,CAAgB,KAAK,IAAL,EAAW,KAAK,cAAL,CAA/B,CADH;AAEH,iBAAI,KAAK,MAAL,EAAa;AACb,sBAAK,MAAL,CAAY,aAAZ,CAA0B,CAA1B,EADa;cAAjB;AAGA,oBAAO,CAAP,CALG;;;;YArDL;;;KA8DA;;;;;;;;;;;;;;kCAOc,QAAQ,MAAM;AAC1B,oBAAO,IAAI,YAAJ,CAAiB,MAAjB,EAAyB,IAAzB,CAAP,CAD0B;;;;;;;;;;;;;yCAWP,QAAQ,MAAM,SAAS;AAC1C,oBAAO,IAAI,YAAJ,CAAiB,MAAjB,EAAyB,IAAzB,EAA+B,WAA/B,CAA2C,OAA3C,EAAoD,IAApD,EAAP,CAD0C;;;;YAlB5C;;;mBAuBS,M;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBCjIA;AACX,yBADW;AAEX,iCAFW;AAGX,+BAHW","file":"js/form.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap e25fe34d2bc7e7cf2068\n **/","/*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Form\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Tooltip from './Tooltip';\nimport 'isomorphic-fetch';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport DestroyableWidget from './DestroyableWidget';\n\nconst LOADING_CLASS = 'loading';\nconst DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\nconst REMOTE = 'data-remote';\nconst REMOTE_ACTION = 'data-remote-action';\nconst ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\nconst ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\nconst ATTR_VALIDATOR = 'data-validate';\nconst ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\nconst ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\nconst ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\nconst ATTR_ERROR_TARGET_ID = 'data-error-target';\nconst ATTR_DEPENDS = 'data-depends-selector';\nconst CONST_USE_JSON = 'json';\nconst CONST_REALTIME_EVENT = 'input';\nconst FOCUS_TOOLTIP_DELAY = 20;\nconst CLICK_TOOLTIP_DELAY = 150;\n\n/**\n * Triggered when form is fully initialized and handlers are binded\n * @type {string}\n */\nexport const EVENT_FORM_READY = 'flexcss.form.ready';\n/**\n * Fires when a form is submitted, cancelable\n * @type {string}\n */\nexport const EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n/**\n * Fired directly after the form has been submitted via ajax\n * @type {string}\n */\nexport const EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n/**\n * Fired when ajax events did complete\n * @type {string}\n */\nexport const EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\n/**\n * A HTML5 Form Validation replacement\n */\n\nclass Form extends DestroyableWidget {\n /**\n * @param {HTMLElement} form\n * @param [options] optional options\n */\n constructor(form, options) {\n super();\n\n if (!(form instanceof HTMLFormElement)) {\n throw 'argument {0} form needs to be an form element';\n }\n\n /**\n * The Form\n * @type {HTMLElement}\n */\n this.form = form;\n\n /**\n * @type {Tooltip}\n */\n this.tooltips = null;\n\n /**\n * @type {Promise}\n */\n this.currentValidationFuture = new Promise(() => {\n });\n\n /**\n * Default options\n * @type {Object}\n */\n this.options = {\n // if true creates tooltips above element, uses FlexCss Tooltips\n createTooltips: true,\n // if true appends error message after input element\n appendError: false,\n // type of ajax submit\n ajaxSubmitType: 'POST',\n // json content type if ajax method is set to json\n ajaxJsonContentType: 'application/json; charset=utf-8',\n // allow inline validation\n inlineValidation: true,\n // validate in realtime (on `input` event)\n realtime: true,\n // timeout when realtime event should be captured\n realtimeTimeout: 250,\n // formatting method for an error\n formatErrorTooltip: (error) => {\n return ' ' + error;\n },\n // the class that will be put on the element to mark it failed validation\n inputErrorClass: 'invalid',\n // the container class for error messages below an element\n containerErrorClass: 'form-error',\n // additional options for fetch\n fetchOptions: {\n credentials: 'include'\n },\n // the container for tooltips\n tooltipContainer: form,\n tooltipOptions: {\n containerClass: 'error-tooltip'\n },\n // if you have a fixed header, either set a number or function here\n scrollToElementDiff: 0\n };\n\n // overwrite default options\n Object.assign(this.options, options);\n\n // apply settings from attributes\n Util.applyOptionsFromElement(form, this.options);\n\n // set form class as widget\n // Forms are very different to classical widgets,\n // we will not use our base widget class for this but just self\n form.hfWidgetInstance = this;\n\n /**\n * A List of Validators\n * @type {Object}\n * @private\n */\n this._validators = Form.globalValidators;\n\n /**\n * @type {Function}\n * @private\n */\n this._remoteValidationFunction = null;\n\n this.initFormValidation();\n }\n\n destroy() {\n super.destroy();\n if (this.tooltips) {\n this.tooltips.destroy();\n }\n }\n\n /**\n * Submits this form, either via ajax or just classical (default)\n * @param {HTMLFormElement} thisForm\n * @param {Event} e\n * @private\n * @returns {Promise|boolean} returns false if submit is cancled\n */\n _submitFunction(thisForm, e) {\n var shouldUseAjax = thisForm.getAttribute(REMOTE), ajaxPostUrl =\n thisForm.getAttribute(REMOTE_ACTION) ||\n thisForm.getAttribute('action') || window.location.href,\n useJson = CONST_USE_JSON === shouldUseAjax, self = this;\n\n var ev = Event.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\n // abort execution is event was prevented\n if (ev.defaultPrevented) {\n self._formStopLoading();\n return false;\n }\n\n if (shouldUseAjax === null) {\n // submit\n return thisForm.submit();\n }\n // prevent form from submit normally\n e.preventDefault();\n\n // add information that this is an XMLHttpRequest request (used by some frameworks)\n let defaultHeaders = {\n 'X-Requested-With': 'XMLHttpRequest'\n };\n\n // setup default headers\n if (useJson) {\n Object.assign(defaultHeaders, {\n 'Content-Type': this.options.ajaxJsonContentType\n });\n }\n let defaultOptions = Object.assign(this.options.fetchOptions, {\n headers: defaultHeaders,\n method: this.options.ajaxSubmitType\n });\n\n // support either JSON request payload or normal payload submission\n var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: JSON.stringify(this.serialize())\n })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: new FormData(thisForm)\n }));\n\n Event.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\n return serverCall.then((r) => {\n (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\n Event.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n // always remove error class\n self._formStopLoading();\n });\n }\n\n /**\n * Serializes a form to a json object\n * @returns {Object}\n */\n serialize() {\n var selectors = [\n 'input[name]:not([type=\"radio\"]):enabled',\n 'input[type=\"radio\"][name]:checked',\n 'select[name]:enabled',\n 'textarea[name]:enabled'\n ], inputs = this.form.querySelectorAll(selectors.join(',')), result = {};\n\n Array.prototype.forEach.call(inputs, function (input) {\n var exists = result[input.name], value = input.value;\n if (exists instanceof Array) {\n exists.push(value);\n } else if (exists) {\n result[input.name] = [result[input.name], value];\n } else {\n result[input.name] = value;\n }\n });\n\n return result;\n }\n\n /**\n * Handles the chain of validation on given fields\n *\n * @param {HTMLElement|Array|NodeList} field\n * @param [focus] optional focus first error\n * @returns {Promise}\n */\n handleValidation(field, focus) {\n var fields = (field instanceof Array || field instanceof NodeList) ? field : [field];\n return this._handleValidation(fields, focus, true).then(((r) => {\n if (!r.foundAnyError) {\n // remove tooltips\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n }\n return r;\n }).bind(this));\n }\n\n /**\n * Handles errors on given node list\n * @param {NodeList} toValidateFields\n * @param {boolean} focus\n * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n * @returns {Promise}\n * @private\n */\n _handleValidation(toValidateFields, focus, scoped) {\n var self = this;\n var arr = Form._createArrayFromInvalidFieldList(toValidateFields), isLocalInvalid = arr.length > 0;\n // focus must appear in the same frame for iOS devices\n if (isLocalInvalid && focus) {\n self._focusElement(arr[0]);\n }\n var validation = scoped ? this._customValidationsForElements(toValidateFields) :\n self.validateCustomFields();\n return validation.then((r) => {\n if (isLocalInvalid) {\n // combine browser and custom validators\n r.foundAnyError = true;\n }\n // get a unique field list of all fields that need to be checked and rendered\n // it's possible that we have duplicates in non scoped mode\n let thisToValidateFields = scoped ? toValidateFields :\n Array.from(arr).concat(r.checkedFields);\n r.checkedFields = thisToValidateFields;\n let foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n firstInvalidField = foundInvalidFields[0];\n if (firstInvalidField) {\n if (focus) {\n self._focusElement(firstInvalidField);\n // if element could not be focused:\n if (document.activeElement !== firstInvalidField) {\n self._handleTooltipHideClickAfterChange();\n }\n } else {\n self._handleTooltipHideClickAfterChange();\n }\n self.showAndOrCreateTooltip(firstInvalidField);\n }\n return r;\n });\n }\n\n /**\n * @param {HTMLElement} field\n * @param {ValidityState} validity\n * @returns {*}\n * @private\n */\n\n _setupErrorMessages(field, validity) {\n return Form.globalErrorMessageHandler ?\n Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n }\n\n /**\n * Handles class labels for elements\n * @param {Object} fields\n * @private\n */\n _handleLabels(fields) {\n Object.keys(fields).forEach(function (id) {\n let labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'), invalid = fields[id];\n if (labels.length) {\n for (let labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n let labelEl = labels[labelsIndex];\n // we can't use toggle attribute, not supported in IE\n if (invalid) {\n this._markElementInvalid(labelEl);\n } else {\n this._markElementValid(labelEl);\n }\n }\n }\n }.bind(this));\n }\n\n /**\n * @param el\n * @private\n */\n _markElementInvalid(el) {\n el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n el.classList.add(this.options.inputErrorClass);\n }\n\n /**\n * @param el\n * @private\n */\n _markElementValid(el) {\n el.removeAttribute(DATA_ELEMENT_INVALID);\n el.classList.remove(this.options.inputErrorClass);\n }\n\n /**\n * A List of invalid elements (:invalid)\n * @returns {Array}\n * @private\n */\n _getInvalidElements() {\n return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n return !(r instanceof HTMLFieldSetElement);\n });\n }\n\n /**\n * @param {HTMLElement} thisParent\n * @private\n */\n _removeElementErrors(thisParent) {\n let errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass), inputsWithErrorClasses =\n thisParent.querySelectorAll(`[${DATA_ELEMENT_INVALID}]`);\n for (let elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n }\n for (let inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n let el = inputsWithErrorClasses[inputErrorIndex];\n this._markElementValid(el);\n }\n }\n\n\n /**\n * Registers a custom validator\n * @param {String} name\n * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n * we can't rely on that\n * @returns {Form}\n */\n registerValidator(name, validator) {\n this._validators[name] = validator;\n return this;\n }\n\n /**\n * Runs async validation\n * @param {String} validationRef\n * @param {HTMLElement} field\n * @returns {Promise}\n * @private\n */\n _runValidation(validationRef, field) {\n if (!this._validators[validationRef]) {\n throw 'Could not found validator: ' + validationRef;\n }\n var cl = field.classList, future = this._validators[validationRef].apply(this, [field, this.form]);\n cl.add(LOADING_CLASS);\n future.then(() => {\n cl.remove(LOADING_CLASS);\n });\n return future;\n }\n\n\n /**\n * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n *\n * @param {Array|NodeList} fields\n * @returns {Promise} contains either true if validations passed or false if something went wrong\n * @private\n */\n _customValidationsForElements(fields) {\n var futures = [], fieldsLength = fields.length, checkedFields = [];\n for (var iVal = 0; iVal < fieldsLength; iVal++) {\n var field = fields[iVal], validationRef = field.getAttribute(ATTR_VALIDATOR), validity = field.validity;\n if (this._validators[validationRef]) {\n // use local validation first and then continue with custom validations\n if (Form._shouldNotValidateField(field) || (validity && !validity.customError && !validity.valid)) {\n continue;\n }\n checkedFields.push(field);\n futures.push(this._runValidation(validationRef, field));\n } else {\n if (validationRef) {\n console.warn('data-validate was set but no validator was found');\n }\n }\n }\n return Promise.all(futures).then(function (allFutures) {\n let l = allFutures.length;\n let result = {\n checkedFields: checkedFields,\n foundAnyError: false\n };\n for (var fI = 0; fI < l; fI++) {\n if (!allFutures[fI]) {\n result.foundAnyError = true;\n break;\n }\n }\n return result;\n });\n }\n\n /**\n * Remove all errors for this form\n * @returns {Form}\n */\n removeErrors() {\n this._removeElementErrors(this.form);\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n return this;\n }\n\n /**\n * Will handle errors for given fields\n * @param {Array|NodeList} fields\n * @param {Boolean} removeAllErrors\n */\n prepareErrors(fields, removeAllErrors) {\n if (removeAllErrors) {\n this.removeErrors();\n }\n let labelGroups = {}, invalidFields = [];\n\n function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n let additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) ||\n field.id, group = thisLabelGroup[additionalLabels];\n if (additionalLabels) {\n // check additionally if field is currently marked as invalid\n // so the label is not marked as error if no field is marked as one\n group = group ? group : isInvalid;\n thisLabelGroup[additionalLabels] = group;\n }\n }\n\n // We save all validations in an extra property because we need to reset the validity due some\n // implementation errors in other browsers then chrome\n for (let i = 0; i < fields.length; i++) {\n let field = fields[i], errorTarget = Form._findErrorTarget(field), parent = errorTarget.parentNode,\n validity = field.validity, isInvalid = validity && !validity.valid;\n if (Form._shouldNotValidateField(field)) {\n continue;\n }\n field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n handleAdditionalLabels(isInvalid, labelGroups, field);\n if (isInvalid) {\n if (!removeAllErrors) {\n // Remove current errors:\n this._removeElementErrors(parent);\n }\n // setup custom error messages:\n this._setupErrorMessages(field, validity);\n let msg = field.validationMessage;\n\n // mark fields as invalid\n this._markElementInvalid(errorTarget);\n this._markElementInvalid(field);\n\n if (this.options.appendError) {\n parent.insertAdjacentHTML(\"beforeend\",\n `
${msg}
`);\n }\n invalidFields.push(field);\n field.flexFormsSavedValidationMessage = msg;\n } else {\n // restore invalid fields\n this._markElementValid(errorTarget);\n this._markElementValid(field);\n\n // cleanup\n delete field.flexFormsSavedValidationMessage;\n\n // remove error markup\n this._removeElementErrors(parent);\n }\n // We have to reset the custom validity here to allow native validations work again\n field.setCustomValidity('');\n }\n // if validates a single field we need to check the linked fields to a label:\n if (fields.length === 1) {\n let field = fields[0];\n let id = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id;\n if (id) {\n let linkedFields = Array.from(\n this.getForm().querySelectorAll(`[${ATTR_DATA_CUSTOM_LABEL}=\"${id}\"], #${id}`));\n linkedFields.forEach(function (thisField) {\n let validity = thisField.validity, isInvalid = validity && !validity.valid &&\n this._isElementInvalidElement(thisField);\n handleAdditionalLabels(isInvalid, labelGroups, thisField);\n }.bind(this));\n }\n }\n this._handleLabels(labelGroups);\n return invalidFields;\n }\n\n /**\n * Validates all custom fields\n * @returns {Promise}\n */\n validateCustomFields() {\n return this._customValidationsForElements(\n this.form.querySelectorAll(\"[data-validate]\"));\n }\n\n /**\n * Tests if a field should be validated\n * @param {HTMLElement} field\n * @returns {boolean}\n * @private\n */\n static _shouldNotValidateField(field) {\n var target = Form._findErrorTarget(field);\n return target instanceof HTMLFieldSetElement || field.validity === undefined ||\n (target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !Util.isVisible(target));\n }\n\n /**\n * Creates an array from a node list with invalid items\n * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n * @param list\n * @returns {Array}\n * @private\n */\n static _createArrayFromInvalidFieldList(list) {\n var arr = [];\n for (var i = 0; i < list.length; ++i) {\n var n = list[i];\n if (n.validity && !n.validity.valid) {\n if (!Form._shouldNotValidateField(n)) {\n arr.push(n);\n }\n }\n }\n return arr;\n }\n\n\n /**\n * This form\n * @returns {HTMLElement}\n */\n getForm() {\n return this.form;\n }\n\n /**\n * Registers a function that handles remote validation\n * @param {Function} func\n * @returns {Form}\n */\n registerRemoteValidation(func) {\n this._remoteValidationFunction = func;\n return this;\n }\n\n\n /**\n * Formats the error content for the tooltip\n * @param {String} error\n * @returns {String}\n * @private\n */\n _formatErrorTooltip(error) {\n return this.options.formatErrorTooltip.apply(this, [error]);\n }\n\n /**\n * Tries to find a custom error target on given target\n * @param target\n * @returns {HTMLElement}\n * @private\n */\n static _findErrorTarget(target) {\n var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n if (!foundTarget) {\n throw 'Given error target did not exsits:' + target;\n }\n return foundTarget;\n }\n\n /**\n * Creates a tooltip at given element, will only create a new instance if not created\n * @param {HTMLElement} target\n * @param {Boolean} [remove]\n */\n showAndOrCreateTooltip(target, remove) {\n var self = this;\n if (!this.tooltips && this.options.createTooltips) {\n this.tooltips = new Tooltip(this.options.tooltipContainer, this.options.tooltipOptions);\n }\n if (!this.options.createTooltips) {\n return false;\n }\n\n if (!target.flexFormsSavedValidity) {\n return false;\n }\n var errorTarget = Form._findErrorTarget(target);\n if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n self.tooltips.createTooltip(errorTarget,\n self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n return true;\n } else {\n if (remove) {\n self.tooltips.removeTooltip();\n }\n }\n return false;\n }\n\n /**\n * Checks if element is marked as invalid\n * @param {HTMLElement} el\n * @returns {boolean}\n * @private\n */\n _isElementInvalidElement(el) {\n return el.hasAttribute(DATA_ELEMENT_INVALID);\n }\n\n /**\n * Handles invalid event of a form\n * @param {Event} e\n * @returns {Promise|boolean}\n * @private\n */\n _checkIsInvalid(e) {\n e.preventDefault();\n var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n return this._handleValidation(invalidFields, true, false);\n }\n\n /**\n * Will query dependent fields (by selector) that should be validated with given field\n * @param field\n * @returns {NodeList|[]}\n * @private\n */\n _getDependentFields(field) {\n let fieldSelector = field.getAttribute(ATTR_DEPENDS), base = [field];\n if (fieldSelector) {\n base.push.apply(base, Array.prototype.slice.apply(\n this.getForm().querySelectorAll(fieldSelector)));\n }\n return base;\n }\n\n /**\n * @private\n * @param {HTMLElement} [target]\n */\n _handleTooltipInline(target) {\n if (this.tooltips) {\n this.tooltips.removeTooltip(target);\n }\n }\n\n /**\n * Initializes validation for a given form, registers event handlers\n */\n initFormValidation() {\n // Suppress the default bubbles\n var form = this.getForm(),\n self = this,\n invalidEvent = 'invalid';\n\n /**\n * Validates if is valid realtime element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidRealtimeElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n form.addEventListener(invalidEvent, function (e) {\n e.preventDefault();\n }, true);\n\n Util.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n self._formLoading();\n var result = self._checkIsInvalid(e);\n if (result) {\n self.currentValidationFuture = new Promise((resolve) => {\n result.then(function (r) {\n setTimeout(function () {\n Util.addEventOnce(invalidEvent, form, handleInvalid, true);\n }, 0);\n resolve(r);\n self._formStopLoading();\n if (!r.foundAnyError) {\n self._formLoading();\n self._handleSubmit(e);\n }\n });\n });\n }\n }, true);\n\n this.addEventListener(form, 'reset', () => {\n this.removeErrors();\n });\n\n // Timeout for keys:\n var TIMEOUT_KEYDOWN, KEYDOWN_RUNNING = false;\n\n // resets keydown events\n function clearKeyDownTimeout() {\n KEYDOWN_RUNNING = false;\n clearTimeout(TIMEOUT_KEYDOWN);\n }\n\n // setup custom realtime event if given\n if (self.options.realtime) {\n this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n if (self._formIsLoading()) {\n return;\n }\n var target = e.target;\n clearTimeout(TIMEOUT_KEYDOWN);\n if (KEYDOWN_RUNNING) {\n return;\n }\n TIMEOUT_KEYDOWN = setTimeout(() => {\n let isStillTarget = document.activeElement === e.target;\n if (!_checkIsValidRealtimeElement(target)) {\n return;\n }\n if (isStillTarget) {\n self._handleTooltipInline();\n }\n KEYDOWN_RUNNING = true;\n let dependentFields = self._getDependentFields(target);\n self._customValidationsForElements(dependentFields).then(function () {\n self.prepareErrors(dependentFields, false);\n if (isStillTarget) {\n self.showAndOrCreateTooltip(e.target);\n }\n // future must be resolved before another event can be started\n KEYDOWN_RUNNING = false;\n });\n }, self.options.realtimeTimeout);\n }, true);\n }\n\n /**\n * Validates if target is a valid input field to check blur and focus events\n *\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidBlurFocusElement(target) {\n let attr = target.getAttribute(\"type\");\n return (attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\");\n }\n\n /**\n * Validates if is valid inline-check element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidInlineCheckElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n this.addEventListener(form, 'blur', function (e) {\n // do not hide tooltip after change event\n if (!e.target.flexcssKeepTooltips) {\n self._handleTooltipInline(e.target);\n }\n delete e.target.flexcssKeepTooltips;\n }, true);\n\n // handle focus on input elements\n // will show an error if field is invalid\n this.addEventListener(form, \"focus\", function (e) {\n if (self._formIsLoading()) {\n return;\n }\n // do not track errors for checkbox and radios on focus:\n if (!_checkIsValidBlurFocusElement(e.target)) {\n return;\n }\n // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n // just have been hidden (on blur). Maybe fix this with a queue later\n setTimeout(function () {\n self.showAndOrCreateTooltip(e.target);\n }, FOCUS_TOOLTIP_DELAY);\n }, true);\n\n if (self.options.inlineValidation) {\n // Handle change for checkbox, radios and selects\n this.addEventListener(form, \"change\", function (e) {\n const target = e.target;\n if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n return;\n }\n clearKeyDownTimeout();\n const name = target.getAttribute('name');\n let inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n // we only support dependent fields for a single widgets right now\n if (inputs.length === 1) {\n inputs = self._getDependentFields(target);\n }\n self._customValidationsForElements(inputs).then(function () {\n self.prepareErrors(inputs, false);\n target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n if (target.flexcssKeepTooltips) {\n self._handleTooltipHideClickAfterChange();\n }\n });\n });\n }\n\n // prevent default if form is invalid\n this.addEventListener(form, \"submit\", function listener(e) {\n self._submitListener(e, listener);\n });\n\n Event.dispatchAndFire(form, EVENT_FORM_READY);\n }\n\n /* Loading states, unfortunately we can't check if a promise is pending :/*/\n /* TODO: Maybe wrap promise to extend this functionality */\n\n _formLoading() {\n this.getForm().classList.add(LOADING_CLASS);\n }\n\n _formStopLoading() {\n this.getForm().classList.remove(LOADING_CLASS);\n }\n\n _formIsLoading() {\n return this.getForm().classList.contains(LOADING_CLASS);\n }\n\n // this defines the logic after a change event when a tooltip is shown\n // because we call this method inside the change event, the click would be immeditally executed with the change\n // event when not using setTimeout(). There might be another solution for this...\n _handleTooltipHideClickAfterChange() {\n const self = this;\n if (this.options.createTooltips) {\n setTimeout(function () {\n Util.addEventOnce(Settings.getTabEvent(), global.document.body, function (t) {\n if (!self._isElementInvalidElement(t.target)) {\n self._handleTooltipInline();\n }\n });\n }, CLICK_TOOLTIP_DELAY);\n }\n }\n\n _focusElement(el) {\n el.focus();\n Util.scrollToElement(el, this.options.scrollToElementDiff);\n }\n\n /**\n * Listener that is executed on form submit\n * @param e\n * @param submitListener\n * @returns {boolean}\n * @private\n */\n _submitListener(e, submitListener) {\n\n const form = this.getForm(),\n self = this,\n submitEvent = 'submit';\n\n if (this._formIsLoading()) {\n e.preventDefault();\n return false;\n }\n this._formLoading();\n form.removeEventListener(submitEvent, submitListener);\n this.removeErrors();\n e.preventDefault();\n // reset:\n if (form.checkValidity()) {\n form.addEventListener(submitEvent, submitListener);\n // It's possible that the form is valid but the custom validations need to be checked again:\n self.currentValidationFuture = new Promise((resolve) => {\n var validation = self.validateCustomFields();\n validation.then(function (r) {\n // because custom validators may mark multiple fields as invalid, we get all of them in the form\n var fields = self._getInvalidElements(),\n errors = self.prepareErrors(fields, false), firstError = errors[0];\n if (firstError) {\n self._focusElement(firstError);\n self.showAndOrCreateTooltip(firstError, true);\n }\n resolve(r);\n });\n });\n self.currentValidationFuture.then(function (r) {\n if (!r.foundAnyError) {\n // Handle submitting the form to server:\n self._handleSubmit(e);\n } else {\n self._formStopLoading();\n }\n });\n } else {\n self._formStopLoading();\n form.addEventListener(submitEvent, submitListener);\n }\n }\n\n\n /**\n * Handles submitting, optionally allows to stop submitting\n * @param e\n * @private\n */\n _handleSubmit(e) {\n this._submitFunction(this.form, e);\n }\n\n\n /**\n * Registers a global event Handler\n * @param errorFunc\n */\n static registerErrorMessageHandler(errorFunc) {\n Form.globalErrorMessageHandler = errorFunc;\n }\n\n /**\n * Initialize forms for a specific selector\n * @param {String} selector\n * @param {Object} [options]\n * @return {array.}\n */\n static init(selector, options) {\n var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') :\n document.querySelectorAll(selector), instances = [];\n for (var i = 0; i < forms.length; i++) {\n instances.push(new Form(forms[i], options));\n }\n return instances;\n }\n\n\n /**\n * Registers a global validator that is usable on all form instances\n * @param {String} name\n * @param {Function} validator\n * @returns {Function}\n */\n static registerValidator(name, validator) {\n Form.globalValidators[name] = validator;\n return Form;\n }\n\n /**\n * Registers a global function that is called when a form should validate the response of a server\n * @param {Function} func\n * @returns {Form}\n */\n static registerGlobalRemoteValidationFunction(func) {\n Form.globalRemoteValidationFunction = func;\n return Form;\n }\n}\n\n\n/**\n * Global validators\n * @type {Array}\n */\nForm.globalValidators = [];\n\n/**\n * Global Remote validation function\n */\nForm.globalRemoteValidationFunction = function () {\n};\n\n/**\n * Handles custom error messages extracts custom message by default\n */\nForm.globalErrorMessageHandler = (field, validity) => {\n if (!validity.customError) {\n let customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n if (customMsg) {\n field.setCustomValidity(customMsg);\n }\n }\n};\n\nexport default Form;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Form.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Tooltip\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport DestroyableWidget from './DestroyableWidget';\nimport Settings from './util/Settings';\n\n/**\n * @type {string}\n */\nconst CLASS_NAMES_TOOLTIP = 'tooltip-container';\n/**\n * @type {string}\n */\nconst CLASS_NAMES_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_CLASSNAME = 'data-class';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\n/**\n * @type {HTMLDocument}\n */\nconst doc = global.document;\n\n/**\n * Simple Tooltip\n */\nclass Tooltip extends DestroyableWidget {\n\n /**\n * Creates a Tooltip\n * @param {HTMLElement|String} DelegateContainer\n * @param {Object} [options]\n */\n constructor(DelegateContainer, options) {\n super();\n /**\n * The Container where possible events are captured\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n if (!this.container) {\n throw new Error('Could not create Tooltip, DelegateContainer not found');\n }\n\n /**\n * The Container where tooltips are stored for this instance\n * @type {HTMLElement}\n */\n this.tooltipContainer = null;\n\n /**\n * Default Options\n */\n this.options = {\n containerClass: '',\n selectorAttribute: 'data-tooltip',\n collisionContainer: this.container\n };\n\n Object.assign(this.options, options || {});\n }\n\n /**\n * Creates and shows a tooltip\n * @param {HTMLElement} target where is this tooltip positioned\n * @param {String} text text content in tooltip, will be NOT escaped\n * @param {Boolean} [removeTitle] removes title element if given\n * @param {Node} [positionRelative]\n */\n createTooltip(target, text, removeTitle, positionRelative) {\n // abort if text is empty\n if (!text || text && text.trim() === '') {\n return;\n }\n\n if (Settings.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n return;\n }\n\n let tooltipContainer = this.tooltipContainer;\n\n if (!tooltipContainer) {\n tooltipContainer = doc.createElement('div');\n this.container.appendChild(tooltipContainer);\n this.tooltipContainer = tooltipContainer;\n }\n this._restoreClassNames(tooltipContainer, target);\n\n tooltipContainer.style.left = 'auto';\n tooltipContainer.style.top = 'auto';\n tooltipContainer.innerHTML = text;\n tooltipContainer.flexTooltipCurrentTarget = target;\n if (removeTitle) {\n target.oldTitle = text;\n target.removeAttribute('title');\n }\n\n Util.setupPositionNearby(positionRelative || target, tooltipContainer,\n this.options.collisionContainer, true, true);\n\n tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n }\n\n _restoreClassNames(container, target) {\n // allow additional classname per tooltip on target element\n const classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n const maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n if (maybeTargetClass) {\n classNames.push(maybeTargetClass);\n }\n container.className = classNames.join(\" \");\n return this;\n }\n\n /**\n * @returns {HTMLElement|null}\n */\n getCurrentTarget() {\n return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n }\n\n /**\n * Destroys this Widget\n * @returns {boolean}\n */\n destroy() {\n super.destroy();\n\n if (this.tooltipContainer) {\n this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n return true;\n }\n return false;\n }\n\n /**\n * Removes a Tooltip on given target\n * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n */\n removeTooltip(target) {\n let selfTarget = target;\n if (!selfTarget && this.tooltipContainer) {\n selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (this.tooltipContainer) {\n if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n return;\n }\n this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n delete this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (selfTarget && selfTarget.oldTitle) {\n selfTarget.setAttribute('title', selfTarget.oldTitle);\n }\n }\n\n /**\n * Initilizes mouse events on container element\n */\n registerEvents() {\n const self = this;\n this.addEventListener(this.container, 'mouseover', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.createTooltip(e.target, e.target.getAttribute('title'), true);\n }\n });\n\n this.addEventListener(this.container, 'mouseout', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.removeTooltip(e.target);\n }\n });\n return this;\n }\n}\n\nexport default Tooltip;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Tooltip.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Provides a Basic Widget\n */\nclass DestroyableWidget {\n\n constructor() {\n this.listeners = [];\n }\n\n /**\n * Destroys a Widget\n */\n destroy() {\n this.listeners.forEach((listener) => {\n listener.element.removeEventListener.apply(listener.element, listener.args);\n });\n this.listeners = [];\n }\n\n /**\n * Adds an event and registers it later to remove bindings\n * @param {HTMLElement} element\n * @param {String} name\n * @param {Function} listener\n * @param {boolean} [capture]\n * @returns {Function}\n */\n addEventListener(element, name, listener, capture) {\n this.listeners.push({\n element,\n args: [name, listener, capture]\n });\n\n element.addEventListener(name, listener, capture);\n return listener;\n }\n\n}\n\nexport default DestroyableWidget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/DestroyableWidget.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","// the whatwg-fetch polyfill installs the fetch() function\n// on the global object (window or self)\n//\n// Return that as the export for use in Webpack, Browserify etc.\nrequire('whatwg-fetch');\nmodule.exports = self.fetch.bind(self);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/isomorphic-fetch/fetch-npm-browserify.js\n ** module id = 12\n ** module chunks = 2 3\n **/","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var list = this.map[name]\n if (!list) {\n list = []\n this.map[name] = list\n }\n list.push(value)\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n var values = this.map[normalizeName(name)]\n return values ? values[0] : null\n }\n\n Headers.prototype.getAll = function(name) {\n return this.map[normalizeName(name)] || []\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = [normalizeValue(value)]\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n Object.getOwnPropertyNames(this.map).forEach(function(name) {\n this.map[name].forEach(function(value) {\n callback.call(thisArg, value, name, this)\n }, this)\n }, this)\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n reader.readAsArrayBuffer(blob)\n return fileReaderReady(reader)\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n reader.readAsText(blob)\n return fileReaderReady(reader)\n }\n\n var support = {\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob();\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n function Body() {\n this.bodyUsed = false\n\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (!body) {\n this._bodyText = ''\n } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n // Only support ArrayBuffers for POST method.\n // Receiving ArrayBuffers happens via Blobs, instead.\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n } else {\n this.text = function() {\n var rejected = consumed(this)\n return rejected ? rejected : Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n if (Request.prototype.isPrototypeOf(input)) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = input\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this)\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function headers(xhr) {\n var head = new Headers()\n var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n pairs.forEach(function(header) {\n var split = header.trim().split(':')\n var key = split.shift().trim()\n var value = split.join(':').trim()\n head.append(key, value)\n })\n return head\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText\n this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request\n if (Request.prototype.isPrototypeOf(input) && !init) {\n request = input\n } else {\n request = new Request(input, init)\n }\n\n var xhr = new XMLHttpRequest()\n\n function responseURL() {\n if ('responseURL' in xhr) {\n return xhr.responseURL\n }\n\n // Avoid security warnings on getResponseHeader when not allowed by CORS\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL')\n }\n\n return;\n }\n\n xhr.onload = function() {\n var status = (xhr.status === 1223) ? 204 : xhr.status\n if (status < 100 || status > 599) {\n reject(new TypeError('Network request failed'))\n return\n }\n var options = {\n status: status,\n statusText: xhr.statusText,\n headers: headers(xhr),\n url: responseURL()\n }\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/whatwg-fetch/fetch.js\n ** module id = 13\n ** module chunks = 2 3\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","import Form from '../Form';\nimport Tooltip from '../Tooltip';\nimport Settings from '../util/Settings';\n\n// default export as component object\nexport default {\n Form,\n Settings,\n Tooltip\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/Form.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6**","webpack:///webpack/bootstrap 81c2cbe516e809e8be72?ed04**","webpack:///./src/main/Form.js?18a8","webpack:///./src/main/Tooltip.js?3890","webpack:///./src/main/util/Util.js?5bc4","webpack:///./src/main/DestroyableWidget.js?8d9b","webpack:///./src/main/util/Settings.js?b01f","webpack:///./~/isomorphic-fetch/fetch-npm-browserify.js?7723","webpack:///./~/whatwg-fetch/fetch.js?1c20","webpack:///./src/main/util/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A;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA,wDAAuD;AACvD,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA,wCAAuC,0BAA0B;AACjE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,gCAA+B,0BAA0B,eAAe;AACxE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAE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AUR,GAAG;AACZ,oBAAO,KAAK,UAAL,CAAgB;AACnB,gCAAe,CAAf;cADG,CAAP,CADY;;;;;;;;;;;oCAWL,GAAG;AACV,iBAAI,CAAC,KAAK,cAAL,CAAoB,MAApB,EAA4B;AAC7B,sBAAK,cAAL,CAAoB,MAApB,GAA6B,EAA7B,CAD6B;cAAjC;AAGA,oBAAO,MAAP,CAAc,KAAK,cAAL,CAAoB,MAApB,EAA4B,CAA1C,EAJU;AAKV,oBAAO,IAAP,CALU;;;;;;;;;gCAWP;AACH,iBAAM,IAAI,IAAI,WAAJ,CAAgB,KAAK,IAAL,EAAW,KAAK,cAAL,CAA/B,CADH;AAEH,iBAAI,KAAK,MAAL,EAAa;AACb,sBAAK,MAAL,CAAY,aAAZ,CAA0B,CAA1B,EADa;cAAjB;AAGA,oBAAO,CAAP,CALG;;;;YArDL;;;KA8DA;;;;;;;;;;;;;;kCAOc,QAAQ,MAAM;AAC1B,oBAAO,IAAI,YAAJ,CAAiB,MAAjB,EAAyB,IAAzB,CAAP,CAD0B;;;;;;;;;;;;;yCAWP,QAAQ,MAAM,SAAS;AAC1C,oBAAO,IAAI,YAAJ,CAAiB,MAAjB,EAAyB,IAAzB,EAA+B,WAA/B,CAA2C,OAA3C,EAAoD,IAApD,EAAP,CAD0C;;;;YAlB5C;;;mBAuBS,M;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBCjIA;AACX,yBADW;AAEX,iCAFW;AAGX,+BAHW","file":"js/form.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 81c2cbe516e809e8be72\n **/","/*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Form\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Tooltip from './Tooltip';\nimport 'isomorphic-fetch';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport DestroyableWidget from './DestroyableWidget';\n\nconst LOADING_CLASS = 'loading';\nconst DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\nconst REMOTE = 'data-remote';\nconst REMOTE_ACTION = 'data-remote-action';\nconst ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\nconst ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\nconst ATTR_VALIDATOR = 'data-validate';\nconst ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\nconst ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\nconst ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\nconst ATTR_ERROR_TARGET_ID = 'data-error-target';\nconst ATTR_DEPENDS = 'data-depends-selector';\nconst CONST_USE_JSON = 'json';\nconst CONST_REALTIME_EVENT = 'input';\nconst FOCUS_TOOLTIP_DELAY = 20;\nconst CLICK_TOOLTIP_DELAY = 150;\n\n/**\n * Triggered when form is fully initialized and handlers are binded\n * @type {string}\n */\nexport const EVENT_FORM_READY = 'flexcss.form.ready';\n/**\n * Fires when a form is submitted, cancelable\n * @type {string}\n */\nexport const EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n/**\n * Fired directly after the form has been submitted via ajax\n * @type {string}\n */\nexport const EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n/**\n * Fired when ajax events did complete\n * @type {string}\n */\nexport const EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\n/**\n * A HTML5 Form Validation replacement\n */\n\nclass Form extends DestroyableWidget {\n /**\n * @param {HTMLElement} form\n * @param [options] optional options\n */\n constructor(form, options) {\n super();\n\n if (!(form instanceof HTMLFormElement)) {\n throw 'argument {0} form needs to be an form element';\n }\n\n /**\n * The Form\n * @type {HTMLElement}\n */\n this.form = form;\n\n /**\n * @type {Tooltip}\n */\n this.tooltips = null;\n\n /**\n * @type {Promise}\n */\n this.currentValidationFuture = new Promise(() => {\n });\n\n /**\n * Default options\n * @type {Object}\n */\n this.options = {\n // if true creates tooltips above element, uses FlexCss Tooltips\n createTooltips: true,\n // if true appends error message after input element\n appendError: false,\n // type of ajax submit\n ajaxSubmitType: 'POST',\n // json content type if ajax method is set to json\n ajaxJsonContentType: 'application/json; charset=utf-8',\n // allow inline validation\n inlineValidation: true,\n // validate in realtime (on `input` event)\n realtime: true,\n // timeout when realtime event should be captured\n realtimeTimeout: 250,\n // formatting method for an error\n formatErrorTooltip: (error) => {\n return ' ' + error;\n },\n // the class that will be put on the element to mark it failed validation\n inputErrorClass: 'invalid',\n // the container class for error messages below an element\n containerErrorClass: 'form-error',\n // additional options for fetch\n fetchOptions: {\n credentials: 'include'\n },\n // the container for tooltips\n tooltipContainer: form,\n tooltipOptions: {\n containerClass: 'error-tooltip'\n },\n // if you have a fixed header, either set a number or function here\n scrollToElementDiff: 0\n };\n\n // overwrite default options\n Object.assign(this.options, options);\n\n // apply settings from attributes\n Util.applyOptionsFromElement(form, this.options);\n\n // set form class as widget\n // Forms are very different to classical widgets,\n // we will not use our base widget class for this but just self\n form.hfWidgetInstance = this;\n\n /**\n * A List of Validators\n * @type {Object}\n * @private\n */\n this._validators = Form.globalValidators;\n\n /**\n * @type {Function}\n * @private\n */\n this._remoteValidationFunction = null;\n\n this.initFormValidation();\n }\n\n destroy() {\n super.destroy();\n if (this.tooltips) {\n this.tooltips.destroy();\n }\n }\n\n /**\n * Submits this form, either via ajax or just classical (default)\n * @param {HTMLFormElement} thisForm\n * @param {Event} e\n * @private\n * @returns {Promise|boolean} returns false if submit is cancled\n */\n _submitFunction(thisForm, e) {\n var shouldUseAjax = thisForm.getAttribute(REMOTE), ajaxPostUrl =\n thisForm.getAttribute(REMOTE_ACTION) ||\n thisForm.getAttribute('action') || window.location.href,\n useJson = CONST_USE_JSON === shouldUseAjax, self = this;\n\n var ev = Event.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\n // abort execution is event was prevented\n if (ev.defaultPrevented) {\n self._formStopLoading();\n return false;\n }\n\n if (shouldUseAjax === null) {\n // submit\n return thisForm.submit();\n }\n // prevent form from submit normally\n e.preventDefault();\n\n // add information that this is an XMLHttpRequest request (used by some frameworks)\n let defaultHeaders = {\n 'X-Requested-With': 'XMLHttpRequest'\n };\n\n // setup default headers\n if (useJson) {\n Object.assign(defaultHeaders, {\n 'Content-Type': this.options.ajaxJsonContentType\n });\n }\n let defaultOptions = Object.assign(this.options.fetchOptions, {\n headers: defaultHeaders,\n method: this.options.ajaxSubmitType\n });\n\n // support either JSON request payload or normal payload submission\n var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: JSON.stringify(this.serialize())\n })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: new FormData(thisForm)\n }));\n\n Event.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\n return serverCall.then((r) => {\n (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\n Event.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n // always remove error class\n self._formStopLoading();\n });\n }\n\n /**\n * Serializes a form to a json object\n * @returns {Object}\n */\n serialize() {\n var selectors = [\n 'input[name]:not([type=\"radio\"]):enabled',\n 'input[type=\"radio\"][name]:checked',\n 'select[name]:enabled',\n 'textarea[name]:enabled'\n ], inputs = this.form.querySelectorAll(selectors.join(',')), result = {};\n\n Array.prototype.forEach.call(inputs, function (input) {\n var exists = result[input.name], value = input.value;\n if (exists instanceof Array) {\n exists.push(value);\n } else if (exists) {\n result[input.name] = [result[input.name], value];\n } else {\n result[input.name] = value;\n }\n });\n\n return result;\n }\n\n /**\n * Handles the chain of validation on given fields\n *\n * @param {HTMLElement|Array|NodeList} field\n * @param [focus] optional focus first error\n * @returns {Promise}\n */\n handleValidation(field, focus) {\n var fields = (field instanceof Array || field instanceof NodeList) ? field : [field];\n return this._handleValidation(fields, focus, true).then(((r) => {\n if (!r.foundAnyError) {\n // remove tooltips\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n }\n return r;\n }).bind(this));\n }\n\n /**\n * Handles errors on given node list\n * @param {NodeList} toValidateFields\n * @param {boolean} focus\n * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n * @returns {Promise}\n * @private\n */\n _handleValidation(toValidateFields, focus, scoped) {\n var self = this;\n var arr = Form._createArrayFromInvalidFieldList(toValidateFields), isLocalInvalid = arr.length > 0;\n // focus must appear in the same frame for iOS devices\n if (isLocalInvalid && focus) {\n self._focusElement(arr[0]);\n }\n var validation = scoped ? this._customValidationsForElements(toValidateFields) :\n self.validateCustomFields();\n return validation.then((r) => {\n if (isLocalInvalid) {\n // combine browser and custom validators\n r.foundAnyError = true;\n }\n // get a unique field list of all fields that need to be checked and rendered\n // it's possible that we have duplicates in non scoped mode\n let thisToValidateFields = scoped ? toValidateFields :\n Array.from(arr).concat(r.checkedFields);\n r.checkedFields = thisToValidateFields;\n let foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n firstInvalidField = foundInvalidFields[0];\n if (firstInvalidField) {\n if (focus) {\n self._focusElement(firstInvalidField);\n // if element could not be focused:\n if (document.activeElement !== firstInvalidField) {\n self._handleTooltipHideClickAfterChange();\n }\n } else {\n self._handleTooltipHideClickAfterChange();\n }\n self.showAndOrCreateTooltip(firstInvalidField);\n }\n return r;\n });\n }\n\n /**\n * @param {HTMLElement} field\n * @param {ValidityState} validity\n * @returns {*}\n * @private\n */\n\n _setupErrorMessages(field, validity) {\n return Form.globalErrorMessageHandler ?\n Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n }\n\n /**\n * Handles class labels for elements\n * @param {Object} fields\n * @private\n */\n _handleLabels(fields) {\n Object.keys(fields).forEach(function (id) {\n let labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'), invalid = fields[id];\n if (labels.length) {\n for (let labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n let labelEl = labels[labelsIndex];\n // we can't use toggle attribute, not supported in IE\n if (invalid) {\n this._markElementInvalid(labelEl);\n } else {\n this._markElementValid(labelEl);\n }\n }\n }\n }.bind(this));\n }\n\n /**\n * @param el\n * @private\n */\n _markElementInvalid(el) {\n el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n el.classList.add(this.options.inputErrorClass);\n }\n\n /**\n * @param el\n * @private\n */\n _markElementValid(el) {\n el.removeAttribute(DATA_ELEMENT_INVALID);\n el.classList.remove(this.options.inputErrorClass);\n }\n\n /**\n * A List of invalid elements (:invalid)\n * @returns {Array}\n * @private\n */\n _getInvalidElements() {\n return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n return !(r instanceof HTMLFieldSetElement);\n });\n }\n\n /**\n * @param {HTMLElement} thisParent\n * @private\n */\n _removeElementErrors(thisParent) {\n let errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass), inputsWithErrorClasses =\n thisParent.querySelectorAll(`[${DATA_ELEMENT_INVALID}]`);\n for (let elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n }\n for (let inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n let el = inputsWithErrorClasses[inputErrorIndex];\n this._markElementValid(el);\n }\n }\n\n\n /**\n * Registers a custom validator\n * @param {String} name\n * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n * we can't rely on that\n * @returns {Form}\n */\n registerValidator(name, validator) {\n this._validators[name] = validator;\n return this;\n }\n\n /**\n * Runs async validation\n * @param {String} validationRef\n * @param {HTMLElement} field\n * @returns {Promise}\n * @private\n */\n _runValidation(validationRef, field) {\n if (!this._validators[validationRef]) {\n throw 'Could not found validator: ' + validationRef;\n }\n var cl = field.classList, future = this._validators[validationRef].apply(this, [field, this.form]);\n cl.add(LOADING_CLASS);\n future.then(() => {\n cl.remove(LOADING_CLASS);\n });\n return future;\n }\n\n\n /**\n * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n *\n * @param {Array|NodeList} fields\n * @returns {Promise} contains either true if validations passed or false if something went wrong\n * @private\n */\n _customValidationsForElements(fields) {\n var futures = [], fieldsLength = fields.length, checkedFields = [];\n for (var iVal = 0; iVal < fieldsLength; iVal++) {\n var field = fields[iVal], validationRef = field.getAttribute(ATTR_VALIDATOR), validity = field.validity;\n if (this._validators[validationRef]) {\n // use local validation first and then continue with custom validations\n if (Form._shouldNotValidateField(field) || (validity && !validity.customError && !validity.valid)) {\n continue;\n }\n checkedFields.push(field);\n futures.push(this._runValidation(validationRef, field));\n } else {\n if (validationRef) {\n console.warn('data-validate was set but no validator was found');\n }\n }\n }\n return Promise.all(futures).then(function (allFutures) {\n let l = allFutures.length;\n let result = {\n checkedFields: checkedFields,\n foundAnyError: false\n };\n for (var fI = 0; fI < l; fI++) {\n if (!allFutures[fI]) {\n result.foundAnyError = true;\n break;\n }\n }\n return result;\n });\n }\n\n /**\n * Remove all errors for this form\n * @returns {Form}\n */\n removeErrors() {\n this._removeElementErrors(this.form);\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n return this;\n }\n\n /**\n * Will handle errors for given fields\n * @param {Array|NodeList} fields\n * @param {Boolean} removeAllErrors\n */\n prepareErrors(fields, removeAllErrors) {\n if (removeAllErrors) {\n this.removeErrors();\n }\n let labelGroups = {}, invalidFields = [];\n\n function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n let additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) ||\n field.id, group = thisLabelGroup[additionalLabels];\n if (additionalLabels) {\n // check additionally if field is currently marked as invalid\n // so the label is not marked as error if no field is marked as one\n group = group ? group : isInvalid;\n thisLabelGroup[additionalLabels] = group;\n }\n }\n\n // We save all validations in an extra property because we need to reset the validity due some\n // implementation errors in other browsers then chrome\n for (let i = 0; i < fields.length; i++) {\n let field = fields[i], errorTarget = Form._findErrorTarget(field), parent = errorTarget.parentNode,\n validity = field.validity, isInvalid = validity && !validity.valid;\n if (Form._shouldNotValidateField(field)) {\n continue;\n }\n field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n handleAdditionalLabels(isInvalid, labelGroups, field);\n if (isInvalid) {\n if (!removeAllErrors) {\n // Remove current errors:\n this._removeElementErrors(parent);\n }\n // setup custom error messages:\n this._setupErrorMessages(field, validity);\n let msg = field.validationMessage;\n\n // mark fields as invalid\n this._markElementInvalid(errorTarget);\n this._markElementInvalid(field);\n\n if (this.options.appendError) {\n parent.insertAdjacentHTML(\"beforeend\",\n `
${msg}
`);\n }\n invalidFields.push(field);\n field.flexFormsSavedValidationMessage = msg;\n } else {\n // restore invalid fields\n this._markElementValid(errorTarget);\n this._markElementValid(field);\n\n // cleanup\n delete field.flexFormsSavedValidationMessage;\n\n // remove error markup\n this._removeElementErrors(parent);\n }\n // We have to reset the custom validity here to allow native validations work again\n field.setCustomValidity('');\n }\n // if validates a single field we need to check the linked fields to a label:\n if (fields.length === 1) {\n let field = fields[0];\n let id = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id;\n if (id) {\n let linkedFields = Array.from(\n this.getForm().querySelectorAll(`[${ATTR_DATA_CUSTOM_LABEL}=\"${id}\"], #${id}`));\n linkedFields.forEach(function (thisField) {\n let validity = thisField.validity, isInvalid = validity && !validity.valid &&\n this._isElementInvalidElement(thisField);\n handleAdditionalLabels(isInvalid, labelGroups, thisField);\n }.bind(this));\n }\n }\n this._handleLabels(labelGroups);\n return invalidFields;\n }\n\n /**\n * Validates all custom fields\n * @returns {Promise}\n */\n validateCustomFields() {\n return this._customValidationsForElements(\n this.form.querySelectorAll(\"[data-validate]\"));\n }\n\n /**\n * Tests if a field should be validated\n * @param {HTMLElement} field\n * @returns {boolean}\n * @private\n */\n static _shouldNotValidateField(field) {\n var target = Form._findErrorTarget(field);\n return target instanceof HTMLFieldSetElement || field.validity === undefined ||\n (target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !Util.isVisible(target));\n }\n\n /**\n * Creates an array from a node list with invalid items\n * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n * @param list\n * @returns {Array}\n * @private\n */\n static _createArrayFromInvalidFieldList(list) {\n var arr = [];\n for (var i = 0; i < list.length; ++i) {\n var n = list[i];\n if (n.validity && !n.validity.valid) {\n if (!Form._shouldNotValidateField(n)) {\n arr.push(n);\n }\n }\n }\n return arr;\n }\n\n\n /**\n * This form\n * @returns {HTMLElement}\n */\n getForm() {\n return this.form;\n }\n\n /**\n * Registers a function that handles remote validation\n * @param {Function} func\n * @returns {Form}\n */\n registerRemoteValidation(func) {\n this._remoteValidationFunction = func;\n return this;\n }\n\n\n /**\n * Formats the error content for the tooltip\n * @param {String} error\n * @returns {String}\n * @private\n */\n _formatErrorTooltip(error) {\n return this.options.formatErrorTooltip.apply(this, [error]);\n }\n\n /**\n * Tries to find a custom error target on given target\n * @param target\n * @returns {HTMLElement}\n * @private\n */\n static _findErrorTarget(target) {\n var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n if (!foundTarget) {\n throw 'Given error target did not exsits:' + target;\n }\n return foundTarget;\n }\n\n /**\n * Creates a tooltip at given element, will only create a new instance if not created\n * @param {HTMLElement} target\n * @param {Boolean} [remove]\n */\n showAndOrCreateTooltip(target, remove) {\n var self = this;\n if (!this.tooltips && this.options.createTooltips) {\n this.tooltips = new Tooltip(this.options.tooltipContainer, this.options.tooltipOptions);\n }\n if (!this.options.createTooltips) {\n return false;\n }\n\n if (!target.flexFormsSavedValidity) {\n return false;\n }\n var errorTarget = Form._findErrorTarget(target);\n if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n self.tooltips.createTooltip(errorTarget,\n self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n return true;\n } else {\n if (remove) {\n self.tooltips.removeTooltip();\n }\n }\n return false;\n }\n\n /**\n * Checks if element is marked as invalid\n * @param {HTMLElement} el\n * @returns {boolean}\n * @private\n */\n _isElementInvalidElement(el) {\n return el.hasAttribute(DATA_ELEMENT_INVALID);\n }\n\n /**\n * Handles invalid event of a form\n * @param {Event} e\n * @returns {Promise|boolean}\n * @private\n */\n _checkIsInvalid(e) {\n e.preventDefault();\n var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n return this._handleValidation(invalidFields, true, false);\n }\n\n /**\n * Will query dependent fields (by selector) that should be validated with given field\n * @param field\n * @returns {NodeList|[]}\n * @private\n */\n _getDependentFields(field) {\n let fieldSelector = field.getAttribute(ATTR_DEPENDS), base = [field];\n if (fieldSelector) {\n base.push.apply(base, Array.prototype.slice.apply(\n this.getForm().querySelectorAll(fieldSelector)));\n }\n return base;\n }\n\n /**\n * @private\n * @param {HTMLElement} [target]\n */\n _handleTooltipInline(target) {\n if (this.tooltips) {\n this.tooltips.removeTooltip(target);\n }\n }\n\n /**\n * Initializes validation for a given form, registers event handlers\n */\n initFormValidation() {\n // Suppress the default bubbles\n var form = this.getForm(),\n self = this,\n invalidEvent = 'invalid';\n\n /**\n * Validates if is valid realtime element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidRealtimeElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n form.addEventListener(invalidEvent, function (e) {\n e.preventDefault();\n }, true);\n\n Util.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n self._formLoading();\n var result = self._checkIsInvalid(e);\n if (result) {\n self.currentValidationFuture = new Promise((resolve) => {\n result.then(function (r) {\n setTimeout(function () {\n Util.addEventOnce(invalidEvent, form, handleInvalid, true);\n }, 0);\n resolve(r);\n self._formStopLoading();\n if (!r.foundAnyError) {\n self._formLoading();\n self._handleSubmit(e);\n }\n });\n });\n }\n }, true);\n\n this.addEventListener(form, 'reset', () => {\n this.removeErrors();\n });\n\n // Timeout for keys:\n var TIMEOUT_KEYDOWN, KEYDOWN_RUNNING = false;\n\n // resets keydown events\n function clearKeyDownTimeout() {\n KEYDOWN_RUNNING = false;\n clearTimeout(TIMEOUT_KEYDOWN);\n }\n\n // setup custom realtime event if given\n if (self.options.realtime) {\n this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n if (self._formIsLoading()) {\n return;\n }\n var target = e.target;\n clearTimeout(TIMEOUT_KEYDOWN);\n if (KEYDOWN_RUNNING) {\n return;\n }\n TIMEOUT_KEYDOWN = setTimeout(() => {\n let isStillTarget = document.activeElement === e.target;\n if (!_checkIsValidRealtimeElement(target)) {\n return;\n }\n if (isStillTarget) {\n self._handleTooltipInline();\n }\n KEYDOWN_RUNNING = true;\n let dependentFields = self._getDependentFields(target);\n self._customValidationsForElements(dependentFields).then(function () {\n self.prepareErrors(dependentFields, false);\n if (isStillTarget) {\n self.showAndOrCreateTooltip(e.target);\n }\n // future must be resolved before another event can be started\n KEYDOWN_RUNNING = false;\n });\n }, self.options.realtimeTimeout);\n }, true);\n }\n\n /**\n * Validates if target is a valid input field to check blur and focus events\n *\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidBlurFocusElement(target) {\n let attr = target.getAttribute(\"type\");\n return (attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\");\n }\n\n /**\n * Validates if is valid inline-check element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidInlineCheckElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n this.addEventListener(form, 'blur', function (e) {\n // do not hide tooltip after change event\n if (!e.target.flexcssKeepTooltips) {\n self._handleTooltipInline(e.target);\n }\n delete e.target.flexcssKeepTooltips;\n }, true);\n\n // handle focus on input elements\n // will show an error if field is invalid\n this.addEventListener(form, \"focus\", function (e) {\n if (self._formIsLoading()) {\n return;\n }\n // do not track errors for checkbox and radios on focus:\n if (!_checkIsValidBlurFocusElement(e.target)) {\n return;\n }\n // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n // just have been hidden (on blur). Maybe fix this with a queue later\n setTimeout(function () {\n self.showAndOrCreateTooltip(e.target);\n }, FOCUS_TOOLTIP_DELAY);\n }, true);\n\n if (self.options.inlineValidation) {\n // Handle change for checkbox, radios and selects\n this.addEventListener(form, \"change\", function (e) {\n const target = e.target;\n if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n return;\n }\n clearKeyDownTimeout();\n const name = target.getAttribute('name');\n let inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n // we only support dependent fields for a single widgets right now\n if (inputs.length === 1) {\n inputs = self._getDependentFields(target);\n }\n self._customValidationsForElements(inputs).then(function () {\n self.prepareErrors(inputs, false);\n target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n if (target.flexcssKeepTooltips) {\n self._handleTooltipHideClickAfterChange();\n }\n });\n });\n }\n\n // prevent default if form is invalid\n this.addEventListener(form, \"submit\", function listener(e) {\n self._submitListener(e, listener);\n });\n\n Event.dispatchAndFire(form, EVENT_FORM_READY);\n }\n\n /* Loading states, unfortunately we can't check if a promise is pending :/*/\n /* TODO: Maybe wrap promise to extend this functionality */\n\n _formLoading() {\n this.getForm().classList.add(LOADING_CLASS);\n }\n\n _formStopLoading() {\n this.getForm().classList.remove(LOADING_CLASS);\n }\n\n _formIsLoading() {\n return this.getForm().classList.contains(LOADING_CLASS);\n }\n\n // this defines the logic after a change event when a tooltip is shown\n // because we call this method inside the change event, the click would be immeditally executed with the change\n // event when not using setTimeout(). There might be another solution for this...\n _handleTooltipHideClickAfterChange() {\n const self = this;\n if (this.options.createTooltips) {\n setTimeout(function () {\n Util.addEventOnce(Settings.getTabEvent(), global.document.body, function (t) {\n if (!self._isElementInvalidElement(t.target)) {\n self._handleTooltipInline();\n }\n });\n }, CLICK_TOOLTIP_DELAY);\n }\n }\n\n _focusElement(el) {\n el.focus();\n Util.scrollToElement(el, this.options.scrollToElementDiff);\n }\n\n /**\n * Listener that is executed on form submit\n * @param e\n * @param submitListener\n * @returns {boolean}\n * @private\n */\n _submitListener(e, submitListener) {\n\n const form = this.getForm(),\n self = this,\n submitEvent = 'submit';\n\n if (this._formIsLoading()) {\n e.preventDefault();\n return false;\n }\n this._formLoading();\n form.removeEventListener(submitEvent, submitListener);\n this.removeErrors();\n e.preventDefault();\n // reset:\n if (form.checkValidity()) {\n form.addEventListener(submitEvent, submitListener);\n // It's possible that the form is valid but the custom validations need to be checked again:\n self.currentValidationFuture = new Promise((resolve) => {\n var validation = self.validateCustomFields();\n validation.then(function (r) {\n // because custom validators may mark multiple fields as invalid, we get all of them in the form\n var fields = self._getInvalidElements(),\n errors = self.prepareErrors(fields, false), firstError = errors[0];\n if (firstError) {\n self._focusElement(firstError);\n self.showAndOrCreateTooltip(firstError, true);\n }\n resolve(r);\n });\n });\n self.currentValidationFuture.then(function (r) {\n if (!r.foundAnyError) {\n // Handle submitting the form to server:\n self._handleSubmit(e);\n } else {\n self._formStopLoading();\n }\n });\n } else {\n self._formStopLoading();\n form.addEventListener(submitEvent, submitListener);\n }\n }\n\n\n /**\n * Handles submitting, optionally allows to stop submitting\n * @param e\n * @private\n */\n _handleSubmit(e) {\n this._submitFunction(this.form, e);\n }\n\n\n /**\n * Registers a global event Handler\n * @param errorFunc\n */\n static registerErrorMessageHandler(errorFunc) {\n Form.globalErrorMessageHandler = errorFunc;\n }\n\n /**\n * Initialize forms for a specific selector\n * @param {String} selector\n * @param {Object} [options]\n * @return {array.}\n */\n static init(selector, options) {\n var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') :\n document.querySelectorAll(selector), instances = [];\n for (var i = 0; i < forms.length; i++) {\n instances.push(new Form(forms[i], options));\n }\n return instances;\n }\n\n\n /**\n * Registers a global validator that is usable on all form instances\n * @param {String} name\n * @param {Function} validator\n * @returns {Function}\n */\n static registerValidator(name, validator) {\n Form.globalValidators[name] = validator;\n return Form;\n }\n\n /**\n * Registers a global function that is called when a form should validate the response of a server\n * @param {Function} func\n * @returns {Form}\n */\n static registerGlobalRemoteValidationFunction(func) {\n Form.globalRemoteValidationFunction = func;\n return Form;\n }\n}\n\n\n/**\n * Global validators\n * @type {Array}\n */\nForm.globalValidators = [];\n\n/**\n * Global Remote validation function\n */\nForm.globalRemoteValidationFunction = function () {\n};\n\n/**\n * Handles custom error messages extracts custom message by default\n */\nForm.globalErrorMessageHandler = (field, validity) => {\n if (!validity.customError) {\n let customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n if (customMsg) {\n field.setCustomValidity(customMsg);\n }\n }\n};\n\nexport default Form;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Form.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Tooltip\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport DestroyableWidget from './DestroyableWidget';\nimport Settings from './util/Settings';\n\n/**\n * @type {string}\n */\nconst CLASS_NAMES_TOOLTIP = 'tooltip-container';\n/**\n * @type {string}\n */\nconst CLASS_NAMES_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_CLASSNAME = 'data-class';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\n/**\n * @type {HTMLDocument}\n */\nconst doc = global.document;\n\n/**\n * Simple Tooltip\n */\nclass Tooltip extends DestroyableWidget {\n\n /**\n * Creates a Tooltip\n * @param {HTMLElement|String} DelegateContainer\n * @param {Object} [options]\n */\n constructor(DelegateContainer, options) {\n super();\n /**\n * The Container where possible events are captured\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n if (!this.container) {\n throw new Error('Could not create Tooltip, DelegateContainer not found');\n }\n\n /**\n * The Container where tooltips are stored for this instance\n * @type {HTMLElement}\n */\n this.tooltipContainer = null;\n\n /**\n * Default Options\n */\n this.options = {\n containerClass: '',\n selectorAttribute: 'data-tooltip',\n collisionContainer: this.container\n };\n\n Object.assign(this.options, options || {});\n }\n\n /**\n * Creates and shows a tooltip\n * @param {HTMLElement} target where is this tooltip positioned\n * @param {String} text text content in tooltip, will be NOT escaped\n * @param {Boolean} [removeTitle] removes title element if given\n * @param {Node} [positionRelative]\n */\n createTooltip(target, text, removeTitle, positionRelative) {\n // abort if text is empty\n if (!text || text && text.trim() === '') {\n return;\n }\n\n if (Settings.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n return;\n }\n\n let tooltipContainer = this.tooltipContainer;\n\n if (!tooltipContainer) {\n tooltipContainer = doc.createElement('div');\n this.container.appendChild(tooltipContainer);\n this.tooltipContainer = tooltipContainer;\n }\n this._restoreClassNames(tooltipContainer, target);\n\n tooltipContainer.style.left = 'auto';\n tooltipContainer.style.top = 'auto';\n tooltipContainer.innerHTML = text;\n tooltipContainer.flexTooltipCurrentTarget = target;\n if (removeTitle) {\n target.oldTitle = text;\n target.removeAttribute('title');\n }\n\n Util.setupPositionNearby(positionRelative || target, tooltipContainer,\n this.options.collisionContainer, true, true);\n\n tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n }\n\n _restoreClassNames(container, target) {\n // allow additional classname per tooltip on target element\n const classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n const maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n if (maybeTargetClass) {\n classNames.push(maybeTargetClass);\n }\n container.className = classNames.join(\" \");\n return this;\n }\n\n /**\n * @returns {HTMLElement|null}\n */\n getCurrentTarget() {\n return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n }\n\n /**\n * Destroys this Widget\n * @returns {boolean}\n */\n destroy() {\n super.destroy();\n\n if (this.tooltipContainer) {\n this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n return true;\n }\n return false;\n }\n\n /**\n * Removes a Tooltip on given target\n * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n */\n removeTooltip(target) {\n let selfTarget = target;\n if (!selfTarget && this.tooltipContainer) {\n selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (this.tooltipContainer) {\n if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n return;\n }\n this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n delete this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (selfTarget && selfTarget.oldTitle) {\n selfTarget.setAttribute('title', selfTarget.oldTitle);\n }\n }\n\n /**\n * Initilizes mouse events on container element\n */\n registerEvents() {\n const self = this;\n this.addEventListener(this.container, 'mouseover', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.createTooltip(e.target, e.target.getAttribute('title'), true);\n }\n });\n\n this.addEventListener(this.container, 'mouseout', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.removeTooltip(e.target);\n }\n });\n return this;\n }\n}\n\nexport default Tooltip;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Tooltip.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Provides a Basic Widget\n */\nclass DestroyableWidget {\n\n constructor() {\n this.listeners = [];\n }\n\n /**\n * Destroys a Widget\n */\n destroy() {\n this.listeners.forEach((listener) => {\n listener.element.removeEventListener.apply(listener.element, listener.args);\n });\n this.listeners = [];\n }\n\n /**\n * Adds an event and registers it later to remove bindings\n * @param {HTMLElement} element\n * @param {String} name\n * @param {Function} listener\n * @param {boolean} [capture]\n * @returns {Function}\n */\n addEventListener(element, name, listener, capture) {\n this.listeners.push({\n element,\n args: [name, listener, capture]\n });\n\n element.addEventListener(name, listener, capture);\n return listener;\n }\n\n}\n\nexport default DestroyableWidget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/DestroyableWidget.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","// the whatwg-fetch polyfill installs the fetch() function\n// on the global object (window or self)\n//\n// Return that as the export for use in Webpack, Browserify etc.\nrequire('whatwg-fetch');\nmodule.exports = self.fetch.bind(self);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/isomorphic-fetch/fetch-npm-browserify.js\n ** module id = 12\n ** module chunks = 2 3\n **/","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var list = this.map[name]\n if (!list) {\n list = []\n this.map[name] = list\n }\n list.push(value)\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n var values = this.map[normalizeName(name)]\n return values ? values[0] : null\n }\n\n Headers.prototype.getAll = function(name) {\n return this.map[normalizeName(name)] || []\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = [normalizeValue(value)]\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n Object.getOwnPropertyNames(this.map).forEach(function(name) {\n this.map[name].forEach(function(value) {\n callback.call(thisArg, value, name, this)\n }, this)\n }, this)\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n reader.readAsArrayBuffer(blob)\n return fileReaderReady(reader)\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n reader.readAsText(blob)\n return fileReaderReady(reader)\n }\n\n var support = {\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob();\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n function Body() {\n this.bodyUsed = false\n\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (!body) {\n this._bodyText = ''\n } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n // Only support ArrayBuffers for POST method.\n // Receiving ArrayBuffers happens via Blobs, instead.\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n } else {\n this.text = function() {\n var rejected = consumed(this)\n return rejected ? rejected : Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n if (Request.prototype.isPrototypeOf(input)) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = input\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this)\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function headers(xhr) {\n var head = new Headers()\n var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n pairs.forEach(function(header) {\n var split = header.trim().split(':')\n var key = split.shift().trim()\n var value = split.join(':').trim()\n head.append(key, value)\n })\n return head\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText\n this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request\n if (Request.prototype.isPrototypeOf(input) && !init) {\n request = input\n } else {\n request = new Request(input, init)\n }\n\n var xhr = new XMLHttpRequest()\n\n function responseURL() {\n if ('responseURL' in xhr) {\n return xhr.responseURL\n }\n\n // Avoid security warnings on getResponseHeader when not allowed by CORS\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL')\n }\n\n return;\n }\n\n xhr.onload = function() {\n var status = (xhr.status === 1223) ? 204 : xhr.status\n if (status < 100 || status > 599) {\n reject(new TypeError('Network request failed'))\n return\n }\n var options = {\n status: status,\n statusText: xhr.statusText,\n headers: headers(xhr),\n url: responseURL()\n }\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/whatwg-fetch/fetch.js\n ** module id = 13\n ** module chunks = 2 3\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","import Form from '../Form';\nimport Tooltip from '../Tooltip';\nimport Settings from '../util/Settings';\n\n// default export as component object\nexport default {\n Form,\n Settings,\n Tooltip\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/Form.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/build/maps/form.min.map b/build/maps/form.min.map index aa4d61f0..ca070874 100644 --- a/build/maps/form.min.map +++ b/build/maps/form.min.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6","webpack:///js/form.min.js","webpack:///webpack/bootstrap 13012788ed6358b638c7?e357","webpack:///./src/main/util/Util.js?5bc4","webpack:///./src/main/util/Settings.js?b01f","webpack:///./src/main/util/Event.js?68bf","webpack:///./src/main/DestroyableWidget.js?8d9b","webpack:///./src/main/Tooltip.js?3890","webpack:///./src/main/Form.js?18a8","webpack:///./~/isomorphic-fetch/fetch-npm-browserify.js?7723","webpack:///./~/whatwg-fetch/fetch.js?1c20","webpack:///./src/main/modules/Form.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","global","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","PFX","COL_LEFT_CLASS","COL_RIGHT_CLASS","COL_BOTTOM_CLASS","Util","element","type","callback","thisFunction","e","apply","thisType","toLowerCase","name","addEventListener","t","el","document","createElement","transitions","transition","OTransition","MozTransition","WebkitTransition","undefined","style","parent","now","parentNode","func","s4","Math","floor","random","toString","substring","doc","inner","width","height","outer","position","top","left","visibility","overflow","appendChild","body","w1","offsetWidth","w2","clientWidth","removeChild","ev","capture","event","removeEventListener","offsetHeight","str","replace","g","toUpperCase","input","JSON","parse","stringify","base","attrs","attributes","attr","s","dashToCamelCase","nodeName","val","nodeValue","hasOwnProperty","parseInt","elementToPosition","collisionContainer","centerHorizontal","positionTop","amountTop","amountLeft","parentsUntil","HTMLElement","window","getComputedStyle","isPartOfNode","offsetTop","offsetLeft","targetPosition","getBoundingClientRect","elementRect","colRect","targetTop","targetRight","right","isCollisionTop","isCollisionBottom","innerHeight","isCollisionLeft","targetLeft","isCollisionRight","classList","remove","calcTop","calcLeft","add","rightPosition","leftCentered","collisionCentered","cssText","optionalOffset","scrollIntoView","thisOffset","scrolledY","pageYOffset","scroll","_interopRequireDefault","obj","__esModule","default","_Util","_Util2","FLEXCSS_GLOBAL_SETTINGS","smallBreakpoint","scrollbarUpdateNodes","darkenerFadeDelay","canvasToggledClass","FLEXCSS_CONST_IS_IOS","FLEXCSS_CONST_IS_TOUCH","FLEXCSS_CONST_IS_IE","FLEXCSS_CONST_TAB_EVENT","FLEXCSS_IS_SMALL_SCREEN","init","FLEXCSS_CONST_SCROLLBAR_WIDTH","getScrollBarWidth","FLEXCSS_CONST_TRANSITION_EVENT","whichTransitionEndEvent","readyState","Settings","settings","assign","navigator","userAgent","match","innerWidth","get","msMaxTouchPoints","CustomEvent","_CustomEvent","params","thisParams","bubbles","cancelable","detail","evt","createEvent","initCustomEvent","Event","EventHandler","defaultOptions","options","withDetail","originalEvent","o","dispatchEvent","withOptions","fire","DestroyableWidget","listeners","forEach","listener","args","push","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","create","constructor","setPrototypeOf","__proto__","_get","object","property","receiver","Function","desc","getOwnPropertyDescriptor","getPrototypeOf","getter","_DestroyableWidget2","_DestroyableWidget3","_Settings","_Settings2","CLASS_NAMES_TOOLTIP","CLASS_NAMES_OPEN","ATTR_DATA_CLASSNAME","ATTR_DATA_NO_TOUCH","Tooltip","_DestroyableWidget","DelegateContainer","_this","container","getElementById","Error","tooltipContainer","containerClass","selectorAttribute","text","removeTitle","positionRelative","trim","isTouchDevice","hasAttribute","_restoreClassNames","innerHTML","flexTooltipCurrentTarget","oldTitle","removeAttribute","setupPositionNearby","classNames","maybeTargetClass","getAttribute","className","join","selfTarget","setAttribute","createTooltip","removeTooltip","EVENT_FORM_AJAX_COMPLETED","EVENT_FORM_AFTER_AJAX_SUBMIT","EVENT_FORM_SUBMIT","EVENT_FORM_READY","_Tooltip","_Tooltip2","_Event","_Event2","LOADING_CLASS","DATA_ELEMENT_INVALID","REMOTE","REMOTE_ACTION","ATTR_DISABLE_INLINE","ATTR_DISABLE_REALTIME","ATTR_VALIDATOR","ATTR_DATA_CUSTOM_MESSAGE","ATTR_DATA_CUSTOM_LABEL","ATTR_VALIDATE_VISIBILITY","ATTR_ERROR_TARGET_ID","ATTR_DEPENDS","CONST_USE_JSON","CONST_REALTIME_EVENT","FOCUS_TOOLTIP_DELAY","CLICK_TOOLTIP_DELAY","Form","form","HTMLFormElement","tooltips","currentValidationFuture","Promise","createTooltips","appendError","ajaxSubmitType","ajaxJsonContentType","inlineValidation","realtime","realtimeTimeout","formatErrorTooltip","error","inputErrorClass","containerErrorClass","fetchOptions","credentials","tooltipOptions","scrollToElementDiff","applyOptionsFromElement","hfWidgetInstance","_validators","globalValidators","_remoteValidationFunction","initFormValidation","destroy","thisForm","shouldUseAjax","ajaxPostUrl","location","href","useJson","dispatch","withOriginal","defaultPrevented","_formStopLoading","submit","preventDefault","defaultHeaders","X-Requested-With","Content-Type","headers","method","serverCall","fetch","serialize","FormData","then","r","globalRemoteValidationFunction","response","selectors","inputs","querySelectorAll","result","Array","exists","field","focus","_this2","fields","NodeList","_handleValidation","foundAnyError","bind","toValidateFields","scoped","arr","_createArrayFromInvalidFieldList","isLocalInvalid","_focusElement","validation","_customValidationsForElements","validateCustomFields","thisToValidateFields","from","concat","checkedFields","foundInvalidFields","prepareErrors","firstInvalidField","activeElement","_handleTooltipHideClickAfterChange","showAndOrCreateTooltip","validity","globalErrorMessageHandler","keys","labels","getForm","invalid","labelsIndex","labelEl","_markElementInvalid","_markElementValid","filter","HTMLFieldSetElement","thisParent","errors","inputsWithErrorClasses","elementErrorIndex","inputErrorIndex","validator","validationRef","cl","future","futures","fieldsLength","iVal","_shouldNotValidateField","customError","valid","_runValidation","console","warn","all","allFutures","l","fI","_removeElementErrors","removeAllErrors","handleAdditionalLabels","isInvalid","thisLabelGroup","additionalLabels","group","removeErrors","labelGroups","invalidFields","errorTarget","_findErrorTarget","flexFormsSavedValidity","_setupErrorMessages","msg","validationMessage","insertAdjacentHTML","flexFormsSavedValidationMessage","setCustomValidity","_field","linkedFields","thisField","_isElementInvalidElement","_handleLabels","_formatErrorTooltip","fieldSelector","slice","_checkIsValidRealtimeElement","clearKeyDownTimeout","KEYDOWN_RUNNING","clearTimeout","TIMEOUT_KEYDOWN","_checkIsValidBlurFocusElement","_checkIsValidInlineCheckElement","_this3","invalidEvent","addEventOnce","handleInvalid","_formLoading","_checkIsInvalid","resolve","setTimeout","_handleSubmit","_formIsLoading","isStillTarget","_handleTooltipInline","dependentFields","_getDependentFields","flexcssKeepTooltips","_submitListener","dispatchAndFire","contains","getTabEvent","scrollToElement","submitListener","submitEvent","checkValidity","_getInvalidElements","firstError","_submitFunction","isVisible","list","n","foundTarget","errorFunc","selector","forms","instances","customMsg","normalizeName","String","test","normalizeValue","Headers","map","append","getOwnPropertyNames","consumed","bodyUsed","reject","fileReaderReady","reader","onload","onerror","readBlobAsArrayBuffer","blob","FileReader","readAsArrayBuffer","readBlobAsText","readAsText","Body","_initBody","_bodyInit","_bodyText","support","Blob","isPrototypeOf","_bodyBlob","formData","_bodyFormData","arrayBuffer","ArrayBuffer","set","rejected","decode","json","normalizeMethod","upcased","methods","indexOf","Request","url","mode","referrer","split","bytes","shift","decodeURIComponent","xhr","head","pairs","getAllResponseHeaders","header","Response","bodyInit","status","ok","statusText","values","getAll","has","thisArg","clone","redirectStatuses","redirect","RangeError","responseURL","getResponseHeader","request","XMLHttpRequest","responseText","open","withCredentials","responseType","setRequestHeader","send","polyfill","_Form","_Form2"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,MAGAR,EAAA,KDgBM,SAASL,EAAQD,EAASM,GAE/BL,EAAOD,QAAUM,EAAo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eArB,GAAApC,OAAA,WACA,GAAA2C,GAAA,OAAAP,EAAAO,OAAA,IAAAP,EAAAO,MACA,QAAAA,KAAA,IAEA,WADA9C,GAAA,GAAA1d,WAAA,0BAGA,IAAAoL,IACAoV,SACAE,WAAAT,EAAAS,WACA5M,UAAAmM,GACAP,IAAAyB,KAEAld,EAAA,YAAAgc,KAAA1L,SAAA0L,EAAAsB,YACApG,GAAA,GAAAmF,GAAArc,EAAAmH,KAGA6U,EAAAnC,QAAA,WACAJ,EAAA,GAAA1d,WAAA,4BAGAigB,EAAAuB,KAAAH,EAAAtN,OAAAsN,EAAA3B,KAAA,GAEA,YAAA2B,EAAAhP,cACA4N,EAAAwB,iBAAA,GAGA,gBAAAxB,IAAAxB,EAAAT,OACAiC,EAAAyB,aAAA;AAGAL,EAAAvN,QAAAjI,QAAA,SAAA1L,EAAA4B,GACAke,EAAA0B,iBAAA5f,EAAA5B,KAGA8f,EAAA2B,KAAA,mBAAAP,GAAA9C,UAAA,KAAA8C,EAAA9C,cAGArS,EAAA+H,MAAA4N,UAAA,IACC,mBAAA3V,WAAAjN,OT68EO,CACA,CACA,CACA,CACA,CAEF,SAASH,EAAQD,EAASM,GAE/B,YAkBA,SAASqJ,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,UAASF,GAhBvFxI,OAAOC,eAAerB,EAAS,cAC3BsB,OAAO,GAGX,IAAI2hB,GAAQ3iB,EAAoB,GAE5B4iB,EAASvZ,EAAuBsZ,GAEhC/R,EAAW5Q,EAAoB,GAE/B6Q,EAAYxH,EAAuBuH,GAEnCzC,EAAYnO,EAAoB,GAEhCoO,EAAa/E,EAAuB8E,EAKxCzO,eUx2FGsS,KAAA4Q,aACAjY,SAAAyD,aACAK,QAAAoC","file":"js/form.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"../\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(18);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\tvar PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\t\n\tvar COL_LEFT_CLASS = 'is-collision-left';\n\t\n\tvar COL_RIGHT_CLASS = 'is-collision-right';\n\t\n\tvar COL_BOTTOM_CLASS = 'is-collision-bottom';\n\t\n\t/**\n\t * Provides shared DOM-Utility functions\n\t */\n\t\n\tvar Util = function () {\n\t function Util() {\n\t _classCallCheck(this, Util);\n\t }\n\t\n\t _createClass(Util, null, [{\n\t key: \"prefixedAnimateEvent\",\n\t\n\t\n\t /**\n\t * Will register the right animation event based on browser\n\t * @param element\n\t * @param type\n\t * @param callback\n\t */\n\t value: function prefixedAnimateEvent(element, type, callback) {\n\t var thisFunction = function thisFunction(e) {\n\t callback.apply(element, [e, thisFunction]);\n\t };\n\t\n\t for (var p = 0; p < PFX.length; p++) {\n\t var thisType = type;\n\t if (!PFX[p]) {\n\t thisType = type.toLowerCase();\n\t }\n\t var name = PFX[p] + thisType;\n\t element.addEventListener(name, thisFunction, true);\n\t }\n\t }\n\t\n\t /**\n\t * Get correct transitionend event\n\t * @returns {String}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"whichTransitionEndEvent\",\n\t value: function whichTransitionEndEvent() {\n\t var t = void 0;\n\t var el = document.createElement('fake');\n\t\n\t var transitions = {\n\t transition: 'transitionend',\n\t OTransition: 'oTransitionEnd',\n\t MozTransition: 'transitionend',\n\t WebkitTransition: 'webkitTransitionEnd'\n\t };\n\t\n\t for (t in transitions) {\n\t if (el.style[t] !== undefined) {\n\t return transitions[t];\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Check if target is part of parent node\n\t * @param target\n\t * @param parent\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: \"isPartOfNode\",\n\t value: function isPartOfNode(target, parent) {\n\t if (!target || !parent) {\n\t return false;\n\t }\n\t var now = target;\n\t while (now !== parent && now !== null) {\n\t if (now === parent) {\n\t break;\n\t }\n\t now = now.parentNode;\n\t }\n\t return now !== null;\n\t }\n\t\n\t /**\n\t * Finds the closest element including itself matching a callback\n\t * @param {Node} el\n\t * @param {Function} callback\n\t * @returns {Node|boolean}\n\t */\n\t\n\t }, {\n\t key: \"closestCallback\",\n\t value: function closestCallback(el, callback) {\n\t var element = el;\n\t while (element !== null) {\n\t if (callback(element)) {\n\t return element;\n\t }\n\t element = element.parentNode;\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Walks the tree until func returns true for given argument\n\t * @param target\n\t * @param func\n\t * @returns {boolean|HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"parentsUntil\",\n\t value: function parentsUntil(target, func) {\n\t if (!target) {\n\t return false;\n\t }\n\t var now = target;\n\t while (!func(now) && now !== null) {\n\t now = now.parentNode;\n\t }\n\t\n\t return now;\n\t }\n\t\n\t /**\n\t * Generates a unique id\n\t * @return {String}\n\t */\n\t\n\t }, {\n\t key: \"guid\",\n\t value: function guid() {\n\t function s4() {\n\t return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n\t }\n\t\n\t return s4() + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + (s4() + s4() + s4());\n\t }\n\t\n\t /**\n\t * Detects scrollbar width\n\t * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n\t * @returns {number}\n\t */\n\t\n\t }, {\n\t key: \"getScrollBarWidth\",\n\t value: function getScrollBarWidth() {\n\t var doc = global.document;\n\t var inner = doc.createElement('p');\n\t\n\t inner.style.width = \"100%\";\n\t inner.style.height = \"200px\";\n\t\n\t var outer = doc.createElement('div');\n\t outer.style.position = \"absolute\";\n\t outer.style.top = \"0px\";\n\t outer.style.left = \"0px\";\n\t outer.style.visibility = \"hidden\";\n\t outer.style.width = \"200px\";\n\t outer.style.height = \"150px\";\n\t outer.style.overflow = \"hidden\";\n\t outer.appendChild(inner);\n\t\n\t doc.body.appendChild(outer);\n\t var w1 = inner.offsetWidth;\n\t outer.style.overflow = 'scroll';\n\t var w2 = inner.offsetWidth;\n\t if (w1 === w2) {\n\t w2 = outer.clientWidth;\n\t }\n\t doc.body.removeChild(outer);\n\t\n\t return w1 - w2;\n\t }\n\t\n\t /**\n\t * Run an event once\n\t * @param {String} ev\n\t * @param {HTMLElement|HTMLDocument} target\n\t * @param {Function} func\n\t * @param {boolean} [capture]\n\t * @return Function created listener\n\t */\n\t\n\t }, {\n\t key: \"addEventOnce\",\n\t value: function addEventOnce(ev, target, func, capture) {\n\t var thisFunction = function thisFunction(event) {\n\t func(event, func);\n\t target.removeEventListener(ev, thisFunction, capture);\n\t };\n\t target.addEventListener(ev, thisFunction, capture);\n\t return thisFunction;\n\t }\n\t\n\t /**\n\t * Checks if an element is visible\n\t * @param {HTMLElement} element\n\t * @returns bool\n\t */\n\t\n\t }, {\n\t key: \"isVisible\",\n\t value: function isVisible(element) {\n\t return element.offsetWidth > 0 && element.offsetHeight > 0;\n\t }\n\t\n\t /**\n\t * Creates a camelCaseRepresentation of a dashed string\n\t * @param {String} str\n\t * @returns String\n\t */\n\t\n\t }, {\n\t key: \"dashToCamelCase\",\n\t value: function dashToCamelCase(str) {\n\t return str.replace(/-([a-z])/g, function (g) {\n\t return g[1].toUpperCase();\n\t });\n\t }\n\t\n\t /**\n\t * Creates a copy of `input`\n\t * @param {*} input\n\t * @return *\n\t */\n\t\n\t }, {\n\t key: \"copy\",\n\t value: function copy(input) {\n\t return JSON.parse(JSON.stringify(input));\n\t }\n\t\n\t /**\n\t * Reads options from element (data attributes) and applies to base\n\t * @param {HTMLElement} element\n\t * @param {Object} base\n\t * @return {Object}\n\t */\n\t\n\t }, {\n\t key: \"applyOptionsFromElement\",\n\t value: function applyOptionsFromElement(element, base) {\n\t if (!element) {\n\t return base;\n\t }\n\t var attrs = element.attributes;\n\t for (var i = 0; i < attrs.length; i++) {\n\t var attr = attrs[i];\n\t if (attr) {\n\t var s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n\t var val = attr.nodeValue;\n\t if (base.hasOwnProperty(s)) {\n\t // skip functions\n\t if (typeof base[s] === 'function') {\n\t continue;\n\t }\n\t if (typeof base[s] === 'boolean') {\n\t base[s] = parseInt(val || 1, 10) === 1;\n\t } else {\n\t base[s] = val;\n\t }\n\t }\n\t }\n\t }\n\t return base;\n\t }\n\t\n\t /**\n\t * Will position an element directly at given target\n\t * Is aware of a given collision container to detect edges\n\t * Will put elementToPosition either to left, center or right edge (prefer right)\n\t * and either to bottom or top (prefers bottom)\n\t *\n\t * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n\t *\n\t * @param {HTMLElement|ClientRect} target the target container to align to\n\t * @param {HTMLElement} elementToPosition the element to position\n\t * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n\t * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n\t * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"setupPositionNearby\",\n\t value: function setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n\t // determine relative offsets\n\t var amountTop = 0;\n\t var amountLeft = 0;\n\t Util.parentsUntil(target.parentNode, function (el) {\n\t if (!(el instanceof HTMLElement)) {\n\t return false;\n\t }\n\t var style = window.getComputedStyle(el);\n\t if (Util.isPartOfNode(elementToPosition, el)) {\n\t if (style && style.position === 'relative') {\n\t amountTop += el.offsetTop || 0;\n\t amountLeft += el.offsetLeft || 0;\n\t }\n\t return false;\n\t }\n\t return true;\n\t });\n\t\n\t var targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n\t var elementRect = elementToPosition.getBoundingClientRect();\n\t var colRect = collisionContainer.getBoundingClientRect();\n\t var targetTop = targetPosition.top - amountTop;\n\t var targetRight = targetPosition.right;\n\t var isCollisionTop = targetTop - elementRect.height <= 0;\n\t var isCollisionBottom = window.innerHeight < targetTop + amountTop + targetPosition.height + elementRect.height;\n\t var isCollisionLeft = targetRight < elementRect.width;\n\t var targetLeft = targetPosition.left;\n\t var isCollisionRight = targetLeft + elementRect.width > colRect.width;\n\t var classList = elementToPosition.classList;\n\t\n\t classList.remove(COL_RIGHT_CLASS);\n\t classList.remove(COL_LEFT_CLASS);\n\t classList.remove(COL_BOTTOM_CLASS);\n\t\n\t var calcTop = void 0;\n\t var calcLeft = void 0;\n\t if (isCollisionLeft && !isCollisionRight) {\n\t // put element to left if collision with left\n\t calcLeft = targetPosition.left - colRect.left - amountLeft + \"px\";\n\t classList.add(COL_LEFT_CLASS);\n\t } else {\n\t // maybe center if no collision with either side\n\t var rightPosition = targetRight - elementRect.width - colRect.left - amountLeft + \"px\";\n\t var leftCentered = (targetLeft + targetPosition.width / 2 - elementRect.width / 2 || 0) - colRect.left;\n\t var collisionCentered = leftCentered + elementRect.width > colRect.width;\n\t if (centerHorizontal && !collisionCentered) {\n\t calcLeft = leftCentered + \"px\";\n\t } else {\n\t classList.add(COL_RIGHT_CLASS);\n\t calcLeft = rightPosition;\n\t }\n\t }\n\t\n\t if (isCollisionBottom || positionTop && !isCollisionTop) {\n\t // Put Element on top if collision\n\t calcTop = targetTop - elementRect.height - colRect.top + \"px\";\n\t classList.add(COL_BOTTOM_CLASS);\n\t } else {\n\t calcTop = targetTop + targetPosition.height - colRect.top + \"px\";\n\t }\n\t\n\t elementToPosition.style.cssText = \"top:\" + calcTop + \";left:\" + calcLeft + \";\";\n\t\n\t return elementToPosition;\n\t }\n\t\n\t /**\n\t * Brings a given element into viewport\n\t * @param {HTMLElement} el\n\t * @param {int|function}[optionalOffset]\n\t */\n\t\n\t }, {\n\t key: \"scrollToElement\",\n\t value: function scrollToElement(el, optionalOffset) {\n\t el.scrollIntoView();\n\t var thisOffset = optionalOffset;\n\t // optionally use a additional scrollDif\n\t if (thisOffset) {\n\t if (typeof thisOffset === 'function') {\n\t thisOffset = optionalOffset();\n\t }\n\t if (thisOffset > 0) {\n\t var scrolledY = window.pageYOffset;\n\t if (scrolledY) {\n\t window.scroll(0, scrolledY - thisOffset);\n\t }\n\t }\n\t }\n\t }\n\t }]);\n\t\n\t return Util;\n\t}();\n\t\n\texports.default = Util;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t// we attach global settings to global once because settings might be shared a lot of times trough the application\n\t// Maybe find a better way to handle that scenario\n\tif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n\t (function () {\n\t global.FLEXCSS_GLOBAL_SETTINGS = {\n\t // defined breakpoint for small devices < n\n\t smallBreakpoint: 768,\n\t // nodes that should be updated when no scrollbar is expected\n\t scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n\t // additional Delay until darkener is fully hidden\n\t darkenerFadeDelay: 100,\n\t // class that is added if canvas has been toggled\n\t canvasToggledClass: 'toggled-canvas'\n\t };\n\t\n\t global.FLEXCSS_CONST_IS_IOS = null;\n\t\n\t global.FLEXCSS_CONST_IS_TOUCH = null;\n\t\n\t global.FLEXCSS_CONST_IS_IE = null;\n\t\n\t global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\t\n\t global.FLEXCSS_IS_SMALL_SCREEN = false;\n\t\n\t var init = function init() {\n\t // Measure scrollbar width\n\t global.FLEXCSS_CONST_SCROLLBAR_WIDTH = _Util2.default.getScrollBarWidth();\n\t // detect right transition end event\n\t global.FLEXCSS_CONST_TRANSITION_EVENT = _Util2.default.whichTransitionEndEvent();\n\t };\n\t\n\t if (global.document.readyState !== 'loading') {\n\t init();\n\t } else {\n\t // it's possible that global.document.body is not available if the document is not\n\t // loaded completely\n\t document.addEventListener('DOMContentLoaded', function () {\n\t init();\n\t });\n\t }\n\t })();\n\t}\n\t\n\t/**\n\t * Utility class that setups global settings\n\t */\n\t\n\tvar Settings = function () {\n\t function Settings() {\n\t _classCallCheck(this, Settings);\n\t }\n\t\n\t _createClass(Settings, null, [{\n\t key: 'setup',\n\t\n\t\n\t /**\n\t * Setup global settings, overwrite default values\n\t * @param {Object} settings\n\t */\n\t value: function setup(settings) {\n\t Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n\t }\n\t\n\t /**\n\t * Access to global settings\n\t * @returns {Object}\n\t */\n\t\n\t }, {\n\t key: 'get',\n\t value: function get() {\n\t return global.FLEXCSS_GLOBAL_SETTINGS;\n\t }\n\t\n\t /**\n\t * Detects a IOS Device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isIosDevice',\n\t value: function isIosDevice() {\n\t if (!global.FLEXCSS_CONST_IS_IOS) {\n\t global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n\t }\n\t\n\t return global.FLEXCSS_CONST_IS_IOS;\n\t }\n\t\n\t /**\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isSmallScreen',\n\t value: function isSmallScreen() {\n\t return window.innerWidth < Settings.get().smallBreakpoint;\n\t }\n\t\n\t /**\n\t * Detects a touch device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isTouchDevice',\n\t value: function isTouchDevice() {\n\t if (!global.FLEXCSS_CONST_IS_TOUCH) {\n\t global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!global.navigator.msMaxTouchPoints;\n\t }\n\t return global.FLEXCSS_CONST_IS_TOUCH;\n\t }\n\t\n\t /**\n\t * Checks if current browser is Internet Explorer\n\t * @returns {boolean|*}\n\t */\n\t\n\t }, {\n\t key: 'isIE',\n\t value: function isIE() {\n\t if (!global.FLEXCSS_CONST_IS_IE) {\n\t global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n\t }\n\t return global.FLEXCSS_CONST_IS_IE;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTransitionEvent',\n\t value: function getTransitionEvent() {\n\t return global.FLEXCSS_CONST_TRANSITION_EVENT;\n\t }\n\t\n\t /**\n\t * @returns {int}\n\t */\n\t\n\t }, {\n\t key: 'getScrollbarWidth',\n\t value: function getScrollbarWidth() {\n\t return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTabEvent',\n\t value: function getTabEvent() {\n\t return global.FLEXCSS_CONST_TAB_EVENT;\n\t }\n\t }]);\n\t\n\t return Settings;\n\t}();\n\t\n\texports.default = Settings;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/* global CustomEvent */\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t// polyfill for custom events to make thinks work in IE\n\t// The needed polyfill is so small that I embedded it here\n\t(function poly() {\n\t if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n\t var _CustomEvent = function CustomEvent(event, params) {\n\t var thisParams = params || {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: undefined\n\t };\n\t var evt = document.createEvent(\"CustomEvent\");\n\t evt.initCustomEvent(event, thisParams.bubbles, thisParams.cancelable, thisParams.detail);\n\t return evt;\n\t };\n\t _CustomEvent.prototype = global.Event.prototype;\n\t global.CustomEvent = _CustomEvent;\n\t }\n\t})();\n\t/**\n\t * Simpler Event dispatching\n\t */\n\t\n\tvar EventHandler = function () {\n\t\n\t /**\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t */\n\t\n\t function EventHandler(target, name) {\n\t _classCallCheck(this, EventHandler);\n\t\n\t this.target = target;\n\t this.defaultOptions = {\n\t bubbles: true,\n\t cancelable: true\n\t };\n\t\n\t this.name = name;\n\t }\n\t\n\t /**\n\t * Set more options\n\t * @param {Object} options\n\t * @returns {EventHandler}\n\t */\n\t\n\t\n\t _createClass(EventHandler, [{\n\t key: \"withOptions\",\n\t value: function withOptions(options) {\n\t Object.assign(this.defaultOptions, options || {});\n\t return this;\n\t }\n\t\n\t /**\n\t * Call with the originalEvent\n\t * @param {Event} e\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withOriginal\",\n\t value: function withOriginal(e) {\n\t return this.withDetail({\n\t originalEvent: e\n\t });\n\t }\n\t\n\t /**\n\t * Extends the detail part of the event\n\t * @param {Object} o\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withDetail\",\n\t value: function withDetail(o) {\n\t if (!this.defaultOptions.detail) {\n\t this.defaultOptions.detail = {};\n\t }\n\t Object.assign(this.defaultOptions.detail, o);\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"fire\",\n\t value: function fire() {\n\t var e = new CustomEvent(this.name, this.defaultOptions);\n\t if (this.target) {\n\t this.target.dispatchEvent(e);\n\t }\n\t return e;\n\t }\n\t }]);\n\t\n\t return EventHandler;\n\t}();\n\t\n\tvar Event = function () {\n\t function Event() {\n\t _classCallCheck(this, Event);\n\t }\n\t\n\t _createClass(Event, null, [{\n\t key: \"dispatch\",\n\t\n\t /**\n\t * Prepares to dispatch a custom event (without firing)\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @returns {EventHandler}\n\t */\n\t value: function dispatch(target, name) {\n\t return new EventHandler(target, name);\n\t }\n\t\n\t /**\n\t * Dispatches a custom event and fires it directly\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @param {Object} [options]\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"dispatchAndFire\",\n\t value: function dispatchAndFire(target, name, options) {\n\t return new EventHandler(target, name).withOptions(options).fire();\n\t }\n\t }]);\n\t\n\t return Event;\n\t}();\n\t\n\texports.default = Event;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 4 */,\n/* 5 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/**\n\t * Provides a Basic Widget\n\t */\n\t\n\tvar DestroyableWidget = function () {\n\t function DestroyableWidget() {\n\t _classCallCheck(this, DestroyableWidget);\n\t\n\t this.listeners = [];\n\t }\n\t\n\t /**\n\t * Destroys a Widget\n\t */\n\t\n\t\n\t _createClass(DestroyableWidget, [{\n\t key: \"destroy\",\n\t value: function destroy() {\n\t this.listeners.forEach(function (listener) {\n\t listener.element.removeEventListener.apply(listener.element, listener.args);\n\t });\n\t this.listeners = [];\n\t }\n\t\n\t /**\n\t * Adds an event and registers it later to remove bindings\n\t * @param {HTMLElement} element\n\t * @param {String} name\n\t * @param {Function} listener\n\t * @param {boolean} [capture]\n\t * @returns {Function}\n\t */\n\t\n\t }, {\n\t key: \"addEventListener\",\n\t value: function addEventListener(element, name, listener, capture) {\n\t this.listeners.push({\n\t element: element,\n\t args: [name, listener, capture]\n\t });\n\t\n\t element.addEventListener(name, listener, capture);\n\t return listener;\n\t }\n\t }]);\n\t\n\t return DestroyableWidget;\n\t}();\n\t\n\texports.default = DestroyableWidget;\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _DestroyableWidget2 = __webpack_require__(5);\n\t\n\tvar _DestroyableWidget3 = _interopRequireDefault(_DestroyableWidget2);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Tooltip\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar CLASS_NAMES_TOOLTIP = 'tooltip-container';\n\t/**\n\t * @type {string}\n\t */\n\tvar CLASS_NAMES_OPEN = 'open';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DATA_CLASSNAME = 'data-class';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\t\n\t/**\n\t * @type {HTMLDocument}\n\t */\n\tvar doc = global.document;\n\t\n\t/**\n\t * Simple Tooltip\n\t */\n\t\n\tvar Tooltip = function (_DestroyableWidget) {\n\t _inherits(Tooltip, _DestroyableWidget);\n\t\n\t /**\n\t * Creates a Tooltip\n\t * @param {HTMLElement|String} DelegateContainer\n\t * @param {Object} [options]\n\t */\n\t\n\t function Tooltip(DelegateContainer, options) {\n\t _classCallCheck(this, Tooltip);\n\t\n\t /**\n\t * The Container where possible events are captured\n\t */\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Tooltip).call(this));\n\t\n\t _this.container = DelegateContainer instanceof HTMLElement ? DelegateContainer : doc.getElementById(DelegateContainer);\n\t\n\t if (!_this.container) {\n\t throw new Error('Could not create Tooltip, DelegateContainer not found');\n\t }\n\t\n\t /**\n\t * The Container where tooltips are stored for this instance\n\t * @type {HTMLElement}\n\t */\n\t _this.tooltipContainer = null;\n\t\n\t /**\n\t * Default Options\n\t */\n\t _this.options = {\n\t containerClass: '',\n\t selectorAttribute: 'data-tooltip',\n\t collisionContainer: _this.container\n\t };\n\t\n\t Object.assign(_this.options, options || {});\n\t return _this;\n\t }\n\t\n\t /**\n\t * Creates and shows a tooltip\n\t * @param {HTMLElement} target where is this tooltip positioned\n\t * @param {String} text text content in tooltip, will be NOT escaped\n\t * @param {Boolean} [removeTitle] removes title element if given\n\t * @param {Node} [positionRelative]\n\t */\n\t\n\t\n\t _createClass(Tooltip, [{\n\t key: 'createTooltip',\n\t value: function createTooltip(target, text, removeTitle, positionRelative) {\n\t // abort if text is empty\n\t if (!text || text && text.trim() === '') {\n\t return;\n\t }\n\t\n\t if (_Settings2.default.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n\t return;\n\t }\n\t\n\t var tooltipContainer = this.tooltipContainer;\n\t\n\t if (!tooltipContainer) {\n\t tooltipContainer = doc.createElement('div');\n\t this.container.appendChild(tooltipContainer);\n\t this.tooltipContainer = tooltipContainer;\n\t }\n\t this._restoreClassNames(tooltipContainer, target);\n\t\n\t tooltipContainer.style.left = 'auto';\n\t tooltipContainer.style.top = 'auto';\n\t tooltipContainer.innerHTML = text;\n\t tooltipContainer.flexTooltipCurrentTarget = target;\n\t if (removeTitle) {\n\t target.oldTitle = text;\n\t target.removeAttribute('title');\n\t }\n\t\n\t _Util2.default.setupPositionNearby(positionRelative || target, tooltipContainer, this.options.collisionContainer, true, true);\n\t\n\t tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n\t }\n\t }, {\n\t key: '_restoreClassNames',\n\t value: function _restoreClassNames(container, target) {\n\t // allow additional classname per tooltip on target element\n\t var classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n\t var maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n\t if (maybeTargetClass) {\n\t classNames.push(maybeTargetClass);\n\t }\n\t container.className = classNames.join(\" \");\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {HTMLElement|null}\n\t */\n\t\n\t }, {\n\t key: 'getCurrentTarget',\n\t value: function getCurrentTarget() {\n\t return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n\t }\n\t\n\t /**\n\t * Destroys this Widget\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t _get(Object.getPrototypeOf(Tooltip.prototype), 'destroy', this).call(this);\n\t\n\t if (this.tooltipContainer) {\n\t this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n\t return true;\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Removes a Tooltip on given target\n\t * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n\t */\n\t\n\t }, {\n\t key: 'removeTooltip',\n\t value: function removeTooltip(target) {\n\t var selfTarget = target;\n\t if (!selfTarget && this.tooltipContainer) {\n\t selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n\t }\n\t if (this.tooltipContainer) {\n\t if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n\t return;\n\t }\n\t this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n\t delete this.tooltipContainer.flexTooltipCurrentTarget;\n\t }\n\t if (selfTarget && selfTarget.oldTitle) {\n\t selfTarget.setAttribute('title', selfTarget.oldTitle);\n\t }\n\t }\n\t\n\t /**\n\t * Initilizes mouse events on container element\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents() {\n\t var self = this;\n\t this.addEventListener(this.container, 'mouseover', function (e) {\n\t if (e.target.hasAttribute(self.options.selectorAttribute)) {\n\t self.createTooltip(e.target, e.target.getAttribute('title'), true);\n\t }\n\t });\n\t\n\t this.addEventListener(this.container, 'mouseout', function (e) {\n\t if (e.target.hasAttribute(self.options.selectorAttribute)) {\n\t self.removeTooltip(e.target);\n\t }\n\t });\n\t return this;\n\t }\n\t }]);\n\t\n\t return Tooltip;\n\t}(_DestroyableWidget3.default);\n\t\n\texports.default = Tooltip;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 7 */,\n/* 8 */,\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_FORM_AJAX_COMPLETED = exports.EVENT_FORM_AFTER_AJAX_SUBMIT = exports.EVENT_FORM_SUBMIT = exports.EVENT_FORM_READY = undefined;\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _Tooltip = __webpack_require__(6);\n\t\n\tvar _Tooltip2 = _interopRequireDefault(_Tooltip);\n\t\n\t__webpack_require__(11);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _DestroyableWidget2 = __webpack_require__(5);\n\t\n\tvar _DestroyableWidget3 = _interopRequireDefault(_DestroyableWidget2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Form\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\tvar LOADING_CLASS = 'loading';\n\tvar DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\n\tvar REMOTE = 'data-remote';\n\tvar REMOTE_ACTION = 'data-remote-action';\n\tvar ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\n\tvar ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\n\tvar ATTR_VALIDATOR = 'data-validate';\n\tvar ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\n\tvar ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\n\tvar ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\n\tvar ATTR_ERROR_TARGET_ID = 'data-error-target';\n\tvar ATTR_DEPENDS = 'data-depends-selector';\n\tvar CONST_USE_JSON = 'json';\n\tvar CONST_REALTIME_EVENT = 'input';\n\tvar FOCUS_TOOLTIP_DELAY = 20;\n\tvar CLICK_TOOLTIP_DELAY = 150;\n\t\n\t/**\n\t * Triggered when form is fully initialized and handlers are binded\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_READY = exports.EVENT_FORM_READY = 'flexcss.form.ready';\n\t/**\n\t * Fires when a form is submitted, cancelable\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_SUBMIT = exports.EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n\t/**\n\t * Fired directly after the form has been submitted via ajax\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_AFTER_AJAX_SUBMIT = exports.EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n\t/**\n\t * Fired when ajax events did complete\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_AJAX_COMPLETED = exports.EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\t\n\t/**\n\t * A HTML5 Form Validation replacement\n\t */\n\t\n\tvar Form = function (_DestroyableWidget) {\n\t _inherits(Form, _DestroyableWidget);\n\t\n\t /**\n\t * @param {HTMLElement} form\n\t * @param [options] optional options\n\t */\n\t\n\t function Form(form, options) {\n\t _classCallCheck(this, Form);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Form).call(this));\n\t\n\t if (!(form instanceof HTMLFormElement)) {\n\t throw 'argument {0} form needs to be an form element';\n\t }\n\t\n\t /**\n\t * The Form\n\t * @type {HTMLElement}\n\t */\n\t _this.form = form;\n\t\n\t /**\n\t * @type {Tooltip}\n\t */\n\t _this.tooltips = null;\n\t\n\t /**\n\t * @type {Promise}\n\t */\n\t _this.currentValidationFuture = new Promise(function () {});\n\t\n\t /**\n\t * Default options\n\t * @type {Object}\n\t */\n\t _this.options = {\n\t // if true creates tooltips above element, uses FlexCss Tooltips\n\t createTooltips: true,\n\t // if true appends error message after input element\n\t appendError: false,\n\t // type of ajax submit\n\t ajaxSubmitType: 'POST',\n\t // json content type if ajax method is set to json\n\t ajaxJsonContentType: 'application/json; charset=utf-8',\n\t // allow inline validation\n\t inlineValidation: true,\n\t // validate in realtime (on `input` event)\n\t realtime: true,\n\t // timeout when realtime event should be captured\n\t realtimeTimeout: 250,\n\t // formatting method for an error\n\t formatErrorTooltip: function formatErrorTooltip(error) {\n\t return ' ' + error;\n\t },\n\t // the class that will be put on the element to mark it failed validation\n\t inputErrorClass: 'invalid',\n\t // the container class for error messages below an element\n\t containerErrorClass: 'form-error',\n\t // additional options for fetch\n\t fetchOptions: {\n\t credentials: 'include'\n\t },\n\t // the container for tooltips\n\t tooltipContainer: form,\n\t tooltipOptions: {\n\t containerClass: 'error-tooltip'\n\t },\n\t // if you have a fixed header, either set a number or function here\n\t scrollToElementDiff: 0\n\t };\n\t\n\t // overwrite default options\n\t Object.assign(_this.options, options);\n\t\n\t // apply settings from attributes\n\t _Util2.default.applyOptionsFromElement(form, _this.options);\n\t\n\t // set form class as widget\n\t // Forms are very different to classical widgets,\n\t // we will not use our base widget class for this but just self\n\t form.hfWidgetInstance = _this;\n\t\n\t /**\n\t * A List of Validators\n\t * @type {Object}\n\t * @private\n\t */\n\t _this._validators = Form.globalValidators;\n\t\n\t /**\n\t * @type {Function}\n\t * @private\n\t */\n\t _this._remoteValidationFunction = null;\n\t\n\t _this.initFormValidation();\n\t return _this;\n\t }\n\t\n\t _createClass(Form, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t _get(Object.getPrototypeOf(Form.prototype), 'destroy', this).call(this);\n\t if (this.tooltips) {\n\t this.tooltips.destroy();\n\t }\n\t }\n\t\n\t /**\n\t * Submits this form, either via ajax or just classical (default)\n\t * @param {HTMLFormElement} thisForm\n\t * @param {Event} e\n\t * @private\n\t * @returns {Promise|boolean} returns false if submit is cancled\n\t */\n\t\n\t }, {\n\t key: '_submitFunction',\n\t value: function _submitFunction(thisForm, e) {\n\t var shouldUseAjax = thisForm.getAttribute(REMOTE),\n\t ajaxPostUrl = thisForm.getAttribute(REMOTE_ACTION) || thisForm.getAttribute('action') || window.location.href,\n\t useJson = CONST_USE_JSON === shouldUseAjax,\n\t self = this;\n\t\n\t var ev = _Event2.default.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\t\n\t // abort execution is event was prevented\n\t if (ev.defaultPrevented) {\n\t self._formStopLoading();\n\t return false;\n\t }\n\t\n\t if (shouldUseAjax === null) {\n\t // submit\n\t return thisForm.submit();\n\t }\n\t // prevent form from submit normally\n\t e.preventDefault();\n\t\n\t // add information that this is an XMLHttpRequest request (used by some frameworks)\n\t var defaultHeaders = {\n\t 'X-Requested-With': 'XMLHttpRequest'\n\t };\n\t\n\t // setup default headers\n\t if (useJson) {\n\t Object.assign(defaultHeaders, {\n\t 'Content-Type': this.options.ajaxJsonContentType\n\t });\n\t }\n\t var defaultOptions = Object.assign(this.options.fetchOptions, {\n\t headers: defaultHeaders,\n\t method: this.options.ajaxSubmitType\n\t });\n\t\n\t // support either JSON request payload or normal payload submission\n\t var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n\t body: JSON.stringify(this.serialize())\n\t })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n\t body: new FormData(thisForm)\n\t }));\n\t\n\t _Event2.default.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\t\n\t return serverCall.then(function (r) {\n\t (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\t\n\t _Event2.default.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n\t // always remove error class\n\t self._formStopLoading();\n\t });\n\t }\n\t\n\t /**\n\t * Serializes a form to a json object\n\t * @returns {Object}\n\t */\n\t\n\t }, {\n\t key: 'serialize',\n\t value: function serialize() {\n\t var selectors = ['input[name]:not([type=\"radio\"]):enabled', 'input[type=\"radio\"][name]:checked', 'select[name]:enabled', 'textarea[name]:enabled'],\n\t inputs = this.form.querySelectorAll(selectors.join(',')),\n\t result = {};\n\t\n\t Array.prototype.forEach.call(inputs, function (input) {\n\t var exists = result[input.name],\n\t value = input.value;\n\t if (exists instanceof Array) {\n\t exists.push(value);\n\t } else if (exists) {\n\t result[input.name] = [result[input.name], value];\n\t } else {\n\t result[input.name] = value;\n\t }\n\t });\n\t\n\t return result;\n\t }\n\t\n\t /**\n\t * Handles the chain of validation on given fields\n\t *\n\t * @param {HTMLElement|Array|NodeList} field\n\t * @param [focus] optional focus first error\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'handleValidation',\n\t value: function handleValidation(field, focus) {\n\t var _this2 = this;\n\t\n\t var fields = field instanceof Array || field instanceof NodeList ? field : [field];\n\t return this._handleValidation(fields, focus, true).then(function (r) {\n\t if (!r.foundAnyError) {\n\t // remove tooltips\n\t if (_this2.tooltips) {\n\t _this2.tooltips.removeTooltip();\n\t }\n\t }\n\t return r;\n\t }.bind(this));\n\t }\n\t\n\t /**\n\t * Handles errors on given node list\n\t * @param {NodeList} toValidateFields\n\t * @param {boolean} focus\n\t * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n\t * @returns {Promise}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleValidation',\n\t value: function _handleValidation(toValidateFields, focus, scoped) {\n\t var self = this;\n\t var arr = Form._createArrayFromInvalidFieldList(toValidateFields),\n\t isLocalInvalid = arr.length > 0;\n\t // focus must appear in the same frame for iOS devices\n\t if (isLocalInvalid && focus) {\n\t self._focusElement(arr[0]);\n\t }\n\t var validation = scoped ? this._customValidationsForElements(toValidateFields) : self.validateCustomFields();\n\t return validation.then(function (r) {\n\t if (isLocalInvalid) {\n\t // combine browser and custom validators\n\t r.foundAnyError = true;\n\t }\n\t // get a unique field list of all fields that need to be checked and rendered\n\t // it's possible that we have duplicates in non scoped mode\n\t var thisToValidateFields = scoped ? toValidateFields : Array.from(arr).concat(r.checkedFields);\n\t r.checkedFields = thisToValidateFields;\n\t var foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n\t firstInvalidField = foundInvalidFields[0];\n\t if (firstInvalidField) {\n\t if (focus) {\n\t self._focusElement(firstInvalidField);\n\t // if element could not be focused:\n\t if (document.activeElement !== firstInvalidField) {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t } else {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t self.showAndOrCreateTooltip(firstInvalidField);\n\t }\n\t return r;\n\t });\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} field\n\t * @param {ValidityState} validity\n\t * @returns {*}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_setupErrorMessages',\n\t value: function _setupErrorMessages(field, validity) {\n\t return Form.globalErrorMessageHandler ? Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n\t }\n\t\n\t /**\n\t * Handles class labels for elements\n\t * @param {Object} fields\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleLabels',\n\t value: function _handleLabels(fields) {\n\t Object.keys(fields).forEach(function (id) {\n\t var labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'),\n\t invalid = fields[id];\n\t if (labels.length) {\n\t for (var labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n\t var labelEl = labels[labelsIndex];\n\t // we can't use toggle attribute, not supported in IE\n\t if (invalid) {\n\t this._markElementInvalid(labelEl);\n\t } else {\n\t this._markElementValid(labelEl);\n\t }\n\t }\n\t }\n\t }.bind(this));\n\t }\n\t\n\t /**\n\t * @param el\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_markElementInvalid',\n\t value: function _markElementInvalid(el) {\n\t el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n\t el.classList.add(this.options.inputErrorClass);\n\t }\n\t\n\t /**\n\t * @param el\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_markElementValid',\n\t value: function _markElementValid(el) {\n\t el.removeAttribute(DATA_ELEMENT_INVALID);\n\t el.classList.remove(this.options.inputErrorClass);\n\t }\n\t\n\t /**\n\t * A List of invalid elements (:invalid)\n\t * @returns {Array}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_getInvalidElements',\n\t value: function _getInvalidElements() {\n\t return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n\t return !(r instanceof HTMLFieldSetElement);\n\t });\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} thisParent\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_removeElementErrors',\n\t value: function _removeElementErrors(thisParent) {\n\t var errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass),\n\t inputsWithErrorClasses = thisParent.querySelectorAll('[' + DATA_ELEMENT_INVALID + ']');\n\t for (var elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n\t errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n\t }\n\t for (var inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n\t var el = inputsWithErrorClasses[inputErrorIndex];\n\t this._markElementValid(el);\n\t }\n\t }\n\t\n\t /**\n\t * Registers a custom validator\n\t * @param {String} name\n\t * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n\t * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n\t * we can't rely on that\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerValidator',\n\t value: function registerValidator(name, validator) {\n\t this._validators[name] = validator;\n\t return this;\n\t }\n\t\n\t /**\n\t * Runs async validation\n\t * @param {String} validationRef\n\t * @param {HTMLElement} field\n\t * @returns {Promise}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_runValidation',\n\t value: function _runValidation(validationRef, field) {\n\t if (!this._validators[validationRef]) {\n\t throw 'Could not found validator: ' + validationRef;\n\t }\n\t var cl = field.classList,\n\t future = this._validators[validationRef].apply(this, [field, this.form]);\n\t cl.add(LOADING_CLASS);\n\t future.then(function () {\n\t cl.remove(LOADING_CLASS);\n\t });\n\t return future;\n\t }\n\t\n\t /**\n\t * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n\t *\n\t * @param {Array|NodeList} fields\n\t * @returns {Promise} contains either true if validations passed or false if something went wrong\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_customValidationsForElements',\n\t value: function _customValidationsForElements(fields) {\n\t var futures = [],\n\t fieldsLength = fields.length,\n\t checkedFields = [];\n\t for (var iVal = 0; iVal < fieldsLength; iVal++) {\n\t var field = fields[iVal],\n\t validationRef = field.getAttribute(ATTR_VALIDATOR),\n\t validity = field.validity;\n\t if (this._validators[validationRef]) {\n\t // use local validation first and then continue with custom validations\n\t if (Form._shouldNotValidateField(field) || validity && !validity.customError && !validity.valid) {\n\t continue;\n\t }\n\t checkedFields.push(field);\n\t futures.push(this._runValidation(validationRef, field));\n\t } else {\n\t if (validationRef) {\n\t console.warn('data-validate was set but no validator was found');\n\t }\n\t }\n\t }\n\t return Promise.all(futures).then(function (allFutures) {\n\t var l = allFutures.length;\n\t var result = {\n\t checkedFields: checkedFields,\n\t foundAnyError: false\n\t };\n\t for (var fI = 0; fI < l; fI++) {\n\t if (!allFutures[fI]) {\n\t result.foundAnyError = true;\n\t break;\n\t }\n\t }\n\t return result;\n\t });\n\t }\n\t\n\t /**\n\t * Remove all errors for this form\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'removeErrors',\n\t value: function removeErrors() {\n\t this._removeElementErrors(this.form);\n\t if (this.tooltips) {\n\t this.tooltips.removeTooltip();\n\t }\n\t return this;\n\t }\n\t\n\t /**\n\t * Will handle errors for given fields\n\t * @param {Array|NodeList} fields\n\t * @param {Boolean} removeAllErrors\n\t */\n\t\n\t }, {\n\t key: 'prepareErrors',\n\t value: function prepareErrors(fields, removeAllErrors) {\n\t if (removeAllErrors) {\n\t this.removeErrors();\n\t }\n\t var labelGroups = {},\n\t invalidFields = [];\n\t\n\t function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n\t var additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id,\n\t group = thisLabelGroup[additionalLabels];\n\t if (additionalLabels) {\n\t // check additionally if field is currently marked as invalid\n\t // so the label is not marked as error if no field is marked as one\n\t group = group ? group : isInvalid;\n\t thisLabelGroup[additionalLabels] = group;\n\t }\n\t }\n\t\n\t // We save all validations in an extra property because we need to reset the validity due some\n\t // implementation errors in other browsers then chrome\n\t for (var i = 0; i < fields.length; i++) {\n\t var field = fields[i],\n\t errorTarget = Form._findErrorTarget(field),\n\t parent = errorTarget.parentNode,\n\t validity = field.validity,\n\t isInvalid = validity && !validity.valid;\n\t if (Form._shouldNotValidateField(field)) {\n\t continue;\n\t }\n\t field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n\t handleAdditionalLabels(isInvalid, labelGroups, field);\n\t if (isInvalid) {\n\t if (!removeAllErrors) {\n\t // Remove current errors:\n\t this._removeElementErrors(parent);\n\t }\n\t // setup custom error messages:\n\t this._setupErrorMessages(field, validity);\n\t var msg = field.validationMessage;\n\t\n\t // mark fields as invalid\n\t this._markElementInvalid(errorTarget);\n\t this._markElementInvalid(field);\n\t\n\t if (this.options.appendError) {\n\t parent.insertAdjacentHTML(\"beforeend\", '
' + msg + '
');\n\t }\n\t invalidFields.push(field);\n\t field.flexFormsSavedValidationMessage = msg;\n\t } else {\n\t // restore invalid fields\n\t this._markElementValid(errorTarget);\n\t this._markElementValid(field);\n\t\n\t // cleanup\n\t delete field.flexFormsSavedValidationMessage;\n\t\n\t // remove error markup\n\t this._removeElementErrors(parent);\n\t }\n\t // We have to reset the custom validity here to allow native validations work again\n\t field.setCustomValidity('');\n\t }\n\t // if validates a single field we need to check the linked fields to a label:\n\t if (fields.length === 1) {\n\t var _field = fields[0];\n\t var id = _field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || _field.id;\n\t if (id) {\n\t var linkedFields = Array.from(this.getForm().querySelectorAll('[' + ATTR_DATA_CUSTOM_LABEL + '=\"' + id + '\"], #' + id));\n\t linkedFields.forEach(function (thisField) {\n\t var validity = thisField.validity,\n\t isInvalid = validity && !validity.valid && this._isElementInvalidElement(thisField);\n\t handleAdditionalLabels(isInvalid, labelGroups, thisField);\n\t }.bind(this));\n\t }\n\t }\n\t this._handleLabels(labelGroups);\n\t return invalidFields;\n\t }\n\t\n\t /**\n\t * Validates all custom fields\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'validateCustomFields',\n\t value: function validateCustomFields() {\n\t return this._customValidationsForElements(this.form.querySelectorAll(\"[data-validate]\"));\n\t }\n\t\n\t /**\n\t * Tests if a field should be validated\n\t * @param {HTMLElement} field\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'getForm',\n\t\n\t\n\t /**\n\t * This form\n\t * @returns {HTMLElement}\n\t */\n\t value: function getForm() {\n\t return this.form;\n\t }\n\t\n\t /**\n\t * Registers a function that handles remote validation\n\t * @param {Function} func\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerRemoteValidation',\n\t value: function registerRemoteValidation(func) {\n\t this._remoteValidationFunction = func;\n\t return this;\n\t }\n\t\n\t /**\n\t * Formats the error content for the tooltip\n\t * @param {String} error\n\t * @returns {String}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_formatErrorTooltip',\n\t value: function _formatErrorTooltip(error) {\n\t return this.options.formatErrorTooltip.apply(this, [error]);\n\t }\n\t\n\t /**\n\t * Tries to find a custom error target on given target\n\t * @param target\n\t * @returns {HTMLElement}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'showAndOrCreateTooltip',\n\t\n\t\n\t /**\n\t * Creates a tooltip at given element, will only create a new instance if not created\n\t * @param {HTMLElement} target\n\t * @param {Boolean} [remove]\n\t */\n\t value: function showAndOrCreateTooltip(target, remove) {\n\t var self = this;\n\t if (!this.tooltips && this.options.createTooltips) {\n\t this.tooltips = new _Tooltip2.default(this.options.tooltipContainer, this.options.tooltipOptions);\n\t }\n\t if (!this.options.createTooltips) {\n\t return false;\n\t }\n\t\n\t if (!target.flexFormsSavedValidity) {\n\t return false;\n\t }\n\t var errorTarget = Form._findErrorTarget(target);\n\t if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n\t self.tooltips.createTooltip(errorTarget, self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n\t return true;\n\t } else {\n\t if (remove) {\n\t self.tooltips.removeTooltip();\n\t }\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Checks if element is marked as invalid\n\t * @param {HTMLElement} el\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_isElementInvalidElement',\n\t value: function _isElementInvalidElement(el) {\n\t return el.hasAttribute(DATA_ELEMENT_INVALID);\n\t }\n\t\n\t /**\n\t * Handles invalid event of a form\n\t * @param {Event} e\n\t * @returns {Promise|boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_checkIsInvalid',\n\t value: function _checkIsInvalid(e) {\n\t e.preventDefault();\n\t var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n\t return this._handleValidation(invalidFields, true, false);\n\t }\n\t\n\t /**\n\t * Will query dependent fields (by selector) that should be validated with given field\n\t * @param field\n\t * @returns {NodeList|[]}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_getDependentFields',\n\t value: function _getDependentFields(field) {\n\t var fieldSelector = field.getAttribute(ATTR_DEPENDS),\n\t base = [field];\n\t if (fieldSelector) {\n\t base.push.apply(base, Array.prototype.slice.apply(this.getForm().querySelectorAll(fieldSelector)));\n\t }\n\t return base;\n\t }\n\t\n\t /**\n\t * @private\n\t * @param {HTMLElement} [target]\n\t */\n\t\n\t }, {\n\t key: '_handleTooltipInline',\n\t value: function _handleTooltipInline(target) {\n\t if (this.tooltips) {\n\t this.tooltips.removeTooltip(target);\n\t }\n\t }\n\t\n\t /**\n\t * Initializes validation for a given form, registers event handlers\n\t */\n\t\n\t }, {\n\t key: 'initFormValidation',\n\t value: function initFormValidation() {\n\t var _this3 = this;\n\t\n\t // Suppress the default bubbles\n\t var form = this.getForm(),\n\t self = this,\n\t invalidEvent = 'invalid';\n\t\n\t /**\n\t * Validates if is valid realtime element\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidRealtimeElement(target) {\n\t return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n\t }\n\t\n\t form.addEventListener(invalidEvent, function (e) {\n\t e.preventDefault();\n\t }, true);\n\t\n\t _Util2.default.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n\t self._formLoading();\n\t var result = self._checkIsInvalid(e);\n\t if (result) {\n\t self.currentValidationFuture = new Promise(function (resolve) {\n\t result.then(function (r) {\n\t setTimeout(function () {\n\t _Util2.default.addEventOnce(invalidEvent, form, handleInvalid, true);\n\t }, 0);\n\t resolve(r);\n\t self._formStopLoading();\n\t if (!r.foundAnyError) {\n\t self._formLoading();\n\t self._handleSubmit(e);\n\t }\n\t });\n\t });\n\t }\n\t }, true);\n\t\n\t this.addEventListener(form, 'reset', function () {\n\t _this3.removeErrors();\n\t });\n\t\n\t // Timeout for keys:\n\t var TIMEOUT_KEYDOWN,\n\t KEYDOWN_RUNNING = false;\n\t\n\t // resets keydown events\n\t function clearKeyDownTimeout() {\n\t KEYDOWN_RUNNING = false;\n\t clearTimeout(TIMEOUT_KEYDOWN);\n\t }\n\t\n\t // setup custom realtime event if given\n\t if (self.options.realtime) {\n\t this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n\t if (self._formIsLoading()) {\n\t return;\n\t }\n\t var target = e.target;\n\t clearTimeout(TIMEOUT_KEYDOWN);\n\t if (KEYDOWN_RUNNING) {\n\t return;\n\t }\n\t TIMEOUT_KEYDOWN = setTimeout(function () {\n\t var isStillTarget = document.activeElement === e.target;\n\t if (!_checkIsValidRealtimeElement(target)) {\n\t return;\n\t }\n\t if (isStillTarget) {\n\t self._handleTooltipInline();\n\t }\n\t KEYDOWN_RUNNING = true;\n\t var dependentFields = self._getDependentFields(target);\n\t self._customValidationsForElements(dependentFields).then(function () {\n\t self.prepareErrors(dependentFields, false);\n\t if (isStillTarget) {\n\t self.showAndOrCreateTooltip(e.target);\n\t }\n\t // future must be resolved before another event can be started\n\t KEYDOWN_RUNNING = false;\n\t });\n\t }, self.options.realtimeTimeout);\n\t }, true);\n\t }\n\t\n\t /**\n\t * Validates if target is a valid input field to check blur and focus events\n\t *\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidBlurFocusElement(target) {\n\t var attr = target.getAttribute(\"type\");\n\t return attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\";\n\t }\n\t\n\t /**\n\t * Validates if is valid inline-check element\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidInlineCheckElement(target) {\n\t return !target.hasAttribute(ATTR_DISABLE_INLINE);\n\t }\n\t\n\t this.addEventListener(form, 'blur', function (e) {\n\t // do not hide tooltip after change event\n\t if (!e.target.flexcssKeepTooltips) {\n\t self._handleTooltipInline(e.target);\n\t }\n\t delete e.target.flexcssKeepTooltips;\n\t }, true);\n\t\n\t // handle focus on input elements\n\t // will show an error if field is invalid\n\t this.addEventListener(form, \"focus\", function (e) {\n\t if (self._formIsLoading()) {\n\t return;\n\t }\n\t // do not track errors for checkbox and radios on focus:\n\t if (!_checkIsValidBlurFocusElement(e.target)) {\n\t return;\n\t }\n\t // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n\t // just have been hidden (on blur). Maybe fix this with a queue later\n\t setTimeout(function () {\n\t self.showAndOrCreateTooltip(e.target);\n\t }, FOCUS_TOOLTIP_DELAY);\n\t }, true);\n\t\n\t if (self.options.inlineValidation) {\n\t // Handle change for checkbox, radios and selects\n\t this.addEventListener(form, \"change\", function (e) {\n\t var target = e.target;\n\t if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n\t return;\n\t }\n\t clearKeyDownTimeout();\n\t var name = target.getAttribute('name');\n\t var inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n\t // we only support dependent fields for a single widgets right now\n\t if (inputs.length === 1) {\n\t inputs = self._getDependentFields(target);\n\t }\n\t self._customValidationsForElements(inputs).then(function () {\n\t self.prepareErrors(inputs, false);\n\t target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n\t if (target.flexcssKeepTooltips) {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t });\n\t });\n\t }\n\t\n\t // prevent default if form is invalid\n\t this.addEventListener(form, \"submit\", function listener(e) {\n\t self._submitListener(e, listener);\n\t });\n\t\n\t _Event2.default.dispatchAndFire(form, EVENT_FORM_READY);\n\t }\n\t\n\t /* Loading states, unfortunately we can't check if a promise is pending :/*/\n\t /* TODO: Maybe wrap promise to extend this functionality */\n\t\n\t }, {\n\t key: '_formLoading',\n\t value: function _formLoading() {\n\t this.getForm().classList.add(LOADING_CLASS);\n\t }\n\t }, {\n\t key: '_formStopLoading',\n\t value: function _formStopLoading() {\n\t this.getForm().classList.remove(LOADING_CLASS);\n\t }\n\t }, {\n\t key: '_formIsLoading',\n\t value: function _formIsLoading() {\n\t return this.getForm().classList.contains(LOADING_CLASS);\n\t }\n\t\n\t // this defines the logic after a change event when a tooltip is shown\n\t // because we call this method inside the change event, the click would be immeditally executed with the change\n\t // event when not using setTimeout(). There might be another solution for this...\n\t\n\t }, {\n\t key: '_handleTooltipHideClickAfterChange',\n\t value: function _handleTooltipHideClickAfterChange() {\n\t var self = this;\n\t if (this.options.createTooltips) {\n\t setTimeout(function () {\n\t _Util2.default.addEventOnce(_Settings2.default.getTabEvent(), global.document.body, function (t) {\n\t if (!self._isElementInvalidElement(t.target)) {\n\t self._handleTooltipInline();\n\t }\n\t });\n\t }, CLICK_TOOLTIP_DELAY);\n\t }\n\t }\n\t }, {\n\t key: '_focusElement',\n\t value: function _focusElement(el) {\n\t el.focus();\n\t _Util2.default.scrollToElement(el, this.options.scrollToElementDiff);\n\t }\n\t\n\t /**\n\t * Listener that is executed on form submit\n\t * @param e\n\t * @param submitListener\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_submitListener',\n\t value: function _submitListener(e, submitListener) {\n\t\n\t var form = this.getForm(),\n\t self = this,\n\t submitEvent = 'submit';\n\t\n\t if (this._formIsLoading()) {\n\t e.preventDefault();\n\t return false;\n\t }\n\t this._formLoading();\n\t form.removeEventListener(submitEvent, submitListener);\n\t this.removeErrors();\n\t e.preventDefault();\n\t // reset:\n\t if (form.checkValidity()) {\n\t form.addEventListener(submitEvent, submitListener);\n\t // It's possible that the form is valid but the custom validations need to be checked again:\n\t self.currentValidationFuture = new Promise(function (resolve) {\n\t var validation = self.validateCustomFields();\n\t validation.then(function (r) {\n\t // because custom validators may mark multiple fields as invalid, we get all of them in the form\n\t var fields = self._getInvalidElements(),\n\t errors = self.prepareErrors(fields, false),\n\t firstError = errors[0];\n\t if (firstError) {\n\t self._focusElement(firstError);\n\t self.showAndOrCreateTooltip(firstError, true);\n\t }\n\t resolve(r);\n\t });\n\t });\n\t self.currentValidationFuture.then(function (r) {\n\t if (!r.foundAnyError) {\n\t // Handle submitting the form to server:\n\t self._handleSubmit(e);\n\t } else {\n\t self._formStopLoading();\n\t }\n\t });\n\t } else {\n\t self._formStopLoading();\n\t form.addEventListener(submitEvent, submitListener);\n\t }\n\t }\n\t\n\t /**\n\t * Handles submitting, optionally allows to stop submitting\n\t * @param e\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleSubmit',\n\t value: function _handleSubmit(e) {\n\t this._submitFunction(this.form, e);\n\t }\n\t\n\t /**\n\t * Registers a global event Handler\n\t * @param errorFunc\n\t */\n\t\n\t }], [{\n\t key: '_shouldNotValidateField',\n\t value: function _shouldNotValidateField(field) {\n\t var target = Form._findErrorTarget(field);\n\t return target instanceof HTMLFieldSetElement || field.validity === undefined || target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !_Util2.default.isVisible(target);\n\t }\n\t\n\t /**\n\t * Creates an array from a node list with invalid items\n\t * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n\t * @param list\n\t * @returns {Array}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_createArrayFromInvalidFieldList',\n\t value: function _createArrayFromInvalidFieldList(list) {\n\t var arr = [];\n\t for (var i = 0; i < list.length; ++i) {\n\t var n = list[i];\n\t if (n.validity && !n.validity.valid) {\n\t if (!Form._shouldNotValidateField(n)) {\n\t arr.push(n);\n\t }\n\t }\n\t }\n\t return arr;\n\t }\n\t }, {\n\t key: '_findErrorTarget',\n\t value: function _findErrorTarget(target) {\n\t var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n\t foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n\t if (!foundTarget) {\n\t throw 'Given error target did not exsits:' + target;\n\t }\n\t return foundTarget;\n\t }\n\t }, {\n\t key: 'registerErrorMessageHandler',\n\t value: function registerErrorMessageHandler(errorFunc) {\n\t Form.globalErrorMessageHandler = errorFunc;\n\t }\n\t\n\t /**\n\t * Initialize forms for a specific selector\n\t * @param {String} selector\n\t * @param {Object} [options]\n\t * @return {array.}\n\t */\n\t\n\t }, {\n\t key: 'init',\n\t value: function init(selector, options) {\n\t var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') : document.querySelectorAll(selector),\n\t instances = [];\n\t for (var i = 0; i < forms.length; i++) {\n\t instances.push(new Form(forms[i], options));\n\t }\n\t return instances;\n\t }\n\t\n\t /**\n\t * Registers a global validator that is usable on all form instances\n\t * @param {String} name\n\t * @param {Function} validator\n\t * @returns {Function}\n\t */\n\t\n\t }, {\n\t key: 'registerValidator',\n\t value: function registerValidator(name, validator) {\n\t Form.globalValidators[name] = validator;\n\t return Form;\n\t }\n\t\n\t /**\n\t * Registers a global function that is called when a form should validate the response of a server\n\t * @param {Function} func\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerGlobalRemoteValidationFunction',\n\t value: function registerGlobalRemoteValidationFunction(func) {\n\t Form.globalRemoteValidationFunction = func;\n\t return Form;\n\t }\n\t }]);\n\t\n\t return Form;\n\t}(_DestroyableWidget3.default);\n\t\n\t/**\n\t * Global validators\n\t * @type {Array}\n\t */\n\t\n\t\n\tForm.globalValidators = [];\n\t\n\t/**\n\t * Global Remote validation function\n\t */\n\tForm.globalRemoteValidationFunction = function () {};\n\t\n\t/**\n\t * Handles custom error messages extracts custom message by default\n\t */\n\tForm.globalErrorMessageHandler = function (field, validity) {\n\t if (!validity.customError) {\n\t var customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n\t if (customMsg) {\n\t field.setCustomValidity(customMsg);\n\t }\n\t }\n\t};\n\t\n\texports.default = Form;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 10 */,\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// the whatwg-fetch polyfill installs the fetch() function\n\t// on the global object (window or self)\n\t//\n\t// Return that as the export for use in Webpack, Browserify etc.\n\t__webpack_require__(12);\n\tmodule.exports = self.fetch.bind(self);\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports) {\n\n\t(function(self) {\n\t 'use strict';\n\t\n\t if (self.fetch) {\n\t return\n\t }\n\t\n\t function normalizeName(name) {\n\t if (typeof name !== 'string') {\n\t name = String(name)\n\t }\n\t if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n\t throw new TypeError('Invalid character in header field name')\n\t }\n\t return name.toLowerCase()\n\t }\n\t\n\t function normalizeValue(value) {\n\t if (typeof value !== 'string') {\n\t value = String(value)\n\t }\n\t return value\n\t }\n\t\n\t function Headers(headers) {\n\t this.map = {}\n\t\n\t if (headers instanceof Headers) {\n\t headers.forEach(function(value, name) {\n\t this.append(name, value)\n\t }, this)\n\t\n\t } else if (headers) {\n\t Object.getOwnPropertyNames(headers).forEach(function(name) {\n\t this.append(name, headers[name])\n\t }, this)\n\t }\n\t }\n\t\n\t Headers.prototype.append = function(name, value) {\n\t name = normalizeName(name)\n\t value = normalizeValue(value)\n\t var list = this.map[name]\n\t if (!list) {\n\t list = []\n\t this.map[name] = list\n\t }\n\t list.push(value)\n\t }\n\t\n\t Headers.prototype['delete'] = function(name) {\n\t delete this.map[normalizeName(name)]\n\t }\n\t\n\t Headers.prototype.get = function(name) {\n\t var values = this.map[normalizeName(name)]\n\t return values ? values[0] : null\n\t }\n\t\n\t Headers.prototype.getAll = function(name) {\n\t return this.map[normalizeName(name)] || []\n\t }\n\t\n\t Headers.prototype.has = function(name) {\n\t return this.map.hasOwnProperty(normalizeName(name))\n\t }\n\t\n\t Headers.prototype.set = function(name, value) {\n\t this.map[normalizeName(name)] = [normalizeValue(value)]\n\t }\n\t\n\t Headers.prototype.forEach = function(callback, thisArg) {\n\t Object.getOwnPropertyNames(this.map).forEach(function(name) {\n\t this.map[name].forEach(function(value) {\n\t callback.call(thisArg, value, name, this)\n\t }, this)\n\t }, this)\n\t }\n\t\n\t function consumed(body) {\n\t if (body.bodyUsed) {\n\t return Promise.reject(new TypeError('Already read'))\n\t }\n\t body.bodyUsed = true\n\t }\n\t\n\t function fileReaderReady(reader) {\n\t return new Promise(function(resolve, reject) {\n\t reader.onload = function() {\n\t resolve(reader.result)\n\t }\n\t reader.onerror = function() {\n\t reject(reader.error)\n\t }\n\t })\n\t }\n\t\n\t function readBlobAsArrayBuffer(blob) {\n\t var reader = new FileReader()\n\t reader.readAsArrayBuffer(blob)\n\t return fileReaderReady(reader)\n\t }\n\t\n\t function readBlobAsText(blob) {\n\t var reader = new FileReader()\n\t reader.readAsText(blob)\n\t return fileReaderReady(reader)\n\t }\n\t\n\t var support = {\n\t blob: 'FileReader' in self && 'Blob' in self && (function() {\n\t try {\n\t new Blob();\n\t return true\n\t } catch(e) {\n\t return false\n\t }\n\t })(),\n\t formData: 'FormData' in self,\n\t arrayBuffer: 'ArrayBuffer' in self\n\t }\n\t\n\t function Body() {\n\t this.bodyUsed = false\n\t\n\t\n\t this._initBody = function(body) {\n\t this._bodyInit = body\n\t if (typeof body === 'string') {\n\t this._bodyText = body\n\t } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n\t this._bodyBlob = body\n\t } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n\t this._bodyFormData = body\n\t } else if (!body) {\n\t this._bodyText = ''\n\t } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n\t // Only support ArrayBuffers for POST method.\n\t // Receiving ArrayBuffers happens via Blobs, instead.\n\t } else {\n\t throw new Error('unsupported BodyInit type')\n\t }\n\t\n\t if (!this.headers.get('content-type')) {\n\t if (typeof body === 'string') {\n\t this.headers.set('content-type', 'text/plain;charset=UTF-8')\n\t } else if (this._bodyBlob && this._bodyBlob.type) {\n\t this.headers.set('content-type', this._bodyBlob.type)\n\t }\n\t }\n\t }\n\t\n\t if (support.blob) {\n\t this.blob = function() {\n\t var rejected = consumed(this)\n\t if (rejected) {\n\t return rejected\n\t }\n\t\n\t if (this._bodyBlob) {\n\t return Promise.resolve(this._bodyBlob)\n\t } else if (this._bodyFormData) {\n\t throw new Error('could not read FormData body as blob')\n\t } else {\n\t return Promise.resolve(new Blob([this._bodyText]))\n\t }\n\t }\n\t\n\t this.arrayBuffer = function() {\n\t return this.blob().then(readBlobAsArrayBuffer)\n\t }\n\t\n\t this.text = function() {\n\t var rejected = consumed(this)\n\t if (rejected) {\n\t return rejected\n\t }\n\t\n\t if (this._bodyBlob) {\n\t return readBlobAsText(this._bodyBlob)\n\t } else if (this._bodyFormData) {\n\t throw new Error('could not read FormData body as text')\n\t } else {\n\t return Promise.resolve(this._bodyText)\n\t }\n\t }\n\t } else {\n\t this.text = function() {\n\t var rejected = consumed(this)\n\t return rejected ? rejected : Promise.resolve(this._bodyText)\n\t }\n\t }\n\t\n\t if (support.formData) {\n\t this.formData = function() {\n\t return this.text().then(decode)\n\t }\n\t }\n\t\n\t this.json = function() {\n\t return this.text().then(JSON.parse)\n\t }\n\t\n\t return this\n\t }\n\t\n\t // HTTP methods whose capitalization should be normalized\n\t var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\t\n\t function normalizeMethod(method) {\n\t var upcased = method.toUpperCase()\n\t return (methods.indexOf(upcased) > -1) ? upcased : method\n\t }\n\t\n\t function Request(input, options) {\n\t options = options || {}\n\t var body = options.body\n\t if (Request.prototype.isPrototypeOf(input)) {\n\t if (input.bodyUsed) {\n\t throw new TypeError('Already read')\n\t }\n\t this.url = input.url\n\t this.credentials = input.credentials\n\t if (!options.headers) {\n\t this.headers = new Headers(input.headers)\n\t }\n\t this.method = input.method\n\t this.mode = input.mode\n\t if (!body) {\n\t body = input._bodyInit\n\t input.bodyUsed = true\n\t }\n\t } else {\n\t this.url = input\n\t }\n\t\n\t this.credentials = options.credentials || this.credentials || 'omit'\n\t if (options.headers || !this.headers) {\n\t this.headers = new Headers(options.headers)\n\t }\n\t this.method = normalizeMethod(options.method || this.method || 'GET')\n\t this.mode = options.mode || this.mode || null\n\t this.referrer = null\n\t\n\t if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n\t throw new TypeError('Body not allowed for GET or HEAD requests')\n\t }\n\t this._initBody(body)\n\t }\n\t\n\t Request.prototype.clone = function() {\n\t return new Request(this)\n\t }\n\t\n\t function decode(body) {\n\t var form = new FormData()\n\t body.trim().split('&').forEach(function(bytes) {\n\t if (bytes) {\n\t var split = bytes.split('=')\n\t var name = split.shift().replace(/\\+/g, ' ')\n\t var value = split.join('=').replace(/\\+/g, ' ')\n\t form.append(decodeURIComponent(name), decodeURIComponent(value))\n\t }\n\t })\n\t return form\n\t }\n\t\n\t function headers(xhr) {\n\t var head = new Headers()\n\t var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n\t pairs.forEach(function(header) {\n\t var split = header.trim().split(':')\n\t var key = split.shift().trim()\n\t var value = split.join(':').trim()\n\t head.append(key, value)\n\t })\n\t return head\n\t }\n\t\n\t Body.call(Request.prototype)\n\t\n\t function Response(bodyInit, options) {\n\t if (!options) {\n\t options = {}\n\t }\n\t\n\t this.type = 'default'\n\t this.status = options.status\n\t this.ok = this.status >= 200 && this.status < 300\n\t this.statusText = options.statusText\n\t this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n\t this.url = options.url || ''\n\t this._initBody(bodyInit)\n\t }\n\t\n\t Body.call(Response.prototype)\n\t\n\t Response.prototype.clone = function() {\n\t return new Response(this._bodyInit, {\n\t status: this.status,\n\t statusText: this.statusText,\n\t headers: new Headers(this.headers),\n\t url: this.url\n\t })\n\t }\n\t\n\t Response.error = function() {\n\t var response = new Response(null, {status: 0, statusText: ''})\n\t response.type = 'error'\n\t return response\n\t }\n\t\n\t var redirectStatuses = [301, 302, 303, 307, 308]\n\t\n\t Response.redirect = function(url, status) {\n\t if (redirectStatuses.indexOf(status) === -1) {\n\t throw new RangeError('Invalid status code')\n\t }\n\t\n\t return new Response(null, {status: status, headers: {location: url}})\n\t }\n\t\n\t self.Headers = Headers;\n\t self.Request = Request;\n\t self.Response = Response;\n\t\n\t self.fetch = function(input, init) {\n\t return new Promise(function(resolve, reject) {\n\t var request\n\t if (Request.prototype.isPrototypeOf(input) && !init) {\n\t request = input\n\t } else {\n\t request = new Request(input, init)\n\t }\n\t\n\t var xhr = new XMLHttpRequest()\n\t\n\t function responseURL() {\n\t if ('responseURL' in xhr) {\n\t return xhr.responseURL\n\t }\n\t\n\t // Avoid security warnings on getResponseHeader when not allowed by CORS\n\t if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n\t return xhr.getResponseHeader('X-Request-URL')\n\t }\n\t\n\t return;\n\t }\n\t\n\t xhr.onload = function() {\n\t var status = (xhr.status === 1223) ? 204 : xhr.status\n\t if (status < 100 || status > 599) {\n\t reject(new TypeError('Network request failed'))\n\t return\n\t }\n\t var options = {\n\t status: status,\n\t statusText: xhr.statusText,\n\t headers: headers(xhr),\n\t url: responseURL()\n\t }\n\t var body = 'response' in xhr ? xhr.response : xhr.responseText;\n\t resolve(new Response(body, options))\n\t }\n\t\n\t xhr.onerror = function() {\n\t reject(new TypeError('Network request failed'))\n\t }\n\t\n\t xhr.open(request.method, request.url, true)\n\t\n\t if (request.credentials === 'include') {\n\t xhr.withCredentials = true\n\t }\n\t\n\t if ('responseType' in xhr && support.blob) {\n\t xhr.responseType = 'blob'\n\t }\n\t\n\t request.headers.forEach(function(value, name) {\n\t xhr.setRequestHeader(name, value)\n\t })\n\t\n\t xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n\t })\n\t }\n\t self.fetch.polyfill = true\n\t})(typeof self !== 'undefined' ? self : this);\n\n\n/***/ },\n/* 13 */,\n/* 14 */,\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _Form = __webpack_require__(9);\n\t\n\tvar _Form2 = _interopRequireDefault(_Form);\n\t\n\tvar _Tooltip = __webpack_require__(6);\n\t\n\tvar _Tooltip2 = _interopRequireDefault(_Tooltip);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t// default export as component object\n\texports.default = {\n\t Form: _Form2.default,\n\t Settings: _Settings2.default,\n\t Tooltip: _Tooltip2.default\n\t};\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** js/form.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 13012788ed6358b638c7\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Provides a Basic Widget\n */\nclass DestroyableWidget {\n\n constructor() {\n this.listeners = [];\n }\n\n /**\n * Destroys a Widget\n */\n destroy() {\n this.listeners.forEach((listener) => {\n listener.element.removeEventListener.apply(listener.element, listener.args);\n });\n this.listeners = [];\n }\n\n /**\n * Adds an event and registers it later to remove bindings\n * @param {HTMLElement} element\n * @param {String} name\n * @param {Function} listener\n * @param {boolean} [capture]\n * @returns {Function}\n */\n addEventListener(element, name, listener, capture) {\n this.listeners.push({\n element,\n args: [name, listener, capture]\n });\n\n element.addEventListener(name, listener, capture);\n return listener;\n }\n\n}\n\nexport default DestroyableWidget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/DestroyableWidget.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Tooltip\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport DestroyableWidget from './DestroyableWidget';\nimport Settings from './util/Settings';\n\n/**\n * @type {string}\n */\nconst CLASS_NAMES_TOOLTIP = 'tooltip-container';\n/**\n * @type {string}\n */\nconst CLASS_NAMES_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_CLASSNAME = 'data-class';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\n/**\n * @type {HTMLDocument}\n */\nconst doc = global.document;\n\n/**\n * Simple Tooltip\n */\nclass Tooltip extends DestroyableWidget {\n\n /**\n * Creates a Tooltip\n * @param {HTMLElement|String} DelegateContainer\n * @param {Object} [options]\n */\n constructor(DelegateContainer, options) {\n super();\n /**\n * The Container where possible events are captured\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n if (!this.container) {\n throw new Error('Could not create Tooltip, DelegateContainer not found');\n }\n\n /**\n * The Container where tooltips are stored for this instance\n * @type {HTMLElement}\n */\n this.tooltipContainer = null;\n\n /**\n * Default Options\n */\n this.options = {\n containerClass: '',\n selectorAttribute: 'data-tooltip',\n collisionContainer: this.container\n };\n\n Object.assign(this.options, options || {});\n }\n\n /**\n * Creates and shows a tooltip\n * @param {HTMLElement} target where is this tooltip positioned\n * @param {String} text text content in tooltip, will be NOT escaped\n * @param {Boolean} [removeTitle] removes title element if given\n * @param {Node} [positionRelative]\n */\n createTooltip(target, text, removeTitle, positionRelative) {\n // abort if text is empty\n if (!text || text && text.trim() === '') {\n return;\n }\n\n if (Settings.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n return;\n }\n\n let tooltipContainer = this.tooltipContainer;\n\n if (!tooltipContainer) {\n tooltipContainer = doc.createElement('div');\n this.container.appendChild(tooltipContainer);\n this.tooltipContainer = tooltipContainer;\n }\n this._restoreClassNames(tooltipContainer, target);\n\n tooltipContainer.style.left = 'auto';\n tooltipContainer.style.top = 'auto';\n tooltipContainer.innerHTML = text;\n tooltipContainer.flexTooltipCurrentTarget = target;\n if (removeTitle) {\n target.oldTitle = text;\n target.removeAttribute('title');\n }\n\n Util.setupPositionNearby(positionRelative || target, tooltipContainer,\n this.options.collisionContainer, true, true);\n\n tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n }\n\n _restoreClassNames(container, target) {\n // allow additional classname per tooltip on target element\n const classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n const maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n if (maybeTargetClass) {\n classNames.push(maybeTargetClass);\n }\n container.className = classNames.join(\" \");\n return this;\n }\n\n /**\n * @returns {HTMLElement|null}\n */\n getCurrentTarget() {\n return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n }\n\n /**\n * Destroys this Widget\n * @returns {boolean}\n */\n destroy() {\n super.destroy();\n\n if (this.tooltipContainer) {\n this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n return true;\n }\n return false;\n }\n\n /**\n * Removes a Tooltip on given target\n * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n */\n removeTooltip(target) {\n let selfTarget = target;\n if (!selfTarget && this.tooltipContainer) {\n selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (this.tooltipContainer) {\n if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n return;\n }\n this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n delete this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (selfTarget && selfTarget.oldTitle) {\n selfTarget.setAttribute('title', selfTarget.oldTitle);\n }\n }\n\n /**\n * Initilizes mouse events on container element\n */\n registerEvents() {\n const self = this;\n this.addEventListener(this.container, 'mouseover', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.createTooltip(e.target, e.target.getAttribute('title'), true);\n }\n });\n\n this.addEventListener(this.container, 'mouseout', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.removeTooltip(e.target);\n }\n });\n return this;\n }\n}\n\nexport default Tooltip;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Tooltip.js\n **/","/*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Form\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Tooltip from './Tooltip';\nimport 'isomorphic-fetch';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport DestroyableWidget from './DestroyableWidget';\n\nconst LOADING_CLASS = 'loading';\nconst DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\nconst REMOTE = 'data-remote';\nconst REMOTE_ACTION = 'data-remote-action';\nconst ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\nconst ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\nconst ATTR_VALIDATOR = 'data-validate';\nconst ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\nconst ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\nconst ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\nconst ATTR_ERROR_TARGET_ID = 'data-error-target';\nconst ATTR_DEPENDS = 'data-depends-selector';\nconst CONST_USE_JSON = 'json';\nconst CONST_REALTIME_EVENT = 'input';\nconst FOCUS_TOOLTIP_DELAY = 20;\nconst CLICK_TOOLTIP_DELAY = 150;\n\n/**\n * Triggered when form is fully initialized and handlers are binded\n * @type {string}\n */\nexport const EVENT_FORM_READY = 'flexcss.form.ready';\n/**\n * Fires when a form is submitted, cancelable\n * @type {string}\n */\nexport const EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n/**\n * Fired directly after the form has been submitted via ajax\n * @type {string}\n */\nexport const EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n/**\n * Fired when ajax events did complete\n * @type {string}\n */\nexport const EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\n/**\n * A HTML5 Form Validation replacement\n */\n\nclass Form extends DestroyableWidget {\n /**\n * @param {HTMLElement} form\n * @param [options] optional options\n */\n constructor(form, options) {\n super();\n\n if (!(form instanceof HTMLFormElement)) {\n throw 'argument {0} form needs to be an form element';\n }\n\n /**\n * The Form\n * @type {HTMLElement}\n */\n this.form = form;\n\n /**\n * @type {Tooltip}\n */\n this.tooltips = null;\n\n /**\n * @type {Promise}\n */\n this.currentValidationFuture = new Promise(() => {\n });\n\n /**\n * Default options\n * @type {Object}\n */\n this.options = {\n // if true creates tooltips above element, uses FlexCss Tooltips\n createTooltips: true,\n // if true appends error message after input element\n appendError: false,\n // type of ajax submit\n ajaxSubmitType: 'POST',\n // json content type if ajax method is set to json\n ajaxJsonContentType: 'application/json; charset=utf-8',\n // allow inline validation\n inlineValidation: true,\n // validate in realtime (on `input` event)\n realtime: true,\n // timeout when realtime event should be captured\n realtimeTimeout: 250,\n // formatting method for an error\n formatErrorTooltip: (error) => {\n return ' ' + error;\n },\n // the class that will be put on the element to mark it failed validation\n inputErrorClass: 'invalid',\n // the container class for error messages below an element\n containerErrorClass: 'form-error',\n // additional options for fetch\n fetchOptions: {\n credentials: 'include'\n },\n // the container for tooltips\n tooltipContainer: form,\n tooltipOptions: {\n containerClass: 'error-tooltip'\n },\n // if you have a fixed header, either set a number or function here\n scrollToElementDiff: 0\n };\n\n // overwrite default options\n Object.assign(this.options, options);\n\n // apply settings from attributes\n Util.applyOptionsFromElement(form, this.options);\n\n // set form class as widget\n // Forms are very different to classical widgets,\n // we will not use our base widget class for this but just self\n form.hfWidgetInstance = this;\n\n /**\n * A List of Validators\n * @type {Object}\n * @private\n */\n this._validators = Form.globalValidators;\n\n /**\n * @type {Function}\n * @private\n */\n this._remoteValidationFunction = null;\n\n this.initFormValidation();\n }\n\n destroy() {\n super.destroy();\n if (this.tooltips) {\n this.tooltips.destroy();\n }\n }\n\n /**\n * Submits this form, either via ajax or just classical (default)\n * @param {HTMLFormElement} thisForm\n * @param {Event} e\n * @private\n * @returns {Promise|boolean} returns false if submit is cancled\n */\n _submitFunction(thisForm, e) {\n var shouldUseAjax = thisForm.getAttribute(REMOTE), ajaxPostUrl =\n thisForm.getAttribute(REMOTE_ACTION) ||\n thisForm.getAttribute('action') || window.location.href,\n useJson = CONST_USE_JSON === shouldUseAjax, self = this;\n\n var ev = Event.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\n // abort execution is event was prevented\n if (ev.defaultPrevented) {\n self._formStopLoading();\n return false;\n }\n\n if (shouldUseAjax === null) {\n // submit\n return thisForm.submit();\n }\n // prevent form from submit normally\n e.preventDefault();\n\n // add information that this is an XMLHttpRequest request (used by some frameworks)\n let defaultHeaders = {\n 'X-Requested-With': 'XMLHttpRequest'\n };\n\n // setup default headers\n if (useJson) {\n Object.assign(defaultHeaders, {\n 'Content-Type': this.options.ajaxJsonContentType\n });\n }\n let defaultOptions = Object.assign(this.options.fetchOptions, {\n headers: defaultHeaders,\n method: this.options.ajaxSubmitType\n });\n\n // support either JSON request payload or normal payload submission\n var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: JSON.stringify(this.serialize())\n })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: new FormData(thisForm)\n }));\n\n Event.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\n return serverCall.then((r) => {\n (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\n Event.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n // always remove error class\n self._formStopLoading();\n });\n }\n\n /**\n * Serializes a form to a json object\n * @returns {Object}\n */\n serialize() {\n var selectors = [\n 'input[name]:not([type=\"radio\"]):enabled',\n 'input[type=\"radio\"][name]:checked',\n 'select[name]:enabled',\n 'textarea[name]:enabled'\n ], inputs = this.form.querySelectorAll(selectors.join(',')), result = {};\n\n Array.prototype.forEach.call(inputs, function (input) {\n var exists = result[input.name], value = input.value;\n if (exists instanceof Array) {\n exists.push(value);\n } else if (exists) {\n result[input.name] = [result[input.name], value];\n } else {\n result[input.name] = value;\n }\n });\n\n return result;\n }\n\n /**\n * Handles the chain of validation on given fields\n *\n * @param {HTMLElement|Array|NodeList} field\n * @param [focus] optional focus first error\n * @returns {Promise}\n */\n handleValidation(field, focus) {\n var fields = (field instanceof Array || field instanceof NodeList) ? field : [field];\n return this._handleValidation(fields, focus, true).then(((r) => {\n if (!r.foundAnyError) {\n // remove tooltips\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n }\n return r;\n }).bind(this));\n }\n\n /**\n * Handles errors on given node list\n * @param {NodeList} toValidateFields\n * @param {boolean} focus\n * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n * @returns {Promise}\n * @private\n */\n _handleValidation(toValidateFields, focus, scoped) {\n var self = this;\n var arr = Form._createArrayFromInvalidFieldList(toValidateFields), isLocalInvalid = arr.length > 0;\n // focus must appear in the same frame for iOS devices\n if (isLocalInvalid && focus) {\n self._focusElement(arr[0]);\n }\n var validation = scoped ? this._customValidationsForElements(toValidateFields) :\n self.validateCustomFields();\n return validation.then((r) => {\n if (isLocalInvalid) {\n // combine browser and custom validators\n r.foundAnyError = true;\n }\n // get a unique field list of all fields that need to be checked and rendered\n // it's possible that we have duplicates in non scoped mode\n let thisToValidateFields = scoped ? toValidateFields :\n Array.from(arr).concat(r.checkedFields);\n r.checkedFields = thisToValidateFields;\n let foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n firstInvalidField = foundInvalidFields[0];\n if (firstInvalidField) {\n if (focus) {\n self._focusElement(firstInvalidField);\n // if element could not be focused:\n if (document.activeElement !== firstInvalidField) {\n self._handleTooltipHideClickAfterChange();\n }\n } else {\n self._handleTooltipHideClickAfterChange();\n }\n self.showAndOrCreateTooltip(firstInvalidField);\n }\n return r;\n });\n }\n\n /**\n * @param {HTMLElement} field\n * @param {ValidityState} validity\n * @returns {*}\n * @private\n */\n\n _setupErrorMessages(field, validity) {\n return Form.globalErrorMessageHandler ?\n Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n }\n\n /**\n * Handles class labels for elements\n * @param {Object} fields\n * @private\n */\n _handleLabels(fields) {\n Object.keys(fields).forEach(function (id) {\n let labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'), invalid = fields[id];\n if (labels.length) {\n for (let labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n let labelEl = labels[labelsIndex];\n // we can't use toggle attribute, not supported in IE\n if (invalid) {\n this._markElementInvalid(labelEl);\n } else {\n this._markElementValid(labelEl);\n }\n }\n }\n }.bind(this));\n }\n\n /**\n * @param el\n * @private\n */\n _markElementInvalid(el) {\n el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n el.classList.add(this.options.inputErrorClass);\n }\n\n /**\n * @param el\n * @private\n */\n _markElementValid(el) {\n el.removeAttribute(DATA_ELEMENT_INVALID);\n el.classList.remove(this.options.inputErrorClass);\n }\n\n /**\n * A List of invalid elements (:invalid)\n * @returns {Array}\n * @private\n */\n _getInvalidElements() {\n return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n return !(r instanceof HTMLFieldSetElement);\n });\n }\n\n /**\n * @param {HTMLElement} thisParent\n * @private\n */\n _removeElementErrors(thisParent) {\n let errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass), inputsWithErrorClasses =\n thisParent.querySelectorAll(`[${DATA_ELEMENT_INVALID}]`);\n for (let elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n }\n for (let inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n let el = inputsWithErrorClasses[inputErrorIndex];\n this._markElementValid(el);\n }\n }\n\n\n /**\n * Registers a custom validator\n * @param {String} name\n * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n * we can't rely on that\n * @returns {Form}\n */\n registerValidator(name, validator) {\n this._validators[name] = validator;\n return this;\n }\n\n /**\n * Runs async validation\n * @param {String} validationRef\n * @param {HTMLElement} field\n * @returns {Promise}\n * @private\n */\n _runValidation(validationRef, field) {\n if (!this._validators[validationRef]) {\n throw 'Could not found validator: ' + validationRef;\n }\n var cl = field.classList, future = this._validators[validationRef].apply(this, [field, this.form]);\n cl.add(LOADING_CLASS);\n future.then(() => {\n cl.remove(LOADING_CLASS);\n });\n return future;\n }\n\n\n /**\n * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n *\n * @param {Array|NodeList} fields\n * @returns {Promise} contains either true if validations passed or false if something went wrong\n * @private\n */\n _customValidationsForElements(fields) {\n var futures = [], fieldsLength = fields.length, checkedFields = [];\n for (var iVal = 0; iVal < fieldsLength; iVal++) {\n var field = fields[iVal], validationRef = field.getAttribute(ATTR_VALIDATOR), validity = field.validity;\n if (this._validators[validationRef]) {\n // use local validation first and then continue with custom validations\n if (Form._shouldNotValidateField(field) || (validity && !validity.customError && !validity.valid)) {\n continue;\n }\n checkedFields.push(field);\n futures.push(this._runValidation(validationRef, field));\n } else {\n if (validationRef) {\n console.warn('data-validate was set but no validator was found');\n }\n }\n }\n return Promise.all(futures).then(function (allFutures) {\n let l = allFutures.length;\n let result = {\n checkedFields: checkedFields,\n foundAnyError: false\n };\n for (var fI = 0; fI < l; fI++) {\n if (!allFutures[fI]) {\n result.foundAnyError = true;\n break;\n }\n }\n return result;\n });\n }\n\n /**\n * Remove all errors for this form\n * @returns {Form}\n */\n removeErrors() {\n this._removeElementErrors(this.form);\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n return this;\n }\n\n /**\n * Will handle errors for given fields\n * @param {Array|NodeList} fields\n * @param {Boolean} removeAllErrors\n */\n prepareErrors(fields, removeAllErrors) {\n if (removeAllErrors) {\n this.removeErrors();\n }\n let labelGroups = {}, invalidFields = [];\n\n function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n let additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) ||\n field.id, group = thisLabelGroup[additionalLabels];\n if (additionalLabels) {\n // check additionally if field is currently marked as invalid\n // so the label is not marked as error if no field is marked as one\n group = group ? group : isInvalid;\n thisLabelGroup[additionalLabels] = group;\n }\n }\n\n // We save all validations in an extra property because we need to reset the validity due some\n // implementation errors in other browsers then chrome\n for (let i = 0; i < fields.length; i++) {\n let field = fields[i], errorTarget = Form._findErrorTarget(field), parent = errorTarget.parentNode,\n validity = field.validity, isInvalid = validity && !validity.valid;\n if (Form._shouldNotValidateField(field)) {\n continue;\n }\n field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n handleAdditionalLabels(isInvalid, labelGroups, field);\n if (isInvalid) {\n if (!removeAllErrors) {\n // Remove current errors:\n this._removeElementErrors(parent);\n }\n // setup custom error messages:\n this._setupErrorMessages(field, validity);\n let msg = field.validationMessage;\n\n // mark fields as invalid\n this._markElementInvalid(errorTarget);\n this._markElementInvalid(field);\n\n if (this.options.appendError) {\n parent.insertAdjacentHTML(\"beforeend\",\n `
${msg}
`);\n }\n invalidFields.push(field);\n field.flexFormsSavedValidationMessage = msg;\n } else {\n // restore invalid fields\n this._markElementValid(errorTarget);\n this._markElementValid(field);\n\n // cleanup\n delete field.flexFormsSavedValidationMessage;\n\n // remove error markup\n this._removeElementErrors(parent);\n }\n // We have to reset the custom validity here to allow native validations work again\n field.setCustomValidity('');\n }\n // if validates a single field we need to check the linked fields to a label:\n if (fields.length === 1) {\n let field = fields[0];\n let id = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id;\n if (id) {\n let linkedFields = Array.from(\n this.getForm().querySelectorAll(`[${ATTR_DATA_CUSTOM_LABEL}=\"${id}\"], #${id}`));\n linkedFields.forEach(function (thisField) {\n let validity = thisField.validity, isInvalid = validity && !validity.valid &&\n this._isElementInvalidElement(thisField);\n handleAdditionalLabels(isInvalid, labelGroups, thisField);\n }.bind(this));\n }\n }\n this._handleLabels(labelGroups);\n return invalidFields;\n }\n\n /**\n * Validates all custom fields\n * @returns {Promise}\n */\n validateCustomFields() {\n return this._customValidationsForElements(\n this.form.querySelectorAll(\"[data-validate]\"));\n }\n\n /**\n * Tests if a field should be validated\n * @param {HTMLElement} field\n * @returns {boolean}\n * @private\n */\n static _shouldNotValidateField(field) {\n var target = Form._findErrorTarget(field);\n return target instanceof HTMLFieldSetElement || field.validity === undefined ||\n (target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !Util.isVisible(target));\n }\n\n /**\n * Creates an array from a node list with invalid items\n * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n * @param list\n * @returns {Array}\n * @private\n */\n static _createArrayFromInvalidFieldList(list) {\n var arr = [];\n for (var i = 0; i < list.length; ++i) {\n var n = list[i];\n if (n.validity && !n.validity.valid) {\n if (!Form._shouldNotValidateField(n)) {\n arr.push(n);\n }\n }\n }\n return arr;\n }\n\n\n /**\n * This form\n * @returns {HTMLElement}\n */\n getForm() {\n return this.form;\n }\n\n /**\n * Registers a function that handles remote validation\n * @param {Function} func\n * @returns {Form}\n */\n registerRemoteValidation(func) {\n this._remoteValidationFunction = func;\n return this;\n }\n\n\n /**\n * Formats the error content for the tooltip\n * @param {String} error\n * @returns {String}\n * @private\n */\n _formatErrorTooltip(error) {\n return this.options.formatErrorTooltip.apply(this, [error]);\n }\n\n /**\n * Tries to find a custom error target on given target\n * @param target\n * @returns {HTMLElement}\n * @private\n */\n static _findErrorTarget(target) {\n var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n if (!foundTarget) {\n throw 'Given error target did not exsits:' + target;\n }\n return foundTarget;\n }\n\n /**\n * Creates a tooltip at given element, will only create a new instance if not created\n * @param {HTMLElement} target\n * @param {Boolean} [remove]\n */\n showAndOrCreateTooltip(target, remove) {\n var self = this;\n if (!this.tooltips && this.options.createTooltips) {\n this.tooltips = new Tooltip(this.options.tooltipContainer, this.options.tooltipOptions);\n }\n if (!this.options.createTooltips) {\n return false;\n }\n\n if (!target.flexFormsSavedValidity) {\n return false;\n }\n var errorTarget = Form._findErrorTarget(target);\n if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n self.tooltips.createTooltip(errorTarget,\n self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n return true;\n } else {\n if (remove) {\n self.tooltips.removeTooltip();\n }\n }\n return false;\n }\n\n /**\n * Checks if element is marked as invalid\n * @param {HTMLElement} el\n * @returns {boolean}\n * @private\n */\n _isElementInvalidElement(el) {\n return el.hasAttribute(DATA_ELEMENT_INVALID);\n }\n\n /**\n * Handles invalid event of a form\n * @param {Event} e\n * @returns {Promise|boolean}\n * @private\n */\n _checkIsInvalid(e) {\n e.preventDefault();\n var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n return this._handleValidation(invalidFields, true, false);\n }\n\n /**\n * Will query dependent fields (by selector) that should be validated with given field\n * @param field\n * @returns {NodeList|[]}\n * @private\n */\n _getDependentFields(field) {\n let fieldSelector = field.getAttribute(ATTR_DEPENDS), base = [field];\n if (fieldSelector) {\n base.push.apply(base, Array.prototype.slice.apply(\n this.getForm().querySelectorAll(fieldSelector)));\n }\n return base;\n }\n\n /**\n * @private\n * @param {HTMLElement} [target]\n */\n _handleTooltipInline(target) {\n if (this.tooltips) {\n this.tooltips.removeTooltip(target);\n }\n }\n\n /**\n * Initializes validation for a given form, registers event handlers\n */\n initFormValidation() {\n // Suppress the default bubbles\n var form = this.getForm(),\n self = this,\n invalidEvent = 'invalid';\n\n /**\n * Validates if is valid realtime element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidRealtimeElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n form.addEventListener(invalidEvent, function (e) {\n e.preventDefault();\n }, true);\n\n Util.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n self._formLoading();\n var result = self._checkIsInvalid(e);\n if (result) {\n self.currentValidationFuture = new Promise((resolve) => {\n result.then(function (r) {\n setTimeout(function () {\n Util.addEventOnce(invalidEvent, form, handleInvalid, true);\n }, 0);\n resolve(r);\n self._formStopLoading();\n if (!r.foundAnyError) {\n self._formLoading();\n self._handleSubmit(e);\n }\n });\n });\n }\n }, true);\n\n this.addEventListener(form, 'reset', () => {\n this.removeErrors();\n });\n\n // Timeout for keys:\n var TIMEOUT_KEYDOWN, KEYDOWN_RUNNING = false;\n\n // resets keydown events\n function clearKeyDownTimeout() {\n KEYDOWN_RUNNING = false;\n clearTimeout(TIMEOUT_KEYDOWN);\n }\n\n // setup custom realtime event if given\n if (self.options.realtime) {\n this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n if (self._formIsLoading()) {\n return;\n }\n var target = e.target;\n clearTimeout(TIMEOUT_KEYDOWN);\n if (KEYDOWN_RUNNING) {\n return;\n }\n TIMEOUT_KEYDOWN = setTimeout(() => {\n let isStillTarget = document.activeElement === e.target;\n if (!_checkIsValidRealtimeElement(target)) {\n return;\n }\n if (isStillTarget) {\n self._handleTooltipInline();\n }\n KEYDOWN_RUNNING = true;\n let dependentFields = self._getDependentFields(target);\n self._customValidationsForElements(dependentFields).then(function () {\n self.prepareErrors(dependentFields, false);\n if (isStillTarget) {\n self.showAndOrCreateTooltip(e.target);\n }\n // future must be resolved before another event can be started\n KEYDOWN_RUNNING = false;\n });\n }, self.options.realtimeTimeout);\n }, true);\n }\n\n /**\n * Validates if target is a valid input field to check blur and focus events\n *\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidBlurFocusElement(target) {\n let attr = target.getAttribute(\"type\");\n return (attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\");\n }\n\n /**\n * Validates if is valid inline-check element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidInlineCheckElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n this.addEventListener(form, 'blur', function (e) {\n // do not hide tooltip after change event\n if (!e.target.flexcssKeepTooltips) {\n self._handleTooltipInline(e.target);\n }\n delete e.target.flexcssKeepTooltips;\n }, true);\n\n // handle focus on input elements\n // will show an error if field is invalid\n this.addEventListener(form, \"focus\", function (e) {\n if (self._formIsLoading()) {\n return;\n }\n // do not track errors for checkbox and radios on focus:\n if (!_checkIsValidBlurFocusElement(e.target)) {\n return;\n }\n // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n // just have been hidden (on blur). Maybe fix this with a queue later\n setTimeout(function () {\n self.showAndOrCreateTooltip(e.target);\n }, FOCUS_TOOLTIP_DELAY);\n }, true);\n\n if (self.options.inlineValidation) {\n // Handle change for checkbox, radios and selects\n this.addEventListener(form, \"change\", function (e) {\n const target = e.target;\n if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n return;\n }\n clearKeyDownTimeout();\n const name = target.getAttribute('name');\n let inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n // we only support dependent fields for a single widgets right now\n if (inputs.length === 1) {\n inputs = self._getDependentFields(target);\n }\n self._customValidationsForElements(inputs).then(function () {\n self.prepareErrors(inputs, false);\n target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n if (target.flexcssKeepTooltips) {\n self._handleTooltipHideClickAfterChange();\n }\n });\n });\n }\n\n // prevent default if form is invalid\n this.addEventListener(form, \"submit\", function listener(e) {\n self._submitListener(e, listener);\n });\n\n Event.dispatchAndFire(form, EVENT_FORM_READY);\n }\n\n /* Loading states, unfortunately we can't check if a promise is pending :/*/\n /* TODO: Maybe wrap promise to extend this functionality */\n\n _formLoading() {\n this.getForm().classList.add(LOADING_CLASS);\n }\n\n _formStopLoading() {\n this.getForm().classList.remove(LOADING_CLASS);\n }\n\n _formIsLoading() {\n return this.getForm().classList.contains(LOADING_CLASS);\n }\n\n // this defines the logic after a change event when a tooltip is shown\n // because we call this method inside the change event, the click would be immeditally executed with the change\n // event when not using setTimeout(). There might be another solution for this...\n _handleTooltipHideClickAfterChange() {\n const self = this;\n if (this.options.createTooltips) {\n setTimeout(function () {\n Util.addEventOnce(Settings.getTabEvent(), global.document.body, function (t) {\n if (!self._isElementInvalidElement(t.target)) {\n self._handleTooltipInline();\n }\n });\n }, CLICK_TOOLTIP_DELAY);\n }\n }\n\n _focusElement(el) {\n el.focus();\n Util.scrollToElement(el, this.options.scrollToElementDiff);\n }\n\n /**\n * Listener that is executed on form submit\n * @param e\n * @param submitListener\n * @returns {boolean}\n * @private\n */\n _submitListener(e, submitListener) {\n\n const form = this.getForm(),\n self = this,\n submitEvent = 'submit';\n\n if (this._formIsLoading()) {\n e.preventDefault();\n return false;\n }\n this._formLoading();\n form.removeEventListener(submitEvent, submitListener);\n this.removeErrors();\n e.preventDefault();\n // reset:\n if (form.checkValidity()) {\n form.addEventListener(submitEvent, submitListener);\n // It's possible that the form is valid but the custom validations need to be checked again:\n self.currentValidationFuture = new Promise((resolve) => {\n var validation = self.validateCustomFields();\n validation.then(function (r) {\n // because custom validators may mark multiple fields as invalid, we get all of them in the form\n var fields = self._getInvalidElements(),\n errors = self.prepareErrors(fields, false), firstError = errors[0];\n if (firstError) {\n self._focusElement(firstError);\n self.showAndOrCreateTooltip(firstError, true);\n }\n resolve(r);\n });\n });\n self.currentValidationFuture.then(function (r) {\n if (!r.foundAnyError) {\n // Handle submitting the form to server:\n self._handleSubmit(e);\n } else {\n self._formStopLoading();\n }\n });\n } else {\n self._formStopLoading();\n form.addEventListener(submitEvent, submitListener);\n }\n }\n\n\n /**\n * Handles submitting, optionally allows to stop submitting\n * @param e\n * @private\n */\n _handleSubmit(e) {\n this._submitFunction(this.form, e);\n }\n\n\n /**\n * Registers a global event Handler\n * @param errorFunc\n */\n static registerErrorMessageHandler(errorFunc) {\n Form.globalErrorMessageHandler = errorFunc;\n }\n\n /**\n * Initialize forms for a specific selector\n * @param {String} selector\n * @param {Object} [options]\n * @return {array.}\n */\n static init(selector, options) {\n var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') :\n document.querySelectorAll(selector), instances = [];\n for (var i = 0; i < forms.length; i++) {\n instances.push(new Form(forms[i], options));\n }\n return instances;\n }\n\n\n /**\n * Registers a global validator that is usable on all form instances\n * @param {String} name\n * @param {Function} validator\n * @returns {Function}\n */\n static registerValidator(name, validator) {\n Form.globalValidators[name] = validator;\n return Form;\n }\n\n /**\n * Registers a global function that is called when a form should validate the response of a server\n * @param {Function} func\n * @returns {Form}\n */\n static registerGlobalRemoteValidationFunction(func) {\n Form.globalRemoteValidationFunction = func;\n return Form;\n }\n}\n\n\n/**\n * Global validators\n * @type {Array}\n */\nForm.globalValidators = [];\n\n/**\n * Global Remote validation function\n */\nForm.globalRemoteValidationFunction = function () {\n};\n\n/**\n * Handles custom error messages extracts custom message by default\n */\nForm.globalErrorMessageHandler = (field, validity) => {\n if (!validity.customError) {\n let customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n if (customMsg) {\n field.setCustomValidity(customMsg);\n }\n }\n};\n\nexport default Form;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Form.js\n **/","// the whatwg-fetch polyfill installs the fetch() function\n// on the global object (window or self)\n//\n// Return that as the export for use in Webpack, Browserify etc.\nrequire('whatwg-fetch');\nmodule.exports = self.fetch.bind(self);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/isomorphic-fetch/fetch-npm-browserify.js\n ** module id = 11\n ** module chunks = 0 1\n **/","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var list = this.map[name]\n if (!list) {\n list = []\n this.map[name] = list\n }\n list.push(value)\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n var values = this.map[normalizeName(name)]\n return values ? values[0] : null\n }\n\n Headers.prototype.getAll = function(name) {\n return this.map[normalizeName(name)] || []\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = [normalizeValue(value)]\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n Object.getOwnPropertyNames(this.map).forEach(function(name) {\n this.map[name].forEach(function(value) {\n callback.call(thisArg, value, name, this)\n }, this)\n }, this)\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n reader.readAsArrayBuffer(blob)\n return fileReaderReady(reader)\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n reader.readAsText(blob)\n return fileReaderReady(reader)\n }\n\n var support = {\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob();\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n function Body() {\n this.bodyUsed = false\n\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (!body) {\n this._bodyText = ''\n } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n // Only support ArrayBuffers for POST method.\n // Receiving ArrayBuffers happens via Blobs, instead.\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n } else {\n this.text = function() {\n var rejected = consumed(this)\n return rejected ? rejected : Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n if (Request.prototype.isPrototypeOf(input)) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = input\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this)\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function headers(xhr) {\n var head = new Headers()\n var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n pairs.forEach(function(header) {\n var split = header.trim().split(':')\n var key = split.shift().trim()\n var value = split.join(':').trim()\n head.append(key, value)\n })\n return head\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText\n this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request\n if (Request.prototype.isPrototypeOf(input) && !init) {\n request = input\n } else {\n request = new Request(input, init)\n }\n\n var xhr = new XMLHttpRequest()\n\n function responseURL() {\n if ('responseURL' in xhr) {\n return xhr.responseURL\n }\n\n // Avoid security warnings on getResponseHeader when not allowed by CORS\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL')\n }\n\n return;\n }\n\n xhr.onload = function() {\n var status = (xhr.status === 1223) ? 204 : xhr.status\n if (status < 100 || status > 599) {\n reject(new TypeError('Network request failed'))\n return\n }\n var options = {\n status: status,\n statusText: xhr.statusText,\n headers: headers(xhr),\n url: responseURL()\n }\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/whatwg-fetch/fetch.js\n ** module id = 12\n ** module chunks = 0 1\n **/","import Form from '../Form';\nimport Tooltip from '../Tooltip';\nimport Settings from '../util/Settings';\n\n// default export as component object\nexport default {\n Form,\n Settings,\n Tooltip\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/Form.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6","webpack:///js/form.min.js","webpack:///webpack/bootstrap a138c665fa30c31cdbad?9e5e","webpack:///./src/main/util/Util.js?5bc4","webpack:///./src/main/util/Settings.js?b01f","webpack:///./src/main/util/Event.js?68bf","webpack:///./src/main/DestroyableWidget.js?8d9b","webpack:///./src/main/Tooltip.js?3890","webpack:///./src/main/Form.js?18a8","webpack:///./~/isomorphic-fetch/fetch-npm-browserify.js?7723","webpack:///./~/whatwg-fetch/fetch.js?1c20","webpack:///./src/main/modules/Form.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","global","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","PFX","COL_LEFT_CLASS","COL_RIGHT_CLASS","COL_BOTTOM_CLASS","Util","element","type","callback","thisFunction","e","apply","thisType","toLowerCase","name","addEventListener","t","el","document","createElement","transitions","transition","OTransition","MozTransition","WebkitTransition","undefined","style","parent","now","parentNode","func","s4","Math","floor","random","toString","substring","doc","inner","width","height","outer","position","top","left","visibility","overflow","appendChild","body","w1","offsetWidth","w2","clientWidth","removeChild","ev","capture","event","removeEventListener","offsetHeight","str","replace","g","toUpperCase","input","JSON","parse","stringify","base","attrs","attributes","attr","s","dashToCamelCase","nodeName","val","nodeValue","hasOwnProperty","parseInt","elementToPosition","collisionContainer","centerHorizontal","positionTop","amountTop","amountLeft","parentsUntil","HTMLElement","window","getComputedStyle","isPartOfNode","offsetTop","offsetLeft","targetPosition","getBoundingClientRect","elementRect","colRect","targetTop","targetRight","right","isCollisionTop","isCollisionBottom","innerHeight","isCollisionLeft","targetLeft","isCollisionRight","classList","remove","calcTop","calcLeft","add","rightPosition","leftCentered","collisionCentered","cssText","optionalOffset","scrollIntoView","thisOffset","scrolledY","pageYOffset","scroll","_interopRequireDefault","obj","__esModule","default","_Util","_Util2","FLEXCSS_GLOBAL_SETTINGS","smallBreakpoint","scrollbarUpdateNodes","darkenerFadeDelay","canvasToggledClass","FLEXCSS_CONST_IS_IOS","FLEXCSS_CONST_IS_TOUCH","FLEXCSS_CONST_IS_IE","FLEXCSS_CONST_TAB_EVENT","FLEXCSS_IS_SMALL_SCREEN","init","FLEXCSS_CONST_SCROLLBAR_WIDTH","getScrollBarWidth","FLEXCSS_CONST_TRANSITION_EVENT","whichTransitionEndEvent","readyState","Settings","settings","assign","navigator","userAgent","match","innerWidth","get","msMaxTouchPoints","CustomEvent","_CustomEvent","params","thisParams","bubbles","cancelable","detail","evt","createEvent","initCustomEvent","Event","EventHandler","defaultOptions","options","withDetail","originalEvent","o","dispatchEvent","withOptions","fire","DestroyableWidget","listeners","forEach","listener","args","push","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","create","constructor","setPrototypeOf","__proto__","_get","object","property","receiver","Function","desc","getOwnPropertyDescriptor","getPrototypeOf","getter","_DestroyableWidget2","_DestroyableWidget3","_Settings","_Settings2","CLASS_NAMES_TOOLTIP","CLASS_NAMES_OPEN","ATTR_DATA_CLASSNAME","ATTR_DATA_NO_TOUCH","Tooltip","_DestroyableWidget","DelegateContainer","_this","container","getElementById","Error","tooltipContainer","containerClass","selectorAttribute","text","removeTitle","positionRelative","trim","isTouchDevice","hasAttribute","_restoreClassNames","innerHTML","flexTooltipCurrentTarget","oldTitle","removeAttribute","setupPositionNearby","classNames","maybeTargetClass","getAttribute","className","join","selfTarget","setAttribute","createTooltip","removeTooltip","EVENT_FORM_AJAX_COMPLETED","EVENT_FORM_AFTER_AJAX_SUBMIT","EVENT_FORM_SUBMIT","EVENT_FORM_READY","_Tooltip","_Tooltip2","_Event","_Event2","LOADING_CLASS","DATA_ELEMENT_INVALID","REMOTE","REMOTE_ACTION","ATTR_DISABLE_INLINE","ATTR_DISABLE_REALTIME","ATTR_VALIDATOR","ATTR_DATA_CUSTOM_MESSAGE","ATTR_DATA_CUSTOM_LABEL","ATTR_VALIDATE_VISIBILITY","ATTR_ERROR_TARGET_ID","ATTR_DEPENDS","CONST_USE_JSON","CONST_REALTIME_EVENT","FOCUS_TOOLTIP_DELAY","CLICK_TOOLTIP_DELAY","Form","form","HTMLFormElement","tooltips","currentValidationFuture","Promise","createTooltips","appendError","ajaxSubmitType","ajaxJsonContentType","inlineValidation","realtime","realtimeTimeout","formatErrorTooltip","error","inputErrorClass","containerErrorClass","fetchOptions","credentials","tooltipOptions","scrollToElementDiff","applyOptionsFromElement","hfWidgetInstance","_validators","globalValidators","_remoteValidationFunction","initFormValidation","destroy","thisForm","shouldUseAjax","ajaxPostUrl","location","href","useJson","dispatch","withOriginal","defaultPrevented","_formStopLoading","submit","preventDefault","defaultHeaders","X-Requested-With","Content-Type","headers","method","serverCall","fetch","serialize","FormData","then","r","globalRemoteValidationFunction","response","selectors","inputs","querySelectorAll","result","Array","exists","field","focus","_this2","fields","NodeList","_handleValidation","foundAnyError","bind","toValidateFields","scoped","arr","_createArrayFromInvalidFieldList","isLocalInvalid","_focusElement","validation","_customValidationsForElements","validateCustomFields","thisToValidateFields","from","concat","checkedFields","foundInvalidFields","prepareErrors","firstInvalidField","activeElement","_handleTooltipHideClickAfterChange","showAndOrCreateTooltip","validity","globalErrorMessageHandler","keys","labels","getForm","invalid","labelsIndex","labelEl","_markElementInvalid","_markElementValid","filter","HTMLFieldSetElement","thisParent","errors","inputsWithErrorClasses","elementErrorIndex","inputErrorIndex","validator","validationRef","cl","future","futures","fieldsLength","iVal","_shouldNotValidateField","customError","valid","_runValidation","console","warn","all","allFutures","l","fI","_removeElementErrors","removeAllErrors","handleAdditionalLabels","isInvalid","thisLabelGroup","additionalLabels","group","removeErrors","labelGroups","invalidFields","errorTarget","_findErrorTarget","flexFormsSavedValidity","_setupErrorMessages","msg","validationMessage","insertAdjacentHTML","flexFormsSavedValidationMessage","setCustomValidity","_field","linkedFields","thisField","_isElementInvalidElement","_handleLabels","_formatErrorTooltip","fieldSelector","slice","_checkIsValidRealtimeElement","clearKeyDownTimeout","KEYDOWN_RUNNING","clearTimeout","TIMEOUT_KEYDOWN","_checkIsValidBlurFocusElement","_checkIsValidInlineCheckElement","_this3","invalidEvent","addEventOnce","handleInvalid","_formLoading","_checkIsInvalid","resolve","setTimeout","_handleSubmit","_formIsLoading","isStillTarget","_handleTooltipInline","dependentFields","_getDependentFields","flexcssKeepTooltips","_submitListener","dispatchAndFire","contains","getTabEvent","scrollToElement","submitListener","submitEvent","checkValidity","_getInvalidElements","firstError","_submitFunction","isVisible","list","n","foundTarget","errorFunc","selector","forms","instances","customMsg","normalizeName","String","test","normalizeValue","Headers","map","append","getOwnPropertyNames","consumed","bodyUsed","reject","fileReaderReady","reader","onload","onerror","readBlobAsArrayBuffer","blob","FileReader","readAsArrayBuffer","readBlobAsText","readAsText","Body","_initBody","_bodyInit","_bodyText","support","Blob","isPrototypeOf","_bodyBlob","formData","_bodyFormData","arrayBuffer","ArrayBuffer","set","rejected","decode","json","normalizeMethod","upcased","methods","indexOf","Request","url","mode","referrer","split","bytes","shift","decodeURIComponent","xhr","head","pairs","getAllResponseHeaders","header","Response","bodyInit","status","ok","statusText","values","getAll","has","thisArg","clone","redirectStatuses","redirect","RangeError","responseURL","getResponseHeader","request","XMLHttpRequest","responseText","open","withCredentials","responseType","setRequestHeader","send","polyfill","_Form","_Form2"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,E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versalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"../\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(18);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\tvar PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\t\n\tvar COL_LEFT_CLASS = 'is-collision-left';\n\t\n\tvar COL_RIGHT_CLASS = 'is-collision-right';\n\t\n\tvar COL_BOTTOM_CLASS = 'is-collision-bottom';\n\t\n\t/**\n\t * Provides shared DOM-Utility functions\n\t */\n\t\n\tvar Util = function () {\n\t function Util() {\n\t _classCallCheck(this, Util);\n\t }\n\t\n\t _createClass(Util, null, [{\n\t key: \"prefixedAnimateEvent\",\n\t\n\t\n\t /**\n\t * Will register the right animation event based on browser\n\t * @param element\n\t * @param type\n\t * @param callback\n\t */\n\t value: function prefixedAnimateEvent(element, type, callback) {\n\t var thisFunction = function thisFunction(e) {\n\t callback.apply(element, [e, thisFunction]);\n\t };\n\t\n\t for (var p = 0; p < PFX.length; p++) {\n\t var thisType = type;\n\t if (!PFX[p]) {\n\t thisType = type.toLowerCase();\n\t }\n\t var name = PFX[p] + thisType;\n\t element.addEventListener(name, thisFunction, true);\n\t }\n\t }\n\t\n\t /**\n\t * Get correct transitionend event\n\t * @returns {String}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"whichTransitionEndEvent\",\n\t value: function whichTransitionEndEvent() {\n\t var t = void 0;\n\t var el = document.createElement('fake');\n\t\n\t var transitions = {\n\t transition: 'transitionend',\n\t OTransition: 'oTransitionEnd',\n\t MozTransition: 'transitionend',\n\t WebkitTransition: 'webkitTransitionEnd'\n\t };\n\t\n\t for (t in transitions) {\n\t if (el.style[t] !== undefined) {\n\t return transitions[t];\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Check if target is part of parent node\n\t * @param target\n\t * @param parent\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: \"isPartOfNode\",\n\t value: function isPartOfNode(target, parent) {\n\t if (!target || !parent) {\n\t return false;\n\t }\n\t var now = target;\n\t while (now !== parent && now !== null) {\n\t if (now === parent) {\n\t break;\n\t }\n\t now = now.parentNode;\n\t }\n\t return now !== null;\n\t }\n\t\n\t /**\n\t * Finds the closest element including itself matching a callback\n\t * @param {Node} el\n\t * @param {Function} callback\n\t * @returns {Node|boolean}\n\t */\n\t\n\t }, {\n\t key: \"closestCallback\",\n\t value: function closestCallback(el, callback) {\n\t var element = el;\n\t while (element !== null) {\n\t if (callback(element)) {\n\t return element;\n\t }\n\t element = element.parentNode;\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Walks the tree until func returns true for given argument\n\t * @param target\n\t * @param func\n\t * @returns {boolean|HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"parentsUntil\",\n\t value: function parentsUntil(target, func) {\n\t if (!target) {\n\t return false;\n\t }\n\t var now = target;\n\t while (!func(now) && now !== null) {\n\t now = now.parentNode;\n\t }\n\t\n\t return now;\n\t }\n\t\n\t /**\n\t * Generates a unique id\n\t * @return {String}\n\t */\n\t\n\t }, {\n\t key: \"guid\",\n\t value: function guid() {\n\t function s4() {\n\t return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n\t }\n\t\n\t return s4() + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + (s4() + s4() + s4());\n\t }\n\t\n\t /**\n\t * Detects scrollbar width\n\t * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n\t * @returns {number}\n\t */\n\t\n\t }, {\n\t key: \"getScrollBarWidth\",\n\t value: function getScrollBarWidth() {\n\t var doc = global.document;\n\t var inner = doc.createElement('p');\n\t\n\t inner.style.width = \"100%\";\n\t inner.style.height = \"200px\";\n\t\n\t var outer = doc.createElement('div');\n\t outer.style.position = \"absolute\";\n\t outer.style.top = \"0px\";\n\t outer.style.left = \"0px\";\n\t outer.style.visibility = \"hidden\";\n\t outer.style.width = \"200px\";\n\t outer.style.height = \"150px\";\n\t outer.style.overflow = \"hidden\";\n\t outer.appendChild(inner);\n\t\n\t doc.body.appendChild(outer);\n\t var w1 = inner.offsetWidth;\n\t outer.style.overflow = 'scroll';\n\t var w2 = inner.offsetWidth;\n\t if (w1 === w2) {\n\t w2 = outer.clientWidth;\n\t }\n\t doc.body.removeChild(outer);\n\t\n\t return w1 - w2;\n\t }\n\t\n\t /**\n\t * Run an event once\n\t * @param {String} ev\n\t * @param {HTMLElement|HTMLDocument} target\n\t * @param {Function} func\n\t * @param {boolean} [capture]\n\t * @return Function created listener\n\t */\n\t\n\t }, {\n\t key: \"addEventOnce\",\n\t value: function addEventOnce(ev, target, func, capture) {\n\t var thisFunction = function thisFunction(event) {\n\t func(event, func);\n\t target.removeEventListener(ev, thisFunction, capture);\n\t };\n\t target.addEventListener(ev, thisFunction, capture);\n\t return thisFunction;\n\t }\n\t\n\t /**\n\t * Checks if an element is visible\n\t * @param {HTMLElement} element\n\t * @returns bool\n\t */\n\t\n\t }, {\n\t key: \"isVisible\",\n\t value: function isVisible(element) {\n\t return element.offsetWidth > 0 && element.offsetHeight > 0;\n\t }\n\t\n\t /**\n\t * Creates a camelCaseRepresentation of a dashed string\n\t * @param {String} str\n\t * @returns String\n\t */\n\t\n\t }, {\n\t key: \"dashToCamelCase\",\n\t value: function dashToCamelCase(str) {\n\t return str.replace(/-([a-z])/g, function (g) {\n\t return g[1].toUpperCase();\n\t });\n\t }\n\t\n\t /**\n\t * Creates a copy of `input`\n\t * @param {*} input\n\t * @return *\n\t */\n\t\n\t }, {\n\t key: \"copy\",\n\t value: function copy(input) {\n\t return JSON.parse(JSON.stringify(input));\n\t }\n\t\n\t /**\n\t * Reads options from element (data attributes) and applies to base\n\t * @param {HTMLElement} element\n\t * @param {Object} base\n\t * @return {Object}\n\t */\n\t\n\t }, {\n\t key: \"applyOptionsFromElement\",\n\t value: function applyOptionsFromElement(element, base) {\n\t if (!element) {\n\t return base;\n\t }\n\t var attrs = element.attributes;\n\t for (var i = 0; i < attrs.length; i++) {\n\t var attr = attrs[i];\n\t if (attr) {\n\t var s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n\t var val = attr.nodeValue;\n\t if (base.hasOwnProperty(s)) {\n\t // skip functions\n\t if (typeof base[s] === 'function') {\n\t continue;\n\t }\n\t if (typeof base[s] === 'boolean') {\n\t base[s] = parseInt(val || 1, 10) === 1;\n\t } else {\n\t base[s] = val;\n\t }\n\t }\n\t }\n\t }\n\t return base;\n\t }\n\t\n\t /**\n\t * Will position an element directly at given target\n\t * Is aware of a given collision container to detect edges\n\t * Will put elementToPosition either to left, center or right edge (prefer right)\n\t * and either to bottom or top (prefers bottom)\n\t *\n\t * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n\t *\n\t * @param {HTMLElement|ClientRect} target the target container to align to\n\t * @param {HTMLElement} elementToPosition the element to position\n\t * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n\t * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n\t * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"setupPositionNearby\",\n\t value: function setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n\t // determine relative offsets\n\t var amountTop = 0;\n\t var amountLeft = 0;\n\t Util.parentsUntil(target.parentNode, function (el) {\n\t if (!(el instanceof HTMLElement)) {\n\t return false;\n\t }\n\t var style = window.getComputedStyle(el);\n\t if (Util.isPartOfNode(elementToPosition, el)) {\n\t if (style && style.position === 'relative') {\n\t amountTop += el.offsetTop || 0;\n\t amountLeft += el.offsetLeft || 0;\n\t }\n\t return false;\n\t }\n\t return true;\n\t });\n\t\n\t var targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n\t var elementRect = elementToPosition.getBoundingClientRect();\n\t var colRect = collisionContainer.getBoundingClientRect();\n\t var targetTop = targetPosition.top - amountTop;\n\t var targetRight = targetPosition.right;\n\t var isCollisionTop = targetTop - elementRect.height <= 0;\n\t var isCollisionBottom = window.innerHeight < targetTop + amountTop + targetPosition.height + elementRect.height;\n\t var isCollisionLeft = targetRight < elementRect.width;\n\t var targetLeft = targetPosition.left;\n\t var isCollisionRight = targetLeft + elementRect.width > colRect.width;\n\t var classList = elementToPosition.classList;\n\t\n\t classList.remove(COL_RIGHT_CLASS);\n\t classList.remove(COL_LEFT_CLASS);\n\t classList.remove(COL_BOTTOM_CLASS);\n\t\n\t var calcTop = void 0;\n\t var calcLeft = void 0;\n\t if (isCollisionLeft && !isCollisionRight) {\n\t // put element to left if collision with left\n\t calcLeft = targetPosition.left - colRect.left - amountLeft + \"px\";\n\t classList.add(COL_LEFT_CLASS);\n\t } else {\n\t // maybe center if no collision with either side\n\t var rightPosition = targetRight - elementRect.width - colRect.left - amountLeft + \"px\";\n\t var leftCentered = (targetLeft + targetPosition.width / 2 - elementRect.width / 2 || 0) - colRect.left;\n\t var collisionCentered = leftCentered + elementRect.width > colRect.width;\n\t if (centerHorizontal && !collisionCentered) {\n\t calcLeft = leftCentered + \"px\";\n\t } else {\n\t classList.add(COL_RIGHT_CLASS);\n\t calcLeft = rightPosition;\n\t }\n\t }\n\t\n\t if (isCollisionBottom || positionTop && !isCollisionTop) {\n\t // Put Element on top if collision\n\t calcTop = targetTop - elementRect.height - colRect.top + \"px\";\n\t classList.add(COL_BOTTOM_CLASS);\n\t } else {\n\t calcTop = targetTop + targetPosition.height - colRect.top + \"px\";\n\t }\n\t\n\t elementToPosition.style.cssText = \"top:\" + calcTop + \";left:\" + calcLeft + \";\";\n\t\n\t return elementToPosition;\n\t }\n\t\n\t /**\n\t * Brings a given element into viewport\n\t * @param {HTMLElement} el\n\t * @param {int|function}[optionalOffset]\n\t */\n\t\n\t }, {\n\t key: \"scrollToElement\",\n\t value: function scrollToElement(el, optionalOffset) {\n\t el.scrollIntoView();\n\t var thisOffset = optionalOffset;\n\t // optionally use a additional scrollDif\n\t if (thisOffset) {\n\t if (typeof thisOffset === 'function') {\n\t thisOffset = optionalOffset();\n\t }\n\t if (thisOffset > 0) {\n\t var scrolledY = window.pageYOffset;\n\t if (scrolledY) {\n\t window.scroll(0, scrolledY - thisOffset);\n\t }\n\t }\n\t }\n\t }\n\t }]);\n\t\n\t return Util;\n\t}();\n\t\n\texports.default = Util;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t// we attach global settings to global once because settings might be shared a lot of times trough the application\n\t// Maybe find a better way to handle that scenario\n\tif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n\t (function () {\n\t global.FLEXCSS_GLOBAL_SETTINGS = {\n\t // defined breakpoint for small devices < n\n\t smallBreakpoint: 768,\n\t // nodes that should be updated when no scrollbar is expected\n\t scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n\t // additional Delay until darkener is fully hidden\n\t darkenerFadeDelay: 100,\n\t // class that is added if canvas has been toggled\n\t canvasToggledClass: 'toggled-canvas'\n\t };\n\t\n\t global.FLEXCSS_CONST_IS_IOS = null;\n\t\n\t global.FLEXCSS_CONST_IS_TOUCH = null;\n\t\n\t global.FLEXCSS_CONST_IS_IE = null;\n\t\n\t global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\t\n\t global.FLEXCSS_IS_SMALL_SCREEN = false;\n\t\n\t var init = function init() {\n\t // Measure scrollbar width\n\t global.FLEXCSS_CONST_SCROLLBAR_WIDTH = _Util2.default.getScrollBarWidth();\n\t // detect right transition end event\n\t global.FLEXCSS_CONST_TRANSITION_EVENT = _Util2.default.whichTransitionEndEvent();\n\t };\n\t\n\t if (global.document.readyState !== 'loading') {\n\t init();\n\t } else {\n\t // it's possible that global.document.body is not available if the document is not\n\t // loaded completely\n\t document.addEventListener('DOMContentLoaded', function () {\n\t init();\n\t });\n\t }\n\t })();\n\t}\n\t\n\t/**\n\t * Utility class that setups global settings\n\t */\n\t\n\tvar Settings = function () {\n\t function Settings() {\n\t _classCallCheck(this, Settings);\n\t }\n\t\n\t _createClass(Settings, null, [{\n\t key: 'setup',\n\t\n\t\n\t /**\n\t * Setup global settings, overwrite default values\n\t * @param {Object} settings\n\t */\n\t value: function setup(settings) {\n\t Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n\t }\n\t\n\t /**\n\t * Access to global settings\n\t * @returns {Object}\n\t */\n\t\n\t }, {\n\t key: 'get',\n\t value: function get() {\n\t return global.FLEXCSS_GLOBAL_SETTINGS;\n\t }\n\t\n\t /**\n\t * Detects a IOS Device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isIosDevice',\n\t value: function isIosDevice() {\n\t if (!global.FLEXCSS_CONST_IS_IOS) {\n\t global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n\t }\n\t\n\t return global.FLEXCSS_CONST_IS_IOS;\n\t }\n\t\n\t /**\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isSmallScreen',\n\t value: function isSmallScreen() {\n\t return window.innerWidth < Settings.get().smallBreakpoint;\n\t }\n\t\n\t /**\n\t * Detects a touch device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isTouchDevice',\n\t value: function isTouchDevice() {\n\t if (!global.FLEXCSS_CONST_IS_TOUCH) {\n\t global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!global.navigator.msMaxTouchPoints;\n\t }\n\t return global.FLEXCSS_CONST_IS_TOUCH;\n\t }\n\t\n\t /**\n\t * Checks if current browser is Internet Explorer\n\t * @returns {boolean|*}\n\t */\n\t\n\t }, {\n\t key: 'isIE',\n\t value: function isIE() {\n\t if (!global.FLEXCSS_CONST_IS_IE) {\n\t global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n\t }\n\t return global.FLEXCSS_CONST_IS_IE;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTransitionEvent',\n\t value: function getTransitionEvent() {\n\t return global.FLEXCSS_CONST_TRANSITION_EVENT;\n\t }\n\t\n\t /**\n\t * @returns {int}\n\t */\n\t\n\t }, {\n\t key: 'getScrollbarWidth',\n\t value: function getScrollbarWidth() {\n\t return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTabEvent',\n\t value: function getTabEvent() {\n\t return global.FLEXCSS_CONST_TAB_EVENT;\n\t }\n\t }]);\n\t\n\t return Settings;\n\t}();\n\t\n\texports.default = Settings;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/* global CustomEvent */\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t// polyfill for custom events to make thinks work in IE\n\t// The needed polyfill is so small that I embedded it here\n\t(function poly() {\n\t if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n\t var _CustomEvent = function CustomEvent(event, params) {\n\t var thisParams = params || {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: undefined\n\t };\n\t var evt = document.createEvent(\"CustomEvent\");\n\t evt.initCustomEvent(event, thisParams.bubbles, thisParams.cancelable, thisParams.detail);\n\t return evt;\n\t };\n\t _CustomEvent.prototype = global.Event.prototype;\n\t global.CustomEvent = _CustomEvent;\n\t }\n\t})();\n\t/**\n\t * Simpler Event dispatching\n\t */\n\t\n\tvar EventHandler = function () {\n\t\n\t /**\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t */\n\t\n\t function EventHandler(target, name) {\n\t _classCallCheck(this, EventHandler);\n\t\n\t this.target = target;\n\t this.defaultOptions = {\n\t bubbles: true,\n\t cancelable: true\n\t };\n\t\n\t this.name = name;\n\t }\n\t\n\t /**\n\t * Set more options\n\t * @param {Object} options\n\t * @returns {EventHandler}\n\t */\n\t\n\t\n\t _createClass(EventHandler, [{\n\t key: \"withOptions\",\n\t value: function withOptions(options) {\n\t Object.assign(this.defaultOptions, options || {});\n\t return this;\n\t }\n\t\n\t /**\n\t * Call with the originalEvent\n\t * @param {Event} e\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withOriginal\",\n\t value: function withOriginal(e) {\n\t return this.withDetail({\n\t originalEvent: e\n\t });\n\t }\n\t\n\t /**\n\t * Extends the detail part of the event\n\t * @param {Object} o\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withDetail\",\n\t value: function withDetail(o) {\n\t if (!this.defaultOptions.detail) {\n\t this.defaultOptions.detail = {};\n\t }\n\t Object.assign(this.defaultOptions.detail, o);\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"fire\",\n\t value: function fire() {\n\t var e = new CustomEvent(this.name, this.defaultOptions);\n\t if (this.target) {\n\t this.target.dispatchEvent(e);\n\t }\n\t return e;\n\t }\n\t }]);\n\t\n\t return EventHandler;\n\t}();\n\t\n\tvar Event = function () {\n\t function Event() {\n\t _classCallCheck(this, Event);\n\t }\n\t\n\t _createClass(Event, null, [{\n\t key: \"dispatch\",\n\t\n\t /**\n\t * Prepares to dispatch a custom event (without firing)\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @returns {EventHandler}\n\t */\n\t value: function dispatch(target, name) {\n\t return new EventHandler(target, name);\n\t }\n\t\n\t /**\n\t * Dispatches a custom event and fires it directly\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @param {Object} [options]\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"dispatchAndFire\",\n\t value: function dispatchAndFire(target, name, options) {\n\t return new EventHandler(target, name).withOptions(options).fire();\n\t }\n\t }]);\n\t\n\t return Event;\n\t}();\n\t\n\texports.default = Event;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 4 */,\n/* 5 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/**\n\t * Provides a Basic Widget\n\t */\n\t\n\tvar DestroyableWidget = function () {\n\t function DestroyableWidget() {\n\t _classCallCheck(this, DestroyableWidget);\n\t\n\t this.listeners = [];\n\t }\n\t\n\t /**\n\t * Destroys a Widget\n\t */\n\t\n\t\n\t _createClass(DestroyableWidget, [{\n\t key: \"destroy\",\n\t value: function destroy() {\n\t this.listeners.forEach(function (listener) {\n\t listener.element.removeEventListener.apply(listener.element, listener.args);\n\t });\n\t this.listeners = [];\n\t }\n\t\n\t /**\n\t * Adds an event and registers it later to remove bindings\n\t * @param {HTMLElement} element\n\t * @param {String} name\n\t * @param {Function} listener\n\t * @param {boolean} [capture]\n\t * @returns {Function}\n\t */\n\t\n\t }, {\n\t key: \"addEventListener\",\n\t value: function addEventListener(element, name, listener, capture) {\n\t this.listeners.push({\n\t element: element,\n\t args: [name, listener, capture]\n\t });\n\t\n\t element.addEventListener(name, listener, capture);\n\t return listener;\n\t }\n\t }]);\n\t\n\t return DestroyableWidget;\n\t}();\n\t\n\texports.default = DestroyableWidget;\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _DestroyableWidget2 = __webpack_require__(5);\n\t\n\tvar _DestroyableWidget3 = _interopRequireDefault(_DestroyableWidget2);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Tooltip\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar CLASS_NAMES_TOOLTIP = 'tooltip-container';\n\t/**\n\t * @type {string}\n\t */\n\tvar CLASS_NAMES_OPEN = 'open';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DATA_CLASSNAME = 'data-class';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\t\n\t/**\n\t * @type {HTMLDocument}\n\t */\n\tvar doc = global.document;\n\t\n\t/**\n\t * Simple Tooltip\n\t */\n\t\n\tvar Tooltip = function (_DestroyableWidget) {\n\t _inherits(Tooltip, _DestroyableWidget);\n\t\n\t /**\n\t * Creates a Tooltip\n\t * @param {HTMLElement|String} DelegateContainer\n\t * @param {Object} [options]\n\t */\n\t\n\t function Tooltip(DelegateContainer, options) {\n\t _classCallCheck(this, Tooltip);\n\t\n\t /**\n\t * The Container where possible events are captured\n\t */\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Tooltip).call(this));\n\t\n\t _this.container = DelegateContainer instanceof HTMLElement ? DelegateContainer : doc.getElementById(DelegateContainer);\n\t\n\t if (!_this.container) {\n\t throw new Error('Could not create Tooltip, DelegateContainer not found');\n\t }\n\t\n\t /**\n\t * The Container where tooltips are stored for this instance\n\t * @type {HTMLElement}\n\t */\n\t _this.tooltipContainer = null;\n\t\n\t /**\n\t * Default Options\n\t */\n\t _this.options = {\n\t containerClass: '',\n\t selectorAttribute: 'data-tooltip',\n\t collisionContainer: _this.container\n\t };\n\t\n\t Object.assign(_this.options, options || {});\n\t return _this;\n\t }\n\t\n\t /**\n\t * Creates and shows a tooltip\n\t * @param {HTMLElement} target where is this tooltip positioned\n\t * @param {String} text text content in tooltip, will be NOT escaped\n\t * @param {Boolean} [removeTitle] removes title element if given\n\t * @param {Node} [positionRelative]\n\t */\n\t\n\t\n\t _createClass(Tooltip, [{\n\t key: 'createTooltip',\n\t value: function createTooltip(target, text, removeTitle, positionRelative) {\n\t // abort if text is empty\n\t if (!text || text && text.trim() === '') {\n\t return;\n\t }\n\t\n\t if (_Settings2.default.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n\t return;\n\t }\n\t\n\t var tooltipContainer = this.tooltipContainer;\n\t\n\t if (!tooltipContainer) {\n\t tooltipContainer = doc.createElement('div');\n\t this.container.appendChild(tooltipContainer);\n\t this.tooltipContainer = tooltipContainer;\n\t }\n\t this._restoreClassNames(tooltipContainer, target);\n\t\n\t tooltipContainer.style.left = 'auto';\n\t tooltipContainer.style.top = 'auto';\n\t tooltipContainer.innerHTML = text;\n\t tooltipContainer.flexTooltipCurrentTarget = target;\n\t if (removeTitle) {\n\t target.oldTitle = text;\n\t target.removeAttribute('title');\n\t }\n\t\n\t _Util2.default.setupPositionNearby(positionRelative || target, tooltipContainer, this.options.collisionContainer, true, true);\n\t\n\t tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n\t }\n\t }, {\n\t key: '_restoreClassNames',\n\t value: function _restoreClassNames(container, target) {\n\t // allow additional classname per tooltip on target element\n\t var classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n\t var maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n\t if (maybeTargetClass) {\n\t classNames.push(maybeTargetClass);\n\t }\n\t container.className = classNames.join(\" \");\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {HTMLElement|null}\n\t */\n\t\n\t }, {\n\t key: 'getCurrentTarget',\n\t value: function getCurrentTarget() {\n\t return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n\t }\n\t\n\t /**\n\t * Destroys this Widget\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t _get(Object.getPrototypeOf(Tooltip.prototype), 'destroy', this).call(this);\n\t\n\t if (this.tooltipContainer) {\n\t this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n\t return true;\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Removes a Tooltip on given target\n\t * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n\t */\n\t\n\t }, {\n\t key: 'removeTooltip',\n\t value: function removeTooltip(target) {\n\t var selfTarget = target;\n\t if (!selfTarget && this.tooltipContainer) {\n\t selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n\t }\n\t if (this.tooltipContainer) {\n\t if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n\t return;\n\t }\n\t this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n\t delete this.tooltipContainer.flexTooltipCurrentTarget;\n\t }\n\t if (selfTarget && selfTarget.oldTitle) {\n\t selfTarget.setAttribute('title', selfTarget.oldTitle);\n\t }\n\t }\n\t\n\t /**\n\t * Initilizes mouse events on container element\n\t */\n\t\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents() {\n\t var self = this;\n\t this.addEventListener(this.container, 'mouseover', function (e) {\n\t if (e.target.hasAttribute(self.options.selectorAttribute)) {\n\t self.createTooltip(e.target, e.target.getAttribute('title'), true);\n\t }\n\t });\n\t\n\t this.addEventListener(this.container, 'mouseout', function (e) {\n\t if (e.target.hasAttribute(self.options.selectorAttribute)) {\n\t self.removeTooltip(e.target);\n\t }\n\t });\n\t return this;\n\t }\n\t }]);\n\t\n\t return Tooltip;\n\t}(_DestroyableWidget3.default);\n\t\n\texports.default = Tooltip;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 7 */,\n/* 8 */,\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_FORM_AJAX_COMPLETED = exports.EVENT_FORM_AFTER_AJAX_SUBMIT = exports.EVENT_FORM_SUBMIT = exports.EVENT_FORM_READY = undefined;\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _Tooltip = __webpack_require__(6);\n\t\n\tvar _Tooltip2 = _interopRequireDefault(_Tooltip);\n\t\n\t__webpack_require__(11);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _DestroyableWidget2 = __webpack_require__(5);\n\t\n\tvar _DestroyableWidget3 = _interopRequireDefault(_DestroyableWidget2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Form\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\tvar LOADING_CLASS = 'loading';\n\tvar DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\n\tvar REMOTE = 'data-remote';\n\tvar REMOTE_ACTION = 'data-remote-action';\n\tvar ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\n\tvar ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\n\tvar ATTR_VALIDATOR = 'data-validate';\n\tvar ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\n\tvar ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\n\tvar ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\n\tvar ATTR_ERROR_TARGET_ID = 'data-error-target';\n\tvar ATTR_DEPENDS = 'data-depends-selector';\n\tvar CONST_USE_JSON = 'json';\n\tvar CONST_REALTIME_EVENT = 'input';\n\tvar FOCUS_TOOLTIP_DELAY = 20;\n\tvar CLICK_TOOLTIP_DELAY = 150;\n\t\n\t/**\n\t * Triggered when form is fully initialized and handlers are binded\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_READY = exports.EVENT_FORM_READY = 'flexcss.form.ready';\n\t/**\n\t * Fires when a form is submitted, cancelable\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_SUBMIT = exports.EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n\t/**\n\t * Fired directly after the form has been submitted via ajax\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_AFTER_AJAX_SUBMIT = exports.EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n\t/**\n\t * Fired when ajax events did complete\n\t * @type {string}\n\t */\n\tvar EVENT_FORM_AJAX_COMPLETED = exports.EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\t\n\t/**\n\t * A HTML5 Form Validation replacement\n\t */\n\t\n\tvar Form = function (_DestroyableWidget) {\n\t _inherits(Form, _DestroyableWidget);\n\t\n\t /**\n\t * @param {HTMLElement} form\n\t * @param [options] optional options\n\t */\n\t\n\t function Form(form, options) {\n\t _classCallCheck(this, Form);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Form).call(this));\n\t\n\t if (!(form instanceof HTMLFormElement)) {\n\t throw 'argument {0} form needs to be an form element';\n\t }\n\t\n\t /**\n\t * The Form\n\t * @type {HTMLElement}\n\t */\n\t _this.form = form;\n\t\n\t /**\n\t * @type {Tooltip}\n\t */\n\t _this.tooltips = null;\n\t\n\t /**\n\t * @type {Promise}\n\t */\n\t _this.currentValidationFuture = new Promise(function () {});\n\t\n\t /**\n\t * Default options\n\t * @type {Object}\n\t */\n\t _this.options = {\n\t // if true creates tooltips above element, uses FlexCss Tooltips\n\t createTooltips: true,\n\t // if true appends error message after input element\n\t appendError: false,\n\t // type of ajax submit\n\t ajaxSubmitType: 'POST',\n\t // json content type if ajax method is set to json\n\t ajaxJsonContentType: 'application/json; charset=utf-8',\n\t // allow inline validation\n\t inlineValidation: true,\n\t // validate in realtime (on `input` event)\n\t realtime: true,\n\t // timeout when realtime event should be captured\n\t realtimeTimeout: 250,\n\t // formatting method for an error\n\t formatErrorTooltip: function formatErrorTooltip(error) {\n\t return ' ' + error;\n\t },\n\t // the class that will be put on the element to mark it failed validation\n\t inputErrorClass: 'invalid',\n\t // the container class for error messages below an element\n\t containerErrorClass: 'form-error',\n\t // additional options for fetch\n\t fetchOptions: {\n\t credentials: 'include'\n\t },\n\t // the container for tooltips\n\t tooltipContainer: form,\n\t tooltipOptions: {\n\t containerClass: 'error-tooltip'\n\t },\n\t // if you have a fixed header, either set a number or function here\n\t scrollToElementDiff: 0\n\t };\n\t\n\t // overwrite default options\n\t Object.assign(_this.options, options);\n\t\n\t // apply settings from attributes\n\t _Util2.default.applyOptionsFromElement(form, _this.options);\n\t\n\t // set form class as widget\n\t // Forms are very different to classical widgets,\n\t // we will not use our base widget class for this but just self\n\t form.hfWidgetInstance = _this;\n\t\n\t /**\n\t * A List of Validators\n\t * @type {Object}\n\t * @private\n\t */\n\t _this._validators = Form.globalValidators;\n\t\n\t /**\n\t * @type {Function}\n\t * @private\n\t */\n\t _this._remoteValidationFunction = null;\n\t\n\t _this.initFormValidation();\n\t return _this;\n\t }\n\t\n\t _createClass(Form, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t _get(Object.getPrototypeOf(Form.prototype), 'destroy', this).call(this);\n\t if (this.tooltips) {\n\t this.tooltips.destroy();\n\t }\n\t }\n\t\n\t /**\n\t * Submits this form, either via ajax or just classical (default)\n\t * @param {HTMLFormElement} thisForm\n\t * @param {Event} e\n\t * @private\n\t * @returns {Promise|boolean} returns false if submit is cancled\n\t */\n\t\n\t }, {\n\t key: '_submitFunction',\n\t value: function _submitFunction(thisForm, e) {\n\t var shouldUseAjax = thisForm.getAttribute(REMOTE),\n\t ajaxPostUrl = thisForm.getAttribute(REMOTE_ACTION) || thisForm.getAttribute('action') || window.location.href,\n\t useJson = CONST_USE_JSON === shouldUseAjax,\n\t self = this;\n\t\n\t var ev = _Event2.default.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\t\n\t // abort execution is event was prevented\n\t if (ev.defaultPrevented) {\n\t self._formStopLoading();\n\t return false;\n\t }\n\t\n\t if (shouldUseAjax === null) {\n\t // submit\n\t return thisForm.submit();\n\t }\n\t // prevent form from submit normally\n\t e.preventDefault();\n\t\n\t // add information that this is an XMLHttpRequest request (used by some frameworks)\n\t var defaultHeaders = {\n\t 'X-Requested-With': 'XMLHttpRequest'\n\t };\n\t\n\t // setup default headers\n\t if (useJson) {\n\t Object.assign(defaultHeaders, {\n\t 'Content-Type': this.options.ajaxJsonContentType\n\t });\n\t }\n\t var defaultOptions = Object.assign(this.options.fetchOptions, {\n\t headers: defaultHeaders,\n\t method: this.options.ajaxSubmitType\n\t });\n\t\n\t // support either JSON request payload or normal payload submission\n\t var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n\t body: JSON.stringify(this.serialize())\n\t })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n\t body: new FormData(thisForm)\n\t }));\n\t\n\t _Event2.default.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\t\n\t return serverCall.then(function (r) {\n\t (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\t\n\t _Event2.default.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n\t // always remove error class\n\t self._formStopLoading();\n\t });\n\t }\n\t\n\t /**\n\t * Serializes a form to a json object\n\t * @returns {Object}\n\t */\n\t\n\t }, {\n\t key: 'serialize',\n\t value: function serialize() {\n\t var selectors = ['input[name]:not([type=\"radio\"]):enabled', 'input[type=\"radio\"][name]:checked', 'select[name]:enabled', 'textarea[name]:enabled'],\n\t inputs = this.form.querySelectorAll(selectors.join(',')),\n\t result = {};\n\t\n\t Array.prototype.forEach.call(inputs, function (input) {\n\t var exists = result[input.name],\n\t value = input.value;\n\t if (exists instanceof Array) {\n\t exists.push(value);\n\t } else if (exists) {\n\t result[input.name] = [result[input.name], value];\n\t } else {\n\t result[input.name] = value;\n\t }\n\t });\n\t\n\t return result;\n\t }\n\t\n\t /**\n\t * Handles the chain of validation on given fields\n\t *\n\t * @param {HTMLElement|Array|NodeList} field\n\t * @param [focus] optional focus first error\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'handleValidation',\n\t value: function handleValidation(field, focus) {\n\t var _this2 = this;\n\t\n\t var fields = field instanceof Array || field instanceof NodeList ? field : [field];\n\t return this._handleValidation(fields, focus, true).then(function (r) {\n\t if (!r.foundAnyError) {\n\t // remove tooltips\n\t if (_this2.tooltips) {\n\t _this2.tooltips.removeTooltip();\n\t }\n\t }\n\t return r;\n\t }.bind(this));\n\t }\n\t\n\t /**\n\t * Handles errors on given node list\n\t * @param {NodeList} toValidateFields\n\t * @param {boolean} focus\n\t * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n\t * @returns {Promise}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleValidation',\n\t value: function _handleValidation(toValidateFields, focus, scoped) {\n\t var self = this;\n\t var arr = Form._createArrayFromInvalidFieldList(toValidateFields),\n\t isLocalInvalid = arr.length > 0;\n\t // focus must appear in the same frame for iOS devices\n\t if (isLocalInvalid && focus) {\n\t self._focusElement(arr[0]);\n\t }\n\t var validation = scoped ? this._customValidationsForElements(toValidateFields) : self.validateCustomFields();\n\t return validation.then(function (r) {\n\t if (isLocalInvalid) {\n\t // combine browser and custom validators\n\t r.foundAnyError = true;\n\t }\n\t // get a unique field list of all fields that need to be checked and rendered\n\t // it's possible that we have duplicates in non scoped mode\n\t var thisToValidateFields = scoped ? toValidateFields : Array.from(arr).concat(r.checkedFields);\n\t r.checkedFields = thisToValidateFields;\n\t var foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n\t firstInvalidField = foundInvalidFields[0];\n\t if (firstInvalidField) {\n\t if (focus) {\n\t self._focusElement(firstInvalidField);\n\t // if element could not be focused:\n\t if (document.activeElement !== firstInvalidField) {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t } else {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t self.showAndOrCreateTooltip(firstInvalidField);\n\t }\n\t return r;\n\t });\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} field\n\t * @param {ValidityState} validity\n\t * @returns {*}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_setupErrorMessages',\n\t value: function _setupErrorMessages(field, validity) {\n\t return Form.globalErrorMessageHandler ? Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n\t }\n\t\n\t /**\n\t * Handles class labels for elements\n\t * @param {Object} fields\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleLabels',\n\t value: function _handleLabels(fields) {\n\t Object.keys(fields).forEach(function (id) {\n\t var labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'),\n\t invalid = fields[id];\n\t if (labels.length) {\n\t for (var labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n\t var labelEl = labels[labelsIndex];\n\t // we can't use toggle attribute, not supported in IE\n\t if (invalid) {\n\t this._markElementInvalid(labelEl);\n\t } else {\n\t this._markElementValid(labelEl);\n\t }\n\t }\n\t }\n\t }.bind(this));\n\t }\n\t\n\t /**\n\t * @param el\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_markElementInvalid',\n\t value: function _markElementInvalid(el) {\n\t el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n\t el.classList.add(this.options.inputErrorClass);\n\t }\n\t\n\t /**\n\t * @param el\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_markElementValid',\n\t value: function _markElementValid(el) {\n\t el.removeAttribute(DATA_ELEMENT_INVALID);\n\t el.classList.remove(this.options.inputErrorClass);\n\t }\n\t\n\t /**\n\t * A List of invalid elements (:invalid)\n\t * @returns {Array}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_getInvalidElements',\n\t value: function _getInvalidElements() {\n\t return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n\t return !(r instanceof HTMLFieldSetElement);\n\t });\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} thisParent\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_removeElementErrors',\n\t value: function _removeElementErrors(thisParent) {\n\t var errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass),\n\t inputsWithErrorClasses = thisParent.querySelectorAll('[' + DATA_ELEMENT_INVALID + ']');\n\t for (var elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n\t errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n\t }\n\t for (var inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n\t var el = inputsWithErrorClasses[inputErrorIndex];\n\t this._markElementValid(el);\n\t }\n\t }\n\t\n\t /**\n\t * Registers a custom validator\n\t * @param {String} name\n\t * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n\t * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n\t * we can't rely on that\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerValidator',\n\t value: function registerValidator(name, validator) {\n\t this._validators[name] = validator;\n\t return this;\n\t }\n\t\n\t /**\n\t * Runs async validation\n\t * @param {String} validationRef\n\t * @param {HTMLElement} field\n\t * @returns {Promise}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_runValidation',\n\t value: function _runValidation(validationRef, field) {\n\t if (!this._validators[validationRef]) {\n\t throw 'Could not found validator: ' + validationRef;\n\t }\n\t var cl = field.classList,\n\t future = this._validators[validationRef].apply(this, [field, this.form]);\n\t cl.add(LOADING_CLASS);\n\t future.then(function () {\n\t cl.remove(LOADING_CLASS);\n\t });\n\t return future;\n\t }\n\t\n\t /**\n\t * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n\t *\n\t * @param {Array|NodeList} fields\n\t * @returns {Promise} contains either true if validations passed or false if something went wrong\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_customValidationsForElements',\n\t value: function _customValidationsForElements(fields) {\n\t var futures = [],\n\t fieldsLength = fields.length,\n\t checkedFields = [];\n\t for (var iVal = 0; iVal < fieldsLength; iVal++) {\n\t var field = fields[iVal],\n\t validationRef = field.getAttribute(ATTR_VALIDATOR),\n\t validity = field.validity;\n\t if (this._validators[validationRef]) {\n\t // use local validation first and then continue with custom validations\n\t if (Form._shouldNotValidateField(field) || validity && !validity.customError && !validity.valid) {\n\t continue;\n\t }\n\t checkedFields.push(field);\n\t futures.push(this._runValidation(validationRef, field));\n\t } else {\n\t if (validationRef) {\n\t console.warn('data-validate was set but no validator was found');\n\t }\n\t }\n\t }\n\t return Promise.all(futures).then(function (allFutures) {\n\t var l = allFutures.length;\n\t var result = {\n\t checkedFields: checkedFields,\n\t foundAnyError: false\n\t };\n\t for (var fI = 0; fI < l; fI++) {\n\t if (!allFutures[fI]) {\n\t result.foundAnyError = true;\n\t break;\n\t }\n\t }\n\t return result;\n\t });\n\t }\n\t\n\t /**\n\t * Remove all errors for this form\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'removeErrors',\n\t value: function removeErrors() {\n\t this._removeElementErrors(this.form);\n\t if (this.tooltips) {\n\t this.tooltips.removeTooltip();\n\t }\n\t return this;\n\t }\n\t\n\t /**\n\t * Will handle errors for given fields\n\t * @param {Array|NodeList} fields\n\t * @param {Boolean} removeAllErrors\n\t */\n\t\n\t }, {\n\t key: 'prepareErrors',\n\t value: function prepareErrors(fields, removeAllErrors) {\n\t if (removeAllErrors) {\n\t this.removeErrors();\n\t }\n\t var labelGroups = {},\n\t invalidFields = [];\n\t\n\t function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n\t var additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id,\n\t group = thisLabelGroup[additionalLabels];\n\t if (additionalLabels) {\n\t // check additionally if field is currently marked as invalid\n\t // so the label is not marked as error if no field is marked as one\n\t group = group ? group : isInvalid;\n\t thisLabelGroup[additionalLabels] = group;\n\t }\n\t }\n\t\n\t // We save all validations in an extra property because we need to reset the validity due some\n\t // implementation errors in other browsers then chrome\n\t for (var i = 0; i < fields.length; i++) {\n\t var field = fields[i],\n\t errorTarget = Form._findErrorTarget(field),\n\t parent = errorTarget.parentNode,\n\t validity = field.validity,\n\t isInvalid = validity && !validity.valid;\n\t if (Form._shouldNotValidateField(field)) {\n\t continue;\n\t }\n\t field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n\t handleAdditionalLabels(isInvalid, labelGroups, field);\n\t if (isInvalid) {\n\t if (!removeAllErrors) {\n\t // Remove current errors:\n\t this._removeElementErrors(parent);\n\t }\n\t // setup custom error messages:\n\t this._setupErrorMessages(field, validity);\n\t var msg = field.validationMessage;\n\t\n\t // mark fields as invalid\n\t this._markElementInvalid(errorTarget);\n\t this._markElementInvalid(field);\n\t\n\t if (this.options.appendError) {\n\t parent.insertAdjacentHTML(\"beforeend\", '
' + msg + '
');\n\t }\n\t invalidFields.push(field);\n\t field.flexFormsSavedValidationMessage = msg;\n\t } else {\n\t // restore invalid fields\n\t this._markElementValid(errorTarget);\n\t this._markElementValid(field);\n\t\n\t // cleanup\n\t delete field.flexFormsSavedValidationMessage;\n\t\n\t // remove error markup\n\t this._removeElementErrors(parent);\n\t }\n\t // We have to reset the custom validity here to allow native validations work again\n\t field.setCustomValidity('');\n\t }\n\t // if validates a single field we need to check the linked fields to a label:\n\t if (fields.length === 1) {\n\t var _field = fields[0];\n\t var id = _field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || _field.id;\n\t if (id) {\n\t var linkedFields = Array.from(this.getForm().querySelectorAll('[' + ATTR_DATA_CUSTOM_LABEL + '=\"' + id + '\"], #' + id));\n\t linkedFields.forEach(function (thisField) {\n\t var validity = thisField.validity,\n\t isInvalid = validity && !validity.valid && this._isElementInvalidElement(thisField);\n\t handleAdditionalLabels(isInvalid, labelGroups, thisField);\n\t }.bind(this));\n\t }\n\t }\n\t this._handleLabels(labelGroups);\n\t return invalidFields;\n\t }\n\t\n\t /**\n\t * Validates all custom fields\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'validateCustomFields',\n\t value: function validateCustomFields() {\n\t return this._customValidationsForElements(this.form.querySelectorAll(\"[data-validate]\"));\n\t }\n\t\n\t /**\n\t * Tests if a field should be validated\n\t * @param {HTMLElement} field\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'getForm',\n\t\n\t\n\t /**\n\t * This form\n\t * @returns {HTMLElement}\n\t */\n\t value: function getForm() {\n\t return this.form;\n\t }\n\t\n\t /**\n\t * Registers a function that handles remote validation\n\t * @param {Function} func\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerRemoteValidation',\n\t value: function registerRemoteValidation(func) {\n\t this._remoteValidationFunction = func;\n\t return this;\n\t }\n\t\n\t /**\n\t * Formats the error content for the tooltip\n\t * @param {String} error\n\t * @returns {String}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_formatErrorTooltip',\n\t value: function _formatErrorTooltip(error) {\n\t return this.options.formatErrorTooltip.apply(this, [error]);\n\t }\n\t\n\t /**\n\t * Tries to find a custom error target on given target\n\t * @param target\n\t * @returns {HTMLElement}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: 'showAndOrCreateTooltip',\n\t\n\t\n\t /**\n\t * Creates a tooltip at given element, will only create a new instance if not created\n\t * @param {HTMLElement} target\n\t * @param {Boolean} [remove]\n\t */\n\t value: function showAndOrCreateTooltip(target, remove) {\n\t var self = this;\n\t if (!this.tooltips && this.options.createTooltips) {\n\t this.tooltips = new _Tooltip2.default(this.options.tooltipContainer, this.options.tooltipOptions);\n\t }\n\t if (!this.options.createTooltips) {\n\t return false;\n\t }\n\t\n\t if (!target.flexFormsSavedValidity) {\n\t return false;\n\t }\n\t var errorTarget = Form._findErrorTarget(target);\n\t if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n\t self.tooltips.createTooltip(errorTarget, self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n\t return true;\n\t } else {\n\t if (remove) {\n\t self.tooltips.removeTooltip();\n\t }\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Checks if element is marked as invalid\n\t * @param {HTMLElement} el\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_isElementInvalidElement',\n\t value: function _isElementInvalidElement(el) {\n\t return el.hasAttribute(DATA_ELEMENT_INVALID);\n\t }\n\t\n\t /**\n\t * Handles invalid event of a form\n\t * @param {Event} e\n\t * @returns {Promise|boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_checkIsInvalid',\n\t value: function _checkIsInvalid(e) {\n\t e.preventDefault();\n\t var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n\t return this._handleValidation(invalidFields, true, false);\n\t }\n\t\n\t /**\n\t * Will query dependent fields (by selector) that should be validated with given field\n\t * @param field\n\t * @returns {NodeList|[]}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_getDependentFields',\n\t value: function _getDependentFields(field) {\n\t var fieldSelector = field.getAttribute(ATTR_DEPENDS),\n\t base = [field];\n\t if (fieldSelector) {\n\t base.push.apply(base, Array.prototype.slice.apply(this.getForm().querySelectorAll(fieldSelector)));\n\t }\n\t return base;\n\t }\n\t\n\t /**\n\t * @private\n\t * @param {HTMLElement} [target]\n\t */\n\t\n\t }, {\n\t key: '_handleTooltipInline',\n\t value: function _handleTooltipInline(target) {\n\t if (this.tooltips) {\n\t this.tooltips.removeTooltip(target);\n\t }\n\t }\n\t\n\t /**\n\t * Initializes validation for a given form, registers event handlers\n\t */\n\t\n\t }, {\n\t key: 'initFormValidation',\n\t value: function initFormValidation() {\n\t var _this3 = this;\n\t\n\t // Suppress the default bubbles\n\t var form = this.getForm(),\n\t self = this,\n\t invalidEvent = 'invalid';\n\t\n\t /**\n\t * Validates if is valid realtime element\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidRealtimeElement(target) {\n\t return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n\t }\n\t\n\t form.addEventListener(invalidEvent, function (e) {\n\t e.preventDefault();\n\t }, true);\n\t\n\t _Util2.default.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n\t self._formLoading();\n\t var result = self._checkIsInvalid(e);\n\t if (result) {\n\t self.currentValidationFuture = new Promise(function (resolve) {\n\t result.then(function (r) {\n\t setTimeout(function () {\n\t _Util2.default.addEventOnce(invalidEvent, form, handleInvalid, true);\n\t }, 0);\n\t resolve(r);\n\t self._formStopLoading();\n\t if (!r.foundAnyError) {\n\t self._formLoading();\n\t self._handleSubmit(e);\n\t }\n\t });\n\t });\n\t }\n\t }, true);\n\t\n\t this.addEventListener(form, 'reset', function () {\n\t _this3.removeErrors();\n\t });\n\t\n\t // Timeout for keys:\n\t var TIMEOUT_KEYDOWN,\n\t KEYDOWN_RUNNING = false;\n\t\n\t // resets keydown events\n\t function clearKeyDownTimeout() {\n\t KEYDOWN_RUNNING = false;\n\t clearTimeout(TIMEOUT_KEYDOWN);\n\t }\n\t\n\t // setup custom realtime event if given\n\t if (self.options.realtime) {\n\t this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n\t if (self._formIsLoading()) {\n\t return;\n\t }\n\t var target = e.target;\n\t clearTimeout(TIMEOUT_KEYDOWN);\n\t if (KEYDOWN_RUNNING) {\n\t return;\n\t }\n\t TIMEOUT_KEYDOWN = setTimeout(function () {\n\t var isStillTarget = document.activeElement === e.target;\n\t if (!_checkIsValidRealtimeElement(target)) {\n\t return;\n\t }\n\t if (isStillTarget) {\n\t self._handleTooltipInline();\n\t }\n\t KEYDOWN_RUNNING = true;\n\t var dependentFields = self._getDependentFields(target);\n\t self._customValidationsForElements(dependentFields).then(function () {\n\t self.prepareErrors(dependentFields, false);\n\t if (isStillTarget) {\n\t self.showAndOrCreateTooltip(e.target);\n\t }\n\t // future must be resolved before another event can be started\n\t KEYDOWN_RUNNING = false;\n\t });\n\t }, self.options.realtimeTimeout);\n\t }, true);\n\t }\n\t\n\t /**\n\t * Validates if target is a valid input field to check blur and focus events\n\t *\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidBlurFocusElement(target) {\n\t var attr = target.getAttribute(\"type\");\n\t return attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\";\n\t }\n\t\n\t /**\n\t * Validates if is valid inline-check element\n\t * @param {HTMLElement} target\n\t * @returns {boolean}\n\t * @private\n\t */\n\t function _checkIsValidInlineCheckElement(target) {\n\t return !target.hasAttribute(ATTR_DISABLE_INLINE);\n\t }\n\t\n\t this.addEventListener(form, 'blur', function (e) {\n\t // do not hide tooltip after change event\n\t if (!e.target.flexcssKeepTooltips) {\n\t self._handleTooltipInline(e.target);\n\t }\n\t delete e.target.flexcssKeepTooltips;\n\t }, true);\n\t\n\t // handle focus on input elements\n\t // will show an error if field is invalid\n\t this.addEventListener(form, \"focus\", function (e) {\n\t if (self._formIsLoading()) {\n\t return;\n\t }\n\t // do not track errors for checkbox and radios on focus:\n\t if (!_checkIsValidBlurFocusElement(e.target)) {\n\t return;\n\t }\n\t // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n\t // just have been hidden (on blur). Maybe fix this with a queue later\n\t setTimeout(function () {\n\t self.showAndOrCreateTooltip(e.target);\n\t }, FOCUS_TOOLTIP_DELAY);\n\t }, true);\n\t\n\t if (self.options.inlineValidation) {\n\t // Handle change for checkbox, radios and selects\n\t this.addEventListener(form, \"change\", function (e) {\n\t var target = e.target;\n\t if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n\t return;\n\t }\n\t clearKeyDownTimeout();\n\t var name = target.getAttribute('name');\n\t var inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n\t // we only support dependent fields for a single widgets right now\n\t if (inputs.length === 1) {\n\t inputs = self._getDependentFields(target);\n\t }\n\t self._customValidationsForElements(inputs).then(function () {\n\t self.prepareErrors(inputs, false);\n\t target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n\t if (target.flexcssKeepTooltips) {\n\t self._handleTooltipHideClickAfterChange();\n\t }\n\t });\n\t });\n\t }\n\t\n\t // prevent default if form is invalid\n\t this.addEventListener(form, \"submit\", function listener(e) {\n\t self._submitListener(e, listener);\n\t });\n\t\n\t _Event2.default.dispatchAndFire(form, EVENT_FORM_READY);\n\t }\n\t\n\t /* Loading states, unfortunately we can't check if a promise is pending :/*/\n\t /* TODO: Maybe wrap promise to extend this functionality */\n\t\n\t }, {\n\t key: '_formLoading',\n\t value: function _formLoading() {\n\t this.getForm().classList.add(LOADING_CLASS);\n\t }\n\t }, {\n\t key: '_formStopLoading',\n\t value: function _formStopLoading() {\n\t this.getForm().classList.remove(LOADING_CLASS);\n\t }\n\t }, {\n\t key: '_formIsLoading',\n\t value: function _formIsLoading() {\n\t return this.getForm().classList.contains(LOADING_CLASS);\n\t }\n\t\n\t // this defines the logic after a change event when a tooltip is shown\n\t // because we call this method inside the change event, the click would be immeditally executed with the change\n\t // event when not using setTimeout(). There might be another solution for this...\n\t\n\t }, {\n\t key: '_handleTooltipHideClickAfterChange',\n\t value: function _handleTooltipHideClickAfterChange() {\n\t var self = this;\n\t if (this.options.createTooltips) {\n\t setTimeout(function () {\n\t _Util2.default.addEventOnce(_Settings2.default.getTabEvent(), global.document.body, function (t) {\n\t if (!self._isElementInvalidElement(t.target)) {\n\t self._handleTooltipInline();\n\t }\n\t });\n\t }, CLICK_TOOLTIP_DELAY);\n\t }\n\t }\n\t }, {\n\t key: '_focusElement',\n\t value: function _focusElement(el) {\n\t el.focus();\n\t _Util2.default.scrollToElement(el, this.options.scrollToElementDiff);\n\t }\n\t\n\t /**\n\t * Listener that is executed on form submit\n\t * @param e\n\t * @param submitListener\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_submitListener',\n\t value: function _submitListener(e, submitListener) {\n\t\n\t var form = this.getForm(),\n\t self = this,\n\t submitEvent = 'submit';\n\t\n\t if (this._formIsLoading()) {\n\t e.preventDefault();\n\t return false;\n\t }\n\t this._formLoading();\n\t form.removeEventListener(submitEvent, submitListener);\n\t this.removeErrors();\n\t e.preventDefault();\n\t // reset:\n\t if (form.checkValidity()) {\n\t form.addEventListener(submitEvent, submitListener);\n\t // It's possible that the form is valid but the custom validations need to be checked again:\n\t self.currentValidationFuture = new Promise(function (resolve) {\n\t var validation = self.validateCustomFields();\n\t validation.then(function (r) {\n\t // because custom validators may mark multiple fields as invalid, we get all of them in the form\n\t var fields = self._getInvalidElements(),\n\t errors = self.prepareErrors(fields, false),\n\t firstError = errors[0];\n\t if (firstError) {\n\t self._focusElement(firstError);\n\t self.showAndOrCreateTooltip(firstError, true);\n\t }\n\t resolve(r);\n\t });\n\t });\n\t self.currentValidationFuture.then(function (r) {\n\t if (!r.foundAnyError) {\n\t // Handle submitting the form to server:\n\t self._handleSubmit(e);\n\t } else {\n\t self._formStopLoading();\n\t }\n\t });\n\t } else {\n\t self._formStopLoading();\n\t form.addEventListener(submitEvent, submitListener);\n\t }\n\t }\n\t\n\t /**\n\t * Handles submitting, optionally allows to stop submitting\n\t * @param e\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_handleSubmit',\n\t value: function _handleSubmit(e) {\n\t this._submitFunction(this.form, e);\n\t }\n\t\n\t /**\n\t * Registers a global event Handler\n\t * @param errorFunc\n\t */\n\t\n\t }], [{\n\t key: '_shouldNotValidateField',\n\t value: function _shouldNotValidateField(field) {\n\t var target = Form._findErrorTarget(field);\n\t return target instanceof HTMLFieldSetElement || field.validity === undefined || target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !_Util2.default.isVisible(target);\n\t }\n\t\n\t /**\n\t * Creates an array from a node list with invalid items\n\t * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n\t * @param list\n\t * @returns {Array}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_createArrayFromInvalidFieldList',\n\t value: function _createArrayFromInvalidFieldList(list) {\n\t var arr = [];\n\t for (var i = 0; i < list.length; ++i) {\n\t var n = list[i];\n\t if (n.validity && !n.validity.valid) {\n\t if (!Form._shouldNotValidateField(n)) {\n\t arr.push(n);\n\t }\n\t }\n\t }\n\t return arr;\n\t }\n\t }, {\n\t key: '_findErrorTarget',\n\t value: function _findErrorTarget(target) {\n\t var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n\t foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n\t if (!foundTarget) {\n\t throw 'Given error target did not exsits:' + target;\n\t }\n\t return foundTarget;\n\t }\n\t }, {\n\t key: 'registerErrorMessageHandler',\n\t value: function registerErrorMessageHandler(errorFunc) {\n\t Form.globalErrorMessageHandler = errorFunc;\n\t }\n\t\n\t /**\n\t * Initialize forms for a specific selector\n\t * @param {String} selector\n\t * @param {Object} [options]\n\t * @return {array.}\n\t */\n\t\n\t }, {\n\t key: 'init',\n\t value: function init(selector, options) {\n\t var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') : document.querySelectorAll(selector),\n\t instances = [];\n\t for (var i = 0; i < forms.length; i++) {\n\t instances.push(new Form(forms[i], options));\n\t }\n\t return instances;\n\t }\n\t\n\t /**\n\t * Registers a global validator that is usable on all form instances\n\t * @param {String} name\n\t * @param {Function} validator\n\t * @returns {Function}\n\t */\n\t\n\t }, {\n\t key: 'registerValidator',\n\t value: function registerValidator(name, validator) {\n\t Form.globalValidators[name] = validator;\n\t return Form;\n\t }\n\t\n\t /**\n\t * Registers a global function that is called when a form should validate the response of a server\n\t * @param {Function} func\n\t * @returns {Form}\n\t */\n\t\n\t }, {\n\t key: 'registerGlobalRemoteValidationFunction',\n\t value: function registerGlobalRemoteValidationFunction(func) {\n\t Form.globalRemoteValidationFunction = func;\n\t return Form;\n\t }\n\t }]);\n\t\n\t return Form;\n\t}(_DestroyableWidget3.default);\n\t\n\t/**\n\t * Global validators\n\t * @type {Array}\n\t */\n\t\n\t\n\tForm.globalValidators = [];\n\t\n\t/**\n\t * Global Remote validation function\n\t */\n\tForm.globalRemoteValidationFunction = function () {};\n\t\n\t/**\n\t * Handles custom error messages extracts custom message by default\n\t */\n\tForm.globalErrorMessageHandler = function (field, validity) {\n\t if (!validity.customError) {\n\t var customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n\t if (customMsg) {\n\t field.setCustomValidity(customMsg);\n\t }\n\t }\n\t};\n\t\n\texports.default = Form;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 10 */,\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// the whatwg-fetch polyfill installs the fetch() function\n\t// on the global object (window or self)\n\t//\n\t// Return that as the export for use in Webpack, Browserify etc.\n\t__webpack_require__(12);\n\tmodule.exports = self.fetch.bind(self);\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports) {\n\n\t(function(self) {\n\t 'use strict';\n\t\n\t if (self.fetch) {\n\t return\n\t }\n\t\n\t function normalizeName(name) {\n\t if (typeof name !== 'string') {\n\t name = String(name)\n\t }\n\t if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n\t throw new TypeError('Invalid character in header field name')\n\t }\n\t return name.toLowerCase()\n\t }\n\t\n\t function normalizeValue(value) {\n\t if (typeof value !== 'string') {\n\t value = String(value)\n\t }\n\t return value\n\t }\n\t\n\t function Headers(headers) {\n\t this.map = {}\n\t\n\t if (headers instanceof Headers) {\n\t headers.forEach(function(value, name) {\n\t this.append(name, value)\n\t }, this)\n\t\n\t } else if (headers) {\n\t Object.getOwnPropertyNames(headers).forEach(function(name) {\n\t this.append(name, headers[name])\n\t }, this)\n\t }\n\t }\n\t\n\t Headers.prototype.append = function(name, value) {\n\t name = normalizeName(name)\n\t value = normalizeValue(value)\n\t var list = this.map[name]\n\t if (!list) {\n\t list = []\n\t this.map[name] = list\n\t }\n\t list.push(value)\n\t }\n\t\n\t Headers.prototype['delete'] = function(name) {\n\t delete this.map[normalizeName(name)]\n\t }\n\t\n\t Headers.prototype.get = function(name) {\n\t var values = this.map[normalizeName(name)]\n\t return values ? values[0] : null\n\t }\n\t\n\t Headers.prototype.getAll = function(name) {\n\t return this.map[normalizeName(name)] || []\n\t }\n\t\n\t Headers.prototype.has = function(name) {\n\t return this.map.hasOwnProperty(normalizeName(name))\n\t }\n\t\n\t Headers.prototype.set = function(name, value) {\n\t this.map[normalizeName(name)] = [normalizeValue(value)]\n\t }\n\t\n\t Headers.prototype.forEach = function(callback, thisArg) {\n\t Object.getOwnPropertyNames(this.map).forEach(function(name) {\n\t this.map[name].forEach(function(value) {\n\t callback.call(thisArg, value, name, this)\n\t }, this)\n\t }, this)\n\t }\n\t\n\t function consumed(body) {\n\t if (body.bodyUsed) {\n\t return Promise.reject(new TypeError('Already read'))\n\t }\n\t body.bodyUsed = true\n\t }\n\t\n\t function fileReaderReady(reader) {\n\t return new Promise(function(resolve, reject) {\n\t reader.onload = function() {\n\t resolve(reader.result)\n\t }\n\t reader.onerror = function() {\n\t reject(reader.error)\n\t }\n\t })\n\t }\n\t\n\t function readBlobAsArrayBuffer(blob) {\n\t var reader = new FileReader()\n\t reader.readAsArrayBuffer(blob)\n\t return fileReaderReady(reader)\n\t }\n\t\n\t function readBlobAsText(blob) {\n\t var reader = new FileReader()\n\t reader.readAsText(blob)\n\t return fileReaderReady(reader)\n\t }\n\t\n\t var support = {\n\t blob: 'FileReader' in self && 'Blob' in self && (function() {\n\t try {\n\t new Blob();\n\t return true\n\t } catch(e) {\n\t return false\n\t }\n\t })(),\n\t formData: 'FormData' in self,\n\t arrayBuffer: 'ArrayBuffer' in self\n\t }\n\t\n\t function Body() {\n\t this.bodyUsed = false\n\t\n\t\n\t this._initBody = function(body) {\n\t this._bodyInit = body\n\t if (typeof body === 'string') {\n\t this._bodyText = body\n\t } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n\t this._bodyBlob = body\n\t } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n\t this._bodyFormData = body\n\t } else if (!body) {\n\t this._bodyText = ''\n\t } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n\t // Only support ArrayBuffers for POST method.\n\t // Receiving ArrayBuffers happens via Blobs, instead.\n\t } else {\n\t throw new Error('unsupported BodyInit type')\n\t }\n\t\n\t if (!this.headers.get('content-type')) {\n\t if (typeof body === 'string') {\n\t this.headers.set('content-type', 'text/plain;charset=UTF-8')\n\t } else if (this._bodyBlob && this._bodyBlob.type) {\n\t this.headers.set('content-type', this._bodyBlob.type)\n\t }\n\t }\n\t }\n\t\n\t if (support.blob) {\n\t this.blob = function() {\n\t var rejected = consumed(this)\n\t if (rejected) {\n\t return rejected\n\t }\n\t\n\t if (this._bodyBlob) {\n\t return Promise.resolve(this._bodyBlob)\n\t } else if (this._bodyFormData) {\n\t throw new Error('could not read FormData body as blob')\n\t } else {\n\t return Promise.resolve(new Blob([this._bodyText]))\n\t }\n\t }\n\t\n\t this.arrayBuffer = function() {\n\t return this.blob().then(readBlobAsArrayBuffer)\n\t }\n\t\n\t this.text = function() {\n\t var rejected = consumed(this)\n\t if (rejected) {\n\t return rejected\n\t }\n\t\n\t if (this._bodyBlob) {\n\t return readBlobAsText(this._bodyBlob)\n\t } else if (this._bodyFormData) {\n\t throw new Error('could not read FormData body as text')\n\t } else {\n\t return Promise.resolve(this._bodyText)\n\t }\n\t }\n\t } else {\n\t this.text = function() {\n\t var rejected = consumed(this)\n\t return rejected ? rejected : Promise.resolve(this._bodyText)\n\t }\n\t }\n\t\n\t if (support.formData) {\n\t this.formData = function() {\n\t return this.text().then(decode)\n\t }\n\t }\n\t\n\t this.json = function() {\n\t return this.text().then(JSON.parse)\n\t }\n\t\n\t return this\n\t }\n\t\n\t // HTTP methods whose capitalization should be normalized\n\t var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\t\n\t function normalizeMethod(method) {\n\t var upcased = method.toUpperCase()\n\t return (methods.indexOf(upcased) > -1) ? upcased : method\n\t }\n\t\n\t function Request(input, options) {\n\t options = options || {}\n\t var body = options.body\n\t if (Request.prototype.isPrototypeOf(input)) {\n\t if (input.bodyUsed) {\n\t throw new TypeError('Already read')\n\t }\n\t this.url = input.url\n\t this.credentials = input.credentials\n\t if (!options.headers) {\n\t this.headers = new Headers(input.headers)\n\t }\n\t this.method = input.method\n\t this.mode = input.mode\n\t if (!body) {\n\t body = input._bodyInit\n\t input.bodyUsed = true\n\t }\n\t } else {\n\t this.url = input\n\t }\n\t\n\t this.credentials = options.credentials || this.credentials || 'omit'\n\t if (options.headers || !this.headers) {\n\t this.headers = new Headers(options.headers)\n\t }\n\t this.method = normalizeMethod(options.method || this.method || 'GET')\n\t this.mode = options.mode || this.mode || null\n\t this.referrer = null\n\t\n\t if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n\t throw new TypeError('Body not allowed for GET or HEAD requests')\n\t }\n\t this._initBody(body)\n\t }\n\t\n\t Request.prototype.clone = function() {\n\t return new Request(this)\n\t }\n\t\n\t function decode(body) {\n\t var form = new FormData()\n\t body.trim().split('&').forEach(function(bytes) {\n\t if (bytes) {\n\t var split = bytes.split('=')\n\t var name = split.shift().replace(/\\+/g, ' ')\n\t var value = split.join('=').replace(/\\+/g, ' ')\n\t form.append(decodeURIComponent(name), decodeURIComponent(value))\n\t }\n\t })\n\t return form\n\t }\n\t\n\t function headers(xhr) {\n\t var head = new Headers()\n\t var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n\t pairs.forEach(function(header) {\n\t var split = header.trim().split(':')\n\t var key = split.shift().trim()\n\t var value = split.join(':').trim()\n\t head.append(key, value)\n\t })\n\t return head\n\t }\n\t\n\t Body.call(Request.prototype)\n\t\n\t function Response(bodyInit, options) {\n\t if (!options) {\n\t options = {}\n\t }\n\t\n\t this.type = 'default'\n\t this.status = options.status\n\t this.ok = this.status >= 200 && this.status < 300\n\t this.statusText = options.statusText\n\t this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n\t this.url = options.url || ''\n\t this._initBody(bodyInit)\n\t }\n\t\n\t Body.call(Response.prototype)\n\t\n\t Response.prototype.clone = function() {\n\t return new Response(this._bodyInit, {\n\t status: this.status,\n\t statusText: this.statusText,\n\t headers: new Headers(this.headers),\n\t url: this.url\n\t })\n\t }\n\t\n\t Response.error = function() {\n\t var response = new Response(null, {status: 0, statusText: ''})\n\t response.type = 'error'\n\t return response\n\t }\n\t\n\t var redirectStatuses = [301, 302, 303, 307, 308]\n\t\n\t Response.redirect = function(url, status) {\n\t if (redirectStatuses.indexOf(status) === -1) {\n\t throw new RangeError('Invalid status code')\n\t }\n\t\n\t return new Response(null, {status: status, headers: {location: url}})\n\t }\n\t\n\t self.Headers = Headers;\n\t self.Request = Request;\n\t self.Response = Response;\n\t\n\t self.fetch = function(input, init) {\n\t return new Promise(function(resolve, reject) {\n\t var request\n\t if (Request.prototype.isPrototypeOf(input) && !init) {\n\t request = input\n\t } else {\n\t request = new Request(input, init)\n\t }\n\t\n\t var xhr = new XMLHttpRequest()\n\t\n\t function responseURL() {\n\t if ('responseURL' in xhr) {\n\t return xhr.responseURL\n\t }\n\t\n\t // Avoid security warnings on getResponseHeader when not allowed by CORS\n\t if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n\t return xhr.getResponseHeader('X-Request-URL')\n\t }\n\t\n\t return;\n\t }\n\t\n\t xhr.onload = function() {\n\t var status = (xhr.status === 1223) ? 204 : xhr.status\n\t if (status < 100 || status > 599) {\n\t reject(new TypeError('Network request failed'))\n\t return\n\t }\n\t var options = {\n\t status: status,\n\t statusText: xhr.statusText,\n\t headers: headers(xhr),\n\t url: responseURL()\n\t }\n\t var body = 'response' in xhr ? xhr.response : xhr.responseText;\n\t resolve(new Response(body, options))\n\t }\n\t\n\t xhr.onerror = function() {\n\t reject(new TypeError('Network request failed'))\n\t }\n\t\n\t xhr.open(request.method, request.url, true)\n\t\n\t if (request.credentials === 'include') {\n\t xhr.withCredentials = true\n\t }\n\t\n\t if ('responseType' in xhr && support.blob) {\n\t xhr.responseType = 'blob'\n\t }\n\t\n\t request.headers.forEach(function(value, name) {\n\t xhr.setRequestHeader(name, value)\n\t })\n\t\n\t xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n\t })\n\t }\n\t self.fetch.polyfill = true\n\t})(typeof self !== 'undefined' ? self : this);\n\n\n/***/ },\n/* 13 */,\n/* 14 */,\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _Form = __webpack_require__(9);\n\t\n\tvar _Form2 = _interopRequireDefault(_Form);\n\t\n\tvar _Tooltip = __webpack_require__(6);\n\t\n\tvar _Tooltip2 = _interopRequireDefault(_Tooltip);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t// default export as component object\n\texports.default = {\n\t Form: _Form2.default,\n\t Settings: _Settings2.default,\n\t Tooltip: _Tooltip2.default\n\t};\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** js/form.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap a138c665fa30c31cdbad\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Provides a Basic Widget\n */\nclass DestroyableWidget {\n\n constructor() {\n this.listeners = [];\n }\n\n /**\n * Destroys a Widget\n */\n destroy() {\n this.listeners.forEach((listener) => {\n listener.element.removeEventListener.apply(listener.element, listener.args);\n });\n this.listeners = [];\n }\n\n /**\n * Adds an event and registers it later to remove bindings\n * @param {HTMLElement} element\n * @param {String} name\n * @param {Function} listener\n * @param {boolean} [capture]\n * @returns {Function}\n */\n addEventListener(element, name, listener, capture) {\n this.listeners.push({\n element,\n args: [name, listener, capture]\n });\n\n element.addEventListener(name, listener, capture);\n return listener;\n }\n\n}\n\nexport default DestroyableWidget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/DestroyableWidget.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Tooltip\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Util from './util/Util';\nimport DestroyableWidget from './DestroyableWidget';\nimport Settings from './util/Settings';\n\n/**\n * @type {string}\n */\nconst CLASS_NAMES_TOOLTIP = 'tooltip-container';\n/**\n * @type {string}\n */\nconst CLASS_NAMES_OPEN = 'open';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_CLASSNAME = 'data-class';\n\n/**\n * @type {string}\n */\nconst ATTR_DATA_NO_TOUCH = 'data-no-touch';\n\n/**\n * @type {HTMLDocument}\n */\nconst doc = global.document;\n\n/**\n * Simple Tooltip\n */\nclass Tooltip extends DestroyableWidget {\n\n /**\n * Creates a Tooltip\n * @param {HTMLElement|String} DelegateContainer\n * @param {Object} [options]\n */\n constructor(DelegateContainer, options) {\n super();\n /**\n * The Container where possible events are captured\n */\n this.container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n if (!this.container) {\n throw new Error('Could not create Tooltip, DelegateContainer not found');\n }\n\n /**\n * The Container where tooltips are stored for this instance\n * @type {HTMLElement}\n */\n this.tooltipContainer = null;\n\n /**\n * Default Options\n */\n this.options = {\n containerClass: '',\n selectorAttribute: 'data-tooltip',\n collisionContainer: this.container\n };\n\n Object.assign(this.options, options || {});\n }\n\n /**\n * Creates and shows a tooltip\n * @param {HTMLElement} target where is this tooltip positioned\n * @param {String} text text content in tooltip, will be NOT escaped\n * @param {Boolean} [removeTitle] removes title element if given\n * @param {Node} [positionRelative]\n */\n createTooltip(target, text, removeTitle, positionRelative) {\n // abort if text is empty\n if (!text || text && text.trim() === '') {\n return;\n }\n\n if (Settings.isTouchDevice() && target && target.hasAttribute(ATTR_DATA_NO_TOUCH)) {\n return;\n }\n\n let tooltipContainer = this.tooltipContainer;\n\n if (!tooltipContainer) {\n tooltipContainer = doc.createElement('div');\n this.container.appendChild(tooltipContainer);\n this.tooltipContainer = tooltipContainer;\n }\n this._restoreClassNames(tooltipContainer, target);\n\n tooltipContainer.style.left = 'auto';\n tooltipContainer.style.top = 'auto';\n tooltipContainer.innerHTML = text;\n tooltipContainer.flexTooltipCurrentTarget = target;\n if (removeTitle) {\n target.oldTitle = text;\n target.removeAttribute('title');\n }\n\n Util.setupPositionNearby(positionRelative || target, tooltipContainer,\n this.options.collisionContainer, true, true);\n\n tooltipContainer.classList.add(CLASS_NAMES_OPEN);\n }\n\n _restoreClassNames(container, target) {\n // allow additional classname per tooltip on target element\n const classNames = [CLASS_NAMES_TOOLTIP, this.options.containerClass];\n const maybeTargetClass = target.getAttribute(ATTR_DATA_CLASSNAME);\n if (maybeTargetClass) {\n classNames.push(maybeTargetClass);\n }\n container.className = classNames.join(\" \");\n return this;\n }\n\n /**\n * @returns {HTMLElement|null}\n */\n getCurrentTarget() {\n return this.tooltipContainer ? this.tooltipContainer.flexTooltipCurrentTarget : null;\n }\n\n /**\n * Destroys this Widget\n * @returns {boolean}\n */\n destroy() {\n super.destroy();\n\n if (this.tooltipContainer) {\n this.tooltipContainer.parentNode.removeChild(this.tooltipContainer);\n return true;\n }\n return false;\n }\n\n /**\n * Removes a Tooltip on given target\n * @param {HTMLElement} [target], if not given will remove current open tooltip on this instance\n */\n removeTooltip(target) {\n let selfTarget = target;\n if (!selfTarget && this.tooltipContainer) {\n selfTarget = this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (this.tooltipContainer) {\n if (this.tooltipContainer.flexTooltipCurrentTarget !== selfTarget) {\n return;\n }\n this.tooltipContainer.classList.remove(CLASS_NAMES_OPEN);\n delete this.tooltipContainer.flexTooltipCurrentTarget;\n }\n if (selfTarget && selfTarget.oldTitle) {\n selfTarget.setAttribute('title', selfTarget.oldTitle);\n }\n }\n\n /**\n * Initilizes mouse events on container element\n */\n registerEvents() {\n const self = this;\n this.addEventListener(this.container, 'mouseover', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.createTooltip(e.target, e.target.getAttribute('title'), true);\n }\n });\n\n this.addEventListener(this.container, 'mouseout', (e) => {\n if (e.target.hasAttribute(self.options.selectorAttribute)) {\n self.removeTooltip(e.target);\n }\n });\n return this;\n }\n}\n\nexport default Tooltip;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Tooltip.js\n **/","/*global HTMLFormElement, fetch, FormData, clearTimeout, NodeList*/\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Form\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\nimport Tooltip from './Tooltip';\nimport 'isomorphic-fetch';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Settings from './util/Settings';\nimport DestroyableWidget from './DestroyableWidget';\n\nconst LOADING_CLASS = 'loading';\nconst DATA_ELEMENT_INVALID = 'data-flexcss-invalid';\nconst REMOTE = 'data-remote';\nconst REMOTE_ACTION = 'data-remote-action';\nconst ATTR_DISABLE_INLINE = 'data-disable-inline-validation';\nconst ATTR_DISABLE_REALTIME = 'data-disable-realtime-validation';\nconst ATTR_VALIDATOR = 'data-validate';\nconst ATTR_DATA_CUSTOM_MESSAGE = 'data-validation-message';\nconst ATTR_DATA_CUSTOM_LABEL = 'data-custom-label';\nconst ATTR_VALIDATE_VISIBILITY = 'data-validate-visibility';\nconst ATTR_ERROR_TARGET_ID = 'data-error-target';\nconst ATTR_DEPENDS = 'data-depends-selector';\nconst CONST_USE_JSON = 'json';\nconst CONST_REALTIME_EVENT = 'input';\nconst FOCUS_TOOLTIP_DELAY = 20;\nconst CLICK_TOOLTIP_DELAY = 150;\n\n/**\n * Triggered when form is fully initialized and handlers are binded\n * @type {string}\n */\nexport const EVENT_FORM_READY = 'flexcss.form.ready';\n/**\n * Fires when a form is submitted, cancelable\n * @type {string}\n */\nexport const EVENT_FORM_SUBMIT = 'flexcss.form.submit';\n/**\n * Fired directly after the form has been submitted via ajax\n * @type {string}\n */\nexport const EVENT_FORM_AFTER_AJAX_SUBMIT = 'flexcss.form.afterAjaxSubmit';\n/**\n * Fired when ajax events did complete\n * @type {string}\n */\nexport const EVENT_FORM_AJAX_COMPLETED = 'flexcss.form.ajaxCompleted';\n\n/**\n * A HTML5 Form Validation replacement\n */\n\nclass Form extends DestroyableWidget {\n /**\n * @param {HTMLElement} form\n * @param [options] optional options\n */\n constructor(form, options) {\n super();\n\n if (!(form instanceof HTMLFormElement)) {\n throw 'argument {0} form needs to be an form element';\n }\n\n /**\n * The Form\n * @type {HTMLElement}\n */\n this.form = form;\n\n /**\n * @type {Tooltip}\n */\n this.tooltips = null;\n\n /**\n * @type {Promise}\n */\n this.currentValidationFuture = new Promise(() => {\n });\n\n /**\n * Default options\n * @type {Object}\n */\n this.options = {\n // if true creates tooltips above element, uses FlexCss Tooltips\n createTooltips: true,\n // if true appends error message after input element\n appendError: false,\n // type of ajax submit\n ajaxSubmitType: 'POST',\n // json content type if ajax method is set to json\n ajaxJsonContentType: 'application/json; charset=utf-8',\n // allow inline validation\n inlineValidation: true,\n // validate in realtime (on `input` event)\n realtime: true,\n // timeout when realtime event should be captured\n realtimeTimeout: 250,\n // formatting method for an error\n formatErrorTooltip: (error) => {\n return ' ' + error;\n },\n // the class that will be put on the element to mark it failed validation\n inputErrorClass: 'invalid',\n // the container class for error messages below an element\n containerErrorClass: 'form-error',\n // additional options for fetch\n fetchOptions: {\n credentials: 'include'\n },\n // the container for tooltips\n tooltipContainer: form,\n tooltipOptions: {\n containerClass: 'error-tooltip'\n },\n // if you have a fixed header, either set a number or function here\n scrollToElementDiff: 0\n };\n\n // overwrite default options\n Object.assign(this.options, options);\n\n // apply settings from attributes\n Util.applyOptionsFromElement(form, this.options);\n\n // set form class as widget\n // Forms are very different to classical widgets,\n // we will not use our base widget class for this but just self\n form.hfWidgetInstance = this;\n\n /**\n * A List of Validators\n * @type {Object}\n * @private\n */\n this._validators = Form.globalValidators;\n\n /**\n * @type {Function}\n * @private\n */\n this._remoteValidationFunction = null;\n\n this.initFormValidation();\n }\n\n destroy() {\n super.destroy();\n if (this.tooltips) {\n this.tooltips.destroy();\n }\n }\n\n /**\n * Submits this form, either via ajax or just classical (default)\n * @param {HTMLFormElement} thisForm\n * @param {Event} e\n * @private\n * @returns {Promise|boolean} returns false if submit is cancled\n */\n _submitFunction(thisForm, e) {\n var shouldUseAjax = thisForm.getAttribute(REMOTE), ajaxPostUrl =\n thisForm.getAttribute(REMOTE_ACTION) ||\n thisForm.getAttribute('action') || window.location.href,\n useJson = CONST_USE_JSON === shouldUseAjax, self = this;\n\n var ev = Event.dispatch(thisForm, EVENT_FORM_SUBMIT).withOriginal(e).fire();\n\n // abort execution is event was prevented\n if (ev.defaultPrevented) {\n self._formStopLoading();\n return false;\n }\n\n if (shouldUseAjax === null) {\n // submit\n return thisForm.submit();\n }\n // prevent form from submit normally\n e.preventDefault();\n\n // add information that this is an XMLHttpRequest request (used by some frameworks)\n let defaultHeaders = {\n 'X-Requested-With': 'XMLHttpRequest'\n };\n\n // setup default headers\n if (useJson) {\n Object.assign(defaultHeaders, {\n 'Content-Type': this.options.ajaxJsonContentType\n });\n }\n let defaultOptions = Object.assign(this.options.fetchOptions, {\n headers: defaultHeaders,\n method: this.options.ajaxSubmitType\n });\n\n // support either JSON request payload or normal payload submission\n var serverCall = useJson ? fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: JSON.stringify(this.serialize())\n })) : fetch(ajaxPostUrl, Object.assign(defaultOptions, {\n body: new FormData(thisForm)\n }));\n\n Event.dispatch(thisForm, EVENT_FORM_AFTER_AJAX_SUBMIT).withOriginal(e).fire();\n\n return serverCall.then((r) => {\n (self._remoteValidationFunction || Form.globalRemoteValidationFunction).apply(self, [r]);\n\n Event.dispatch(thisForm, EVENT_FORM_AJAX_COMPLETED).withOriginal(e).withDetail({ response: r }).fire();\n // always remove error class\n self._formStopLoading();\n });\n }\n\n /**\n * Serializes a form to a json object\n * @returns {Object}\n */\n serialize() {\n var selectors = [\n 'input[name]:not([type=\"radio\"]):enabled',\n 'input[type=\"radio\"][name]:checked',\n 'select[name]:enabled',\n 'textarea[name]:enabled'\n ], inputs = this.form.querySelectorAll(selectors.join(',')), result = {};\n\n Array.prototype.forEach.call(inputs, function (input) {\n var exists = result[input.name], value = input.value;\n if (exists instanceof Array) {\n exists.push(value);\n } else if (exists) {\n result[input.name] = [result[input.name], value];\n } else {\n result[input.name] = value;\n }\n });\n\n return result;\n }\n\n /**\n * Handles the chain of validation on given fields\n *\n * @param {HTMLElement|Array|NodeList} field\n * @param [focus] optional focus first error\n * @returns {Promise}\n */\n handleValidation(field, focus) {\n var fields = (field instanceof Array || field instanceof NodeList) ? field : [field];\n return this._handleValidation(fields, focus, true).then(((r) => {\n if (!r.foundAnyError) {\n // remove tooltips\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n }\n return r;\n }).bind(this));\n }\n\n /**\n * Handles errors on given node list\n * @param {NodeList} toValidateFields\n * @param {boolean} focus\n * @param {boolean} scoped if true, will only validate the fields `invalidFields`\n * @returns {Promise}\n * @private\n */\n _handleValidation(toValidateFields, focus, scoped) {\n var self = this;\n var arr = Form._createArrayFromInvalidFieldList(toValidateFields), isLocalInvalid = arr.length > 0;\n // focus must appear in the same frame for iOS devices\n if (isLocalInvalid && focus) {\n self._focusElement(arr[0]);\n }\n var validation = scoped ? this._customValidationsForElements(toValidateFields) :\n self.validateCustomFields();\n return validation.then((r) => {\n if (isLocalInvalid) {\n // combine browser and custom validators\n r.foundAnyError = true;\n }\n // get a unique field list of all fields that need to be checked and rendered\n // it's possible that we have duplicates in non scoped mode\n let thisToValidateFields = scoped ? toValidateFields :\n Array.from(arr).concat(r.checkedFields);\n r.checkedFields = thisToValidateFields;\n let foundInvalidFields = self.prepareErrors(thisToValidateFields, false),\n firstInvalidField = foundInvalidFields[0];\n if (firstInvalidField) {\n if (focus) {\n self._focusElement(firstInvalidField);\n // if element could not be focused:\n if (document.activeElement !== firstInvalidField) {\n self._handleTooltipHideClickAfterChange();\n }\n } else {\n self._handleTooltipHideClickAfterChange();\n }\n self.showAndOrCreateTooltip(firstInvalidField);\n }\n return r;\n });\n }\n\n /**\n * @param {HTMLElement} field\n * @param {ValidityState} validity\n * @returns {*}\n * @private\n */\n\n _setupErrorMessages(field, validity) {\n return Form.globalErrorMessageHandler ?\n Form.globalErrorMessageHandler.apply(this, [field, validity]) : false;\n }\n\n /**\n * Handles class labels for elements\n * @param {Object} fields\n * @private\n */\n _handleLabels(fields) {\n Object.keys(fields).forEach(function (id) {\n let labels = this.getForm().querySelectorAll('[for=\"' + id + '\"]'), invalid = fields[id];\n if (labels.length) {\n for (let labelsIndex = 0; labelsIndex < labels.length; labelsIndex++) {\n let labelEl = labels[labelsIndex];\n // we can't use toggle attribute, not supported in IE\n if (invalid) {\n this._markElementInvalid(labelEl);\n } else {\n this._markElementValid(labelEl);\n }\n }\n }\n }.bind(this));\n }\n\n /**\n * @param el\n * @private\n */\n _markElementInvalid(el) {\n el.setAttribute(DATA_ELEMENT_INVALID, \"true\");\n el.classList.add(this.options.inputErrorClass);\n }\n\n /**\n * @param el\n * @private\n */\n _markElementValid(el) {\n el.removeAttribute(DATA_ELEMENT_INVALID);\n el.classList.remove(this.options.inputErrorClass);\n }\n\n /**\n * A List of invalid elements (:invalid)\n * @returns {Array}\n * @private\n */\n _getInvalidElements() {\n return Array.prototype.filter.call(this.getForm().querySelectorAll(\":invalid\"), function (r) {\n return !(r instanceof HTMLFieldSetElement);\n });\n }\n\n /**\n * @param {HTMLElement} thisParent\n * @private\n */\n _removeElementErrors(thisParent) {\n let errors = thisParent.querySelectorAll('.' + this.options.containerErrorClass), inputsWithErrorClasses =\n thisParent.querySelectorAll(`[${DATA_ELEMENT_INVALID}]`);\n for (let elementErrorIndex = 0; elementErrorIndex < errors.length; elementErrorIndex++) {\n errors[elementErrorIndex].parentNode.removeChild(errors[elementErrorIndex]);\n }\n for (let inputErrorIndex = 0; inputErrorIndex < inputsWithErrorClasses.length; inputErrorIndex++) {\n let el = inputsWithErrorClasses[inputErrorIndex];\n this._markElementValid(el);\n }\n }\n\n\n /**\n * Registers a custom validator\n * @param {String} name\n * @param {Function} validator a validation function should always return either a Future(true) or Future(false)\n * even when the field has been invalidated with `setCustomValidity`, because of different browser `bugs`\n * we can't rely on that\n * @returns {Form}\n */\n registerValidator(name, validator) {\n this._validators[name] = validator;\n return this;\n }\n\n /**\n * Runs async validation\n * @param {String} validationRef\n * @param {HTMLElement} field\n * @returns {Promise}\n * @private\n */\n _runValidation(validationRef, field) {\n if (!this._validators[validationRef]) {\n throw 'Could not found validator: ' + validationRef;\n }\n var cl = field.classList, future = this._validators[validationRef].apply(this, [field, this.form]);\n cl.add(LOADING_CLASS);\n future.then(() => {\n cl.remove(LOADING_CLASS);\n });\n return future;\n }\n\n\n /**\n * Run custom validations for elements, validations are done async do support XHR Requests or other stuff\n *\n * @param {Array|NodeList} fields\n * @returns {Promise} contains either true if validations passed or false if something went wrong\n * @private\n */\n _customValidationsForElements(fields) {\n var futures = [], fieldsLength = fields.length, checkedFields = [];\n for (var iVal = 0; iVal < fieldsLength; iVal++) {\n var field = fields[iVal], validationRef = field.getAttribute(ATTR_VALIDATOR), validity = field.validity;\n if (this._validators[validationRef]) {\n // use local validation first and then continue with custom validations\n if (Form._shouldNotValidateField(field) || (validity && !validity.customError && !validity.valid)) {\n continue;\n }\n checkedFields.push(field);\n futures.push(this._runValidation(validationRef, field));\n } else {\n if (validationRef) {\n console.warn('data-validate was set but no validator was found');\n }\n }\n }\n return Promise.all(futures).then(function (allFutures) {\n let l = allFutures.length;\n let result = {\n checkedFields: checkedFields,\n foundAnyError: false\n };\n for (var fI = 0; fI < l; fI++) {\n if (!allFutures[fI]) {\n result.foundAnyError = true;\n break;\n }\n }\n return result;\n });\n }\n\n /**\n * Remove all errors for this form\n * @returns {Form}\n */\n removeErrors() {\n this._removeElementErrors(this.form);\n if (this.tooltips) {\n this.tooltips.removeTooltip();\n }\n return this;\n }\n\n /**\n * Will handle errors for given fields\n * @param {Array|NodeList} fields\n * @param {Boolean} removeAllErrors\n */\n prepareErrors(fields, removeAllErrors) {\n if (removeAllErrors) {\n this.removeErrors();\n }\n let labelGroups = {}, invalidFields = [];\n\n function handleAdditionalLabels(isInvalid, thisLabelGroup, field) {\n let additionalLabels = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) ||\n field.id, group = thisLabelGroup[additionalLabels];\n if (additionalLabels) {\n // check additionally if field is currently marked as invalid\n // so the label is not marked as error if no field is marked as one\n group = group ? group : isInvalid;\n thisLabelGroup[additionalLabels] = group;\n }\n }\n\n // We save all validations in an extra property because we need to reset the validity due some\n // implementation errors in other browsers then chrome\n for (let i = 0; i < fields.length; i++) {\n let field = fields[i], errorTarget = Form._findErrorTarget(field), parent = errorTarget.parentNode,\n validity = field.validity, isInvalid = validity && !validity.valid;\n if (Form._shouldNotValidateField(field)) {\n continue;\n }\n field.flexFormsSavedValidity = JSON.parse(JSON.stringify(validity));\n handleAdditionalLabels(isInvalid, labelGroups, field);\n if (isInvalid) {\n if (!removeAllErrors) {\n // Remove current errors:\n this._removeElementErrors(parent);\n }\n // setup custom error messages:\n this._setupErrorMessages(field, validity);\n let msg = field.validationMessage;\n\n // mark fields as invalid\n this._markElementInvalid(errorTarget);\n this._markElementInvalid(field);\n\n if (this.options.appendError) {\n parent.insertAdjacentHTML(\"beforeend\",\n `
${msg}
`);\n }\n invalidFields.push(field);\n field.flexFormsSavedValidationMessage = msg;\n } else {\n // restore invalid fields\n this._markElementValid(errorTarget);\n this._markElementValid(field);\n\n // cleanup\n delete field.flexFormsSavedValidationMessage;\n\n // remove error markup\n this._removeElementErrors(parent);\n }\n // We have to reset the custom validity here to allow native validations work again\n field.setCustomValidity('');\n }\n // if validates a single field we need to check the linked fields to a label:\n if (fields.length === 1) {\n let field = fields[0];\n let id = field.getAttribute(ATTR_DATA_CUSTOM_LABEL) || field.id;\n if (id) {\n let linkedFields = Array.from(\n this.getForm().querySelectorAll(`[${ATTR_DATA_CUSTOM_LABEL}=\"${id}\"], #${id}`));\n linkedFields.forEach(function (thisField) {\n let validity = thisField.validity, isInvalid = validity && !validity.valid &&\n this._isElementInvalidElement(thisField);\n handleAdditionalLabels(isInvalid, labelGroups, thisField);\n }.bind(this));\n }\n }\n this._handleLabels(labelGroups);\n return invalidFields;\n }\n\n /**\n * Validates all custom fields\n * @returns {Promise}\n */\n validateCustomFields() {\n return this._customValidationsForElements(\n this.form.querySelectorAll(\"[data-validate]\"));\n }\n\n /**\n * Tests if a field should be validated\n * @param {HTMLElement} field\n * @returns {boolean}\n * @private\n */\n static _shouldNotValidateField(field) {\n var target = Form._findErrorTarget(field);\n return target instanceof HTMLFieldSetElement || field.validity === undefined ||\n (target.hasAttribute(ATTR_VALIDATE_VISIBILITY) && !Util.isVisible(target));\n }\n\n /**\n * Creates an array from a node list with invalid items\n * This Method expicitly checks if field should not be validated so it can be used to foucs a field\n * @param list\n * @returns {Array}\n * @private\n */\n static _createArrayFromInvalidFieldList(list) {\n var arr = [];\n for (var i = 0; i < list.length; ++i) {\n var n = list[i];\n if (n.validity && !n.validity.valid) {\n if (!Form._shouldNotValidateField(n)) {\n arr.push(n);\n }\n }\n }\n return arr;\n }\n\n\n /**\n * This form\n * @returns {HTMLElement}\n */\n getForm() {\n return this.form;\n }\n\n /**\n * Registers a function that handles remote validation\n * @param {Function} func\n * @returns {Form}\n */\n registerRemoteValidation(func) {\n this._remoteValidationFunction = func;\n return this;\n }\n\n\n /**\n * Formats the error content for the tooltip\n * @param {String} error\n * @returns {String}\n * @private\n */\n _formatErrorTooltip(error) {\n return this.options.formatErrorTooltip.apply(this, [error]);\n }\n\n /**\n * Tries to find a custom error target on given target\n * @param target\n * @returns {HTMLElement}\n * @private\n */\n static _findErrorTarget(target) {\n var el = target.getAttribute(ATTR_ERROR_TARGET_ID) || target,\n foundTarget = el instanceof HTMLElement ? el : global.document.getElementById(el);\n if (!foundTarget) {\n throw 'Given error target did not exsits:' + target;\n }\n return foundTarget;\n }\n\n /**\n * Creates a tooltip at given element, will only create a new instance if not created\n * @param {HTMLElement} target\n * @param {Boolean} [remove]\n */\n showAndOrCreateTooltip(target, remove) {\n var self = this;\n if (!this.tooltips && this.options.createTooltips) {\n this.tooltips = new Tooltip(this.options.tooltipContainer, this.options.tooltipOptions);\n }\n if (!this.options.createTooltips) {\n return false;\n }\n\n if (!target.flexFormsSavedValidity) {\n return false;\n }\n var errorTarget = Form._findErrorTarget(target);\n if (!target.flexFormsSavedValidity.valid && self._isElementInvalidElement(errorTarget)) {\n self.tooltips.createTooltip(errorTarget,\n self._formatErrorTooltip(target.flexFormsSavedValidationMessage), false);\n return true;\n } else {\n if (remove) {\n self.tooltips.removeTooltip();\n }\n }\n return false;\n }\n\n /**\n * Checks if element is marked as invalid\n * @param {HTMLElement} el\n * @returns {boolean}\n * @private\n */\n _isElementInvalidElement(el) {\n return el.hasAttribute(DATA_ELEMENT_INVALID);\n }\n\n /**\n * Handles invalid event of a form\n * @param {Event} e\n * @returns {Promise|boolean}\n * @private\n */\n _checkIsInvalid(e) {\n e.preventDefault();\n var invalidFields = this.getForm().querySelectorAll(\":invalid\");\n return this._handleValidation(invalidFields, true, false);\n }\n\n /**\n * Will query dependent fields (by selector) that should be validated with given field\n * @param field\n * @returns {NodeList|[]}\n * @private\n */\n _getDependentFields(field) {\n let fieldSelector = field.getAttribute(ATTR_DEPENDS), base = [field];\n if (fieldSelector) {\n base.push.apply(base, Array.prototype.slice.apply(\n this.getForm().querySelectorAll(fieldSelector)));\n }\n return base;\n }\n\n /**\n * @private\n * @param {HTMLElement} [target]\n */\n _handleTooltipInline(target) {\n if (this.tooltips) {\n this.tooltips.removeTooltip(target);\n }\n }\n\n /**\n * Initializes validation for a given form, registers event handlers\n */\n initFormValidation() {\n // Suppress the default bubbles\n var form = this.getForm(),\n self = this,\n invalidEvent = 'invalid';\n\n /**\n * Validates if is valid realtime element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidRealtimeElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_REALTIME) && !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n form.addEventListener(invalidEvent, function (e) {\n e.preventDefault();\n }, true);\n\n Util.addEventOnce(invalidEvent, form, function handleInvalid(e) {\n self._formLoading();\n var result = self._checkIsInvalid(e);\n if (result) {\n self.currentValidationFuture = new Promise((resolve) => {\n result.then(function (r) {\n setTimeout(function () {\n Util.addEventOnce(invalidEvent, form, handleInvalid, true);\n }, 0);\n resolve(r);\n self._formStopLoading();\n if (!r.foundAnyError) {\n self._formLoading();\n self._handleSubmit(e);\n }\n });\n });\n }\n }, true);\n\n this.addEventListener(form, 'reset', () => {\n this.removeErrors();\n });\n\n // Timeout for keys:\n var TIMEOUT_KEYDOWN, KEYDOWN_RUNNING = false;\n\n // resets keydown events\n function clearKeyDownTimeout() {\n KEYDOWN_RUNNING = false;\n clearTimeout(TIMEOUT_KEYDOWN);\n }\n\n // setup custom realtime event if given\n if (self.options.realtime) {\n this.addEventListener(form, CONST_REALTIME_EVENT, function (e) {\n if (self._formIsLoading()) {\n return;\n }\n var target = e.target;\n clearTimeout(TIMEOUT_KEYDOWN);\n if (KEYDOWN_RUNNING) {\n return;\n }\n TIMEOUT_KEYDOWN = setTimeout(() => {\n let isStillTarget = document.activeElement === e.target;\n if (!_checkIsValidRealtimeElement(target)) {\n return;\n }\n if (isStillTarget) {\n self._handleTooltipInline();\n }\n KEYDOWN_RUNNING = true;\n let dependentFields = self._getDependentFields(target);\n self._customValidationsForElements(dependentFields).then(function () {\n self.prepareErrors(dependentFields, false);\n if (isStillTarget) {\n self.showAndOrCreateTooltip(e.target);\n }\n // future must be resolved before another event can be started\n KEYDOWN_RUNNING = false;\n });\n }, self.options.realtimeTimeout);\n }, true);\n }\n\n /**\n * Validates if target is a valid input field to check blur and focus events\n *\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidBlurFocusElement(target) {\n let attr = target.getAttribute(\"type\");\n return (attr !== \"radio\" && attr !== \"checkbox\" && attr !== \"submit\");\n }\n\n /**\n * Validates if is valid inline-check element\n * @param {HTMLElement} target\n * @returns {boolean}\n * @private\n */\n function _checkIsValidInlineCheckElement(target) {\n return !target.hasAttribute(ATTR_DISABLE_INLINE);\n }\n\n this.addEventListener(form, 'blur', function (e) {\n // do not hide tooltip after change event\n if (!e.target.flexcssKeepTooltips) {\n self._handleTooltipInline(e.target);\n }\n delete e.target.flexcssKeepTooltips;\n }, true);\n\n // handle focus on input elements\n // will show an error if field is invalid\n this.addEventListener(form, \"focus\", function (e) {\n if (self._formIsLoading()) {\n return;\n }\n // do not track errors for checkbox and radios on focus:\n if (!_checkIsValidBlurFocusElement(e.target)) {\n return;\n }\n // we need to delay this a little, because Firefox and Safari do not show a tooltip after it\n // just have been hidden (on blur). Maybe fix this with a queue later\n setTimeout(function () {\n self.showAndOrCreateTooltip(e.target);\n }, FOCUS_TOOLTIP_DELAY);\n }, true);\n\n if (self.options.inlineValidation) {\n // Handle change for checkbox, radios and selects\n this.addEventListener(form, \"change\", function (e) {\n const target = e.target;\n if (self._formIsLoading() || !_checkIsValidInlineCheckElement(target)) {\n return;\n }\n clearKeyDownTimeout();\n const name = target.getAttribute('name');\n let inputs = name ? form.querySelectorAll('[name=\"' + name + '\"]') : [target];\n // we only support dependent fields for a single widgets right now\n if (inputs.length === 1) {\n inputs = self._getDependentFields(target);\n }\n self._customValidationsForElements(inputs).then(function () {\n self.prepareErrors(inputs, false);\n target.flexcssKeepTooltips = self.showAndOrCreateTooltip(target, true);\n if (target.flexcssKeepTooltips) {\n self._handleTooltipHideClickAfterChange();\n }\n });\n });\n }\n\n // prevent default if form is invalid\n this.addEventListener(form, \"submit\", function listener(e) {\n self._submitListener(e, listener);\n });\n\n Event.dispatchAndFire(form, EVENT_FORM_READY);\n }\n\n /* Loading states, unfortunately we can't check if a promise is pending :/*/\n /* TODO: Maybe wrap promise to extend this functionality */\n\n _formLoading() {\n this.getForm().classList.add(LOADING_CLASS);\n }\n\n _formStopLoading() {\n this.getForm().classList.remove(LOADING_CLASS);\n }\n\n _formIsLoading() {\n return this.getForm().classList.contains(LOADING_CLASS);\n }\n\n // this defines the logic after a change event when a tooltip is shown\n // because we call this method inside the change event, the click would be immeditally executed with the change\n // event when not using setTimeout(). There might be another solution for this...\n _handleTooltipHideClickAfterChange() {\n const self = this;\n if (this.options.createTooltips) {\n setTimeout(function () {\n Util.addEventOnce(Settings.getTabEvent(), global.document.body, function (t) {\n if (!self._isElementInvalidElement(t.target)) {\n self._handleTooltipInline();\n }\n });\n }, CLICK_TOOLTIP_DELAY);\n }\n }\n\n _focusElement(el) {\n el.focus();\n Util.scrollToElement(el, this.options.scrollToElementDiff);\n }\n\n /**\n * Listener that is executed on form submit\n * @param e\n * @param submitListener\n * @returns {boolean}\n * @private\n */\n _submitListener(e, submitListener) {\n\n const form = this.getForm(),\n self = this,\n submitEvent = 'submit';\n\n if (this._formIsLoading()) {\n e.preventDefault();\n return false;\n }\n this._formLoading();\n form.removeEventListener(submitEvent, submitListener);\n this.removeErrors();\n e.preventDefault();\n // reset:\n if (form.checkValidity()) {\n form.addEventListener(submitEvent, submitListener);\n // It's possible that the form is valid but the custom validations need to be checked again:\n self.currentValidationFuture = new Promise((resolve) => {\n var validation = self.validateCustomFields();\n validation.then(function (r) {\n // because custom validators may mark multiple fields as invalid, we get all of them in the form\n var fields = self._getInvalidElements(),\n errors = self.prepareErrors(fields, false), firstError = errors[0];\n if (firstError) {\n self._focusElement(firstError);\n self.showAndOrCreateTooltip(firstError, true);\n }\n resolve(r);\n });\n });\n self.currentValidationFuture.then(function (r) {\n if (!r.foundAnyError) {\n // Handle submitting the form to server:\n self._handleSubmit(e);\n } else {\n self._formStopLoading();\n }\n });\n } else {\n self._formStopLoading();\n form.addEventListener(submitEvent, submitListener);\n }\n }\n\n\n /**\n * Handles submitting, optionally allows to stop submitting\n * @param e\n * @private\n */\n _handleSubmit(e) {\n this._submitFunction(this.form, e);\n }\n\n\n /**\n * Registers a global event Handler\n * @param errorFunc\n */\n static registerErrorMessageHandler(errorFunc) {\n Form.globalErrorMessageHandler = errorFunc;\n }\n\n /**\n * Initialize forms for a specific selector\n * @param {String} selector\n * @param {Object} [options]\n * @return {array.}\n */\n static init(selector, options) {\n var forms = selector instanceof HTMLElement ? selector.querySelectorAll('form') :\n document.querySelectorAll(selector), instances = [];\n for (var i = 0; i < forms.length; i++) {\n instances.push(new Form(forms[i], options));\n }\n return instances;\n }\n\n\n /**\n * Registers a global validator that is usable on all form instances\n * @param {String} name\n * @param {Function} validator\n * @returns {Function}\n */\n static registerValidator(name, validator) {\n Form.globalValidators[name] = validator;\n return Form;\n }\n\n /**\n * Registers a global function that is called when a form should validate the response of a server\n * @param {Function} func\n * @returns {Form}\n */\n static registerGlobalRemoteValidationFunction(func) {\n Form.globalRemoteValidationFunction = func;\n return Form;\n }\n}\n\n\n/**\n * Global validators\n * @type {Array}\n */\nForm.globalValidators = [];\n\n/**\n * Global Remote validation function\n */\nForm.globalRemoteValidationFunction = function () {\n};\n\n/**\n * Handles custom error messages extracts custom message by default\n */\nForm.globalErrorMessageHandler = (field, validity) => {\n if (!validity.customError) {\n let customMsg = field.getAttribute(ATTR_DATA_CUSTOM_MESSAGE);\n if (customMsg) {\n field.setCustomValidity(customMsg);\n }\n }\n};\n\nexport default Form;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Form.js\n **/","// the whatwg-fetch polyfill installs the fetch() function\n// on the global object (window or self)\n//\n// Return that as the export for use in Webpack, Browserify etc.\nrequire('whatwg-fetch');\nmodule.exports = self.fetch.bind(self);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/isomorphic-fetch/fetch-npm-browserify.js\n ** module id = 11\n ** module chunks = 0 1\n **/","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var list = this.map[name]\n if (!list) {\n list = []\n this.map[name] = list\n }\n list.push(value)\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n var values = this.map[normalizeName(name)]\n return values ? values[0] : null\n }\n\n Headers.prototype.getAll = function(name) {\n return this.map[normalizeName(name)] || []\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = [normalizeValue(value)]\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n Object.getOwnPropertyNames(this.map).forEach(function(name) {\n this.map[name].forEach(function(value) {\n callback.call(thisArg, value, name, this)\n }, this)\n }, this)\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n reader.readAsArrayBuffer(blob)\n return fileReaderReady(reader)\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n reader.readAsText(blob)\n return fileReaderReady(reader)\n }\n\n var support = {\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob();\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n function Body() {\n this.bodyUsed = false\n\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (!body) {\n this._bodyText = ''\n } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n // Only support ArrayBuffers for POST method.\n // Receiving ArrayBuffers happens via Blobs, instead.\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n } else {\n this.text = function() {\n var rejected = consumed(this)\n return rejected ? rejected : Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n if (Request.prototype.isPrototypeOf(input)) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = input\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this)\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function headers(xhr) {\n var head = new Headers()\n var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n pairs.forEach(function(header) {\n var split = header.trim().split(':')\n var key = split.shift().trim()\n var value = split.join(':').trim()\n head.append(key, value)\n })\n return head\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText\n this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request\n if (Request.prototype.isPrototypeOf(input) && !init) {\n request = input\n } else {\n request = new Request(input, init)\n }\n\n var xhr = new XMLHttpRequest()\n\n function responseURL() {\n if ('responseURL' in xhr) {\n return xhr.responseURL\n }\n\n // Avoid security warnings on getResponseHeader when not allowed by CORS\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL')\n }\n\n return;\n }\n\n xhr.onload = function() {\n var status = (xhr.status === 1223) ? 204 : xhr.status\n if (status < 100 || status > 599) {\n reject(new TypeError('Network request failed'))\n return\n }\n var options = {\n status: status,\n statusText: xhr.statusText,\n headers: headers(xhr),\n url: responseURL()\n }\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/whatwg-fetch/fetch.js\n ** module id = 12\n ** module chunks = 0 1\n **/","import Form from '../Form';\nimport Tooltip from '../Tooltip';\nimport Settings from '../util/Settings';\n\n// default export as component object\nexport default {\n Form,\n Settings,\n Tooltip\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/Form.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/build/maps/modal.map b/build/maps/modal.map index 843bc25f..0dc40f7a 100644 --- a/build/maps/modal.map +++ b/build/maps/modal.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6***","webpack:///webpack/bootstrap e25fe34d2bc7e7cf2068?8d0c***","webpack:///./src/main/util/Util.js?5bc4*","webpack:///./src/main/util/Settings.js?b01f*","webpack:///./src/main/util/Event.js?68bf*","webpack:///./src/main/Modal.js?a8d4","webpack:///./src/main/Widget.js?920e","webpack:///./src/main/lib/FixedWindow.js?6376","webpack:///./src/main/lib/debounce.js?3601","webpack:///./src/main/modules/Modal.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdA,KAAM,MAAM,CAAC,QAAD,EAAW,KAAX,EAAkB,IAAlB,EAAwB,GAAxB,EAA6B,EAA7B,CAAN;;AAEN,KAAM,iBAAiB,mBAAjB;;AAEN,KAAM,kBAAkB,oBAAlB;;AAEN,KAAM,mBAAmB,qBAAnB;;;;;;KAKA;;;;;;;;;;;;;;;8CAQ0B,SAAS,MAAM,UAAU;AACjD,iBAAM,eAAe,SAAS,YAAT,CAAsB,CAAtB,EAAyB;AAC1C,0BAAS,KAAT,CAAe,OAAf,EAAwB,CAAC,CAAD,EAAI,YAAJ,CAAxB,EAD0C;cAAzB,CAD4B;;AAKjD,kBAAK,IAAI,IAAI,CAAJ,EAAO,IAAI,IAAI,MAAJ,EAAY,GAAhC,EAAqC;AACjC,qBAAI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B,YAAG,OAAH,GAAa,WAAW,EAAX,EAAe,EAAf,CAAb,CAF6B;MAAN;EAAZ,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBCKA;AACX,2BADW;AAEX,iCAFW;AAGX,6BAHW","file":"js/modal.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap e25fe34d2bc7e7cf2068\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Modal\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global KeyboardEvent */\n\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\nconst KEY_ESC = 27;\n/* Attribute Names */\nconst ATTR_CREATE_NEW = 'data-new-instance';\nconst ATTR_CLOSE = 'data-close-modal';\nconst ATTR_NAME = 'data-modal';\n\n/* Class names */\nconst CLS_CONTAINER_CURRENT = 'front';\nconst CLS_OPEN = 'open';\nconst CLS_CURRENT = 'current';\nconst CLS_PART_OF_STACK = 'part-of-stack';\nconst CLS_MODAL_CONTAINER = 'modal-container';\nconst CLS_ANIM_END = 'modal-anim-end';\nconst CLS_LOADER_CONTAINER = 'loader-container';\nconst CLS_LOADER = 'loader';\nconst CLS_BACKDROP = 'backdrop';\n\n/* Events */\n\n/**\n * Event triggered when modal is closed\n * @type {string}\n */\nexport const EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n/**\n * Event triggered before a modal is closed, cancelable\n * @type {string}\n */\nexport const EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n/**\n * Event triggered when a modal is opened\n * @type {string}\n */\nexport const EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\n/**\n * Event triggered when modal is initilized, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_INIT = 'flexcss.modal.init';\n\n/**\n * Triggered when the content of an async modal on a target is loaded, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\n/**\n * A Modal Implementation\n */\nclass Modal {\n constructor(DelegateContainer, options) {\n const doc = global.document;\n const container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n // Instance vars:\n if (!container) {\n throw new Error(`Could not found container element by given ID/Element: ${DelegateContainer}`);\n }\n\n this.currentOpen = null;\n\n this.loading = false;\n\n this.container = container;\n\n /**\n * Default Options\n */\n this.options = {\n classNames: 'modal',\n closeOnEscape: true,\n closeOnBackgroundClick: true,\n destroyOnFinish: false,\n fixedContainer: true,\n containerClassNames: ''\n };\n\n Object.assign(this.options, options);\n\n // Container where events are delegated\n this.eventContainer = null;\n this.eventFunction = null;\n\n this.dataMainPageContainer = global.document.body;\n\n this.currentScrollTop = 0;\n\n this.modalContainer = null;\n\n // Destroy full modal instance when no dialogs are bind to?\n // Otherwise container is recycled\n this.destroyOnFinish = this.options.destroyOnFinish;\n }\n\n /**\n * Removes this modal from global stack\n * Will handle fixing main html element too\n * @private\n * @param n\n */\n _removeModalFromStack(n) {\n const t = Modal._modalInstances.indexOf(n);\n if (t > -1) {\n Modal._modalInstances.splice(t, 1);\n FixedWindow.getInstance().close();\n }\n }\n\n\n /**\n * Modal container that contains all `stacked` modals for this instance\n * @returns {HTMLElement}\n */\n getModalContainer() {\n return this.modalContainer;\n }\n\n /**\n * Closes the current open modal of this stack\n * @params [e], optional event\n * @returns {*}\n */\n close(e) {\n const self = this;\n\n const options = self.currentOpen ? Util.applyOptionsFromElement(\n self.currentOpen, Util.copy(self.options)) : self.options;\n\n // close only on keyboard if instance should\n if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n return false;\n }\n\n // close only on background if instance should\n if (!options.closeOnBackgroundClick && e &&\n e.type === Settings.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n\n // if an instance is currently loading, prevent from closing\n if (self.loading) {\n return false;\n }\n\n if (e) {\n e.preventDefault();\n }\n\n if (self.currentOpen) {\n // dispatch beforeClose event, if prevented prevent modal from closing\n const ev = Event.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n if (ev.defaultPrevented) {\n return false;\n }\n\n this._finishState(self.currentOpen);\n // if there is an previous modal\n if (self.currentOpen.prevModal) {\n // switch to the next modal\n return self.switchModals(self.currentOpen.prevModal,\n self.currentOpen.prevModal.prevModal || null);\n }\n\n // finally trigger closed event\n Event.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n }\n self._removeModalFromStack(self.currentOpen);\n\n // Full stack closed:\n self.currentOpen = null;\n if (self.modalContainer) {\n // setup next open\n const lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n const classList = self.modalContainer.classList;\n classList.remove(CLS_CONTAINER_CURRENT);\n classList.remove(CLS_BACKDROP);\n classList.remove(CLS_OPEN);\n // Remove all current classes from child-nodes\n for (let i = 0; i < self.modalContainer.childNodes.length; i++) {\n const node = self.modalContainer.childNodes[i];\n const cl = node.classList;\n // remove applied styles\n self._finishState(node);\n cl.remove(CLS_CURRENT);\n cl.remove(CLS_PART_OF_STACK);\n }\n if (lastContainer) {\n lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n }\n }\n\n if (self.destroyOnFinish) {\n self.destroy();\n }\n return self;\n }\n\n /**\n * Resets a target when newly initilizes\n * @param target\n * @private\n */\n _finishState(target) {\n target.classList.remove(CLS_ANIM_END);\n }\n\n /**\n * Handler called when a Modal has finished an animation\n * @param e\n * @param self\n * @private\n */\n _finishAnim(e, self) {\n e.target.classList.add(CLS_ANIM_END);\n e.target.removeEventListener(e.type, self, true);\n }\n\n /**\n * Brings the given modal to front\n * @param co\n * @param last\n */\n switchModals(co, last) {\n co.prevModal = last;\n Modal._modalInstances.push(co);\n FixedWindow.getInstance().open(this, this.modalContainer);\n if (last) {\n this._finishState(last);\n Util.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n last.classList.add(CLS_PART_OF_STACK);\n }\n // set new currentOpen\n this.currentOpen = co;\n\n // bring current container to the front\n const instances = Modal._modalInstances;\n\n for (let m = 0; m < instances.length; m++) {\n instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n }\n this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n // remove animations if animations has been completed, fixes various bugs:\n // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n Util.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\n for (let i = 0; i < this.modalContainer.childNodes.length; i++) {\n const n = this.modalContainer.childNodes[i];\n const isCurrent = n.classList.contains(CLS_CURRENT);\n if (n === co) {\n co.classList.add(CLS_CURRENT);\n co.classList.remove(CLS_PART_OF_STACK);\n this._finishState(co);\n } else {\n n.classList.remove(CLS_CURRENT);\n if (isCurrent) {\n this._removeModalFromStack(n);\n Event.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n }\n }\n }\n }\n\n /**\n * Creates a Modal and opens it (later)\n * @param e\n * @returns {Promise|boolean}\n */\n createWidget(e) {\n const self = this;\n if (this.loading) {\n return false;\n }\n\n // check if another modal has registered events on this dom path:\n if (e && e.target) {\n const foundInstance = Util.parentsUntil(e.target, (node) => {\n return node && node.flexModalInstance;\n });\n\n // if another instance has been found, abort\n if (foundInstance !== this.container) {\n return false;\n }\n }\n let targetContent;\n let future;\n let widget;\n let target;\n let hasTarget = true;\n const isHtmlElement = e instanceof HTMLElement;\n const isWidget = Widget.isWidget(e);\n if (isHtmlElement || isWidget) {\n if (isHtmlElement) {\n targetContent = e;\n } else {\n widget = e;\n targetContent = widget.element;\n }\n } else {\n target = e.target;\n if (!target) {\n throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n }\n hasTarget = target.hasAttribute(ATTR_NAME);\n targetContent = target.getAttribute(ATTR_NAME);\n widget = Widget.findWidget(target);\n if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n const newInstance = new Modal(this.container)\n .setDestroyOnFinish(true);\n e.newInstance = true;\n newInstance.fromEvent(e).then(() => {\n newInstance.registerEvents(newInstance.getModalContainer());\n });\n return false;\n }\n if (hasTarget) {\n e.stopImmediatePropagation();\n e.preventDefault();\n }\n }\n\n if (!hasTarget) {\n return false;\n }\n\n let modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\n // lazy create modal container\n if (!this.modalContainer) {\n this.modalContainer = global.document.createElement('div');\n this.modalContainer.className = `${CLS_MODAL_CONTAINER} ${this.options.containerClassNames} ${CLS_OPEN}`;\n const closeModalFunction = (ce) => {\n if (this.loading) {\n return false;\n }\n if (Util.isPartOfNode(ce.target, this.currentOpen)) {\n if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n }\n this.close(ce);\n };\n\n this.modalContainer.addEventListener(Settings.getTabEvent(), closeModalFunction, false);\n\n modalContainerClasses = this.modalContainer.classList;\n this.container.appendChild(this.modalContainer);\n } else {\n modalContainerClasses.add(CLS_OPEN);\n }\n\n let loader;\n const doc = global.document;\n const toggleLoader = (show) => {\n if (show) {\n loader = doc.createElement('div');\n loader.className = CLS_LOADER_CONTAINER;\n const loaderLoader = doc.createElement('div');\n loaderLoader.className = CLS_LOADER;\n loader.appendChild(loaderLoader);\n this.modalContainer.appendChild(loader);\n } else {\n loader.parentNode.removeChild(loader);\n }\n };\n modalContainerClasses.add('loading');\n modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n modalContainerClasses.add(CLS_BACKDROP);\n });\n });\n\n this.loading = true;\n toggleLoader(true);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n let result;\n if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n result = r;\n } else {\n // Create container Element:\n const element = doc.createElement('div');\n element.className = self.options.classNames;\n element.innerHTML = r;\n element.id = Util.guid();\n result = element;\n }\n widget.finalContent = result;\n Event.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n return result;\n });\n } else {\n const el = targetContent instanceof HTMLElement ||\n targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n if (el) {\n future = new Promise((resolve) => {\n resolve(el);\n });\n } else {\n throw new Error(`Could not found given modal element (content) with ID: ${targetContent}`);\n }\n }\n\n Event.dispatchAndFire(target, EVENT_MODAL_INIT);\n\n return future.then((thisEl) => {\n thisEl.hfWidgetInstance = this;\n this.modalContainer.appendChild(thisEl);\n modalContainerClasses.remove('loading');\n this.loading = false;\n toggleLoader(false);\n this.open(thisEl, true, e);\n return thisEl;\n });\n }\n\n /**\n * Open's an already rendered modal\n * @param {HTMLElement} modal\n * @param {Boolean} [internal], set to true to prevent container management\n * @param {Boolean} [maybeEvent], optional event-object that triggered open\n */\n open(modal, internal, maybeEvent) {\n if (!internal) {\n this.modalContainer.classList.add('open');\n }\n this.switchModals(modal, this.currentOpen);\n\n Event.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n }\n\n\n registerEvents(delegate) {\n const delegateContainer = delegate || this.container;\n // Modals should always be fixed\n FixedWindow.getInstance().addScreenConstraint(Modal, () => true);\n // register modal instance so we can detect multiple registrars\n delegateContainer.flexModalInstance = this;\n this.eventFunction = (...args) => {\n this.createWidget.apply(this, args);\n };\n delegateContainer.addEventListener(Settings.getTabEvent(), this.eventFunction, false);\n\n this.eventContainer = delegateContainer;\n return this;\n }\n\n\n /**\n * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n * @param {HTMLElement|Widget} widget instance or html element\n * @returns {Promise}\n */\n fromWidget(widget) {\n return this.createWidget(widget);\n }\n\n /**\n * Creates a Widget from event\n * @param e\n * @returns {Promise}\n */\n fromEvent(e) {\n return this.createWidget(e);\n }\n\n setDestroyOnFinish(v) {\n this.destroyOnFinish = v;\n return this;\n }\n\n /**\n * Destroy this widget instance, cleans empty DOM nodes\n * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n */\n destroy() {\n const modalContainer = this.modalContainer;\n const isEmptyContainer = modalContainer.childNodes.length === 0;\n // Remove event listener on destroy, do not remove DOM node\n if (this.eventContainer) {\n this.eventContainer.removeEventListener(Settings.getTabEvent(), this.eventFunction, true);\n }\n\n if (isEmptyContainer) {\n if (modalContainer.parentNode) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n }\n if (global.MutationObserver) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach(() => {\n if (modalContainer.childNodes.length === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n observer.disconnect();\n }\n });\n });\n observer.observe(modalContainer,\n {\n childList: true\n }\n );\n } else {\n modalContainer.addEventListener('DOMNodeRemoved', (e) => {\n if (e.target !== modalContainer && (modalContainer.childNodes.length - 1) === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n });\n }\n }\n}\n\n\n// Static variable that keeps track of all open modals\nModal._modalInstances = [];\n\n// Global keydown listener for modal\nglobal.addEventListener('keydown', (e) => {\n if (e.keyCode === KEY_ESC) {\n const lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n if (lastModal) {\n Widget.findWidget(lastModal).close(e);\n }\n }\n});\n\nexport default Modal;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Modal.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Widget\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/**\n * A Widget provides async content on a specific target (e.g. a modal link)\n */\nclass Widget {\n\n /**\n * Creates a new Widget\n * @param [element], optional define the content of widget\n */\n constructor(element) {\n /**\n *\n * @type {Promise}\n */\n this.asyncContent = null;\n\n /**\n * @type {boolean}\n */\n this._isWidget = true;\n\n if (element) {\n /**\n * @type {HTMLElement}\n */\n this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n if (this.element) {\n this.element.hfWidgetInstance = this;\n this.setAsync(() => {\n return new Promise((s) => {\n s(this.element);\n });\n });\n } else {\n throw new Error(`Could not found element with ID: ${element}`);\n }\n }\n /**\n * The final resulted content that a widget did create (e.g. a modal container)\n * @type {HTMLElement}\n */\n this.finalContent = null;\n }\n\n /**\n *\n * @returns {Promise}\n */\n getAsync() {\n return this.asyncContent();\n }\n\n /**\n * @param {Function.} async\n * @returns {Widget}\n */\n setAsync(async) {\n this.asyncContent = async;\n return this;\n }\n\n /**\n * @returns {HTMLElement}\n */\n getFinalContent() {\n return this.finalContent;\n }\n\n /**\n * @param {HTMLElement} element\n * @returns {Widget}\n */\n setElement(element) {\n this.element = element;\n return this;\n }\n\n /**\n * Destroys the generated content of this widget\n * @returns {boolean}\n */\n destroy() {\n if (this.finalContent && this.finalContent.parentNode) {\n this.finalContent.parentNode.removeChild(this.finalContent);\n return true;\n }\n\n delete this.element;\n delete this.asyncContent;\n delete this.finalContent;\n\n return false;\n }\n\n /**\n * Will find a widget on an Element\n * @param {HTMLElement} element\n * @returns {Widget|undefined}\n */\n static findWidget(element) {\n return element ? element.hfWidgetInstance : undefined;\n }\n\n /**\n * Checks if a given object is an instance\n * @param {Object} self\n * @returns {boolean}\n */\n static isWidget(self) {\n return self instanceof Widget || typeof self === 'object' && self.hasOwnProperty('_isWidget');\n }\n}\n\nexport default Widget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Widget.js\n **/","import Settings from '../util/Settings';\nimport debounce from './debounce';\nimport Event from '../util/Event';\nimport Util from '../util/Util';\n\nconst CLS_FIXED_WINDOW = 'fixed-window-open';\n\nexport const EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\nexport const EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\n/**\n * @type {string}\n */\nexport const ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\n/**\n * @type {FixedWindow}\n */\nlet fixedWindowInstance;\n\nexport default class FixedWindow {\n\n constructor() {\n this.widgets = [];\n this.currentScrollTop = 0;\n this.fixedScreenConstraints = [];\n this.windowWidth = 0;\n this.isFixedWindowActive = false;\n this.touchListener = null;\n }\n\n /**\n * Adds a constraint to detect if the window needs to be changed when the screensize changes\n *\n * @param {Function} widget\n * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n */\n addScreenConstraint(widget, fixedBreakpointFn) {\n this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n }\n\n /**\n * @returns {null|DestroyableWidget}\n */\n getCurrentWidget() {\n return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n }\n\n /**\n * @private\n */\n _checkFixedNeeded() {\n if (this.widgets.length === 0) {\n return;\n }\n const widgets = new Set(this.widgets);\n const widgetsThatRequireFixedWindow = Array.from(widgets).some(({ widget }) => {\n return this.fixedScreenConstraints[widget] && this.fixedScreenConstraints[widget](this.windowWidth);\n });\n if (!widgetsThatRequireFixedWindow) {\n this._removeFixedContainer();\n } else {\n this._addFixedContainer();\n }\n }\n\n /**\n * @private\n */\n _addFixedContainer() {\n if (this.isFixedWindowActive) {\n return;\n }\n Event.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n detail: this.getCurrentWidget()\n });\n // this causes layout and should be optimized\n // At lest we write in a batch later\n Settings.get().scrollbarUpdateNodes.map((n) => {\n let foundProperty = 'paddingRight';\n let direction = 1;\n let node = n;\n if (n instanceof Array) {\n const [whatNode, property, d] = n;\n foundProperty = property;\n node = whatNode;\n direction = d || 1;\n }\n return {\n node,\n property: foundProperty,\n value: `${parseInt(global.getComputedStyle(node)[foundProperty], 10) +\n (!node.__fixedWindowMod__ ? (Settings.getScrollbarWidth() * direction) : 0)}px`\n };\n }).forEach((d) => {\n d.node.__fixedWindowMod__ = true;\n d.node.style[d.property] = d.value;\n });\n\n this.touchListener = (e) => {\n e.preventDefault();\n };\n\n let shouldNotMoveUp = false;\n let shouldNotMoveDown = false;\n let neverScroll = false;\n let lastClientY = 0;\n this.touchStartListener = (e) => {\n let { element } = this.getCurrentWidget();\n const closestOverflow = Util.closestCallback(e.target,\n (el) => el instanceof HTMLTextAreaElement ||\n (el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH)));\n if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n element = closestOverflow;\n }\n if (Util.isPartOfNode(e.target, element)) {\n neverScroll = element.scrollHeight === element.offsetHeight;\n lastClientY = e.touches[0].clientY;\n // never allow scrolling when there is nothing to scroll\n if (neverScroll) {\n return false;\n }\n if (element.scrollTop === 0) {\n element.scrollTop = 1;\n shouldNotMoveUp = true;\n } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n shouldNotMoveDown = true;\n element.scrollTop -= 1;\n }\n }\n };\n\n global.addEventListener('touchmove', this.touchListener);\n global.document.body.addEventListener('touchstart', this.touchStartListener);\n\n this.touchMoveListener = (e) => {\n const { element } = this.getCurrentWidget();\n if (Util.isPartOfNode(e.target, element)) {\n const { clientY } = e.touches[0];\n const isScrollingDown = (lastClientY - clientY) > 0;\n lastClientY = clientY;\n\n if (neverScroll) {\n neverScroll = false;\n return false;\n }\n\n if (!shouldNotMoveDown && isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n if (shouldNotMoveDown && !isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n if (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n shouldNotMoveUp = false;\n shouldNotMoveDown = false;\n }\n };\n global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\n global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n this.isFixedWindowActive = true;\n }\n\n /**\n * @private\n */\n _removeFixedContainer() {\n if (this.isFixedWindowActive) {\n // cleanup event listeners\n global.removeEventListener('touchmove', this.touchListener);\n global.document.body.removeEventListener('touchstart', this.touchStartListener);\n global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\n // reset scrollbar nodes\n Settings.get().scrollbarUpdateNodes.forEach((node) => {\n if (node instanceof Array) {\n const [whatNode, property] = node;\n delete whatNode.__fixedWindowMod__;\n whatNode.style[property] = '';\n } else {\n delete node.__fixedWindowMod__;\n node.style.paddingRight = '';\n }\n });\n global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n Event.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n this.isFixedWindowActive = false;\n }\n }\n\n /**\n * Will close a window when no widgets are opened that need one\n */\n resizeListener() {\n this.windowWidth = global.innerWidth;\n this._checkFixedNeeded();\n }\n\n /**\n * @returns {FixedWindow}\n */\n static getInstance() {\n if (!fixedWindowInstance) {\n fixedWindowInstance = new FixedWindow();\n fixedWindowInstance.windowWidth = global.innerWidth;\n const eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n global.addEventListener(\n 'resize',\n debounce(eventHandler, 500)\n );\n global.addEventListener('orientationchange', eventHandler);\n }\n return fixedWindowInstance;\n }\n\n /**\n * Request a close of the fixed window\n */\n close() {\n this.widgets.pop();\n if (this.widgets.length === 0) {\n this._removeFixedContainer();\n }\n }\n\n /**\n * Request to open a fixed windows\n * @param {Object|DestroyableWidget} instance\n * @param {HTMLElement} element\n */\n open(instance, element) {\n let fixed = false;\n if (typeof instance === 'object') {\n const widget = instance.constructor;\n const fixedWidget = this.fixedScreenConstraints[instance.constructor];\n if (widget && fixedWidget) {\n fixed = fixedWidget(this.windowWidth);\n }\n const length = this.widgets.length;\n this.widgets.push(\n {\n widget,\n element\n }\n );\n // open a new window if there is no window active\n if (length === 0) {\n if (fixed) {\n this._addFixedContainer();\n }\n }\n }\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/FixedWindow.js\n **/","export default (fn, ms) => () => {\n clearTimeout(fn.timeout);\n fn.timeout = setTimeout(fn, ms);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/debounce.js\n **/","import Modal from '../Modal';\nimport Settings from '../util/Settings';\nimport Widget from '../Widget';\n\n// default export as component object\nexport default {\n Modal,\n Settings,\n Widget\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/Modal.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6***","webpack:///webpack/bootstrap 81c2cbe516e809e8be72?ed04***","webpack:///./src/main/util/Util.js?5bc4*","webpack:///./src/main/util/Settings.js?b01f*","webpack:///./src/main/util/Event.js?68bf*","webpack:///./src/main/Modal.js?a8d4","webpack:///./src/main/Widget.js?920e","webpack:///./src/main/lib/FixedWindow.js?6376","webpack:///./src/main/lib/debounce.js?3601","webpack:///./src/main/modules/Modal.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdA,KAAM,MAAM,CAAC,QAAD,EAAW,KAAX,EAAkB,IAAlB,EAAwB,GAAxB,EAA6B,EAA7B,CAAN;;AAEN,KAAM,iBAAiB,mBAAjB;;AAEN,KAAM,kBAAkB,oBAAlB;;AAEN,KAAM,mBAAmB,qBAAnB;;;;;;KAKA;;;;;;;;;;;;;;;8CAQ0B,SAAS,MAAM,UAAU;AACjD,iBAAM,eAAe,SAAS,YAAT,CAAsB,CAAtB,EAAyB;AAC1C,0BAAS,KAAT,CAAe,OAAf,EAAwB,CAAC,CAAD,EAAI,YAAJ,CAAxB,EAD0C;cAAzB,CAD4B;;AAKjD,kBAAK,IAAI,IAAI,CAAJ,EAAO,IAAI,IAAI,MAAJ,EAAY,GAAhC,EAAqC;AACjC,qBAAI,WAAW,IAAX,CAD6B;AAEjC,qBAAI,CAAC,IAAI,CAAJ,CAAD,EAAS;AACT,gCAAW,KAAK,WAAL,EAAX,CAD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ent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 81c2cbe516e809e8be72\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Modal\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global KeyboardEvent */\n\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\nconst KEY_ESC = 27;\n/* Attribute Names */\nconst ATTR_CREATE_NEW = 'data-new-instance';\nconst ATTR_CLOSE = 'data-close-modal';\nconst ATTR_NAME = 'data-modal';\n\n/* Class names */\nconst CLS_CONTAINER_CURRENT = 'front';\nconst CLS_OPEN = 'open';\nconst CLS_CURRENT = 'current';\nconst CLS_PART_OF_STACK = 'part-of-stack';\nconst CLS_MODAL_CONTAINER = 'modal-container';\nconst CLS_ANIM_END = 'modal-anim-end';\nconst CLS_LOADER_CONTAINER = 'loader-container';\nconst CLS_LOADER = 'loader';\nconst CLS_BACKDROP = 'backdrop';\n\n/* Events */\n\n/**\n * Event triggered when modal is closed\n * @type {string}\n */\nexport const EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n/**\n * Event triggered before a modal is closed, cancelable\n * @type {string}\n */\nexport const EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n/**\n * Event triggered when a modal is opened\n * @type {string}\n */\nexport const EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\n/**\n * Event triggered when modal is initilized, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_INIT = 'flexcss.modal.init';\n\n/**\n * Triggered when the content of an async modal on a target is loaded, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\n/**\n * A Modal Implementation\n */\nclass Modal {\n constructor(DelegateContainer, options) {\n const doc = global.document;\n const container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n // Instance vars:\n if (!container) {\n throw new Error(`Could not found container element by given ID/Element: ${DelegateContainer}`);\n }\n\n this.currentOpen = null;\n\n this.loading = false;\n\n this.container = container;\n\n /**\n * Default Options\n */\n this.options = {\n classNames: 'modal',\n closeOnEscape: true,\n closeOnBackgroundClick: true,\n destroyOnFinish: false,\n fixedContainer: true,\n containerClassNames: ''\n };\n\n Object.assign(this.options, options);\n\n // Container where events are delegated\n this.eventContainer = null;\n this.eventFunction = null;\n\n this.dataMainPageContainer = global.document.body;\n\n this.currentScrollTop = 0;\n\n this.modalContainer = null;\n\n // Destroy full modal instance when no dialogs are bind to?\n // Otherwise container is recycled\n this.destroyOnFinish = this.options.destroyOnFinish;\n }\n\n /**\n * Removes this modal from global stack\n * Will handle fixing main html element too\n * @private\n * @param n\n */\n _removeModalFromStack(n) {\n const t = Modal._modalInstances.indexOf(n);\n if (t > -1) {\n Modal._modalInstances.splice(t, 1);\n FixedWindow.getInstance().close();\n }\n }\n\n\n /**\n * Modal container that contains all `stacked` modals for this instance\n * @returns {HTMLElement}\n */\n getModalContainer() {\n return this.modalContainer;\n }\n\n /**\n * Closes the current open modal of this stack\n * @params [e], optional event\n * @returns {*}\n */\n close(e) {\n const self = this;\n\n const options = self.currentOpen ? Util.applyOptionsFromElement(\n self.currentOpen, Util.copy(self.options)) : self.options;\n\n // close only on keyboard if instance should\n if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n return false;\n }\n\n // close only on background if instance should\n if (!options.closeOnBackgroundClick && e &&\n e.type === Settings.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n\n // if an instance is currently loading, prevent from closing\n if (self.loading) {\n return false;\n }\n\n if (e) {\n e.preventDefault();\n }\n\n if (self.currentOpen) {\n // dispatch beforeClose event, if prevented prevent modal from closing\n const ev = Event.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n if (ev.defaultPrevented) {\n return false;\n }\n\n this._finishState(self.currentOpen);\n // if there is an previous modal\n if (self.currentOpen.prevModal) {\n // switch to the next modal\n return self.switchModals(self.currentOpen.prevModal,\n self.currentOpen.prevModal.prevModal || null);\n }\n\n // finally trigger closed event\n Event.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n }\n self._removeModalFromStack(self.currentOpen);\n\n // Full stack closed:\n self.currentOpen = null;\n if (self.modalContainer) {\n // setup next open\n const lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n const classList = self.modalContainer.classList;\n classList.remove(CLS_CONTAINER_CURRENT);\n classList.remove(CLS_BACKDROP);\n classList.remove(CLS_OPEN);\n // Remove all current classes from child-nodes\n for (let i = 0; i < self.modalContainer.childNodes.length; i++) {\n const node = self.modalContainer.childNodes[i];\n const cl = node.classList;\n // remove applied styles\n self._finishState(node);\n cl.remove(CLS_CURRENT);\n cl.remove(CLS_PART_OF_STACK);\n }\n if (lastContainer) {\n lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n }\n }\n\n if (self.destroyOnFinish) {\n self.destroy();\n }\n return self;\n }\n\n /**\n * Resets a target when newly initilizes\n * @param target\n * @private\n */\n _finishState(target) {\n target.classList.remove(CLS_ANIM_END);\n }\n\n /**\n * Handler called when a Modal has finished an animation\n * @param e\n * @param self\n * @private\n */\n _finishAnim(e, self) {\n e.target.classList.add(CLS_ANIM_END);\n e.target.removeEventListener(e.type, self, true);\n }\n\n /**\n * Brings the given modal to front\n * @param co\n * @param last\n */\n switchModals(co, last) {\n co.prevModal = last;\n Modal._modalInstances.push(co);\n FixedWindow.getInstance().open(this, this.modalContainer);\n if (last) {\n this._finishState(last);\n Util.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n last.classList.add(CLS_PART_OF_STACK);\n }\n // set new currentOpen\n this.currentOpen = co;\n\n // bring current container to the front\n const instances = Modal._modalInstances;\n\n for (let m = 0; m < instances.length; m++) {\n instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n }\n this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n // remove animations if animations has been completed, fixes various bugs:\n // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n Util.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\n for (let i = 0; i < this.modalContainer.childNodes.length; i++) {\n const n = this.modalContainer.childNodes[i];\n const isCurrent = n.classList.contains(CLS_CURRENT);\n if (n === co) {\n co.classList.add(CLS_CURRENT);\n co.classList.remove(CLS_PART_OF_STACK);\n this._finishState(co);\n } else {\n n.classList.remove(CLS_CURRENT);\n if (isCurrent) {\n this._removeModalFromStack(n);\n Event.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n }\n }\n }\n }\n\n /**\n * Creates a Modal and opens it (later)\n * @param e\n * @returns {Promise|boolean}\n */\n createWidget(e) {\n const self = this;\n if (this.loading) {\n return false;\n }\n\n // check if another modal has registered events on this dom path:\n if (e && e.target) {\n const foundInstance = Util.parentsUntil(e.target, (node) => {\n return node && node.flexModalInstance;\n });\n\n // if another instance has been found, abort\n if (foundInstance !== this.container) {\n return false;\n }\n }\n let targetContent;\n let future;\n let widget;\n let target;\n let hasTarget = true;\n const isHtmlElement = e instanceof HTMLElement;\n const isWidget = Widget.isWidget(e);\n if (isHtmlElement || isWidget) {\n if (isHtmlElement) {\n targetContent = e;\n } else {\n widget = e;\n targetContent = widget.element;\n }\n } else {\n target = e.target;\n if (!target) {\n throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n }\n hasTarget = target.hasAttribute(ATTR_NAME);\n targetContent = target.getAttribute(ATTR_NAME);\n widget = Widget.findWidget(target);\n if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n const newInstance = new Modal(this.container)\n .setDestroyOnFinish(true);\n e.newInstance = true;\n newInstance.fromEvent(e).then(() => {\n newInstance.registerEvents(newInstance.getModalContainer());\n });\n return false;\n }\n if (hasTarget) {\n e.stopImmediatePropagation();\n e.preventDefault();\n }\n }\n\n if (!hasTarget) {\n return false;\n }\n\n let modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\n // lazy create modal container\n if (!this.modalContainer) {\n this.modalContainer = global.document.createElement('div');\n this.modalContainer.className = `${CLS_MODAL_CONTAINER} ${this.options.containerClassNames} ${CLS_OPEN}`;\n const closeModalFunction = (ce) => {\n if (this.loading) {\n return false;\n }\n if (Util.isPartOfNode(ce.target, this.currentOpen)) {\n if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n }\n this.close(ce);\n };\n\n this.modalContainer.addEventListener(Settings.getTabEvent(), closeModalFunction, false);\n\n modalContainerClasses = this.modalContainer.classList;\n this.container.appendChild(this.modalContainer);\n } else {\n modalContainerClasses.add(CLS_OPEN);\n }\n\n let loader;\n const doc = global.document;\n const toggleLoader = (show) => {\n if (show) {\n loader = doc.createElement('div');\n loader.className = CLS_LOADER_CONTAINER;\n const loaderLoader = doc.createElement('div');\n loaderLoader.className = CLS_LOADER;\n loader.appendChild(loaderLoader);\n this.modalContainer.appendChild(loader);\n } else {\n loader.parentNode.removeChild(loader);\n }\n };\n modalContainerClasses.add('loading');\n modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n modalContainerClasses.add(CLS_BACKDROP);\n });\n });\n\n this.loading = true;\n toggleLoader(true);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n let result;\n if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n result = r;\n } else {\n // Create container Element:\n const element = doc.createElement('div');\n element.className = self.options.classNames;\n element.innerHTML = r;\n element.id = Util.guid();\n result = element;\n }\n widget.finalContent = result;\n Event.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n return result;\n });\n } else {\n const el = targetContent instanceof HTMLElement ||\n targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n if (el) {\n future = new Promise((resolve) => {\n resolve(el);\n });\n } else {\n throw new Error(`Could not found given modal element (content) with ID: ${targetContent}`);\n }\n }\n\n Event.dispatchAndFire(target, EVENT_MODAL_INIT);\n\n return future.then((thisEl) => {\n thisEl.hfWidgetInstance = this;\n this.modalContainer.appendChild(thisEl);\n modalContainerClasses.remove('loading');\n this.loading = false;\n toggleLoader(false);\n this.open(thisEl, true, e);\n return thisEl;\n });\n }\n\n /**\n * Open's an already rendered modal\n * @param {HTMLElement} modal\n * @param {Boolean} [internal], set to true to prevent container management\n * @param {Boolean} [maybeEvent], optional event-object that triggered open\n */\n open(modal, internal, maybeEvent) {\n if (!internal) {\n this.modalContainer.classList.add('open');\n }\n this.switchModals(modal, this.currentOpen);\n\n Event.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n }\n\n\n registerEvents(delegate) {\n const delegateContainer = delegate || this.container;\n // Modals should always be fixed\n FixedWindow.getInstance().addScreenConstraint(Modal, () => true);\n // register modal instance so we can detect multiple registrars\n delegateContainer.flexModalInstance = this;\n this.eventFunction = (...args) => {\n this.createWidget.apply(this, args);\n };\n delegateContainer.addEventListener(Settings.getTabEvent(), this.eventFunction, false);\n\n this.eventContainer = delegateContainer;\n return this;\n }\n\n\n /**\n * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n * @param {HTMLElement|Widget} widget instance or html element\n * @returns {Promise}\n */\n fromWidget(widget) {\n return this.createWidget(widget);\n }\n\n /**\n * Creates a Widget from event\n * @param e\n * @returns {Promise}\n */\n fromEvent(e) {\n return this.createWidget(e);\n }\n\n setDestroyOnFinish(v) {\n this.destroyOnFinish = v;\n return this;\n }\n\n /**\n * Destroy this widget instance, cleans empty DOM nodes\n * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n */\n destroy() {\n const modalContainer = this.modalContainer;\n const isEmptyContainer = modalContainer.childNodes.length === 0;\n // Remove event listener on destroy, do not remove DOM node\n if (this.eventContainer) {\n this.eventContainer.removeEventListener(Settings.getTabEvent(), this.eventFunction, true);\n }\n\n if (isEmptyContainer) {\n if (modalContainer.parentNode) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n }\n if (global.MutationObserver) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach(() => {\n if (modalContainer.childNodes.length === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n observer.disconnect();\n }\n });\n });\n observer.observe(modalContainer,\n {\n childList: true\n }\n );\n } else {\n modalContainer.addEventListener('DOMNodeRemoved', (e) => {\n if (e.target !== modalContainer && (modalContainer.childNodes.length - 1) === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n });\n }\n }\n}\n\n\n// Static variable that keeps track of all open modals\nModal._modalInstances = [];\n\n// Global keydown listener for modal\nglobal.addEventListener('keydown', (e) => {\n if (e.keyCode === KEY_ESC) {\n const lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n if (lastModal) {\n Widget.findWidget(lastModal).close(e);\n }\n }\n});\n\nexport default Modal;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Modal.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Widget\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/**\n * A Widget provides async content on a specific target (e.g. a modal link)\n */\nclass Widget {\n\n /**\n * Creates a new Widget\n * @param [element], optional define the content of widget\n */\n constructor(element) {\n /**\n *\n * @type {Promise}\n */\n this.asyncContent = null;\n\n /**\n * @type {boolean}\n */\n this._isWidget = true;\n\n if (element) {\n /**\n * @type {HTMLElement}\n */\n this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n if (this.element) {\n this.element.hfWidgetInstance = this;\n this.setAsync(() => {\n return new Promise((s) => {\n s(this.element);\n });\n });\n } else {\n throw new Error(`Could not found element with ID: ${element}`);\n }\n }\n /**\n * The final resulted content that a widget did create (e.g. a modal container)\n * @type {HTMLElement}\n */\n this.finalContent = null;\n }\n\n /**\n *\n * @returns {Promise}\n */\n getAsync() {\n return this.asyncContent();\n }\n\n /**\n * @param {Function.} async\n * @returns {Widget}\n */\n setAsync(async) {\n this.asyncContent = async;\n return this;\n }\n\n /**\n * @returns {HTMLElement}\n */\n getFinalContent() {\n return this.finalContent;\n }\n\n /**\n * @param {HTMLElement} element\n * @returns {Widget}\n */\n setElement(element) {\n this.element = element;\n return this;\n }\n\n /**\n * Destroys the generated content of this widget\n * @returns {boolean}\n */\n destroy() {\n if (this.finalContent && this.finalContent.parentNode) {\n this.finalContent.parentNode.removeChild(this.finalContent);\n return true;\n }\n\n delete this.element;\n delete this.asyncContent;\n delete this.finalContent;\n\n return false;\n }\n\n /**\n * Will find a widget on an Element\n * @param {HTMLElement} element\n * @returns {Widget|undefined}\n */\n static findWidget(element) {\n return element ? element.hfWidgetInstance : undefined;\n }\n\n /**\n * Checks if a given object is an instance\n * @param {Object} self\n * @returns {boolean}\n */\n static isWidget(self) {\n return self instanceof Widget || typeof self === 'object' && self.hasOwnProperty('_isWidget');\n }\n}\n\nexport default Widget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Widget.js\n **/","import Settings from '../util/Settings';\nimport debounce from './debounce';\nimport Event from '../util/Event';\nimport Util from '../util/Util';\n\nconst CLS_FIXED_WINDOW = 'fixed-window-open';\n\nexport const EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\nexport const EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\n/**\n * @type {string}\n */\nexport const ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\n/**\n * @type {FixedWindow}\n */\nlet fixedWindowInstance;\n\nexport default class FixedWindow {\n\n constructor() {\n this.widgets = [];\n this.currentScrollTop = 0;\n this.fixedScreenConstraints = [];\n this.windowWidth = 0;\n this.isFixedWindowActive = false;\n this.touchListener = null;\n }\n\n /**\n * Adds a constraint to detect if the window needs to be changed when the screensize changes\n *\n * @param {Function} widget\n * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n */\n addScreenConstraint(widget, fixedBreakpointFn) {\n this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n }\n\n /**\n * @returns {null|DestroyableWidget}\n */\n getCurrentWidget() {\n return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n }\n\n /**\n * @private\n */\n _checkFixedNeeded() {\n if (this.widgets.length === 0) {\n return;\n }\n const widgets = new Set(this.widgets);\n const widgetsThatRequireFixedWindow = Array.from(widgets).some(({ widget }) => {\n return this.fixedScreenConstraints[widget] && this.fixedScreenConstraints[widget](this.windowWidth);\n });\n if (!widgetsThatRequireFixedWindow) {\n this._removeFixedContainer();\n } else {\n this._addFixedContainer();\n }\n }\n\n /**\n * @private\n */\n _addFixedContainer() {\n if (this.isFixedWindowActive) {\n return;\n }\n Event.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n detail: this.getCurrentWidget()\n });\n // this causes layout and should be optimized\n // At lest we write in a batch later\n Settings.get().scrollbarUpdateNodes.map((n) => {\n let foundProperty = 'paddingRight';\n let direction = 1;\n let node = n;\n if (n instanceof Array) {\n const [whatNode, property, d] = n;\n foundProperty = property;\n node = whatNode;\n direction = d || 1;\n }\n return {\n node,\n property: foundProperty,\n value: `${parseInt(global.getComputedStyle(node)[foundProperty], 10) +\n (!node.__fixedWindowMod__ ? (Settings.getScrollbarWidth() * direction) : 0)}px`\n };\n }).forEach((d) => {\n d.node.__fixedWindowMod__ = true;\n d.node.style[d.property] = d.value;\n });\n\n this.touchListener = (e) => {\n e.preventDefault();\n };\n\n let shouldNotMoveUp = false;\n let shouldNotMoveDown = false;\n let neverScroll = false;\n let lastClientY = 0;\n this.touchStartListener = (e) => {\n let { element } = this.getCurrentWidget();\n const closestOverflow = Util.closestCallback(e.target,\n (el) => el instanceof HTMLTextAreaElement ||\n (el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH)));\n if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n element = closestOverflow;\n }\n if (Util.isPartOfNode(e.target, element)) {\n neverScroll = element.scrollHeight === element.offsetHeight;\n lastClientY = e.touches[0].clientY;\n // never allow scrolling when there is nothing to scroll\n if (neverScroll) {\n return false;\n }\n if (element.scrollTop === 0) {\n element.scrollTop = 1;\n shouldNotMoveUp = true;\n } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n shouldNotMoveDown = true;\n element.scrollTop -= 1;\n }\n }\n };\n\n global.addEventListener('touchmove', this.touchListener);\n global.document.body.addEventListener('touchstart', this.touchStartListener);\n\n this.touchMoveListener = (e) => {\n const { element } = this.getCurrentWidget();\n if (Util.isPartOfNode(e.target, element)) {\n const { clientY } = e.touches[0];\n const isScrollingDown = (lastClientY - clientY) > 0;\n lastClientY = clientY;\n\n if (neverScroll) {\n neverScroll = false;\n return false;\n }\n\n if ((!shouldNotMoveDown && isScrollingDown) ||\n (shouldNotMoveDown && !isScrollingDown) ||\n (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) ||\n (shouldNotMoveDown && shouldNotMoveUp && isScrollingDown)\n ) {\n e.stopImmediatePropagation();\n }\n\n shouldNotMoveUp = false;\n shouldNotMoveDown = false;\n }\n };\n global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\n global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n this.isFixedWindowActive = true;\n }\n\n /**\n * @private\n */\n _removeFixedContainer() {\n if (this.isFixedWindowActive) {\n // cleanup event listeners\n global.removeEventListener('touchmove', this.touchListener);\n global.document.body.removeEventListener('touchstart', this.touchStartListener);\n global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\n // reset scrollbar nodes\n Settings.get().scrollbarUpdateNodes.forEach((node) => {\n if (node instanceof Array) {\n const [whatNode, property] = node;\n delete whatNode.__fixedWindowMod__;\n whatNode.style[property] = '';\n } else {\n delete node.__fixedWindowMod__;\n node.style.paddingRight = '';\n }\n });\n global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n Event.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n this.isFixedWindowActive = false;\n }\n }\n\n /**\n * Will close a window when no widgets are opened that need one\n */\n resizeListener() {\n this.windowWidth = global.innerWidth;\n this._checkFixedNeeded();\n }\n\n /**\n * @returns {FixedWindow}\n */\n static getInstance() {\n if (!fixedWindowInstance) {\n fixedWindowInstance = new FixedWindow();\n fixedWindowInstance.windowWidth = global.innerWidth;\n const eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n global.addEventListener(\n 'resize',\n debounce(eventHandler, 500)\n );\n global.addEventListener('orientationchange', eventHandler);\n }\n return fixedWindowInstance;\n }\n\n /**\n * Request a close of the fixed window\n */\n close() {\n this.widgets.pop();\n if (this.widgets.length === 0) {\n this._removeFixedContainer();\n }\n }\n\n /**\n * Request to open a fixed windows\n * @param {Object|DestroyableWidget} instance\n * @param {HTMLElement} element\n */\n open(instance, element) {\n let fixed = false;\n if (typeof instance === 'object') {\n const widget = instance.constructor;\n const fixedWidget = this.fixedScreenConstraints[instance.constructor];\n if (widget && fixedWidget) {\n fixed = fixedWidget(this.windowWidth);\n }\n const length = this.widgets.length;\n this.widgets.push(\n {\n widget,\n element\n }\n );\n // open a new window if there is no window active\n if (length === 0) {\n if (fixed) {\n this._addFixedContainer();\n }\n }\n }\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/FixedWindow.js\n **/","export default (fn, ms) => () => {\n clearTimeout(fn.timeout);\n fn.timeout = setTimeout(fn, ms);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/debounce.js\n **/","import Modal from '../Modal';\nimport Settings from '../util/Settings';\nimport Widget from '../Widget';\n\n// default export as component object\nexport default {\n Modal,\n Settings,\n Widget\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/Modal.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/build/maps/modal.min.map b/build/maps/modal.min.map index 36faa3ab..9679fdb8 100644 --- a/build/maps/modal.min.map +++ b/build/maps/modal.min.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6*","webpack:///js/modal.min.js","webpack:///webpack/bootstrap 13012788ed6358b638c7?e357*","webpack:///./src/main/util/Util.js?5bc4*","webpack:///./src/main/util/Settings.js?b01f*","webpack:///./src/main/util/Event.js?68bf*","webpack:///./src/main/Widget.js?920e","webpack:///./src/main/lib/FixedWindow.js?6376","webpack:///./src/main/Modal.js?a8d4","webpack:///./src/main/lib/debounce.js?3601","webpack:///./src/main/modules/Modal.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","global","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","PFX","COL_LEFT_CLASS","COL_RIGHT_CLASS","COL_BOTTOM_CLASS","Util","element","type","callback","thisFunction","e","apply","thisType","toLowerCase","name","addEventListener","t","el","document","createElement","transitions","transition","OTransition","MozTransition","WebkitTransition","undefined","style","parent","now","parentNode","func","s4","Math","floor","random","toString","substring","doc","inner","width","height","outer","position","top","left","visibility","overflow","appendChild","body","w1","offsetWidth","w2","clientWidth","removeChild","ev","capture","event","removeEventListener","offsetHeight","str","replace","g","toUpperCase","input","JSON","parse","stringify","base","attrs","attributes","attr","s","dashToCamelCase","nodeName","val","nodeValue","hasOwnProperty","parseInt","elementToPosition","collisionContainer","centerHorizontal","positionTop","amountTop","amountLeft","parentsUntil","HTMLElement","window","getComputedStyle","isPartOfNode","offsetTop","offsetLeft","targetPosition","getBoundingClientRect","elementRect","colRect","targetTop","targetRight","right","isCollisionTop","isCollisionBottom","innerHeight","isCollisionLeft","targetLeft","isCollisionRight","classList","remove","calcTop","calcLeft","add","rightPosition","leftCentered","collisionCentered","cssText","optionalOffset","scrollIntoView","thisOffset","scrolledY","pageYOffset","scroll","_interopRequireDefault","obj","__esModule","default","_Util","_Util2","FLEXCSS_GLOBAL_SETTINGS","smallBreakpoint","scrollbarUpdateNodes","darkenerFadeDelay","canvasToggledClass","FLEXCSS_CONST_IS_IOS","FLEXCSS_CONST_IS_TOUCH","FLEXCSS_CONST_IS_IE","FLEXCSS_CONST_TAB_EVENT","FLEXCSS_IS_SMALL_SCREEN","init","FLEXCSS_CONST_SCROLLBAR_WIDTH","getScrollBarWidth","FLEXCSS_CONST_TRANSITION_EVENT","whichTransitionEndEvent","readyState","Settings","settings","assign","navigator","userAgent","match","innerWidth","get","msMaxTouchPoints","CustomEvent","_CustomEvent","params","thisParams","bubbles","cancelable","detail","evt","createEvent","initCustomEvent","Event","EventHandler","defaultOptions","options","withDetail","originalEvent","o","dispatchEvent","withOptions","fire","_typeof","Symbol","iterator","constructor","Widget","_this","asyncContent","_isWidget","getElementById","Error","hfWidgetInstance","setAsync","Promise","finalContent","async","self","ALLOW_ELEMENT_OVERFLOW_TOUCH","EVENT_AFTER_FIXED_REMOVE","EVENT_BEFORE_FIXED_ADD","_slicedToArray","sliceIterator","arr","_arr","_n","_d","_e","_s","_i","next","done","push","err","Array","isArray","_Settings","_Settings2","_debounce","_debounce2","_Event","_Event2","CLS_FIXED_WINDOW","fixedWindowInstance","FixedWindow","widgets","currentScrollTop","fixedScreenConstraints","windowWidth","isFixedWindowActive","touchListener","widget","fixedBreakpointFn","Set","widgetsThatRequireFixedWindow","from","some","_ref","_addFixedContainer","_removeFixedContainer","_this2","dispatchAndFire","getCurrentWidget","map","n","foundProperty","direction","node","whatNode","property","d","__fixedWindowMod__","getScrollbarWidth","forEach","preventDefault","shouldNotMoveUp","shouldNotMoveDown","neverScroll","lastClientY","touchStartListener","_getCurrentWidget","closestOverflow","closestCallback","HTMLTextAreaElement","hasAttribute","scrollHeight","touches","clientY","scrollTop","touchMoveListener","_getCurrentWidget2","isScrollingDown","stopImmediatePropagation","documentElement","_node","paddingRight","_checkFixedNeeded","pop","fixed","fixedWidget","eventHandler","resizeListener","bind","EVENT_MODAL_ASYNC_TARGET_LOADED","EVENT_MODAL_INIT","EVENT_MODAL_OPENED","EVENT_MODAL_BEFORE_CLOSED","EVENT_MODAL_CLOSED","_Widget","_Widget2","_FixedWindow","_FixedWindow2","KEY_ESC","ATTR_CREATE_NEW","ATTR_CLOSE","ATTR_NAME","CLS_CONTAINER_CURRENT","CLS_OPEN","CLS_CURRENT","CLS_PART_OF_STACK","CLS_MODAL_CONTAINER","CLS_ANIM_END","CLS_LOADER_CONTAINER","CLS_LOADER","CLS_BACKDROP","Modal","DelegateContainer","container","currentOpen","loading","classNames","closeOnEscape","closeOnBackgroundClick","destroyOnFinish","fixedContainer","containerClassNames","eventContainer","eventFunction","dataMainPageContainer","modalContainer","_modalInstances","indexOf","splice","getInstance","close","applyOptionsFromElement","copy","KeyboardEvent","getTabEvent","defaultPrevented","_finishState","prevModal","switchModals","dispatch","withOriginal","_removeModalFromStack","lastContainer","childNodes","cl","destroy","co","last","open","prefixedAnimateEvent","_finishAnim","instances","isCurrent","contains","foundInstance","flexModalInstance","targetContent","future","hasTarget","isHtmlElement","isWidget","getAttribute","findWidget","newInstance","_ret","setDestroyOnFinish","fromEvent","then","registerEvents","getModalContainer","v","modalContainerClasses","className","closeModalFunction","ce","loader","toggleLoader","show","loaderLoader","requestAnimationFrame","getAsync","r","result","DocumentFragment","innerHTML","guid","resolve","thisEl","modal","internal","maybeEvent","delegate","delegateContainer","addScreenConstraint","_len","arguments","args","_key","createWidget","isEmptyContainer","MutationObserver","observer","mutations","disconnect","observe","childList","keyCode","lastModal","fn","ms","clearTimeout","timeout","setTimeout","_Modal","_Modal2"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,W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C,GAAIA,EAAE0X,UAAY5G,EAAS,CACvB,GAAM6G,GAAYhG,EAAMe,gBAAgBf,EAAMe,gBAAgB5T,OAAS,EACnE6Y,IACAhH,aAAOmE,WAAW6C,GAAW7E,MAAM9S,MPs+C9C9C,aOj+CcyU,IPk+Ce9T,KAAKX,EAAU,WAAa,MAAOI,WAG1D,CAED,SAASH,EAAQD,GAEtB,YAEAoB,QAAOC,eAAerB,EAAS,cAC3BsB,OAAO,IAGXtB,aQviEc,SAAC0a,EAAIC,GRwiEf,MQxiEsB,YACvBC,aAAaF,EAAGG,SAChBH,EAAGG,QAAUC,WAAWJ,EAAIC,MR6iExB,CACA,CACA,CACA,CACA,CACA,CACA,CACA,CAEF,SAAS1a,EAAQD,EAASM,GAE/B,YAkBA,SAASqJ,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,UAASF,GAhBvFxI,OAAOC,eAAerB,EAAS,cAC3BsB,OAAO,GAGX,IAAIyZ,GAASza,EAAoB,GAE7B0a,EAAUrR,EAAuBoR,GAEjC/L,EAAY1O,EAAoB,GAEhC2O,EAAatF,EAAuBqF,GAEpCwE,EAAUlT,EAAoB,GAE9BmT,EAAW9J,EAAuB6J,EAKtCxT,eSzkEGyU,MAAAuG,aACA/P,SAAAgE,aACA/B,OAAAuG","file":"js/modal.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"../\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(19);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\tvar PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\t\n\tvar COL_LEFT_CLASS = 'is-collision-left';\n\t\n\tvar COL_RIGHT_CLASS = 'is-collision-right';\n\t\n\tvar COL_BOTTOM_CLASS = 'is-collision-bottom';\n\t\n\t/**\n\t * Provides shared DOM-Utility functions\n\t */\n\t\n\tvar Util = function () {\n\t function Util() {\n\t _classCallCheck(this, Util);\n\t }\n\t\n\t _createClass(Util, null, [{\n\t key: \"prefixedAnimateEvent\",\n\t\n\t\n\t /**\n\t * Will register the right animation event based on browser\n\t * @param element\n\t * @param type\n\t * @param callback\n\t */\n\t value: function prefixedAnimateEvent(element, type, callback) {\n\t var thisFunction = function thisFunction(e) {\n\t callback.apply(element, [e, thisFunction]);\n\t };\n\t\n\t for (var p = 0; p < PFX.length; p++) {\n\t var thisType = type;\n\t if (!PFX[p]) {\n\t thisType = type.toLowerCase();\n\t }\n\t var name = PFX[p] + thisType;\n\t element.addEventListener(name, thisFunction, true);\n\t }\n\t }\n\t\n\t /**\n\t * Get correct transitionend event\n\t * @returns {String}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"whichTransitionEndEvent\",\n\t value: function whichTransitionEndEvent() {\n\t var t = void 0;\n\t var el = document.createElement('fake');\n\t\n\t var transitions = {\n\t transition: 'transitionend',\n\t OTransition: 'oTransitionEnd',\n\t MozTransition: 'transitionend',\n\t WebkitTransition: 'webkitTransitionEnd'\n\t };\n\t\n\t for (t in transitions) {\n\t if (el.style[t] !== undefined) {\n\t return transitions[t];\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Check if target is part of parent node\n\t * @param target\n\t * @param parent\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: \"isPartOfNode\",\n\t value: function isPartOfNode(target, parent) {\n\t if (!target || !parent) {\n\t return false;\n\t }\n\t var now = target;\n\t while (now !== parent && now !== null) {\n\t if (now === parent) {\n\t break;\n\t }\n\t now = now.parentNode;\n\t }\n\t return now !== null;\n\t }\n\t\n\t /**\n\t * Finds the closest element including itself matching a callback\n\t * @param {Node} el\n\t * @param {Function} callback\n\t * @returns {Node|boolean}\n\t */\n\t\n\t }, {\n\t key: \"closestCallback\",\n\t value: function closestCallback(el, callback) {\n\t var element = el;\n\t while (element !== null) {\n\t if (callback(element)) {\n\t return element;\n\t }\n\t element = element.parentNode;\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Walks the tree until func returns true for given argument\n\t * @param target\n\t * @param func\n\t * @returns {boolean|HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"parentsUntil\",\n\t value: function parentsUntil(target, func) {\n\t if (!target) {\n\t return false;\n\t }\n\t var now = target;\n\t while (!func(now) && now !== null) {\n\t now = now.parentNode;\n\t }\n\t\n\t return now;\n\t }\n\t\n\t /**\n\t * Generates a unique id\n\t * @return {String}\n\t */\n\t\n\t }, {\n\t key: \"guid\",\n\t value: function guid() {\n\t function s4() {\n\t return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n\t }\n\t\n\t return s4() + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + (s4() + s4() + s4());\n\t }\n\t\n\t /**\n\t * Detects scrollbar width\n\t * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n\t * @returns {number}\n\t */\n\t\n\t }, {\n\t key: \"getScrollBarWidth\",\n\t value: function getScrollBarWidth() {\n\t var doc = global.document;\n\t var inner = doc.createElement('p');\n\t\n\t inner.style.width = \"100%\";\n\t inner.style.height = \"200px\";\n\t\n\t var outer = doc.createElement('div');\n\t outer.style.position = \"absolute\";\n\t outer.style.top = \"0px\";\n\t outer.style.left = \"0px\";\n\t outer.style.visibility = \"hidden\";\n\t outer.style.width = \"200px\";\n\t outer.style.height = \"150px\";\n\t outer.style.overflow = \"hidden\";\n\t outer.appendChild(inner);\n\t\n\t doc.body.appendChild(outer);\n\t var w1 = inner.offsetWidth;\n\t outer.style.overflow = 'scroll';\n\t var w2 = inner.offsetWidth;\n\t if (w1 === w2) {\n\t w2 = outer.clientWidth;\n\t }\n\t doc.body.removeChild(outer);\n\t\n\t return w1 - w2;\n\t }\n\t\n\t /**\n\t * Run an event once\n\t * @param {String} ev\n\t * @param {HTMLElement|HTMLDocument} target\n\t * @param {Function} func\n\t * @param {boolean} [capture]\n\t * @return Function created listener\n\t */\n\t\n\t }, {\n\t key: \"addEventOnce\",\n\t value: function addEventOnce(ev, target, func, capture) {\n\t var thisFunction = function thisFunction(event) {\n\t func(event, func);\n\t target.removeEventListener(ev, thisFunction, capture);\n\t };\n\t target.addEventListener(ev, thisFunction, capture);\n\t return thisFunction;\n\t }\n\t\n\t /**\n\t * Checks if an element is visible\n\t * @param {HTMLElement} element\n\t * @returns bool\n\t */\n\t\n\t }, {\n\t key: \"isVisible\",\n\t value: function isVisible(element) {\n\t return element.offsetWidth > 0 && element.offsetHeight > 0;\n\t }\n\t\n\t /**\n\t * Creates a camelCaseRepresentation of a dashed string\n\t * @param {String} str\n\t * @returns String\n\t */\n\t\n\t }, {\n\t key: \"dashToCamelCase\",\n\t value: function dashToCamelCase(str) {\n\t return str.replace(/-([a-z])/g, function (g) {\n\t return g[1].toUpperCase();\n\t });\n\t }\n\t\n\t /**\n\t * Creates a copy of `input`\n\t * @param {*} input\n\t * @return *\n\t */\n\t\n\t }, {\n\t key: \"copy\",\n\t value: function copy(input) {\n\t return JSON.parse(JSON.stringify(input));\n\t }\n\t\n\t /**\n\t * Reads options from element (data attributes) and applies to base\n\t * @param {HTMLElement} element\n\t * @param {Object} base\n\t * @return {Object}\n\t */\n\t\n\t }, {\n\t key: \"applyOptionsFromElement\",\n\t value: function applyOptionsFromElement(element, base) {\n\t if (!element) {\n\t return base;\n\t }\n\t var attrs = element.attributes;\n\t for (var i = 0; i < attrs.length; i++) {\n\t var attr = attrs[i];\n\t if (attr) {\n\t var s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n\t var val = attr.nodeValue;\n\t if (base.hasOwnProperty(s)) {\n\t // skip functions\n\t if (typeof base[s] === 'function') {\n\t continue;\n\t }\n\t if (typeof base[s] === 'boolean') {\n\t base[s] = parseInt(val || 1, 10) === 1;\n\t } else {\n\t base[s] = val;\n\t }\n\t }\n\t }\n\t }\n\t return base;\n\t }\n\t\n\t /**\n\t * Will position an element directly at given target\n\t * Is aware of a given collision container to detect edges\n\t * Will put elementToPosition either to left, center or right edge (prefer right)\n\t * and either to bottom or top (prefers bottom)\n\t *\n\t * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n\t *\n\t * @param {HTMLElement|ClientRect} target the target container to align to\n\t * @param {HTMLElement} elementToPosition the element to position\n\t * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n\t * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n\t * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"setupPositionNearby\",\n\t value: function setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n\t // determine relative offsets\n\t var amountTop = 0;\n\t var amountLeft = 0;\n\t Util.parentsUntil(target.parentNode, function (el) {\n\t if (!(el instanceof HTMLElement)) {\n\t return false;\n\t }\n\t var style = window.getComputedStyle(el);\n\t if (Util.isPartOfNode(elementToPosition, el)) {\n\t if (style && style.position === 'relative') {\n\t amountTop += el.offsetTop || 0;\n\t amountLeft += el.offsetLeft || 0;\n\t }\n\t return false;\n\t }\n\t return true;\n\t });\n\t\n\t var targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n\t var elementRect = elementToPosition.getBoundingClientRect();\n\t var colRect = collisionContainer.getBoundingClientRect();\n\t var targetTop = targetPosition.top - amountTop;\n\t var targetRight = targetPosition.right;\n\t var isCollisionTop = targetTop - elementRect.height <= 0;\n\t var isCollisionBottom = window.innerHeight < targetTop + amountTop + targetPosition.height + elementRect.height;\n\t var isCollisionLeft = targetRight < elementRect.width;\n\t var targetLeft = targetPosition.left;\n\t var isCollisionRight = targetLeft + elementRect.width > colRect.width;\n\t var classList = elementToPosition.classList;\n\t\n\t classList.remove(COL_RIGHT_CLASS);\n\t classList.remove(COL_LEFT_CLASS);\n\t classList.remove(COL_BOTTOM_CLASS);\n\t\n\t var calcTop = void 0;\n\t var calcLeft = void 0;\n\t if (isCollisionLeft && !isCollisionRight) {\n\t // put element to left if collision with left\n\t calcLeft = targetPosition.left - colRect.left - amountLeft + \"px\";\n\t classList.add(COL_LEFT_CLASS);\n\t } else {\n\t // maybe center if no collision with either side\n\t var rightPosition = targetRight - elementRect.width - colRect.left - amountLeft + \"px\";\n\t var leftCentered = (targetLeft + targetPosition.width / 2 - elementRect.width / 2 || 0) - colRect.left;\n\t var collisionCentered = leftCentered + elementRect.width > colRect.width;\n\t if (centerHorizontal && !collisionCentered) {\n\t calcLeft = leftCentered + \"px\";\n\t } else {\n\t classList.add(COL_RIGHT_CLASS);\n\t calcLeft = rightPosition;\n\t }\n\t }\n\t\n\t if (isCollisionBottom || positionTop && !isCollisionTop) {\n\t // Put Element on top if collision\n\t calcTop = targetTop - elementRect.height - colRect.top + \"px\";\n\t classList.add(COL_BOTTOM_CLASS);\n\t } else {\n\t calcTop = targetTop + targetPosition.height - colRect.top + \"px\";\n\t }\n\t\n\t elementToPosition.style.cssText = \"top:\" + calcTop + \";left:\" + calcLeft + \";\";\n\t\n\t return elementToPosition;\n\t }\n\t\n\t /**\n\t * Brings a given element into viewport\n\t * @param {HTMLElement} el\n\t * @param {int|function}[optionalOffset]\n\t */\n\t\n\t }, {\n\t key: \"scrollToElement\",\n\t value: function scrollToElement(el, optionalOffset) {\n\t el.scrollIntoView();\n\t var thisOffset = optionalOffset;\n\t // optionally use a additional scrollDif\n\t if (thisOffset) {\n\t if (typeof thisOffset === 'function') {\n\t thisOffset = optionalOffset();\n\t }\n\t if (thisOffset > 0) {\n\t var scrolledY = window.pageYOffset;\n\t if (scrolledY) {\n\t window.scroll(0, scrolledY - thisOffset);\n\t }\n\t }\n\t }\n\t }\n\t }]);\n\t\n\t return Util;\n\t}();\n\t\n\texports.default = Util;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t// we attach global settings to global once because settings might be shared a lot of times trough the application\n\t// Maybe find a better way to handle that scenario\n\tif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n\t (function () {\n\t global.FLEXCSS_GLOBAL_SETTINGS = {\n\t // defined breakpoint for small devices < n\n\t smallBreakpoint: 768,\n\t // nodes that should be updated when no scrollbar is expected\n\t scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n\t // additional Delay until darkener is fully hidden\n\t darkenerFadeDelay: 100,\n\t // class that is added if canvas has been toggled\n\t canvasToggledClass: 'toggled-canvas'\n\t };\n\t\n\t global.FLEXCSS_CONST_IS_IOS = null;\n\t\n\t global.FLEXCSS_CONST_IS_TOUCH = null;\n\t\n\t global.FLEXCSS_CONST_IS_IE = null;\n\t\n\t global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\t\n\t global.FLEXCSS_IS_SMALL_SCREEN = false;\n\t\n\t var init = function init() {\n\t // Measure scrollbar width\n\t global.FLEXCSS_CONST_SCROLLBAR_WIDTH = _Util2.default.getScrollBarWidth();\n\t // detect right transition end event\n\t global.FLEXCSS_CONST_TRANSITION_EVENT = _Util2.default.whichTransitionEndEvent();\n\t };\n\t\n\t if (global.document.readyState !== 'loading') {\n\t init();\n\t } else {\n\t // it's possible that global.document.body is not available if the document is not\n\t // loaded completely\n\t document.addEventListener('DOMContentLoaded', function () {\n\t init();\n\t });\n\t }\n\t })();\n\t}\n\t\n\t/**\n\t * Utility class that setups global settings\n\t */\n\t\n\tvar Settings = function () {\n\t function Settings() {\n\t _classCallCheck(this, Settings);\n\t }\n\t\n\t _createClass(Settings, null, [{\n\t key: 'setup',\n\t\n\t\n\t /**\n\t * Setup global settings, overwrite default values\n\t * @param {Object} settings\n\t */\n\t value: function setup(settings) {\n\t Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n\t }\n\t\n\t /**\n\t * Access to global settings\n\t * @returns {Object}\n\t */\n\t\n\t }, {\n\t key: 'get',\n\t value: function get() {\n\t return global.FLEXCSS_GLOBAL_SETTINGS;\n\t }\n\t\n\t /**\n\t * Detects a IOS Device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isIosDevice',\n\t value: function isIosDevice() {\n\t if (!global.FLEXCSS_CONST_IS_IOS) {\n\t global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n\t }\n\t\n\t return global.FLEXCSS_CONST_IS_IOS;\n\t }\n\t\n\t /**\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isSmallScreen',\n\t value: function isSmallScreen() {\n\t return window.innerWidth < Settings.get().smallBreakpoint;\n\t }\n\t\n\t /**\n\t * Detects a touch device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isTouchDevice',\n\t value: function isTouchDevice() {\n\t if (!global.FLEXCSS_CONST_IS_TOUCH) {\n\t global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!global.navigator.msMaxTouchPoints;\n\t }\n\t return global.FLEXCSS_CONST_IS_TOUCH;\n\t }\n\t\n\t /**\n\t * Checks if current browser is Internet Explorer\n\t * @returns {boolean|*}\n\t */\n\t\n\t }, {\n\t key: 'isIE',\n\t value: function isIE() {\n\t if (!global.FLEXCSS_CONST_IS_IE) {\n\t global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n\t }\n\t return global.FLEXCSS_CONST_IS_IE;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTransitionEvent',\n\t value: function getTransitionEvent() {\n\t return global.FLEXCSS_CONST_TRANSITION_EVENT;\n\t }\n\t\n\t /**\n\t * @returns {int}\n\t */\n\t\n\t }, {\n\t key: 'getScrollbarWidth',\n\t value: function getScrollbarWidth() {\n\t return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTabEvent',\n\t value: function getTabEvent() {\n\t return global.FLEXCSS_CONST_TAB_EVENT;\n\t }\n\t }]);\n\t\n\t return Settings;\n\t}();\n\t\n\texports.default = Settings;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/* global CustomEvent */\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t// polyfill for custom events to make thinks work in IE\n\t// The needed polyfill is so small that I embedded it here\n\t(function poly() {\n\t if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n\t var _CustomEvent = function CustomEvent(event, params) {\n\t var thisParams = params || {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: undefined\n\t };\n\t var evt = document.createEvent(\"CustomEvent\");\n\t evt.initCustomEvent(event, thisParams.bubbles, thisParams.cancelable, thisParams.detail);\n\t return evt;\n\t };\n\t _CustomEvent.prototype = global.Event.prototype;\n\t global.CustomEvent = _CustomEvent;\n\t }\n\t})();\n\t/**\n\t * Simpler Event dispatching\n\t */\n\t\n\tvar EventHandler = function () {\n\t\n\t /**\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t */\n\t\n\t function EventHandler(target, name) {\n\t _classCallCheck(this, EventHandler);\n\t\n\t this.target = target;\n\t this.defaultOptions = {\n\t bubbles: true,\n\t cancelable: true\n\t };\n\t\n\t this.name = name;\n\t }\n\t\n\t /**\n\t * Set more options\n\t * @param {Object} options\n\t * @returns {EventHandler}\n\t */\n\t\n\t\n\t _createClass(EventHandler, [{\n\t key: \"withOptions\",\n\t value: function withOptions(options) {\n\t Object.assign(this.defaultOptions, options || {});\n\t return this;\n\t }\n\t\n\t /**\n\t * Call with the originalEvent\n\t * @param {Event} e\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withOriginal\",\n\t value: function withOriginal(e) {\n\t return this.withDetail({\n\t originalEvent: e\n\t });\n\t }\n\t\n\t /**\n\t * Extends the detail part of the event\n\t * @param {Object} o\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withDetail\",\n\t value: function withDetail(o) {\n\t if (!this.defaultOptions.detail) {\n\t this.defaultOptions.detail = {};\n\t }\n\t Object.assign(this.defaultOptions.detail, o);\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"fire\",\n\t value: function fire() {\n\t var e = new CustomEvent(this.name, this.defaultOptions);\n\t if (this.target) {\n\t this.target.dispatchEvent(e);\n\t }\n\t return e;\n\t }\n\t }]);\n\t\n\t return EventHandler;\n\t}();\n\t\n\tvar Event = function () {\n\t function Event() {\n\t _classCallCheck(this, Event);\n\t }\n\t\n\t _createClass(Event, null, [{\n\t key: \"dispatch\",\n\t\n\t /**\n\t * Prepares to dispatch a custom event (without firing)\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @returns {EventHandler}\n\t */\n\t value: function dispatch(target, name) {\n\t return new EventHandler(target, name);\n\t }\n\t\n\t /**\n\t * Dispatches a custom event and fires it directly\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @param {Object} [options]\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"dispatchAndFire\",\n\t value: function dispatchAndFire(target, name, options) {\n\t return new EventHandler(target, name).withOptions(options).fire();\n\t }\n\t }]);\n\t\n\t return Event;\n\t}();\n\t\n\texports.default = Event;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Widget\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/**\n\t * A Widget provides async content on a specific target (e.g. a modal link)\n\t */\n\t\n\tvar Widget = function () {\n\t\n\t /**\n\t * Creates a new Widget\n\t * @param [element], optional define the content of widget\n\t */\n\t\n\t function Widget(element) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, Widget);\n\t\n\t /**\n\t *\n\t * @type {Promise}\n\t */\n\t this.asyncContent = null;\n\t\n\t /**\n\t * @type {boolean}\n\t */\n\t this._isWidget = true;\n\t\n\t if (element) {\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n\t if (this.element) {\n\t this.element.hfWidgetInstance = this;\n\t this.setAsync(function () {\n\t return new Promise(function (s) {\n\t s(_this.element);\n\t });\n\t });\n\t } else {\n\t throw new Error('Could not found element with ID: ' + element);\n\t }\n\t }\n\t /**\n\t * The final resulted content that a widget did create (e.g. a modal container)\n\t * @type {HTMLElement}\n\t */\n\t this.finalContent = null;\n\t }\n\t\n\t /**\n\t *\n\t * @returns {Promise}\n\t */\n\t\n\t\n\t _createClass(Widget, [{\n\t key: 'getAsync',\n\t value: function getAsync() {\n\t return this.asyncContent();\n\t }\n\t\n\t /**\n\t * @param {Function.} async\n\t * @returns {Widget}\n\t */\n\t\n\t }, {\n\t key: 'setAsync',\n\t value: function setAsync(async) {\n\t this.asyncContent = async;\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getFinalContent',\n\t value: function getFinalContent() {\n\t return this.finalContent;\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} element\n\t * @returns {Widget}\n\t */\n\t\n\t }, {\n\t key: 'setElement',\n\t value: function setElement(element) {\n\t this.element = element;\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroys the generated content of this widget\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t if (this.finalContent && this.finalContent.parentNode) {\n\t this.finalContent.parentNode.removeChild(this.finalContent);\n\t return true;\n\t }\n\t\n\t delete this.element;\n\t delete this.asyncContent;\n\t delete this.finalContent;\n\t\n\t return false;\n\t }\n\t\n\t /**\n\t * Will find a widget on an Element\n\t * @param {HTMLElement} element\n\t * @returns {Widget|undefined}\n\t */\n\t\n\t }], [{\n\t key: 'findWidget',\n\t value: function findWidget(element) {\n\t return element ? element.hfWidgetInstance : undefined;\n\t }\n\t\n\t /**\n\t * Checks if a given object is an instance\n\t * @param {Object} self\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isWidget',\n\t value: function isWidget(self) {\n\t return self instanceof Widget || (typeof self === 'undefined' ? 'undefined' : _typeof(self)) === 'object' && self.hasOwnProperty('_isWidget');\n\t }\n\t }]);\n\t\n\t return Widget;\n\t}();\n\t\n\texports.default = Widget;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 5 */,\n/* 6 */,\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.ALLOW_ELEMENT_OVERFLOW_TOUCH = exports.EVENT_AFTER_FIXED_REMOVE = exports.EVENT_BEFORE_FIXED_ADD = undefined;\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _debounce = __webpack_require__(10);\n\t\n\tvar _debounce2 = _interopRequireDefault(_debounce);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar CLS_FIXED_WINDOW = 'fixed-window-open';\n\t\n\tvar EVENT_BEFORE_FIXED_ADD = exports.EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\n\tvar EVENT_AFTER_FIXED_REMOVE = exports.EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ALLOW_ELEMENT_OVERFLOW_TOUCH = exports.ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\t\n\t/**\n\t * @type {FixedWindow}\n\t */\n\tvar fixedWindowInstance = void 0;\n\t\n\tvar FixedWindow = function () {\n\t function FixedWindow() {\n\t _classCallCheck(this, FixedWindow);\n\t\n\t this.widgets = [];\n\t this.currentScrollTop = 0;\n\t this.fixedScreenConstraints = [];\n\t this.windowWidth = 0;\n\t this.isFixedWindowActive = false;\n\t this.touchListener = null;\n\t }\n\t\n\t /**\n\t * Adds a constraint to detect if the window needs to be changed when the screensize changes\n\t *\n\t * @param {Function} widget\n\t * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n\t */\n\t\n\t\n\t _createClass(FixedWindow, [{\n\t key: 'addScreenConstraint',\n\t value: function addScreenConstraint(widget, fixedBreakpointFn) {\n\t this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n\t }\n\t\n\t /**\n\t * @returns {null|DestroyableWidget}\n\t */\n\t\n\t }, {\n\t key: 'getCurrentWidget',\n\t value: function getCurrentWidget() {\n\t return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_checkFixedNeeded',\n\t value: function _checkFixedNeeded() {\n\t var _this = this;\n\t\n\t if (this.widgets.length === 0) {\n\t return;\n\t }\n\t var widgets = new Set(this.widgets);\n\t var widgetsThatRequireFixedWindow = Array.from(widgets).some(function (_ref) {\n\t var widget = _ref.widget;\n\t\n\t return _this.fixedScreenConstraints[widget] && _this.fixedScreenConstraints[widget](_this.windowWidth);\n\t });\n\t if (!widgetsThatRequireFixedWindow) {\n\t this._removeFixedContainer();\n\t } else {\n\t this._addFixedContainer();\n\t }\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_addFixedContainer',\n\t value: function _addFixedContainer() {\n\t var _this2 = this;\n\t\n\t if (this.isFixedWindowActive) {\n\t return;\n\t }\n\t _Event2.default.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n\t detail: this.getCurrentWidget()\n\t });\n\t // this causes layout and should be optimized\n\t // At lest we write in a batch later\n\t _Settings2.default.get().scrollbarUpdateNodes.map(function (n) {\n\t var foundProperty = 'paddingRight';\n\t var direction = 1;\n\t var node = n;\n\t if (n instanceof Array) {\n\t var _n = _slicedToArray(n, 3);\n\t\n\t var whatNode = _n[0];\n\t var property = _n[1];\n\t var d = _n[2];\n\t\n\t foundProperty = property;\n\t node = whatNode;\n\t direction = d || 1;\n\t }\n\t return {\n\t node: node,\n\t property: foundProperty,\n\t value: parseInt(global.getComputedStyle(node)[foundProperty], 10) + (!node.__fixedWindowMod__ ? _Settings2.default.getScrollbarWidth() * direction : 0) + 'px'\n\t };\n\t }).forEach(function (d) {\n\t d.node.__fixedWindowMod__ = true;\n\t d.node.style[d.property] = d.value;\n\t });\n\t\n\t this.touchListener = function (e) {\n\t e.preventDefault();\n\t };\n\t\n\t var shouldNotMoveUp = false;\n\t var shouldNotMoveDown = false;\n\t var neverScroll = false;\n\t var lastClientY = 0;\n\t this.touchStartListener = function (e) {\n\t var _getCurrentWidget = _this2.getCurrentWidget();\n\t\n\t var element = _getCurrentWidget.element;\n\t\n\t var closestOverflow = _Util2.default.closestCallback(e.target, function (el) {\n\t return el instanceof HTMLTextAreaElement || el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH);\n\t });\n\t if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n\t element = closestOverflow;\n\t }\n\t if (_Util2.default.isPartOfNode(e.target, element)) {\n\t neverScroll = element.scrollHeight === element.offsetHeight;\n\t lastClientY = e.touches[0].clientY;\n\t // never allow scrolling when there is nothing to scroll\n\t if (neverScroll) {\n\t return false;\n\t }\n\t if (element.scrollTop === 0) {\n\t element.scrollTop = 1;\n\t shouldNotMoveUp = true;\n\t } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n\t shouldNotMoveDown = true;\n\t element.scrollTop -= 1;\n\t }\n\t }\n\t };\n\t\n\t global.addEventListener('touchmove', this.touchListener);\n\t global.document.body.addEventListener('touchstart', this.touchStartListener);\n\t\n\t this.touchMoveListener = function (e) {\n\t var _getCurrentWidget2 = _this2.getCurrentWidget();\n\t\n\t var element = _getCurrentWidget2.element;\n\t\n\t if (_Util2.default.isPartOfNode(e.target, element)) {\n\t var clientY = e.touches[0].clientY;\n\t\n\t var isScrollingDown = lastClientY - clientY > 0;\n\t lastClientY = clientY;\n\t\n\t if (neverScroll) {\n\t neverScroll = false;\n\t return false;\n\t }\n\t\n\t if (!shouldNotMoveDown && isScrollingDown) {\n\t e.stopImmediatePropagation();\n\t }\n\t\n\t if (shouldNotMoveDown && !isScrollingDown) {\n\t e.stopImmediatePropagation();\n\t }\n\t\n\t if (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) {\n\t e.stopImmediatePropagation();\n\t }\n\t\n\t shouldNotMoveUp = false;\n\t shouldNotMoveDown = false;\n\t }\n\t };\n\t global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\t\n\t global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n\t this.isFixedWindowActive = true;\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_removeFixedContainer',\n\t value: function _removeFixedContainer() {\n\t if (this.isFixedWindowActive) {\n\t // cleanup event listeners\n\t global.removeEventListener('touchmove', this.touchListener);\n\t global.document.body.removeEventListener('touchstart', this.touchStartListener);\n\t global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\t\n\t // reset scrollbar nodes\n\t _Settings2.default.get().scrollbarUpdateNodes.forEach(function (node) {\n\t if (node instanceof Array) {\n\t var _node = _slicedToArray(node, 2);\n\t\n\t var whatNode = _node[0];\n\t var property = _node[1];\n\t\n\t delete whatNode.__fixedWindowMod__;\n\t whatNode.style[property] = '';\n\t } else {\n\t delete node.__fixedWindowMod__;\n\t node.style.paddingRight = '';\n\t }\n\t });\n\t global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n\t _Event2.default.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n\t this.isFixedWindowActive = false;\n\t }\n\t }\n\t\n\t /**\n\t * Will close a window when no widgets are opened that need one\n\t */\n\t\n\t }, {\n\t key: 'resizeListener',\n\t value: function resizeListener() {\n\t this.windowWidth = global.innerWidth;\n\t this._checkFixedNeeded();\n\t }\n\t\n\t /**\n\t * @returns {FixedWindow}\n\t */\n\t\n\t }, {\n\t key: 'close',\n\t\n\t\n\t /**\n\t * Request a close of the fixed window\n\t */\n\t value: function close() {\n\t this.widgets.pop();\n\t if (this.widgets.length === 0) {\n\t this._removeFixedContainer();\n\t }\n\t }\n\t\n\t /**\n\t * Request to open a fixed windows\n\t * @param {Object|DestroyableWidget} instance\n\t * @param {HTMLElement} element\n\t */\n\t\n\t }, {\n\t key: 'open',\n\t value: function open(instance, element) {\n\t var fixed = false;\n\t if ((typeof instance === 'undefined' ? 'undefined' : _typeof(instance)) === 'object') {\n\t var widget = instance.constructor;\n\t var fixedWidget = this.fixedScreenConstraints[instance.constructor];\n\t if (widget && fixedWidget) {\n\t fixed = fixedWidget(this.windowWidth);\n\t }\n\t var length = this.widgets.length;\n\t this.widgets.push({\n\t widget: widget,\n\t element: element\n\t });\n\t // open a new window if there is no window active\n\t if (length === 0) {\n\t if (fixed) {\n\t this._addFixedContainer();\n\t }\n\t }\n\t }\n\t }\n\t }], [{\n\t key: 'getInstance',\n\t value: function getInstance() {\n\t if (!fixedWindowInstance) {\n\t fixedWindowInstance = new FixedWindow();\n\t fixedWindowInstance.windowWidth = global.innerWidth;\n\t var eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n\t global.addEventListener('resize', (0, _debounce2.default)(eventHandler, 500));\n\t global.addEventListener('orientationchange', eventHandler);\n\t }\n\t return fixedWindowInstance;\n\t }\n\t }]);\n\t\n\t return FixedWindow;\n\t}();\n\n\texports.default = FixedWindow;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_MODAL_ASYNC_TARGET_LOADED = exports.EVENT_MODAL_INIT = exports.EVENT_MODAL_OPENED = exports.EVENT_MODAL_BEFORE_CLOSED = exports.EVENT_MODAL_CLOSED = undefined;\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Modal\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/* global KeyboardEvent */\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tvar _FixedWindow = __webpack_require__(7);\n\t\n\tvar _FixedWindow2 = _interopRequireDefault(_FixedWindow);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar KEY_ESC = 27;\n\t/* Attribute Names */\n\tvar ATTR_CREATE_NEW = 'data-new-instance';\n\tvar ATTR_CLOSE = 'data-close-modal';\n\tvar ATTR_NAME = 'data-modal';\n\t\n\t/* Class names */\n\tvar CLS_CONTAINER_CURRENT = 'front';\n\tvar CLS_OPEN = 'open';\n\tvar CLS_CURRENT = 'current';\n\tvar CLS_PART_OF_STACK = 'part-of-stack';\n\tvar CLS_MODAL_CONTAINER = 'modal-container';\n\tvar CLS_ANIM_END = 'modal-anim-end';\n\tvar CLS_LOADER_CONTAINER = 'loader-container';\n\tvar CLS_LOADER = 'loader';\n\tvar CLS_BACKDROP = 'backdrop';\n\t\n\t/* Events */\n\t\n\t/**\n\t * Event triggered when modal is closed\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_CLOSED = exports.EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n\t/**\n\t * Event triggered before a modal is closed, cancelable\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_BEFORE_CLOSED = exports.EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n\t/**\n\t * Event triggered when a modal is opened\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_OPENED = exports.EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\t\n\t/**\n\t * Event triggered when modal is initilized, called on target\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_INIT = exports.EVENT_MODAL_INIT = 'flexcss.modal.init';\n\t\n\t/**\n\t * Triggered when the content of an async modal on a target is loaded, called on target\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_ASYNC_TARGET_LOADED = exports.EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\t\n\t/**\n\t * A Modal Implementation\n\t */\n\t\n\tvar Modal = function () {\n\t function Modal(DelegateContainer, options) {\n\t _classCallCheck(this, Modal);\n\t\n\t var doc = global.document;\n\t var container = DelegateContainer instanceof HTMLElement ? DelegateContainer : doc.getElementById(DelegateContainer);\n\t\n\t // Instance vars:\n\t if (!container) {\n\t throw new Error('Could not found container element by given ID/Element: ' + DelegateContainer);\n\t }\n\t\n\t this.currentOpen = null;\n\t\n\t this.loading = false;\n\t\n\t this.container = container;\n\t\n\t /**\n\t * Default Options\n\t */\n\t this.options = {\n\t classNames: 'modal',\n\t closeOnEscape: true,\n\t closeOnBackgroundClick: true,\n\t destroyOnFinish: false,\n\t fixedContainer: true,\n\t containerClassNames: ''\n\t };\n\t\n\t Object.assign(this.options, options);\n\t\n\t // Container where events are delegated\n\t this.eventContainer = null;\n\t this.eventFunction = null;\n\t\n\t this.dataMainPageContainer = global.document.body;\n\t\n\t this.currentScrollTop = 0;\n\t\n\t this.modalContainer = null;\n\t\n\t // Destroy full modal instance when no dialogs are bind to?\n\t // Otherwise container is recycled\n\t this.destroyOnFinish = this.options.destroyOnFinish;\n\t }\n\t\n\t /**\n\t * Removes this modal from global stack\n\t * Will handle fixing main html element too\n\t * @private\n\t * @param n\n\t */\n\t\n\t\n\t _createClass(Modal, [{\n\t key: '_removeModalFromStack',\n\t value: function _removeModalFromStack(n) {\n\t var t = Modal._modalInstances.indexOf(n);\n\t if (t > -1) {\n\t Modal._modalInstances.splice(t, 1);\n\t _FixedWindow2.default.getInstance().close();\n\t }\n\t }\n\t\n\t /**\n\t * Modal container that contains all `stacked` modals for this instance\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getModalContainer',\n\t value: function getModalContainer() {\n\t return this.modalContainer;\n\t }\n\t\n\t /**\n\t * Closes the current open modal of this stack\n\t * @params [e], optional event\n\t * @returns {*}\n\t */\n\t\n\t }, {\n\t key: 'close',\n\t value: function close(e) {\n\t var self = this;\n\t\n\t var options = self.currentOpen ? _Util2.default.applyOptionsFromElement(self.currentOpen, _Util2.default.copy(self.options)) : self.options;\n\t\n\t // close only on keyboard if instance should\n\t if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n\t return false;\n\t }\n\t\n\t // close only on background if instance should\n\t if (!options.closeOnBackgroundClick && e && e.type === _Settings2.default.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n\t return false;\n\t }\n\t\n\t // if an instance is currently loading, prevent from closing\n\t if (self.loading) {\n\t return false;\n\t }\n\t\n\t if (e) {\n\t e.preventDefault();\n\t }\n\t\n\t if (self.currentOpen) {\n\t // dispatch beforeClose event, if prevented prevent modal from closing\n\t var ev = _Event2.default.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n\t if (ev.defaultPrevented) {\n\t return false;\n\t }\n\t\n\t this._finishState(self.currentOpen);\n\t // if there is an previous modal\n\t if (self.currentOpen.prevModal) {\n\t // switch to the next modal\n\t return self.switchModals(self.currentOpen.prevModal, self.currentOpen.prevModal.prevModal || null);\n\t }\n\t\n\t // finally trigger closed event\n\t _Event2.default.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n\t }\n\t self._removeModalFromStack(self.currentOpen);\n\t\n\t // Full stack closed:\n\t self.currentOpen = null;\n\t if (self.modalContainer) {\n\t // setup next open\n\t var lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n\t var classList = self.modalContainer.classList;\n\t classList.remove(CLS_CONTAINER_CURRENT);\n\t classList.remove(CLS_BACKDROP);\n\t classList.remove(CLS_OPEN);\n\t // Remove all current classes from child-nodes\n\t for (var i = 0; i < self.modalContainer.childNodes.length; i++) {\n\t var node = self.modalContainer.childNodes[i];\n\t var cl = node.classList;\n\t // remove applied styles\n\t self._finishState(node);\n\t cl.remove(CLS_CURRENT);\n\t cl.remove(CLS_PART_OF_STACK);\n\t }\n\t if (lastContainer) {\n\t lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n\t }\n\t }\n\t\n\t if (self.destroyOnFinish) {\n\t self.destroy();\n\t }\n\t return self;\n\t }\n\t\n\t /**\n\t * Resets a target when newly initilizes\n\t * @param target\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_finishState',\n\t value: function _finishState(target) {\n\t target.classList.remove(CLS_ANIM_END);\n\t }\n\t\n\t /**\n\t * Handler called when a Modal has finished an animation\n\t * @param e\n\t * @param self\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_finishAnim',\n\t value: function _finishAnim(e, self) {\n\t e.target.classList.add(CLS_ANIM_END);\n\t e.target.removeEventListener(e.type, self, true);\n\t }\n\t\n\t /**\n\t * Brings the given modal to front\n\t * @param co\n\t * @param last\n\t */\n\t\n\t }, {\n\t key: 'switchModals',\n\t value: function switchModals(co, last) {\n\t co.prevModal = last;\n\t Modal._modalInstances.push(co);\n\t _FixedWindow2.default.getInstance().open(this, this.modalContainer);\n\t if (last) {\n\t this._finishState(last);\n\t _Util2.default.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n\t last.classList.add(CLS_PART_OF_STACK);\n\t }\n\t // set new currentOpen\n\t this.currentOpen = co;\n\t\n\t // bring current container to the front\n\t var instances = Modal._modalInstances;\n\t\n\t for (var m = 0; m < instances.length; m++) {\n\t instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n\t }\n\t this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n\t // remove animations if animations has been completed, fixes various bugs:\n\t // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n\t _Util2.default.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\t\n\t for (var i = 0; i < this.modalContainer.childNodes.length; i++) {\n\t var n = this.modalContainer.childNodes[i];\n\t var isCurrent = n.classList.contains(CLS_CURRENT);\n\t if (n === co) {\n\t co.classList.add(CLS_CURRENT);\n\t co.classList.remove(CLS_PART_OF_STACK);\n\t this._finishState(co);\n\t } else {\n\t n.classList.remove(CLS_CURRENT);\n\t if (isCurrent) {\n\t this._removeModalFromStack(n);\n\t _Event2.default.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n\t }\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Creates a Modal and opens it (later)\n\t * @param e\n\t * @returns {Promise|boolean}\n\t */\n\t\n\t }, {\n\t key: 'createWidget',\n\t value: function createWidget(e) {\n\t var _this = this;\n\t\n\t var self = this;\n\t if (this.loading) {\n\t return false;\n\t }\n\t\n\t // check if another modal has registered events on this dom path:\n\t if (e && e.target) {\n\t var foundInstance = _Util2.default.parentsUntil(e.target, function (node) {\n\t return node && node.flexModalInstance;\n\t });\n\t\n\t // if another instance has been found, abort\n\t if (foundInstance !== this.container) {\n\t return false;\n\t }\n\t }\n\t var targetContent = void 0;\n\t var future = void 0;\n\t var widget = void 0;\n\t var target = void 0;\n\t var hasTarget = true;\n\t var isHtmlElement = e instanceof HTMLElement;\n\t var isWidget = _Widget2.default.isWidget(e);\n\t if (isHtmlElement || isWidget) {\n\t if (isHtmlElement) {\n\t targetContent = e;\n\t } else {\n\t widget = e;\n\t targetContent = widget.element;\n\t }\n\t } else {\n\t target = e.target;\n\t if (!target) {\n\t throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n\t }\n\t hasTarget = target.hasAttribute(ATTR_NAME);\n\t targetContent = target.getAttribute(ATTR_NAME);\n\t widget = _Widget2.default.findWidget(target);\n\t if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n\t var _ret = function () {\n\t var newInstance = new Modal(_this.container).setDestroyOnFinish(true);\n\t e.newInstance = true;\n\t newInstance.fromEvent(e).then(function () {\n\t newInstance.registerEvents(newInstance.getModalContainer());\n\t });\n\t return {\n\t v: false\n\t };\n\t }();\n\t\n\t if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === \"object\") return _ret.v;\n\t }\n\t if (hasTarget) {\n\t e.stopImmediatePropagation();\n\t e.preventDefault();\n\t }\n\t }\n\t\n\t if (!hasTarget) {\n\t return false;\n\t }\n\t\n\t var modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\t\n\t // lazy create modal container\n\t if (!this.modalContainer) {\n\t this.modalContainer = global.document.createElement('div');\n\t this.modalContainer.className = CLS_MODAL_CONTAINER + ' ' + this.options.containerClassNames + ' ' + CLS_OPEN;\n\t var closeModalFunction = function closeModalFunction(ce) {\n\t if (_this.loading) {\n\t return false;\n\t }\n\t if (_Util2.default.isPartOfNode(ce.target, _this.currentOpen)) {\n\t if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n\t return false;\n\t }\n\t }\n\t _this.close(ce);\n\t };\n\t\n\t this.modalContainer.addEventListener(_Settings2.default.getTabEvent(), closeModalFunction, false);\n\t\n\t modalContainerClasses = this.modalContainer.classList;\n\t this.container.appendChild(this.modalContainer);\n\t } else {\n\t modalContainerClasses.add(CLS_OPEN);\n\t }\n\t\n\t var loader = void 0;\n\t var doc = global.document;\n\t var toggleLoader = function toggleLoader(show) {\n\t if (show) {\n\t loader = doc.createElement('div');\n\t loader.className = CLS_LOADER_CONTAINER;\n\t var loaderLoader = doc.createElement('div');\n\t loaderLoader.className = CLS_LOADER;\n\t loader.appendChild(loaderLoader);\n\t _this.modalContainer.appendChild(loader);\n\t } else {\n\t loader.parentNode.removeChild(loader);\n\t }\n\t };\n\t modalContainerClasses.add('loading');\n\t modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\t\n\t requestAnimationFrame(function () {\n\t requestAnimationFrame(function () {\n\t modalContainerClasses.add(CLS_BACKDROP);\n\t });\n\t });\n\t\n\t this.loading = true;\n\t toggleLoader(true);\n\t var async = widget ? widget.getAsync() : null;\n\t if (_Widget2.default.isWidget(widget) && async) {\n\t future = async.then(function (r) {\n\t var result = void 0;\n\t if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n\t result = r;\n\t } else {\n\t // Create container Element:\n\t var element = doc.createElement('div');\n\t element.className = self.options.classNames;\n\t element.innerHTML = r;\n\t element.id = _Util2.default.guid();\n\t result = element;\n\t }\n\t widget.finalContent = result;\n\t _Event2.default.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n\t return result;\n\t });\n\t } else {\n\t (function () {\n\t var el = targetContent instanceof HTMLElement || targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n\t if (el) {\n\t future = new Promise(function (resolve) {\n\t resolve(el);\n\t });\n\t } else {\n\t throw new Error('Could not found given modal element (content) with ID: ' + targetContent);\n\t }\n\t })();\n\t }\n\t\n\t _Event2.default.dispatchAndFire(target, EVENT_MODAL_INIT);\n\t\n\t return future.then(function (thisEl) {\n\t thisEl.hfWidgetInstance = _this;\n\t _this.modalContainer.appendChild(thisEl);\n\t modalContainerClasses.remove('loading');\n\t _this.loading = false;\n\t toggleLoader(false);\n\t _this.open(thisEl, true, e);\n\t return thisEl;\n\t });\n\t }\n\t\n\t /**\n\t * Open's an already rendered modal\n\t * @param {HTMLElement} modal\n\t * @param {Boolean} [internal], set to true to prevent container management\n\t * @param {Boolean} [maybeEvent], optional event-object that triggered open\n\t */\n\t\n\t }, {\n\t key: 'open',\n\t value: function open(modal, internal, maybeEvent) {\n\t if (!internal) {\n\t this.modalContainer.classList.add('open');\n\t }\n\t this.switchModals(modal, this.currentOpen);\n\t\n\t _Event2.default.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n\t }\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents(delegate) {\n\t var _this2 = this;\n\t\n\t var delegateContainer = delegate || this.container;\n\t // Modals should always be fixed\n\t _FixedWindow2.default.getInstance().addScreenConstraint(Modal, function () {\n\t return true;\n\t });\n\t // register modal instance so we can detect multiple registrars\n\t delegateContainer.flexModalInstance = this;\n\t this.eventFunction = function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t _this2.createWidget.apply(_this2, args);\n\t };\n\t delegateContainer.addEventListener(_Settings2.default.getTabEvent(), this.eventFunction, false);\n\t\n\t this.eventContainer = delegateContainer;\n\t return this;\n\t }\n\t\n\t /**\n\t * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n\t * @param {HTMLElement|Widget} widget instance or html element\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'fromWidget',\n\t value: function fromWidget(widget) {\n\t return this.createWidget(widget);\n\t }\n\t\n\t /**\n\t * Creates a Widget from event\n\t * @param e\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'fromEvent',\n\t value: function fromEvent(e) {\n\t return this.createWidget(e);\n\t }\n\t }, {\n\t key: 'setDestroyOnFinish',\n\t value: function setDestroyOnFinish(v) {\n\t this.destroyOnFinish = v;\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroy this widget instance, cleans empty DOM nodes\n\t * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t var modalContainer = this.modalContainer;\n\t var isEmptyContainer = modalContainer.childNodes.length === 0;\n\t // Remove event listener on destroy, do not remove DOM node\n\t if (this.eventContainer) {\n\t this.eventContainer.removeEventListener(_Settings2.default.getTabEvent(), this.eventFunction, true);\n\t }\n\t\n\t if (isEmptyContainer) {\n\t if (modalContainer.parentNode) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t }\n\t }\n\t if (global.MutationObserver) {\n\t (function () {\n\t var observer = new MutationObserver(function (mutations) {\n\t mutations.forEach(function () {\n\t if (modalContainer.childNodes.length === 0) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t observer.disconnect();\n\t }\n\t });\n\t });\n\t observer.observe(modalContainer, {\n\t childList: true\n\t });\n\t })();\n\t } else {\n\t modalContainer.addEventListener('DOMNodeRemoved', function (e) {\n\t if (e.target !== modalContainer && modalContainer.childNodes.length - 1 === 0) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t }\n\t });\n\t }\n\t }\n\t }]);\n\t\n\t return Modal;\n\t}();\n\t\n\t// Static variable that keeps track of all open modals\n\t\n\t\n\tModal._modalInstances = [];\n\t\n\t// Global keydown listener for modal\n\tglobal.addEventListener('keydown', function (e) {\n\t if (e.keyCode === KEY_ESC) {\n\t var lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n\t if (lastModal) {\n\t _Widget2.default.findWidget(lastModal).close(e);\n\t }\n\t }\n\t});\n\t\n\texports.default = Modal;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 9 */,\n/* 10 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (fn, ms) {\n\t return function () {\n\t clearTimeout(fn.timeout);\n\t fn.timeout = setTimeout(fn, ms);\n\t };\n\t};\n\n/***/ },\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */,\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _Modal = __webpack_require__(8);\n\t\n\tvar _Modal2 = _interopRequireDefault(_Modal);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t// default export as component object\n\texports.default = {\n\t Modal: _Modal2.default,\n\t Settings: _Settings2.default,\n\t Widget: _Widget2.default\n\t};\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** js/modal.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 13012788ed6358b638c7\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Widget\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/**\n * A Widget provides async content on a specific target (e.g. a modal link)\n */\nclass Widget {\n\n /**\n * Creates a new Widget\n * @param [element], optional define the content of widget\n */\n constructor(element) {\n /**\n *\n * @type {Promise}\n */\n this.asyncContent = null;\n\n /**\n * @type {boolean}\n */\n this._isWidget = true;\n\n if (element) {\n /**\n * @type {HTMLElement}\n */\n this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n if (this.element) {\n this.element.hfWidgetInstance = this;\n this.setAsync(() => {\n return new Promise((s) => {\n s(this.element);\n });\n });\n } else {\n throw new Error(`Could not found element with ID: ${element}`);\n }\n }\n /**\n * The final resulted content that a widget did create (e.g. a modal container)\n * @type {HTMLElement}\n */\n this.finalContent = null;\n }\n\n /**\n *\n * @returns {Promise}\n */\n getAsync() {\n return this.asyncContent();\n }\n\n /**\n * @param {Function.} async\n * @returns {Widget}\n */\n setAsync(async) {\n this.asyncContent = async;\n return this;\n }\n\n /**\n * @returns {HTMLElement}\n */\n getFinalContent() {\n return this.finalContent;\n }\n\n /**\n * @param {HTMLElement} element\n * @returns {Widget}\n */\n setElement(element) {\n this.element = element;\n return this;\n }\n\n /**\n * Destroys the generated content of this widget\n * @returns {boolean}\n */\n destroy() {\n if (this.finalContent && this.finalContent.parentNode) {\n this.finalContent.parentNode.removeChild(this.finalContent);\n return true;\n }\n\n delete this.element;\n delete this.asyncContent;\n delete this.finalContent;\n\n return false;\n }\n\n /**\n * Will find a widget on an Element\n * @param {HTMLElement} element\n * @returns {Widget|undefined}\n */\n static findWidget(element) {\n return element ? element.hfWidgetInstance : undefined;\n }\n\n /**\n * Checks if a given object is an instance\n * @param {Object} self\n * @returns {boolean}\n */\n static isWidget(self) {\n return self instanceof Widget || typeof self === 'object' && self.hasOwnProperty('_isWidget');\n }\n}\n\nexport default Widget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Widget.js\n **/","import Settings from '../util/Settings';\nimport debounce from './debounce';\nimport Event from '../util/Event';\nimport Util from '../util/Util';\n\nconst CLS_FIXED_WINDOW = 'fixed-window-open';\n\nexport const EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\nexport const EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\n/**\n * @type {string}\n */\nexport const ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\n/**\n * @type {FixedWindow}\n */\nlet fixedWindowInstance;\n\nexport default class FixedWindow {\n\n constructor() {\n this.widgets = [];\n this.currentScrollTop = 0;\n this.fixedScreenConstraints = [];\n this.windowWidth = 0;\n this.isFixedWindowActive = false;\n this.touchListener = null;\n }\n\n /**\n * Adds a constraint to detect if the window needs to be changed when the screensize changes\n *\n * @param {Function} widget\n * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n */\n addScreenConstraint(widget, fixedBreakpointFn) {\n this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n }\n\n /**\n * @returns {null|DestroyableWidget}\n */\n getCurrentWidget() {\n return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n }\n\n /**\n * @private\n */\n _checkFixedNeeded() {\n if (this.widgets.length === 0) {\n return;\n }\n const widgets = new Set(this.widgets);\n const widgetsThatRequireFixedWindow = Array.from(widgets).some(({ widget }) => {\n return this.fixedScreenConstraints[widget] && this.fixedScreenConstraints[widget](this.windowWidth);\n });\n if (!widgetsThatRequireFixedWindow) {\n this._removeFixedContainer();\n } else {\n this._addFixedContainer();\n }\n }\n\n /**\n * @private\n */\n _addFixedContainer() {\n if (this.isFixedWindowActive) {\n return;\n }\n Event.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n detail: this.getCurrentWidget()\n });\n // this causes layout and should be optimized\n // At lest we write in a batch later\n Settings.get().scrollbarUpdateNodes.map((n) => {\n let foundProperty = 'paddingRight';\n let direction = 1;\n let node = n;\n if (n instanceof Array) {\n const [whatNode, property, d] = n;\n foundProperty = property;\n node = whatNode;\n direction = d || 1;\n }\n return {\n node,\n property: foundProperty,\n value: `${parseInt(global.getComputedStyle(node)[foundProperty], 10) +\n (!node.__fixedWindowMod__ ? (Settings.getScrollbarWidth() * direction) : 0)}px`\n };\n }).forEach((d) => {\n d.node.__fixedWindowMod__ = true;\n d.node.style[d.property] = d.value;\n });\n\n this.touchListener = (e) => {\n e.preventDefault();\n };\n\n let shouldNotMoveUp = false;\n let shouldNotMoveDown = false;\n let neverScroll = false;\n let lastClientY = 0;\n this.touchStartListener = (e) => {\n let { element } = this.getCurrentWidget();\n const closestOverflow = Util.closestCallback(e.target,\n (el) => el instanceof HTMLTextAreaElement ||\n (el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH)));\n if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n element = closestOverflow;\n }\n if (Util.isPartOfNode(e.target, element)) {\n neverScroll = element.scrollHeight === element.offsetHeight;\n lastClientY = e.touches[0].clientY;\n // never allow scrolling when there is nothing to scroll\n if (neverScroll) {\n return false;\n }\n if (element.scrollTop === 0) {\n element.scrollTop = 1;\n shouldNotMoveUp = true;\n } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n shouldNotMoveDown = true;\n element.scrollTop -= 1;\n }\n }\n };\n\n global.addEventListener('touchmove', this.touchListener);\n global.document.body.addEventListener('touchstart', this.touchStartListener);\n\n this.touchMoveListener = (e) => {\n const { element } = this.getCurrentWidget();\n if (Util.isPartOfNode(e.target, element)) {\n const { clientY } = e.touches[0];\n const isScrollingDown = (lastClientY - clientY) > 0;\n lastClientY = clientY;\n\n if (neverScroll) {\n neverScroll = false;\n return false;\n }\n\n if (!shouldNotMoveDown && isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n if (shouldNotMoveDown && !isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n if (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) {\n e.stopImmediatePropagation();\n }\n\n shouldNotMoveUp = false;\n shouldNotMoveDown = false;\n }\n };\n global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\n global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n this.isFixedWindowActive = true;\n }\n\n /**\n * @private\n */\n _removeFixedContainer() {\n if (this.isFixedWindowActive) {\n // cleanup event listeners\n global.removeEventListener('touchmove', this.touchListener);\n global.document.body.removeEventListener('touchstart', this.touchStartListener);\n global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\n // reset scrollbar nodes\n Settings.get().scrollbarUpdateNodes.forEach((node) => {\n if (node instanceof Array) {\n const [whatNode, property] = node;\n delete whatNode.__fixedWindowMod__;\n whatNode.style[property] = '';\n } else {\n delete node.__fixedWindowMod__;\n node.style.paddingRight = '';\n }\n });\n global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n Event.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n this.isFixedWindowActive = false;\n }\n }\n\n /**\n * Will close a window when no widgets are opened that need one\n */\n resizeListener() {\n this.windowWidth = global.innerWidth;\n this._checkFixedNeeded();\n }\n\n /**\n * @returns {FixedWindow}\n */\n static getInstance() {\n if (!fixedWindowInstance) {\n fixedWindowInstance = new FixedWindow();\n fixedWindowInstance.windowWidth = global.innerWidth;\n const eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n global.addEventListener(\n 'resize',\n debounce(eventHandler, 500)\n );\n global.addEventListener('orientationchange', eventHandler);\n }\n return fixedWindowInstance;\n }\n\n /**\n * Request a close of the fixed window\n */\n close() {\n this.widgets.pop();\n if (this.widgets.length === 0) {\n this._removeFixedContainer();\n }\n }\n\n /**\n * Request to open a fixed windows\n * @param {Object|DestroyableWidget} instance\n * @param {HTMLElement} element\n */\n open(instance, element) {\n let fixed = false;\n if (typeof instance === 'object') {\n const widget = instance.constructor;\n const fixedWidget = this.fixedScreenConstraints[instance.constructor];\n if (widget && fixedWidget) {\n fixed = fixedWidget(this.windowWidth);\n }\n const length = this.widgets.length;\n this.widgets.push(\n {\n widget,\n element\n }\n );\n // open a new window if there is no window active\n if (length === 0) {\n if (fixed) {\n this._addFixedContainer();\n }\n }\n }\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/FixedWindow.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Modal\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global KeyboardEvent */\n\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\nconst KEY_ESC = 27;\n/* Attribute Names */\nconst ATTR_CREATE_NEW = 'data-new-instance';\nconst ATTR_CLOSE = 'data-close-modal';\nconst ATTR_NAME = 'data-modal';\n\n/* Class names */\nconst CLS_CONTAINER_CURRENT = 'front';\nconst CLS_OPEN = 'open';\nconst CLS_CURRENT = 'current';\nconst CLS_PART_OF_STACK = 'part-of-stack';\nconst CLS_MODAL_CONTAINER = 'modal-container';\nconst CLS_ANIM_END = 'modal-anim-end';\nconst CLS_LOADER_CONTAINER = 'loader-container';\nconst CLS_LOADER = 'loader';\nconst CLS_BACKDROP = 'backdrop';\n\n/* Events */\n\n/**\n * Event triggered when modal is closed\n * @type {string}\n */\nexport const EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n/**\n * Event triggered before a modal is closed, cancelable\n * @type {string}\n */\nexport const EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n/**\n * Event triggered when a modal is opened\n * @type {string}\n */\nexport const EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\n/**\n * Event triggered when modal is initilized, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_INIT = 'flexcss.modal.init';\n\n/**\n * Triggered when the content of an async modal on a target is loaded, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\n/**\n * A Modal Implementation\n */\nclass Modal {\n constructor(DelegateContainer, options) {\n const doc = global.document;\n const container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n // Instance vars:\n if (!container) {\n throw new Error(`Could not found container element by given ID/Element: ${DelegateContainer}`);\n }\n\n this.currentOpen = null;\n\n this.loading = false;\n\n this.container = container;\n\n /**\n * Default Options\n */\n this.options = {\n classNames: 'modal',\n closeOnEscape: true,\n closeOnBackgroundClick: true,\n destroyOnFinish: false,\n fixedContainer: true,\n containerClassNames: ''\n };\n\n Object.assign(this.options, options);\n\n // Container where events are delegated\n this.eventContainer = null;\n this.eventFunction = null;\n\n this.dataMainPageContainer = global.document.body;\n\n this.currentScrollTop = 0;\n\n this.modalContainer = null;\n\n // Destroy full modal instance when no dialogs are bind to?\n // Otherwise container is recycled\n this.destroyOnFinish = this.options.destroyOnFinish;\n }\n\n /**\n * Removes this modal from global stack\n * Will handle fixing main html element too\n * @private\n * @param n\n */\n _removeModalFromStack(n) {\n const t = Modal._modalInstances.indexOf(n);\n if (t > -1) {\n Modal._modalInstances.splice(t, 1);\n FixedWindow.getInstance().close();\n }\n }\n\n\n /**\n * Modal container that contains all `stacked` modals for this instance\n * @returns {HTMLElement}\n */\n getModalContainer() {\n return this.modalContainer;\n }\n\n /**\n * Closes the current open modal of this stack\n * @params [e], optional event\n * @returns {*}\n */\n close(e) {\n const self = this;\n\n const options = self.currentOpen ? Util.applyOptionsFromElement(\n self.currentOpen, Util.copy(self.options)) : self.options;\n\n // close only on keyboard if instance should\n if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n return false;\n }\n\n // close only on background if instance should\n if (!options.closeOnBackgroundClick && e &&\n e.type === Settings.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n\n // if an instance is currently loading, prevent from closing\n if (self.loading) {\n return false;\n }\n\n if (e) {\n e.preventDefault();\n }\n\n if (self.currentOpen) {\n // dispatch beforeClose event, if prevented prevent modal from closing\n const ev = Event.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n if (ev.defaultPrevented) {\n return false;\n }\n\n this._finishState(self.currentOpen);\n // if there is an previous modal\n if (self.currentOpen.prevModal) {\n // switch to the next modal\n return self.switchModals(self.currentOpen.prevModal,\n self.currentOpen.prevModal.prevModal || null);\n }\n\n // finally trigger closed event\n Event.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n }\n self._removeModalFromStack(self.currentOpen);\n\n // Full stack closed:\n self.currentOpen = null;\n if (self.modalContainer) {\n // setup next open\n const lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n const classList = self.modalContainer.classList;\n classList.remove(CLS_CONTAINER_CURRENT);\n classList.remove(CLS_BACKDROP);\n classList.remove(CLS_OPEN);\n // Remove all current classes from child-nodes\n for (let i = 0; i < self.modalContainer.childNodes.length; i++) {\n const node = self.modalContainer.childNodes[i];\n const cl = node.classList;\n // remove applied styles\n self._finishState(node);\n cl.remove(CLS_CURRENT);\n cl.remove(CLS_PART_OF_STACK);\n }\n if (lastContainer) {\n lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n }\n }\n\n if (self.destroyOnFinish) {\n self.destroy();\n }\n return self;\n }\n\n /**\n * Resets a target when newly initilizes\n * @param target\n * @private\n */\n _finishState(target) {\n target.classList.remove(CLS_ANIM_END);\n }\n\n /**\n * Handler called when a Modal has finished an animation\n * @param e\n * @param self\n * @private\n */\n _finishAnim(e, self) {\n e.target.classList.add(CLS_ANIM_END);\n e.target.removeEventListener(e.type, self, true);\n }\n\n /**\n * Brings the given modal to front\n * @param co\n * @param last\n */\n switchModals(co, last) {\n co.prevModal = last;\n Modal._modalInstances.push(co);\n FixedWindow.getInstance().open(this, this.modalContainer);\n if (last) {\n this._finishState(last);\n Util.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n last.classList.add(CLS_PART_OF_STACK);\n }\n // set new currentOpen\n this.currentOpen = co;\n\n // bring current container to the front\n const instances = Modal._modalInstances;\n\n for (let m = 0; m < instances.length; m++) {\n instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n }\n this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n // remove animations if animations has been completed, fixes various bugs:\n // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n Util.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\n for (let i = 0; i < this.modalContainer.childNodes.length; i++) {\n const n = this.modalContainer.childNodes[i];\n const isCurrent = n.classList.contains(CLS_CURRENT);\n if (n === co) {\n co.classList.add(CLS_CURRENT);\n co.classList.remove(CLS_PART_OF_STACK);\n this._finishState(co);\n } else {\n n.classList.remove(CLS_CURRENT);\n if (isCurrent) {\n this._removeModalFromStack(n);\n Event.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n }\n }\n }\n }\n\n /**\n * Creates a Modal and opens it (later)\n * @param e\n * @returns {Promise|boolean}\n */\n createWidget(e) {\n const self = this;\n if (this.loading) {\n return false;\n }\n\n // check if another modal has registered events on this dom path:\n if (e && e.target) {\n const foundInstance = Util.parentsUntil(e.target, (node) => {\n return node && node.flexModalInstance;\n });\n\n // if another instance has been found, abort\n if (foundInstance !== this.container) {\n return false;\n }\n }\n let targetContent;\n let future;\n let widget;\n let target;\n let hasTarget = true;\n const isHtmlElement = e instanceof HTMLElement;\n const isWidget = Widget.isWidget(e);\n if (isHtmlElement || isWidget) {\n if (isHtmlElement) {\n targetContent = e;\n } else {\n widget = e;\n targetContent = widget.element;\n }\n } else {\n target = e.target;\n if (!target) {\n throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n }\n hasTarget = target.hasAttribute(ATTR_NAME);\n targetContent = target.getAttribute(ATTR_NAME);\n widget = Widget.findWidget(target);\n if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n const newInstance = new Modal(this.container)\n .setDestroyOnFinish(true);\n e.newInstance = true;\n newInstance.fromEvent(e).then(() => {\n newInstance.registerEvents(newInstance.getModalContainer());\n });\n return false;\n }\n if (hasTarget) {\n e.stopImmediatePropagation();\n e.preventDefault();\n }\n }\n\n if (!hasTarget) {\n return false;\n }\n\n let modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\n // lazy create modal container\n if (!this.modalContainer) {\n this.modalContainer = global.document.createElement('div');\n this.modalContainer.className = `${CLS_MODAL_CONTAINER} ${this.options.containerClassNames} ${CLS_OPEN}`;\n const closeModalFunction = (ce) => {\n if (this.loading) {\n return false;\n }\n if (Util.isPartOfNode(ce.target, this.currentOpen)) {\n if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n }\n this.close(ce);\n };\n\n this.modalContainer.addEventListener(Settings.getTabEvent(), closeModalFunction, false);\n\n modalContainerClasses = this.modalContainer.classList;\n this.container.appendChild(this.modalContainer);\n } else {\n modalContainerClasses.add(CLS_OPEN);\n }\n\n let loader;\n const doc = global.document;\n const toggleLoader = (show) => {\n if (show) {\n loader = doc.createElement('div');\n loader.className = CLS_LOADER_CONTAINER;\n const loaderLoader = doc.createElement('div');\n loaderLoader.className = CLS_LOADER;\n loader.appendChild(loaderLoader);\n this.modalContainer.appendChild(loader);\n } else {\n loader.parentNode.removeChild(loader);\n }\n };\n modalContainerClasses.add('loading');\n modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n modalContainerClasses.add(CLS_BACKDROP);\n });\n });\n\n this.loading = true;\n toggleLoader(true);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n let result;\n if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n result = r;\n } else {\n // Create container Element:\n const element = doc.createElement('div');\n element.className = self.options.classNames;\n element.innerHTML = r;\n element.id = Util.guid();\n result = element;\n }\n widget.finalContent = result;\n Event.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n return result;\n });\n } else {\n const el = targetContent instanceof HTMLElement ||\n targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n if (el) {\n future = new Promise((resolve) => {\n resolve(el);\n });\n } else {\n throw new Error(`Could not found given modal element (content) with ID: ${targetContent}`);\n }\n }\n\n Event.dispatchAndFire(target, EVENT_MODAL_INIT);\n\n return future.then((thisEl) => {\n thisEl.hfWidgetInstance = this;\n this.modalContainer.appendChild(thisEl);\n modalContainerClasses.remove('loading');\n this.loading = false;\n toggleLoader(false);\n this.open(thisEl, true, e);\n return thisEl;\n });\n }\n\n /**\n * Open's an already rendered modal\n * @param {HTMLElement} modal\n * @param {Boolean} [internal], set to true to prevent container management\n * @param {Boolean} [maybeEvent], optional event-object that triggered open\n */\n open(modal, internal, maybeEvent) {\n if (!internal) {\n this.modalContainer.classList.add('open');\n }\n this.switchModals(modal, this.currentOpen);\n\n Event.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n }\n\n\n registerEvents(delegate) {\n const delegateContainer = delegate || this.container;\n // Modals should always be fixed\n FixedWindow.getInstance().addScreenConstraint(Modal, () => true);\n // register modal instance so we can detect multiple registrars\n delegateContainer.flexModalInstance = this;\n this.eventFunction = (...args) => {\n this.createWidget.apply(this, args);\n };\n delegateContainer.addEventListener(Settings.getTabEvent(), this.eventFunction, false);\n\n this.eventContainer = delegateContainer;\n return this;\n }\n\n\n /**\n * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n * @param {HTMLElement|Widget} widget instance or html element\n * @returns {Promise}\n */\n fromWidget(widget) {\n return this.createWidget(widget);\n }\n\n /**\n * Creates a Widget from event\n * @param e\n * @returns {Promise}\n */\n fromEvent(e) {\n return this.createWidget(e);\n }\n\n setDestroyOnFinish(v) {\n this.destroyOnFinish = v;\n return this;\n }\n\n /**\n * Destroy this widget instance, cleans empty DOM nodes\n * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n */\n destroy() {\n const modalContainer = this.modalContainer;\n const isEmptyContainer = modalContainer.childNodes.length === 0;\n // Remove event listener on destroy, do not remove DOM node\n if (this.eventContainer) {\n this.eventContainer.removeEventListener(Settings.getTabEvent(), this.eventFunction, true);\n }\n\n if (isEmptyContainer) {\n if (modalContainer.parentNode) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n }\n if (global.MutationObserver) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach(() => {\n if (modalContainer.childNodes.length === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n observer.disconnect();\n }\n });\n });\n observer.observe(modalContainer,\n {\n childList: true\n }\n );\n } else {\n modalContainer.addEventListener('DOMNodeRemoved', (e) => {\n if (e.target !== modalContainer && (modalContainer.childNodes.length - 1) === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n });\n }\n }\n}\n\n\n// Static variable that keeps track of all open modals\nModal._modalInstances = [];\n\n// Global keydown listener for modal\nglobal.addEventListener('keydown', (e) => {\n if (e.keyCode === KEY_ESC) {\n const lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n if (lastModal) {\n Widget.findWidget(lastModal).close(e);\n }\n }\n});\n\nexport default Modal;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Modal.js\n **/","export default (fn, ms) => () => {\n clearTimeout(fn.timeout);\n fn.timeout = setTimeout(fn, ms);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/debounce.js\n **/","import Modal from '../Modal';\nimport Settings from '../util/Settings';\nimport Widget from '../Widget';\n\n// default export as component object\nexport default {\n Modal,\n Settings,\n Widget\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/Modal.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6*","webpack:///js/modal.min.js","webpack:///webpack/bootstrap a138c665fa30c31cdbad?9e5e*","webpack:///./src/main/util/Util.js?5bc4*","webpack:///./src/main/util/Settings.js?b01f*","webpack:///./src/main/util/Event.js?68bf*","webpack:///./src/main/Widget.js?920e","webpack:///./src/main/lib/FixedWindow.js?6376","webpack:///./src/main/Modal.js?a8d4","webpack:///./src/main/lib/debounce.js?3601","webpack:///./src/main/modules/Modal.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","global","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","PFX","COL_LEFT_CLASS","COL_RIGHT_CLASS","COL_BOTTOM_CLASS","Util","element","type","callback","thisFunction","e","apply","thisType","toLowerCase","name","addEventListener","t","el","document","createElement","transitions","transition","OTransition","MozTransition","WebkitTransition","undefined","style","parent","now","parentNode","func","s4","Math","floor","random","toString","substring","doc","inner","width","height","outer","position","top","left","visibility","overflow","appendChild","body","w1","offsetWidth","w2","clientWidth","removeChild","ev","capture","event","removeEventListener","offsetHeight","str","replace","g","toUpperCase","input","JSON","parse","stringify","base","attrs","attributes","attr","s","dashToCamelCase","nodeName","val","nodeValue","hasOwnProperty","parseInt","elementToPosition","collisionContainer","centerHorizontal","positionTop","amountTop","amountLeft","parentsUntil","HTMLElement","window","getComputedStyle","isPartOfNode","offsetTop","offsetLeft","targetPosition","getBoundingClientRect","elementRect","colRect","targetTop","targetRight","right","isCollisionTop","isCollisionBottom","innerHeight","isCollisionLeft","targetLeft","isCollisionRight","classList","remove","calcTop","calcLeft","add","rightPosition","leftCentered","collisionCentered","cssText","optionalOffset","scrollIntoView","thisOffset","scrolledY","pageYOffset","scroll","_interopRequireDefault","obj","__esModule","default","_Util","_Util2","FLEXCSS_GLOBAL_SETTINGS","smallBreakpoint","scrollbarUpdateNodes","darkenerFadeDelay","canvasToggledClass","FLEXCSS_CONST_IS_IOS","FLEXCSS_CONST_IS_TOUCH","FLEXCSS_CONST_IS_IE","FLEXCSS_CONST_TAB_EVENT","FLEXCSS_IS_SMALL_SCREEN","init","FLEXCSS_CONST_SCROLLBAR_WIDTH","getScrollBarWidth","FLEXCSS_CONST_TRANSITION_EVENT","whichTransitionEndEvent","readyState","Settings","settings","assign","navigator","userAgent","match","innerWidth","get","msMaxTouchPoints","CustomEvent","_CustomEvent","params","thisParams","bubbles","cancelable","detail","evt","createEvent","initCustomEvent","Event","EventHandler","defaultOptions","options","withDetail","originalEvent","o","dispatchEvent","withOptions","fire","_typeof","Symbol","iterator","constructor","Widget","_this","asyncContent","_isWidget","getElementById","Error","hfWidgetInstance","setAsync","Promise","finalContent","async","self","ALLOW_ELEMENT_OVERFLOW_TOUCH","EVENT_AFTER_FIXED_REMOVE","EVENT_BEFORE_FIXED_ADD","_slicedToArray","sliceIterator","arr","_arr","_n","_d","_e","_s","_i","next","done","push","err","Array","isArray","_Settings","_Settings2","_debounce","_debounce2","_Event","_Event2","CLS_FIXED_WINDOW","fixedWindowInstance","FixedWindow","widgets","currentScrollTop","fixedScreenConstraints","windowWidth","isFixedWindowActive","touchListener","widget","fixedBreakpointFn","Set","widgetsThatRequireFixedWindow","from","some","_ref","_addFixedContainer","_removeFixedContainer","_this2","dispatchAndFire","getCurrentWidget","map","n","foundProperty","direction","node","whatNode","property","d","__fixedWindowMod__","getScrollbarWidth","forEach","preventDefault","shouldNotMoveUp","shouldNotMoveDown","neverScroll","lastClientY","touchStartListener","_getCurrentWidget","closestOverflow","closestCallback","HTMLTextAreaElement","hasAttribute","scrollHeight","touches","clientY","scrollTop","touchMoveListener","_getCurrentWidget2","isScrollingDown","stopImmediatePropagation","documentElement","_node","paddingRight","_checkFixedNeeded","pop","fixed","fixedWidget","eventHandler","resizeListener","bind","EVENT_MODAL_ASYNC_TARGET_LOADED","EVENT_MODAL_INIT","EVENT_MODAL_OPENED","EVENT_MODAL_BEFORE_CLOSED","EVENT_MODAL_CLOSED","_Widget","_Widget2","_FixedWindow","_FixedWindow2","KEY_ESC","ATTR_CREATE_NEW","ATTR_CLOSE","ATTR_NAME","CLS_CONTAINER_CURRENT","CLS_OPEN","CLS_CURRENT","CLS_PART_OF_STACK","CLS_MODAL_CONTAINER","CLS_ANIM_END","CLS_LOADER_CONTAINER","CLS_LOADER","CLS_BACKDROP","Modal","DelegateContainer","container","currentOpen","loading","classNames","closeOnEscape","closeOnBackgroundClick","destroyOnFinish","fixedContainer","containerClassNames","eventContainer","eventFunction","dataMainPageContainer","modalContainer","_modalInstances","indexOf","splice","getInstance","close","applyOptionsFromElement","copy","KeyboardEvent","getTabEvent","defaultPrevented","_finishState","prevModal","switchModals","dispatch","withOriginal","_removeModalFromStack","lastContainer","childNodes","cl","destroy","co","last","open","prefixedAnimateEvent","_finishAnim","instances","isCurrent","contains","foundInstance","flexModalInstance","targetContent","future","hasTarget","isHtmlElement","isWidget","getAttribute","findWidget","newInstance","_ret","setDestroyOnFinish","fromEvent","then","registerEvents","getModalContainer","v","modalContainerClasses","className","closeModalFunction","ce","loader","toggleLoader","show","loaderLoader","requestAnimationFrame","getAsync","r","result","DocumentFragment","innerHTML","guid","resolve","thisEl","modal","internal","maybeEvent","delegate","delegateContainer","addScreenConstraint","_len","arguments","args","_key","createWidget","isEmptyContainer","MutationObserver","observer","mutations","disconnect","observe","childList","keyCode","lastModal","fn","ms","clearTimeout","timeout","setTimeout","_Modal","_Modal2"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAA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1D,CAED,SAASH,EAAQD,GAEtB,YAEAoB,QAAOC,eAAerB,EAAS,cAC3BsB,OAAO,IAGXtB,aQ/hEc,SAAC0a,EAAIC,GRgiEf,MQhiEsB,YACvBC,aAAaF,EAAGG,SAChBH,EAAGG,QAAUC,WAAWJ,EAAIC,MRqiExB,CACA,CACA,CACA,CACA,CACA,CACA,CACA,CAEF,SAAS1a,EAAQD,EAASM,GAE/B,YAkBA,SAASqJ,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,UAASF,GAhBvFxI,OAAOC,eAAerB,EAAS,cAC3BsB,OAAO,GAGX,IAAIyZ,GAASza,EAAoB,GAE7B0a,EAAUrR,EAAuBoR,GAEjC/L,EAAY1O,EAAoB,GAEhC2O,EAAatF,EAAuBqF,GAEpCwE,EAAUlT,EAAoB,GAE9BmT,EAAW9J,EAAuB6J,EAKtCxT,eSjkEGyU,MAAAuG,aACA/P,SAAAgE,aACA/B,OAAAuG","file":"js/modal.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FlexCss\"] = factory();\n\telse\n\t\troot[\"FlexCss\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"../\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(19);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\tvar PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\t\n\tvar COL_LEFT_CLASS = 'is-collision-left';\n\t\n\tvar COL_RIGHT_CLASS = 'is-collision-right';\n\t\n\tvar COL_BOTTOM_CLASS = 'is-collision-bottom';\n\t\n\t/**\n\t * Provides shared DOM-Utility functions\n\t */\n\t\n\tvar Util = function () {\n\t function Util() {\n\t _classCallCheck(this, Util);\n\t }\n\t\n\t _createClass(Util, null, [{\n\t key: \"prefixedAnimateEvent\",\n\t\n\t\n\t /**\n\t * Will register the right animation event based on browser\n\t * @param element\n\t * @param type\n\t * @param callback\n\t */\n\t value: function prefixedAnimateEvent(element, type, callback) {\n\t var thisFunction = function thisFunction(e) {\n\t callback.apply(element, [e, thisFunction]);\n\t };\n\t\n\t for (var p = 0; p < PFX.length; p++) {\n\t var thisType = type;\n\t if (!PFX[p]) {\n\t thisType = type.toLowerCase();\n\t }\n\t var name = PFX[p] + thisType;\n\t element.addEventListener(name, thisFunction, true);\n\t }\n\t }\n\t\n\t /**\n\t * Get correct transitionend event\n\t * @returns {String}\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"whichTransitionEndEvent\",\n\t value: function whichTransitionEndEvent() {\n\t var t = void 0;\n\t var el = document.createElement('fake');\n\t\n\t var transitions = {\n\t transition: 'transitionend',\n\t OTransition: 'oTransitionEnd',\n\t MozTransition: 'transitionend',\n\t WebkitTransition: 'webkitTransitionEnd'\n\t };\n\t\n\t for (t in transitions) {\n\t if (el.style[t] !== undefined) {\n\t return transitions[t];\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Check if target is part of parent node\n\t * @param target\n\t * @param parent\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: \"isPartOfNode\",\n\t value: function isPartOfNode(target, parent) {\n\t if (!target || !parent) {\n\t return false;\n\t }\n\t var now = target;\n\t while (now !== parent && now !== null) {\n\t if (now === parent) {\n\t break;\n\t }\n\t now = now.parentNode;\n\t }\n\t return now !== null;\n\t }\n\t\n\t /**\n\t * Finds the closest element including itself matching a callback\n\t * @param {Node} el\n\t * @param {Function} callback\n\t * @returns {Node|boolean}\n\t */\n\t\n\t }, {\n\t key: \"closestCallback\",\n\t value: function closestCallback(el, callback) {\n\t var element = el;\n\t while (element !== null) {\n\t if (callback(element)) {\n\t return element;\n\t }\n\t element = element.parentNode;\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * Walks the tree until func returns true for given argument\n\t * @param target\n\t * @param func\n\t * @returns {boolean|HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"parentsUntil\",\n\t value: function parentsUntil(target, func) {\n\t if (!target) {\n\t return false;\n\t }\n\t var now = target;\n\t while (!func(now) && now !== null) {\n\t now = now.parentNode;\n\t }\n\t\n\t return now;\n\t }\n\t\n\t /**\n\t * Generates a unique id\n\t * @return {String}\n\t */\n\t\n\t }, {\n\t key: \"guid\",\n\t value: function guid() {\n\t function s4() {\n\t return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n\t }\n\t\n\t return s4() + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + (s4() + s4() + s4());\n\t }\n\t\n\t /**\n\t * Detects scrollbar width\n\t * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n\t * @returns {number}\n\t */\n\t\n\t }, {\n\t key: \"getScrollBarWidth\",\n\t value: function getScrollBarWidth() {\n\t var doc = global.document;\n\t var inner = doc.createElement('p');\n\t\n\t inner.style.width = \"100%\";\n\t inner.style.height = \"200px\";\n\t\n\t var outer = doc.createElement('div');\n\t outer.style.position = \"absolute\";\n\t outer.style.top = \"0px\";\n\t outer.style.left = \"0px\";\n\t outer.style.visibility = \"hidden\";\n\t outer.style.width = \"200px\";\n\t outer.style.height = \"150px\";\n\t outer.style.overflow = \"hidden\";\n\t outer.appendChild(inner);\n\t\n\t doc.body.appendChild(outer);\n\t var w1 = inner.offsetWidth;\n\t outer.style.overflow = 'scroll';\n\t var w2 = inner.offsetWidth;\n\t if (w1 === w2) {\n\t w2 = outer.clientWidth;\n\t }\n\t doc.body.removeChild(outer);\n\t\n\t return w1 - w2;\n\t }\n\t\n\t /**\n\t * Run an event once\n\t * @param {String} ev\n\t * @param {HTMLElement|HTMLDocument} target\n\t * @param {Function} func\n\t * @param {boolean} [capture]\n\t * @return Function created listener\n\t */\n\t\n\t }, {\n\t key: \"addEventOnce\",\n\t value: function addEventOnce(ev, target, func, capture) {\n\t var thisFunction = function thisFunction(event) {\n\t func(event, func);\n\t target.removeEventListener(ev, thisFunction, capture);\n\t };\n\t target.addEventListener(ev, thisFunction, capture);\n\t return thisFunction;\n\t }\n\t\n\t /**\n\t * Checks if an element is visible\n\t * @param {HTMLElement} element\n\t * @returns bool\n\t */\n\t\n\t }, {\n\t key: \"isVisible\",\n\t value: function isVisible(element) {\n\t return element.offsetWidth > 0 && element.offsetHeight > 0;\n\t }\n\t\n\t /**\n\t * Creates a camelCaseRepresentation of a dashed string\n\t * @param {String} str\n\t * @returns String\n\t */\n\t\n\t }, {\n\t key: \"dashToCamelCase\",\n\t value: function dashToCamelCase(str) {\n\t return str.replace(/-([a-z])/g, function (g) {\n\t return g[1].toUpperCase();\n\t });\n\t }\n\t\n\t /**\n\t * Creates a copy of `input`\n\t * @param {*} input\n\t * @return *\n\t */\n\t\n\t }, {\n\t key: \"copy\",\n\t value: function copy(input) {\n\t return JSON.parse(JSON.stringify(input));\n\t }\n\t\n\t /**\n\t * Reads options from element (data attributes) and applies to base\n\t * @param {HTMLElement} element\n\t * @param {Object} base\n\t * @return {Object}\n\t */\n\t\n\t }, {\n\t key: \"applyOptionsFromElement\",\n\t value: function applyOptionsFromElement(element, base) {\n\t if (!element) {\n\t return base;\n\t }\n\t var attrs = element.attributes;\n\t for (var i = 0; i < attrs.length; i++) {\n\t var attr = attrs[i];\n\t if (attr) {\n\t var s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n\t var val = attr.nodeValue;\n\t if (base.hasOwnProperty(s)) {\n\t // skip functions\n\t if (typeof base[s] === 'function') {\n\t continue;\n\t }\n\t if (typeof base[s] === 'boolean') {\n\t base[s] = parseInt(val || 1, 10) === 1;\n\t } else {\n\t base[s] = val;\n\t }\n\t }\n\t }\n\t }\n\t return base;\n\t }\n\t\n\t /**\n\t * Will position an element directly at given target\n\t * Is aware of a given collision container to detect edges\n\t * Will put elementToPosition either to left, center or right edge (prefer right)\n\t * and either to bottom or top (prefers bottom)\n\t *\n\t * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n\t *\n\t * @param {HTMLElement|ClientRect} target the target container to align to\n\t * @param {HTMLElement} elementToPosition the element to position\n\t * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n\t * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n\t * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: \"setupPositionNearby\",\n\t value: function setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n\t // determine relative offsets\n\t var amountTop = 0;\n\t var amountLeft = 0;\n\t Util.parentsUntil(target.parentNode, function (el) {\n\t if (!(el instanceof HTMLElement)) {\n\t return false;\n\t }\n\t var style = window.getComputedStyle(el);\n\t if (Util.isPartOfNode(elementToPosition, el)) {\n\t if (style && style.position === 'relative') {\n\t amountTop += el.offsetTop || 0;\n\t amountLeft += el.offsetLeft || 0;\n\t }\n\t return false;\n\t }\n\t return true;\n\t });\n\t\n\t var targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n\t var elementRect = elementToPosition.getBoundingClientRect();\n\t var colRect = collisionContainer.getBoundingClientRect();\n\t var targetTop = targetPosition.top - amountTop;\n\t var targetRight = targetPosition.right;\n\t var isCollisionTop = targetTop - elementRect.height <= 0;\n\t var isCollisionBottom = window.innerHeight < targetTop + amountTop + targetPosition.height + elementRect.height;\n\t var isCollisionLeft = targetRight < elementRect.width;\n\t var targetLeft = targetPosition.left;\n\t var isCollisionRight = targetLeft + elementRect.width > colRect.width;\n\t var classList = elementToPosition.classList;\n\t\n\t classList.remove(COL_RIGHT_CLASS);\n\t classList.remove(COL_LEFT_CLASS);\n\t classList.remove(COL_BOTTOM_CLASS);\n\t\n\t var calcTop = void 0;\n\t var calcLeft = void 0;\n\t if (isCollisionLeft && !isCollisionRight) {\n\t // put element to left if collision with left\n\t calcLeft = targetPosition.left - colRect.left - amountLeft + \"px\";\n\t classList.add(COL_LEFT_CLASS);\n\t } else {\n\t // maybe center if no collision with either side\n\t var rightPosition = targetRight - elementRect.width - colRect.left - amountLeft + \"px\";\n\t var leftCentered = (targetLeft + targetPosition.width / 2 - elementRect.width / 2 || 0) - colRect.left;\n\t var collisionCentered = leftCentered + elementRect.width > colRect.width;\n\t if (centerHorizontal && !collisionCentered) {\n\t calcLeft = leftCentered + \"px\";\n\t } else {\n\t classList.add(COL_RIGHT_CLASS);\n\t calcLeft = rightPosition;\n\t }\n\t }\n\t\n\t if (isCollisionBottom || positionTop && !isCollisionTop) {\n\t // Put Element on top if collision\n\t calcTop = targetTop - elementRect.height - colRect.top + \"px\";\n\t classList.add(COL_BOTTOM_CLASS);\n\t } else {\n\t calcTop = targetTop + targetPosition.height - colRect.top + \"px\";\n\t }\n\t\n\t elementToPosition.style.cssText = \"top:\" + calcTop + \";left:\" + calcLeft + \";\";\n\t\n\t return elementToPosition;\n\t }\n\t\n\t /**\n\t * Brings a given element into viewport\n\t * @param {HTMLElement} el\n\t * @param {int|function}[optionalOffset]\n\t */\n\t\n\t }, {\n\t key: \"scrollToElement\",\n\t value: function scrollToElement(el, optionalOffset) {\n\t el.scrollIntoView();\n\t var thisOffset = optionalOffset;\n\t // optionally use a additional scrollDif\n\t if (thisOffset) {\n\t if (typeof thisOffset === 'function') {\n\t thisOffset = optionalOffset();\n\t }\n\t if (thisOffset > 0) {\n\t var scrolledY = window.pageYOffset;\n\t if (scrolledY) {\n\t window.scroll(0, scrolledY - thisOffset);\n\t }\n\t }\n\t }\n\t }\n\t }]);\n\t\n\t return Util;\n\t}();\n\t\n\texports.default = Util;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t// we attach global settings to global once because settings might be shared a lot of times trough the application\n\t// Maybe find a better way to handle that scenario\n\tif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n\t (function () {\n\t global.FLEXCSS_GLOBAL_SETTINGS = {\n\t // defined breakpoint for small devices < n\n\t smallBreakpoint: 768,\n\t // nodes that should be updated when no scrollbar is expected\n\t scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n\t // additional Delay until darkener is fully hidden\n\t darkenerFadeDelay: 100,\n\t // class that is added if canvas has been toggled\n\t canvasToggledClass: 'toggled-canvas'\n\t };\n\t\n\t global.FLEXCSS_CONST_IS_IOS = null;\n\t\n\t global.FLEXCSS_CONST_IS_TOUCH = null;\n\t\n\t global.FLEXCSS_CONST_IS_IE = null;\n\t\n\t global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\t\n\t global.FLEXCSS_IS_SMALL_SCREEN = false;\n\t\n\t var init = function init() {\n\t // Measure scrollbar width\n\t global.FLEXCSS_CONST_SCROLLBAR_WIDTH = _Util2.default.getScrollBarWidth();\n\t // detect right transition end event\n\t global.FLEXCSS_CONST_TRANSITION_EVENT = _Util2.default.whichTransitionEndEvent();\n\t };\n\t\n\t if (global.document.readyState !== 'loading') {\n\t init();\n\t } else {\n\t // it's possible that global.document.body is not available if the document is not\n\t // loaded completely\n\t document.addEventListener('DOMContentLoaded', function () {\n\t init();\n\t });\n\t }\n\t })();\n\t}\n\t\n\t/**\n\t * Utility class that setups global settings\n\t */\n\t\n\tvar Settings = function () {\n\t function Settings() {\n\t _classCallCheck(this, Settings);\n\t }\n\t\n\t _createClass(Settings, null, [{\n\t key: 'setup',\n\t\n\t\n\t /**\n\t * Setup global settings, overwrite default values\n\t * @param {Object} settings\n\t */\n\t value: function setup(settings) {\n\t Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n\t }\n\t\n\t /**\n\t * Access to global settings\n\t * @returns {Object}\n\t */\n\t\n\t }, {\n\t key: 'get',\n\t value: function get() {\n\t return global.FLEXCSS_GLOBAL_SETTINGS;\n\t }\n\t\n\t /**\n\t * Detects a IOS Device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isIosDevice',\n\t value: function isIosDevice() {\n\t if (!global.FLEXCSS_CONST_IS_IOS) {\n\t global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n\t }\n\t\n\t return global.FLEXCSS_CONST_IS_IOS;\n\t }\n\t\n\t /**\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isSmallScreen',\n\t value: function isSmallScreen() {\n\t return window.innerWidth < Settings.get().smallBreakpoint;\n\t }\n\t\n\t /**\n\t * Detects a touch device, caches subsequent calls\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isTouchDevice',\n\t value: function isTouchDevice() {\n\t if (!global.FLEXCSS_CONST_IS_TOUCH) {\n\t global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!global.navigator.msMaxTouchPoints;\n\t }\n\t return global.FLEXCSS_CONST_IS_TOUCH;\n\t }\n\t\n\t /**\n\t * Checks if current browser is Internet Explorer\n\t * @returns {boolean|*}\n\t */\n\t\n\t }, {\n\t key: 'isIE',\n\t value: function isIE() {\n\t if (!global.FLEXCSS_CONST_IS_IE) {\n\t global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n\t }\n\t return global.FLEXCSS_CONST_IS_IE;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTransitionEvent',\n\t value: function getTransitionEvent() {\n\t return global.FLEXCSS_CONST_TRANSITION_EVENT;\n\t }\n\t\n\t /**\n\t * @returns {int}\n\t */\n\t\n\t }, {\n\t key: 'getScrollbarWidth',\n\t value: function getScrollbarWidth() {\n\t return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n\t }\n\t\n\t /**\n\t * @returns {String}\n\t */\n\t\n\t }, {\n\t key: 'getTabEvent',\n\t value: function getTabEvent() {\n\t return global.FLEXCSS_CONST_TAB_EVENT;\n\t }\n\t }]);\n\t\n\t return Settings;\n\t}();\n\t\n\texports.default = Settings;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/* global CustomEvent */\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t// polyfill for custom events to make thinks work in IE\n\t// The needed polyfill is so small that I embedded it here\n\t(function poly() {\n\t if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n\t var _CustomEvent = function CustomEvent(event, params) {\n\t var thisParams = params || {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: undefined\n\t };\n\t var evt = document.createEvent(\"CustomEvent\");\n\t evt.initCustomEvent(event, thisParams.bubbles, thisParams.cancelable, thisParams.detail);\n\t return evt;\n\t };\n\t _CustomEvent.prototype = global.Event.prototype;\n\t global.CustomEvent = _CustomEvent;\n\t }\n\t})();\n\t/**\n\t * Simpler Event dispatching\n\t */\n\t\n\tvar EventHandler = function () {\n\t\n\t /**\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t */\n\t\n\t function EventHandler(target, name) {\n\t _classCallCheck(this, EventHandler);\n\t\n\t this.target = target;\n\t this.defaultOptions = {\n\t bubbles: true,\n\t cancelable: true\n\t };\n\t\n\t this.name = name;\n\t }\n\t\n\t /**\n\t * Set more options\n\t * @param {Object} options\n\t * @returns {EventHandler}\n\t */\n\t\n\t\n\t _createClass(EventHandler, [{\n\t key: \"withOptions\",\n\t value: function withOptions(options) {\n\t Object.assign(this.defaultOptions, options || {});\n\t return this;\n\t }\n\t\n\t /**\n\t * Call with the originalEvent\n\t * @param {Event} e\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withOriginal\",\n\t value: function withOriginal(e) {\n\t return this.withDetail({\n\t originalEvent: e\n\t });\n\t }\n\t\n\t /**\n\t * Extends the detail part of the event\n\t * @param {Object} o\n\t * @returns {EventHandler}\n\t */\n\t\n\t }, {\n\t key: \"withDetail\",\n\t value: function withDetail(o) {\n\t if (!this.defaultOptions.detail) {\n\t this.defaultOptions.detail = {};\n\t }\n\t Object.assign(this.defaultOptions.detail, o);\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"fire\",\n\t value: function fire() {\n\t var e = new CustomEvent(this.name, this.defaultOptions);\n\t if (this.target) {\n\t this.target.dispatchEvent(e);\n\t }\n\t return e;\n\t }\n\t }]);\n\t\n\t return EventHandler;\n\t}();\n\t\n\tvar Event = function () {\n\t function Event() {\n\t _classCallCheck(this, Event);\n\t }\n\t\n\t _createClass(Event, null, [{\n\t key: \"dispatch\",\n\t\n\t /**\n\t * Prepares to dispatch a custom event (without firing)\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @returns {EventHandler}\n\t */\n\t value: function dispatch(target, name) {\n\t return new EventHandler(target, name);\n\t }\n\t\n\t /**\n\t * Dispatches a custom event and fires it directly\n\t * @param {HTMLElement} target\n\t * @param {String} name\n\t * @param {Object} [options]\n\t * @returns {CustomEvent}\n\t */\n\t\n\t }, {\n\t key: \"dispatchAndFire\",\n\t value: function dispatchAndFire(target, name, options) {\n\t return new EventHandler(target, name).withOptions(options).fire();\n\t }\n\t }]);\n\t\n\t return Event;\n\t}();\n\t\n\texports.default = Event;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Widget\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/**\n\t * A Widget provides async content on a specific target (e.g. a modal link)\n\t */\n\t\n\tvar Widget = function () {\n\t\n\t /**\n\t * Creates a new Widget\n\t * @param [element], optional define the content of widget\n\t */\n\t\n\t function Widget(element) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, Widget);\n\t\n\t /**\n\t *\n\t * @type {Promise}\n\t */\n\t this.asyncContent = null;\n\t\n\t /**\n\t * @type {boolean}\n\t */\n\t this._isWidget = true;\n\t\n\t if (element) {\n\t /**\n\t * @type {HTMLElement}\n\t */\n\t this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n\t if (this.element) {\n\t this.element.hfWidgetInstance = this;\n\t this.setAsync(function () {\n\t return new Promise(function (s) {\n\t s(_this.element);\n\t });\n\t });\n\t } else {\n\t throw new Error('Could not found element with ID: ' + element);\n\t }\n\t }\n\t /**\n\t * The final resulted content that a widget did create (e.g. a modal container)\n\t * @type {HTMLElement}\n\t */\n\t this.finalContent = null;\n\t }\n\t\n\t /**\n\t *\n\t * @returns {Promise}\n\t */\n\t\n\t\n\t _createClass(Widget, [{\n\t key: 'getAsync',\n\t value: function getAsync() {\n\t return this.asyncContent();\n\t }\n\t\n\t /**\n\t * @param {Function.} async\n\t * @returns {Widget}\n\t */\n\t\n\t }, {\n\t key: 'setAsync',\n\t value: function setAsync(async) {\n\t this.asyncContent = async;\n\t return this;\n\t }\n\t\n\t /**\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getFinalContent',\n\t value: function getFinalContent() {\n\t return this.finalContent;\n\t }\n\t\n\t /**\n\t * @param {HTMLElement} element\n\t * @returns {Widget}\n\t */\n\t\n\t }, {\n\t key: 'setElement',\n\t value: function setElement(element) {\n\t this.element = element;\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroys the generated content of this widget\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t if (this.finalContent && this.finalContent.parentNode) {\n\t this.finalContent.parentNode.removeChild(this.finalContent);\n\t return true;\n\t }\n\t\n\t delete this.element;\n\t delete this.asyncContent;\n\t delete this.finalContent;\n\t\n\t return false;\n\t }\n\t\n\t /**\n\t * Will find a widget on an Element\n\t * @param {HTMLElement} element\n\t * @returns {Widget|undefined}\n\t */\n\t\n\t }], [{\n\t key: 'findWidget',\n\t value: function findWidget(element) {\n\t return element ? element.hfWidgetInstance : undefined;\n\t }\n\t\n\t /**\n\t * Checks if a given object is an instance\n\t * @param {Object} self\n\t * @returns {boolean}\n\t */\n\t\n\t }, {\n\t key: 'isWidget',\n\t value: function isWidget(self) {\n\t return self instanceof Widget || (typeof self === 'undefined' ? 'undefined' : _typeof(self)) === 'object' && self.hasOwnProperty('_isWidget');\n\t }\n\t }]);\n\t\n\t return Widget;\n\t}();\n\t\n\texports.default = Widget;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 5 */,\n/* 6 */,\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.ALLOW_ELEMENT_OVERFLOW_TOUCH = exports.EVENT_AFTER_FIXED_REMOVE = exports.EVENT_BEFORE_FIXED_ADD = undefined;\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _debounce = __webpack_require__(10);\n\t\n\tvar _debounce2 = _interopRequireDefault(_debounce);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar CLS_FIXED_WINDOW = 'fixed-window-open';\n\t\n\tvar EVENT_BEFORE_FIXED_ADD = exports.EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\n\tvar EVENT_AFTER_FIXED_REMOVE = exports.EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\t\n\t/**\n\t * @type {string}\n\t */\n\tvar ALLOW_ELEMENT_OVERFLOW_TOUCH = exports.ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\t\n\t/**\n\t * @type {FixedWindow}\n\t */\n\tvar fixedWindowInstance = void 0;\n\t\n\tvar FixedWindow = function () {\n\t function FixedWindow() {\n\t _classCallCheck(this, FixedWindow);\n\t\n\t this.widgets = [];\n\t this.currentScrollTop = 0;\n\t this.fixedScreenConstraints = [];\n\t this.windowWidth = 0;\n\t this.isFixedWindowActive = false;\n\t this.touchListener = null;\n\t }\n\t\n\t /**\n\t * Adds a constraint to detect if the window needs to be changed when the screensize changes\n\t *\n\t * @param {Function} widget\n\t * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n\t */\n\t\n\t\n\t _createClass(FixedWindow, [{\n\t key: 'addScreenConstraint',\n\t value: function addScreenConstraint(widget, fixedBreakpointFn) {\n\t this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n\t }\n\t\n\t /**\n\t * @returns {null|DestroyableWidget}\n\t */\n\t\n\t }, {\n\t key: 'getCurrentWidget',\n\t value: function getCurrentWidget() {\n\t return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_checkFixedNeeded',\n\t value: function _checkFixedNeeded() {\n\t var _this = this;\n\t\n\t if (this.widgets.length === 0) {\n\t return;\n\t }\n\t var widgets = new Set(this.widgets);\n\t var widgetsThatRequireFixedWindow = Array.from(widgets).some(function (_ref) {\n\t var widget = _ref.widget;\n\t\n\t return _this.fixedScreenConstraints[widget] && _this.fixedScreenConstraints[widget](_this.windowWidth);\n\t });\n\t if (!widgetsThatRequireFixedWindow) {\n\t this._removeFixedContainer();\n\t } else {\n\t this._addFixedContainer();\n\t }\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_addFixedContainer',\n\t value: function _addFixedContainer() {\n\t var _this2 = this;\n\t\n\t if (this.isFixedWindowActive) {\n\t return;\n\t }\n\t _Event2.default.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n\t detail: this.getCurrentWidget()\n\t });\n\t // this causes layout and should be optimized\n\t // At lest we write in a batch later\n\t _Settings2.default.get().scrollbarUpdateNodes.map(function (n) {\n\t var foundProperty = 'paddingRight';\n\t var direction = 1;\n\t var node = n;\n\t if (n instanceof Array) {\n\t var _n = _slicedToArray(n, 3);\n\t\n\t var whatNode = _n[0];\n\t var property = _n[1];\n\t var d = _n[2];\n\t\n\t foundProperty = property;\n\t node = whatNode;\n\t direction = d || 1;\n\t }\n\t return {\n\t node: node,\n\t property: foundProperty,\n\t value: parseInt(global.getComputedStyle(node)[foundProperty], 10) + (!node.__fixedWindowMod__ ? _Settings2.default.getScrollbarWidth() * direction : 0) + 'px'\n\t };\n\t }).forEach(function (d) {\n\t d.node.__fixedWindowMod__ = true;\n\t d.node.style[d.property] = d.value;\n\t });\n\t\n\t this.touchListener = function (e) {\n\t e.preventDefault();\n\t };\n\t\n\t var shouldNotMoveUp = false;\n\t var shouldNotMoveDown = false;\n\t var neverScroll = false;\n\t var lastClientY = 0;\n\t this.touchStartListener = function (e) {\n\t var _getCurrentWidget = _this2.getCurrentWidget();\n\t\n\t var element = _getCurrentWidget.element;\n\t\n\t var closestOverflow = _Util2.default.closestCallback(e.target, function (el) {\n\t return el instanceof HTMLTextAreaElement || el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH);\n\t });\n\t if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n\t element = closestOverflow;\n\t }\n\t if (_Util2.default.isPartOfNode(e.target, element)) {\n\t neverScroll = element.scrollHeight === element.offsetHeight;\n\t lastClientY = e.touches[0].clientY;\n\t // never allow scrolling when there is nothing to scroll\n\t if (neverScroll) {\n\t return false;\n\t }\n\t if (element.scrollTop === 0) {\n\t element.scrollTop = 1;\n\t shouldNotMoveUp = true;\n\t } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n\t shouldNotMoveDown = true;\n\t element.scrollTop -= 1;\n\t }\n\t }\n\t };\n\t\n\t global.addEventListener('touchmove', this.touchListener);\n\t global.document.body.addEventListener('touchstart', this.touchStartListener);\n\t\n\t this.touchMoveListener = function (e) {\n\t var _getCurrentWidget2 = _this2.getCurrentWidget();\n\t\n\t var element = _getCurrentWidget2.element;\n\t\n\t if (_Util2.default.isPartOfNode(e.target, element)) {\n\t var clientY = e.touches[0].clientY;\n\t\n\t var isScrollingDown = lastClientY - clientY > 0;\n\t lastClientY = clientY;\n\t\n\t if (neverScroll) {\n\t neverScroll = false;\n\t return false;\n\t }\n\t\n\t if (!shouldNotMoveDown && isScrollingDown || shouldNotMoveDown && !isScrollingDown || !shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown || shouldNotMoveDown && shouldNotMoveUp && isScrollingDown) {\n\t e.stopImmediatePropagation();\n\t }\n\t\n\t shouldNotMoveUp = false;\n\t shouldNotMoveDown = false;\n\t }\n\t };\n\t global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\t\n\t global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n\t this.isFixedWindowActive = true;\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_removeFixedContainer',\n\t value: function _removeFixedContainer() {\n\t if (this.isFixedWindowActive) {\n\t // cleanup event listeners\n\t global.removeEventListener('touchmove', this.touchListener);\n\t global.document.body.removeEventListener('touchstart', this.touchStartListener);\n\t global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\t\n\t // reset scrollbar nodes\n\t _Settings2.default.get().scrollbarUpdateNodes.forEach(function (node) {\n\t if (node instanceof Array) {\n\t var _node = _slicedToArray(node, 2);\n\t\n\t var whatNode = _node[0];\n\t var property = _node[1];\n\t\n\t delete whatNode.__fixedWindowMod__;\n\t whatNode.style[property] = '';\n\t } else {\n\t delete node.__fixedWindowMod__;\n\t node.style.paddingRight = '';\n\t }\n\t });\n\t global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n\t _Event2.default.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n\t this.isFixedWindowActive = false;\n\t }\n\t }\n\t\n\t /**\n\t * Will close a window when no widgets are opened that need one\n\t */\n\t\n\t }, {\n\t key: 'resizeListener',\n\t value: function resizeListener() {\n\t this.windowWidth = global.innerWidth;\n\t this._checkFixedNeeded();\n\t }\n\t\n\t /**\n\t * @returns {FixedWindow}\n\t */\n\t\n\t }, {\n\t key: 'close',\n\t\n\t\n\t /**\n\t * Request a close of the fixed window\n\t */\n\t value: function close() {\n\t this.widgets.pop();\n\t if (this.widgets.length === 0) {\n\t this._removeFixedContainer();\n\t }\n\t }\n\t\n\t /**\n\t * Request to open a fixed windows\n\t * @param {Object|DestroyableWidget} instance\n\t * @param {HTMLElement} element\n\t */\n\t\n\t }, {\n\t key: 'open',\n\t value: function open(instance, element) {\n\t var fixed = false;\n\t if ((typeof instance === 'undefined' ? 'undefined' : _typeof(instance)) === 'object') {\n\t var widget = instance.constructor;\n\t var fixedWidget = this.fixedScreenConstraints[instance.constructor];\n\t if (widget && fixedWidget) {\n\t fixed = fixedWidget(this.windowWidth);\n\t }\n\t var length = this.widgets.length;\n\t this.widgets.push({\n\t widget: widget,\n\t element: element\n\t });\n\t // open a new window if there is no window active\n\t if (length === 0) {\n\t if (fixed) {\n\t this._addFixedContainer();\n\t }\n\t }\n\t }\n\t }\n\t }], [{\n\t key: 'getInstance',\n\t value: function getInstance() {\n\t if (!fixedWindowInstance) {\n\t fixedWindowInstance = new FixedWindow();\n\t fixedWindowInstance.windowWidth = global.innerWidth;\n\t var eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n\t global.addEventListener('resize', (0, _debounce2.default)(eventHandler, 500));\n\t global.addEventListener('orientationchange', eventHandler);\n\t }\n\t return fixedWindowInstance;\n\t }\n\t }]);\n\t\n\t return FixedWindow;\n\t}();\n\n\texports.default = FixedWindow;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.EVENT_MODAL_ASYNC_TARGET_LOADED = exports.EVENT_MODAL_INIT = exports.EVENT_MODAL_OPENED = exports.EVENT_MODAL_BEFORE_CLOSED = exports.EVENT_MODAL_CLOSED = undefined;\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n\t * The MIT License (MIT)\n\t *\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t */\n\t\n\t/*!\n\t * FlexCss.Modal\n\t * Licensed under the MIT License (MIT)\n\t * Copyright (c) 2015 David Heidrich, BowlingX \n\t */\n\t\n\t/* global KeyboardEvent */\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Event = __webpack_require__(3);\n\t\n\tvar _Event2 = _interopRequireDefault(_Event);\n\t\n\tvar _Util = __webpack_require__(1);\n\t\n\tvar _Util2 = _interopRequireDefault(_Util);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tvar _FixedWindow = __webpack_require__(7);\n\t\n\tvar _FixedWindow2 = _interopRequireDefault(_FixedWindow);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar KEY_ESC = 27;\n\t/* Attribute Names */\n\tvar ATTR_CREATE_NEW = 'data-new-instance';\n\tvar ATTR_CLOSE = 'data-close-modal';\n\tvar ATTR_NAME = 'data-modal';\n\t\n\t/* Class names */\n\tvar CLS_CONTAINER_CURRENT = 'front';\n\tvar CLS_OPEN = 'open';\n\tvar CLS_CURRENT = 'current';\n\tvar CLS_PART_OF_STACK = 'part-of-stack';\n\tvar CLS_MODAL_CONTAINER = 'modal-container';\n\tvar CLS_ANIM_END = 'modal-anim-end';\n\tvar CLS_LOADER_CONTAINER = 'loader-container';\n\tvar CLS_LOADER = 'loader';\n\tvar CLS_BACKDROP = 'backdrop';\n\t\n\t/* Events */\n\t\n\t/**\n\t * Event triggered when modal is closed\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_CLOSED = exports.EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n\t/**\n\t * Event triggered before a modal is closed, cancelable\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_BEFORE_CLOSED = exports.EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n\t/**\n\t * Event triggered when a modal is opened\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_OPENED = exports.EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\t\n\t/**\n\t * Event triggered when modal is initilized, called on target\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_INIT = exports.EVENT_MODAL_INIT = 'flexcss.modal.init';\n\t\n\t/**\n\t * Triggered when the content of an async modal on a target is loaded, called on target\n\t * @type {string}\n\t */\n\tvar EVENT_MODAL_ASYNC_TARGET_LOADED = exports.EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\t\n\t/**\n\t * A Modal Implementation\n\t */\n\t\n\tvar Modal = function () {\n\t function Modal(DelegateContainer, options) {\n\t _classCallCheck(this, Modal);\n\t\n\t var doc = global.document;\n\t var container = DelegateContainer instanceof HTMLElement ? DelegateContainer : doc.getElementById(DelegateContainer);\n\t\n\t // Instance vars:\n\t if (!container) {\n\t throw new Error('Could not found container element by given ID/Element: ' + DelegateContainer);\n\t }\n\t\n\t this.currentOpen = null;\n\t\n\t this.loading = false;\n\t\n\t this.container = container;\n\t\n\t /**\n\t * Default Options\n\t */\n\t this.options = {\n\t classNames: 'modal',\n\t closeOnEscape: true,\n\t closeOnBackgroundClick: true,\n\t destroyOnFinish: false,\n\t fixedContainer: true,\n\t containerClassNames: ''\n\t };\n\t\n\t Object.assign(this.options, options);\n\t\n\t // Container where events are delegated\n\t this.eventContainer = null;\n\t this.eventFunction = null;\n\t\n\t this.dataMainPageContainer = global.document.body;\n\t\n\t this.currentScrollTop = 0;\n\t\n\t this.modalContainer = null;\n\t\n\t // Destroy full modal instance when no dialogs are bind to?\n\t // Otherwise container is recycled\n\t this.destroyOnFinish = this.options.destroyOnFinish;\n\t }\n\t\n\t /**\n\t * Removes this modal from global stack\n\t * Will handle fixing main html element too\n\t * @private\n\t * @param n\n\t */\n\t\n\t\n\t _createClass(Modal, [{\n\t key: '_removeModalFromStack',\n\t value: function _removeModalFromStack(n) {\n\t var t = Modal._modalInstances.indexOf(n);\n\t if (t > -1) {\n\t Modal._modalInstances.splice(t, 1);\n\t _FixedWindow2.default.getInstance().close();\n\t }\n\t }\n\t\n\t /**\n\t * Modal container that contains all `stacked` modals for this instance\n\t * @returns {HTMLElement}\n\t */\n\t\n\t }, {\n\t key: 'getModalContainer',\n\t value: function getModalContainer() {\n\t return this.modalContainer;\n\t }\n\t\n\t /**\n\t * Closes the current open modal of this stack\n\t * @params [e], optional event\n\t * @returns {*}\n\t */\n\t\n\t }, {\n\t key: 'close',\n\t value: function close(e) {\n\t var self = this;\n\t\n\t var options = self.currentOpen ? _Util2.default.applyOptionsFromElement(self.currentOpen, _Util2.default.copy(self.options)) : self.options;\n\t\n\t // close only on keyboard if instance should\n\t if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n\t return false;\n\t }\n\t\n\t // close only on background if instance should\n\t if (!options.closeOnBackgroundClick && e && e.type === _Settings2.default.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n\t return false;\n\t }\n\t\n\t // if an instance is currently loading, prevent from closing\n\t if (self.loading) {\n\t return false;\n\t }\n\t\n\t if (e) {\n\t e.preventDefault();\n\t }\n\t\n\t if (self.currentOpen) {\n\t // dispatch beforeClose event, if prevented prevent modal from closing\n\t var ev = _Event2.default.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n\t if (ev.defaultPrevented) {\n\t return false;\n\t }\n\t\n\t this._finishState(self.currentOpen);\n\t // if there is an previous modal\n\t if (self.currentOpen.prevModal) {\n\t // switch to the next modal\n\t return self.switchModals(self.currentOpen.prevModal, self.currentOpen.prevModal.prevModal || null);\n\t }\n\t\n\t // finally trigger closed event\n\t _Event2.default.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n\t }\n\t self._removeModalFromStack(self.currentOpen);\n\t\n\t // Full stack closed:\n\t self.currentOpen = null;\n\t if (self.modalContainer) {\n\t // setup next open\n\t var lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n\t var classList = self.modalContainer.classList;\n\t classList.remove(CLS_CONTAINER_CURRENT);\n\t classList.remove(CLS_BACKDROP);\n\t classList.remove(CLS_OPEN);\n\t // Remove all current classes from child-nodes\n\t for (var i = 0; i < self.modalContainer.childNodes.length; i++) {\n\t var node = self.modalContainer.childNodes[i];\n\t var cl = node.classList;\n\t // remove applied styles\n\t self._finishState(node);\n\t cl.remove(CLS_CURRENT);\n\t cl.remove(CLS_PART_OF_STACK);\n\t }\n\t if (lastContainer) {\n\t lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n\t }\n\t }\n\t\n\t if (self.destroyOnFinish) {\n\t self.destroy();\n\t }\n\t return self;\n\t }\n\t\n\t /**\n\t * Resets a target when newly initilizes\n\t * @param target\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_finishState',\n\t value: function _finishState(target) {\n\t target.classList.remove(CLS_ANIM_END);\n\t }\n\t\n\t /**\n\t * Handler called when a Modal has finished an animation\n\t * @param e\n\t * @param self\n\t * @private\n\t */\n\t\n\t }, {\n\t key: '_finishAnim',\n\t value: function _finishAnim(e, self) {\n\t e.target.classList.add(CLS_ANIM_END);\n\t e.target.removeEventListener(e.type, self, true);\n\t }\n\t\n\t /**\n\t * Brings the given modal to front\n\t * @param co\n\t * @param last\n\t */\n\t\n\t }, {\n\t key: 'switchModals',\n\t value: function switchModals(co, last) {\n\t co.prevModal = last;\n\t Modal._modalInstances.push(co);\n\t _FixedWindow2.default.getInstance().open(this, this.modalContainer);\n\t if (last) {\n\t this._finishState(last);\n\t _Util2.default.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n\t last.classList.add(CLS_PART_OF_STACK);\n\t }\n\t // set new currentOpen\n\t this.currentOpen = co;\n\t\n\t // bring current container to the front\n\t var instances = Modal._modalInstances;\n\t\n\t for (var m = 0; m < instances.length; m++) {\n\t instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n\t }\n\t this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n\t // remove animations if animations has been completed, fixes various bugs:\n\t // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n\t _Util2.default.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\t\n\t for (var i = 0; i < this.modalContainer.childNodes.length; i++) {\n\t var n = this.modalContainer.childNodes[i];\n\t var isCurrent = n.classList.contains(CLS_CURRENT);\n\t if (n === co) {\n\t co.classList.add(CLS_CURRENT);\n\t co.classList.remove(CLS_PART_OF_STACK);\n\t this._finishState(co);\n\t } else {\n\t n.classList.remove(CLS_CURRENT);\n\t if (isCurrent) {\n\t this._removeModalFromStack(n);\n\t _Event2.default.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n\t }\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Creates a Modal and opens it (later)\n\t * @param e\n\t * @returns {Promise|boolean}\n\t */\n\t\n\t }, {\n\t key: 'createWidget',\n\t value: function createWidget(e) {\n\t var _this = this;\n\t\n\t var self = this;\n\t if (this.loading) {\n\t return false;\n\t }\n\t\n\t // check if another modal has registered events on this dom path:\n\t if (e && e.target) {\n\t var foundInstance = _Util2.default.parentsUntil(e.target, function (node) {\n\t return node && node.flexModalInstance;\n\t });\n\t\n\t // if another instance has been found, abort\n\t if (foundInstance !== this.container) {\n\t return false;\n\t }\n\t }\n\t var targetContent = void 0;\n\t var future = void 0;\n\t var widget = void 0;\n\t var target = void 0;\n\t var hasTarget = true;\n\t var isHtmlElement = e instanceof HTMLElement;\n\t var isWidget = _Widget2.default.isWidget(e);\n\t if (isHtmlElement || isWidget) {\n\t if (isHtmlElement) {\n\t targetContent = e;\n\t } else {\n\t widget = e;\n\t targetContent = widget.element;\n\t }\n\t } else {\n\t target = e.target;\n\t if (!target) {\n\t throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n\t }\n\t hasTarget = target.hasAttribute(ATTR_NAME);\n\t targetContent = target.getAttribute(ATTR_NAME);\n\t widget = _Widget2.default.findWidget(target);\n\t if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n\t var _ret = function () {\n\t var newInstance = new Modal(_this.container).setDestroyOnFinish(true);\n\t e.newInstance = true;\n\t newInstance.fromEvent(e).then(function () {\n\t newInstance.registerEvents(newInstance.getModalContainer());\n\t });\n\t return {\n\t v: false\n\t };\n\t }();\n\t\n\t if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === \"object\") return _ret.v;\n\t }\n\t if (hasTarget) {\n\t e.stopImmediatePropagation();\n\t e.preventDefault();\n\t }\n\t }\n\t\n\t if (!hasTarget) {\n\t return false;\n\t }\n\t\n\t var modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\t\n\t // lazy create modal container\n\t if (!this.modalContainer) {\n\t this.modalContainer = global.document.createElement('div');\n\t this.modalContainer.className = CLS_MODAL_CONTAINER + ' ' + this.options.containerClassNames + ' ' + CLS_OPEN;\n\t var closeModalFunction = function closeModalFunction(ce) {\n\t if (_this.loading) {\n\t return false;\n\t }\n\t if (_Util2.default.isPartOfNode(ce.target, _this.currentOpen)) {\n\t if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n\t return false;\n\t }\n\t }\n\t _this.close(ce);\n\t };\n\t\n\t this.modalContainer.addEventListener(_Settings2.default.getTabEvent(), closeModalFunction, false);\n\t\n\t modalContainerClasses = this.modalContainer.classList;\n\t this.container.appendChild(this.modalContainer);\n\t } else {\n\t modalContainerClasses.add(CLS_OPEN);\n\t }\n\t\n\t var loader = void 0;\n\t var doc = global.document;\n\t var toggleLoader = function toggleLoader(show) {\n\t if (show) {\n\t loader = doc.createElement('div');\n\t loader.className = CLS_LOADER_CONTAINER;\n\t var loaderLoader = doc.createElement('div');\n\t loaderLoader.className = CLS_LOADER;\n\t loader.appendChild(loaderLoader);\n\t _this.modalContainer.appendChild(loader);\n\t } else {\n\t loader.parentNode.removeChild(loader);\n\t }\n\t };\n\t modalContainerClasses.add('loading');\n\t modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\t\n\t requestAnimationFrame(function () {\n\t requestAnimationFrame(function () {\n\t modalContainerClasses.add(CLS_BACKDROP);\n\t });\n\t });\n\t\n\t this.loading = true;\n\t toggleLoader(true);\n\t var async = widget ? widget.getAsync() : null;\n\t if (_Widget2.default.isWidget(widget) && async) {\n\t future = async.then(function (r) {\n\t var result = void 0;\n\t if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n\t result = r;\n\t } else {\n\t // Create container Element:\n\t var element = doc.createElement('div');\n\t element.className = self.options.classNames;\n\t element.innerHTML = r;\n\t element.id = _Util2.default.guid();\n\t result = element;\n\t }\n\t widget.finalContent = result;\n\t _Event2.default.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n\t return result;\n\t });\n\t } else {\n\t (function () {\n\t var el = targetContent instanceof HTMLElement || targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n\t if (el) {\n\t future = new Promise(function (resolve) {\n\t resolve(el);\n\t });\n\t } else {\n\t throw new Error('Could not found given modal element (content) with ID: ' + targetContent);\n\t }\n\t })();\n\t }\n\t\n\t _Event2.default.dispatchAndFire(target, EVENT_MODAL_INIT);\n\t\n\t return future.then(function (thisEl) {\n\t thisEl.hfWidgetInstance = _this;\n\t _this.modalContainer.appendChild(thisEl);\n\t modalContainerClasses.remove('loading');\n\t _this.loading = false;\n\t toggleLoader(false);\n\t _this.open(thisEl, true, e);\n\t return thisEl;\n\t });\n\t }\n\t\n\t /**\n\t * Open's an already rendered modal\n\t * @param {HTMLElement} modal\n\t * @param {Boolean} [internal], set to true to prevent container management\n\t * @param {Boolean} [maybeEvent], optional event-object that triggered open\n\t */\n\t\n\t }, {\n\t key: 'open',\n\t value: function open(modal, internal, maybeEvent) {\n\t if (!internal) {\n\t this.modalContainer.classList.add('open');\n\t }\n\t this.switchModals(modal, this.currentOpen);\n\t\n\t _Event2.default.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n\t }\n\t }, {\n\t key: 'registerEvents',\n\t value: function registerEvents(delegate) {\n\t var _this2 = this;\n\t\n\t var delegateContainer = delegate || this.container;\n\t // Modals should always be fixed\n\t _FixedWindow2.default.getInstance().addScreenConstraint(Modal, function () {\n\t return true;\n\t });\n\t // register modal instance so we can detect multiple registrars\n\t delegateContainer.flexModalInstance = this;\n\t this.eventFunction = function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t _this2.createWidget.apply(_this2, args);\n\t };\n\t delegateContainer.addEventListener(_Settings2.default.getTabEvent(), this.eventFunction, false);\n\t\n\t this.eventContainer = delegateContainer;\n\t return this;\n\t }\n\t\n\t /**\n\t * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n\t * @param {HTMLElement|Widget} widget instance or html element\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'fromWidget',\n\t value: function fromWidget(widget) {\n\t return this.createWidget(widget);\n\t }\n\t\n\t /**\n\t * Creates a Widget from event\n\t * @param e\n\t * @returns {Promise}\n\t */\n\t\n\t }, {\n\t key: 'fromEvent',\n\t value: function fromEvent(e) {\n\t return this.createWidget(e);\n\t }\n\t }, {\n\t key: 'setDestroyOnFinish',\n\t value: function setDestroyOnFinish(v) {\n\t this.destroyOnFinish = v;\n\t return this;\n\t }\n\t\n\t /**\n\t * Destroy this widget instance, cleans empty DOM nodes\n\t * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n\t */\n\t\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t var modalContainer = this.modalContainer;\n\t var isEmptyContainer = modalContainer.childNodes.length === 0;\n\t // Remove event listener on destroy, do not remove DOM node\n\t if (this.eventContainer) {\n\t this.eventContainer.removeEventListener(_Settings2.default.getTabEvent(), this.eventFunction, true);\n\t }\n\t\n\t if (isEmptyContainer) {\n\t if (modalContainer.parentNode) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t }\n\t }\n\t if (global.MutationObserver) {\n\t (function () {\n\t var observer = new MutationObserver(function (mutations) {\n\t mutations.forEach(function () {\n\t if (modalContainer.childNodes.length === 0) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t observer.disconnect();\n\t }\n\t });\n\t });\n\t observer.observe(modalContainer, {\n\t childList: true\n\t });\n\t })();\n\t } else {\n\t modalContainer.addEventListener('DOMNodeRemoved', function (e) {\n\t if (e.target !== modalContainer && modalContainer.childNodes.length - 1 === 0) {\n\t modalContainer.parentNode.removeChild(modalContainer);\n\t }\n\t });\n\t }\n\t }\n\t }]);\n\t\n\t return Modal;\n\t}();\n\t\n\t// Static variable that keeps track of all open modals\n\t\n\t\n\tModal._modalInstances = [];\n\t\n\t// Global keydown listener for modal\n\tglobal.addEventListener('keydown', function (e) {\n\t if (e.keyCode === KEY_ESC) {\n\t var lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n\t if (lastModal) {\n\t _Widget2.default.findWidget(lastModal).close(e);\n\t }\n\t }\n\t});\n\t\n\texports.default = Modal;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 9 */,\n/* 10 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (fn, ms) {\n\t return function () {\n\t clearTimeout(fn.timeout);\n\t fn.timeout = setTimeout(fn, ms);\n\t };\n\t};\n\n/***/ },\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */,\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _Modal = __webpack_require__(8);\n\t\n\tvar _Modal2 = _interopRequireDefault(_Modal);\n\t\n\tvar _Settings = __webpack_require__(2);\n\t\n\tvar _Settings2 = _interopRequireDefault(_Settings);\n\t\n\tvar _Widget = __webpack_require__(4);\n\t\n\tvar _Widget2 = _interopRequireDefault(_Widget);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t// default export as component object\n\texports.default = {\n\t Modal: _Modal2.default,\n\t Settings: _Settings2.default,\n\t Widget: _Widget2.default\n\t};\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** js/modal.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap a138c665fa30c31cdbad\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst PFX = [\"webkit\", \"moz\", \"MS\", \"o\", \"\"];\n\nconst COL_LEFT_CLASS = 'is-collision-left';\n\nconst COL_RIGHT_CLASS = 'is-collision-right';\n\nconst COL_BOTTOM_CLASS = 'is-collision-bottom';\n\n/**\n * Provides shared DOM-Utility functions\n */\nclass Util {\n\n /**\n * Will register the right animation event based on browser\n * @param element\n * @param type\n * @param callback\n */\n static prefixedAnimateEvent(element, type, callback) {\n const thisFunction = function thisFunction(e) {\n callback.apply(element, [e, thisFunction]);\n };\n\n for (let p = 0; p < PFX.length; p++) {\n let thisType = type;\n if (!PFX[p]) {\n thisType = type.toLowerCase();\n }\n const name = PFX[p] + thisType;\n element.addEventListener(name, thisFunction, true);\n }\n }\n\n /**\n * Get correct transitionend event\n * @returns {String}\n * @private\n */\n static whichTransitionEndEvent() {\n let t;\n const el = document.createElement('fake');\n\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n }\n\n /**\n * Check if target is part of parent node\n * @param target\n * @param parent\n * @returns {boolean}\n */\n static isPartOfNode(target, parent) {\n if (!target || !parent) {\n return false;\n }\n let now = target;\n while (now !== parent && now !== null) {\n if (now === parent) {\n break;\n }\n now = now.parentNode;\n }\n return now !== null;\n }\n\n /**\n * Finds the closest element including itself matching a callback\n * @param {Node} el\n * @param {Function} callback\n * @returns {Node|boolean}\n */\n static closestCallback(el, callback) {\n let element = el;\n while (element !== null) {\n if (callback(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n }\n\n /**\n * Walks the tree until func returns true for given argument\n * @param target\n * @param func\n * @returns {boolean|HTMLElement}\n */\n static parentsUntil(target, func) {\n if (!target) {\n return false;\n }\n let now = target;\n while (!func(now) && now !== null) {\n now = now.parentNode;\n }\n\n return now;\n }\n\n /**\n * Generates a unique id\n * @return {String}\n */\n static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;\n }\n\n /**\n * Detects scrollbar width\n * @see http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\n * @returns {number}\n */\n static getScrollBarWidth() {\n const doc = global.document;\n const inner = doc.createElement('p');\n\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n const outer = doc.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n doc.body.appendChild(outer);\n const w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n doc.body.removeChild(outer);\n\n return (w1 - w2);\n }\n\n\n /**\n * Run an event once\n * @param {String} ev\n * @param {HTMLElement|HTMLDocument} target\n * @param {Function} func\n * @param {boolean} [capture]\n * @return Function created listener\n */\n static addEventOnce(ev, target, func, capture) {\n const thisFunction = function thisFunction(event) {\n func(event, func);\n target.removeEventListener(ev, thisFunction, capture);\n };\n target.addEventListener(ev, thisFunction, capture);\n return thisFunction;\n }\n\n /**\n * Checks if an element is visible\n * @param {HTMLElement} element\n * @returns bool\n */\n static isVisible(element) {\n return element.offsetWidth > 0 && element.offsetHeight > 0;\n }\n\n /**\n * Creates a camelCaseRepresentation of a dashed string\n * @param {String} str\n * @returns String\n */\n static dashToCamelCase(str) {\n return str.replace(/-([a-z])/g, (g) => {\n return g[1].toUpperCase();\n });\n }\n\n /**\n * Creates a copy of `input`\n * @param {*} input\n * @return *\n */\n static copy(input) {\n return JSON.parse(JSON.stringify(input));\n }\n\n /**\n * Reads options from element (data attributes) and applies to base\n * @param {HTMLElement} element\n * @param {Object} base\n * @return {Object}\n */\n static applyOptionsFromElement(element, base) {\n if (!element) {\n return base;\n }\n const attrs = element.attributes;\n for (let i = 0; i < attrs.length; i++) {\n const attr = attrs[i];\n if (attr) {\n const s = Util.dashToCamelCase(attr.nodeName.replace('data-', ''));\n const val = attr.nodeValue;\n if (base.hasOwnProperty(s)) {\n // skip functions\n if (typeof base[s] === 'function') {\n continue;\n }\n if (typeof base[s] === 'boolean') {\n base[s] = parseInt(val || 1, 10) === 1;\n } else {\n base[s] = val;\n }\n }\n }\n }\n return base;\n }\n\n /**\n * Will position an element directly at given target\n * Is aware of a given collision container to detect edges\n * Will put elementToPosition either to left, center or right edge (prefer right)\n * and either to bottom or top (prefers bottom)\n *\n * You may overwrite preferred positioned with `centerHorizontal` and `positionTop`\n *\n * @param {HTMLElement|ClientRect} target the target container to align to\n * @param {HTMLElement} elementToPosition the element to position\n * @param {HTMLElement} collisionContainer the outer container to prevent collisions\n * @param {boolean} [centerHorizontal] set true to center element, otherwise it's put on the right border by default\n * @param {boolean} [positionTop] flip top, by default element is positioned to the bottom.\n * @returns {HTMLElement}\n */\n static setupPositionNearby(target, elementToPosition, collisionContainer, centerHorizontal, positionTop) {\n // determine relative offsets\n let amountTop = 0;\n let amountLeft = 0;\n Util.parentsUntil(target.parentNode, (el) => {\n if (!(el instanceof HTMLElement)) {\n return false;\n }\n const style = window.getComputedStyle(el);\n if (Util.isPartOfNode(elementToPosition, el)) {\n if (style && style.position === 'relative') {\n amountTop += el.offsetTop || 0;\n amountLeft += el.offsetLeft || 0;\n }\n return false;\n }\n return true;\n });\n\n const targetPosition = target instanceof HTMLElement ? target.getBoundingClientRect() : target;\n const elementRect = elementToPosition.getBoundingClientRect();\n const colRect = collisionContainer.getBoundingClientRect();\n const targetTop = targetPosition.top - amountTop;\n const targetRight = targetPosition.right;\n const isCollisionTop = (targetTop - elementRect.height) <= 0;\n const isCollisionBottom =\n window.innerHeight < (targetTop + amountTop + targetPosition.height + elementRect.height);\n const isCollisionLeft = targetRight < elementRect.width;\n const targetLeft = targetPosition.left;\n const isCollisionRight = (targetLeft + elementRect.width) > colRect.width;\n const classList = elementToPosition.classList;\n\n classList.remove(COL_RIGHT_CLASS);\n classList.remove(COL_LEFT_CLASS);\n classList.remove(COL_BOTTOM_CLASS);\n\n let calcTop;\n let calcLeft;\n if (isCollisionLeft && !isCollisionRight) {\n // put element to left if collision with left\n calcLeft = `${(targetPosition.left - colRect.left - amountLeft)}px`;\n classList.add(COL_LEFT_CLASS);\n } else {\n // maybe center if no collision with either side\n const rightPosition = `${(targetRight - elementRect.width - colRect.left - amountLeft)}px`;\n const leftCentered = ((targetLeft + targetPosition.width / 2) -\n (elementRect.width / 2) || 0) - colRect.left;\n const collisionCentered = (leftCentered + elementRect.width) > colRect.width;\n if (centerHorizontal && !collisionCentered) {\n calcLeft = `${leftCentered}px`;\n } else {\n classList.add(COL_RIGHT_CLASS);\n calcLeft = rightPosition;\n }\n }\n\n if (isCollisionBottom || (positionTop && !isCollisionTop)) {\n // Put Element on top if collision\n calcTop = `${(targetTop - elementRect.height) - colRect.top}px`;\n classList.add(COL_BOTTOM_CLASS);\n } else {\n calcTop = `${(targetTop + targetPosition.height) - colRect.top}px`;\n }\n\n elementToPosition.style.cssText = `top:${calcTop};left:${calcLeft};`;\n\n return elementToPosition;\n }\n\n /**\n * Brings a given element into viewport\n * @param {HTMLElement} el\n * @param {int|function}[optionalOffset]\n */\n static scrollToElement(el, optionalOffset) {\n el.scrollIntoView();\n let thisOffset = optionalOffset;\n // optionally use a additional scrollDif\n if (thisOffset) {\n if (typeof thisOffset === 'function') {\n thisOffset = optionalOffset();\n }\n if (thisOffset > 0) {\n const scrolledY = window.pageYOffset;\n if (scrolledY) {\n window.scroll(0, scrolledY - thisOffset);\n }\n }\n }\n }\n}\n\nexport default Util;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Util.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport Util from './Util';\n\n// we attach global settings to global once because settings might be shared a lot of times trough the application\n// Maybe find a better way to handle that scenario\nif (!global.FLEXCSS_GLOBAL_SETTINGS) {\n global.FLEXCSS_GLOBAL_SETTINGS = {\n // defined breakpoint for small devices < n\n smallBreakpoint: 768,\n // nodes that should be updated when no scrollbar is expected\n scrollbarUpdateNodes: global.document.body !== null ? [global.document.body] : [],\n // additional Delay until darkener is fully hidden\n darkenerFadeDelay: 100,\n // class that is added if canvas has been toggled\n canvasToggledClass: 'toggled-canvas'\n };\n\n global.FLEXCSS_CONST_IS_IOS = null;\n\n global.FLEXCSS_CONST_IS_TOUCH = null;\n\n global.FLEXCSS_CONST_IS_IE = null;\n\n global.FLEXCSS_CONST_TAB_EVENT = 'click';\n\n global.FLEXCSS_IS_SMALL_SCREEN = false;\n\n const init = () => {\n // Measure scrollbar width\n global.FLEXCSS_CONST_SCROLLBAR_WIDTH = Util.getScrollBarWidth();\n // detect right transition end event\n global.FLEXCSS_CONST_TRANSITION_EVENT = Util.whichTransitionEndEvent();\n };\n\n if (global.document.readyState !== 'loading') {\n init();\n } else {\n // it's possible that global.document.body is not available if the document is not\n // loaded completely\n document.addEventListener('DOMContentLoaded', () => {\n init();\n });\n }\n}\n\n/**\n * Utility class that setups global settings\n */\nclass Settings {\n\n /**\n * Setup global settings, overwrite default values\n * @param {Object} settings\n */\n static setup(settings) {\n Object.assign(global.FLEXCSS_GLOBAL_SETTINGS, settings);\n }\n\n /**\n * Access to global settings\n * @returns {Object}\n */\n static get() {\n return global.FLEXCSS_GLOBAL_SETTINGS;\n }\n\n /**\n * Detects a IOS Device, caches subsequent calls\n * @returns {boolean}\n */\n static isIosDevice() {\n if (!global.FLEXCSS_CONST_IS_IOS) {\n global.FLEXCSS_CONST_IS_IOS = global.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);\n }\n\n return global.FLEXCSS_CONST_IS_IOS;\n }\n\n /**\n * @returns {boolean}\n */\n static isSmallScreen() {\n return window.innerWidth < Settings.get().smallBreakpoint;\n }\n\n /**\n * Detects a touch device, caches subsequent calls\n * @returns {boolean}\n */\n static isTouchDevice() {\n if (!global.FLEXCSS_CONST_IS_TOUCH) {\n global.FLEXCSS_CONST_IS_TOUCH = 'ontouchstart' in window || !!(global.navigator.msMaxTouchPoints);\n }\n return global.FLEXCSS_CONST_IS_TOUCH;\n }\n\n /**\n * Checks if current browser is Internet Explorer\n * @returns {boolean|*}\n */\n static isIE() {\n if (!global.FLEXCSS_CONST_IS_IE) {\n global.FLEXCSS_CONST_IS_IE = \"ActiveXObject\" in window;\n }\n return global.FLEXCSS_CONST_IS_IE;\n }\n\n /**\n * @returns {String}\n */\n static getTransitionEvent() {\n return global.FLEXCSS_CONST_TRANSITION_EVENT;\n }\n\n /**\n * @returns {int}\n */\n static getScrollbarWidth() {\n return global.FLEXCSS_CONST_SCROLLBAR_WIDTH;\n }\n\n /**\n * @returns {String}\n */\n static getTabEvent() {\n return global.FLEXCSS_CONST_TAB_EVENT;\n }\n}\n\nexport default Settings;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Settings.js\n **/","/* global CustomEvent */\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// polyfill for custom events to make thinks work in IE\n// The needed polyfill is so small that I embedded it here\n(function poly() {\n if (!global.CustomEvent || typeof global.CustomEvent !== 'function') {\n const CustomEvent = function CustomEvent(event, params) {\n const thisParams = params ||\n {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, thisParams.bubbles,\n thisParams.cancelable, thisParams.detail);\n return evt;\n };\n CustomEvent.prototype = global.Event.prototype;\n global.CustomEvent = CustomEvent;\n }\n})();\n/**\n * Simpler Event dispatching\n */\nclass EventHandler {\n\n /**\n * @param {HTMLElement} target\n * @param {String} name\n */\n constructor(target, name) {\n this.target = target;\n this.defaultOptions = {\n bubbles: true,\n cancelable: true\n };\n\n this.name = name;\n }\n\n /**\n * Set more options\n * @param {Object} options\n * @returns {EventHandler}\n */\n withOptions(options) {\n Object.assign(this.defaultOptions, (options || {}));\n return this;\n }\n\n /**\n * Call with the originalEvent\n * @param {Event} e\n * @returns {EventHandler}\n */\n withOriginal(e) {\n return this.withDetail({\n originalEvent: e\n });\n }\n\n /**\n * Extends the detail part of the event\n * @param {Object} o\n * @returns {EventHandler}\n */\n withDetail(o) {\n if (!this.defaultOptions.detail) {\n this.defaultOptions.detail = {};\n }\n Object.assign(this.defaultOptions.detail, o);\n return this;\n }\n\n /**\n * @returns {CustomEvent}\n */\n fire() {\n const e = new CustomEvent(this.name, this.defaultOptions);\n if (this.target) {\n this.target.dispatchEvent(e);\n }\n return e;\n }\n}\n\nclass Event {\n /**\n * Prepares to dispatch a custom event (without firing)\n * @param {HTMLElement} target\n * @param {String} name\n * @returns {EventHandler}\n */\n static dispatch(target, name) {\n return new EventHandler(target, name);\n }\n\n /**\n * Dispatches a custom event and fires it directly\n * @param {HTMLElement} target\n * @param {String} name\n * @param {Object} [options]\n * @returns {CustomEvent}\n */\n static dispatchAndFire(target, name, options) {\n return new EventHandler(target, name).withOptions(options).fire();\n }\n}\n\nexport default Event;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/util/Event.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Widget\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/**\n * A Widget provides async content on a specific target (e.g. a modal link)\n */\nclass Widget {\n\n /**\n * Creates a new Widget\n * @param [element], optional define the content of widget\n */\n constructor(element) {\n /**\n *\n * @type {Promise}\n */\n this.asyncContent = null;\n\n /**\n * @type {boolean}\n */\n this._isWidget = true;\n\n if (element) {\n /**\n * @type {HTMLElement}\n */\n this.element = element instanceof HTMLElement ? element : global.document.getElementById(element);\n if (this.element) {\n this.element.hfWidgetInstance = this;\n this.setAsync(() => {\n return new Promise((s) => {\n s(this.element);\n });\n });\n } else {\n throw new Error(`Could not found element with ID: ${element}`);\n }\n }\n /**\n * The final resulted content that a widget did create (e.g. a modal container)\n * @type {HTMLElement}\n */\n this.finalContent = null;\n }\n\n /**\n *\n * @returns {Promise}\n */\n getAsync() {\n return this.asyncContent();\n }\n\n /**\n * @param {Function.} async\n * @returns {Widget}\n */\n setAsync(async) {\n this.asyncContent = async;\n return this;\n }\n\n /**\n * @returns {HTMLElement}\n */\n getFinalContent() {\n return this.finalContent;\n }\n\n /**\n * @param {HTMLElement} element\n * @returns {Widget}\n */\n setElement(element) {\n this.element = element;\n return this;\n }\n\n /**\n * Destroys the generated content of this widget\n * @returns {boolean}\n */\n destroy() {\n if (this.finalContent && this.finalContent.parentNode) {\n this.finalContent.parentNode.removeChild(this.finalContent);\n return true;\n }\n\n delete this.element;\n delete this.asyncContent;\n delete this.finalContent;\n\n return false;\n }\n\n /**\n * Will find a widget on an Element\n * @param {HTMLElement} element\n * @returns {Widget|undefined}\n */\n static findWidget(element) {\n return element ? element.hfWidgetInstance : undefined;\n }\n\n /**\n * Checks if a given object is an instance\n * @param {Object} self\n * @returns {boolean}\n */\n static isWidget(self) {\n return self instanceof Widget || typeof self === 'object' && self.hasOwnProperty('_isWidget');\n }\n}\n\nexport default Widget;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Widget.js\n **/","import Settings from '../util/Settings';\nimport debounce from './debounce';\nimport Event from '../util/Event';\nimport Util from '../util/Util';\n\nconst CLS_FIXED_WINDOW = 'fixed-window-open';\n\nexport const EVENT_BEFORE_FIXED_ADD = 'flexcss.fixedWindow.beforeAdd';\nexport const EVENT_AFTER_FIXED_REMOVE = 'flexcss.fixedWindow.afterRemove';\n\n/**\n * @type {string}\n */\nexport const ALLOW_ELEMENT_OVERFLOW_TOUCH = 'data-overflow';\n\n/**\n * @type {FixedWindow}\n */\nlet fixedWindowInstance;\n\nexport default class FixedWindow {\n\n constructor() {\n this.widgets = [];\n this.currentScrollTop = 0;\n this.fixedScreenConstraints = [];\n this.windowWidth = 0;\n this.isFixedWindowActive = false;\n this.touchListener = null;\n }\n\n /**\n * Adds a constraint to detect if the window needs to be changed when the screensize changes\n *\n * @param {Function} widget\n * @param {Function} fixedBreakpointFn gets a width argument, return true to open a window\n */\n addScreenConstraint(widget, fixedBreakpointFn) {\n this.fixedScreenConstraints[widget] = fixedBreakpointFn;\n }\n\n /**\n * @returns {null|DestroyableWidget}\n */\n getCurrentWidget() {\n return this.widgets.length > 0 ? this.widgets[this.widgets.length - 1] : null;\n }\n\n /**\n * @private\n */\n _checkFixedNeeded() {\n if (this.widgets.length === 0) {\n return;\n }\n const widgets = new Set(this.widgets);\n const widgetsThatRequireFixedWindow = Array.from(widgets).some(({ widget }) => {\n return this.fixedScreenConstraints[widget] && this.fixedScreenConstraints[widget](this.windowWidth);\n });\n if (!widgetsThatRequireFixedWindow) {\n this._removeFixedContainer();\n } else {\n this._addFixedContainer();\n }\n }\n\n /**\n * @private\n */\n _addFixedContainer() {\n if (this.isFixedWindowActive) {\n return;\n }\n Event.dispatchAndFire(global.document, EVENT_BEFORE_FIXED_ADD, {\n detail: this.getCurrentWidget()\n });\n // this causes layout and should be optimized\n // At lest we write in a batch later\n Settings.get().scrollbarUpdateNodes.map((n) => {\n let foundProperty = 'paddingRight';\n let direction = 1;\n let node = n;\n if (n instanceof Array) {\n const [whatNode, property, d] = n;\n foundProperty = property;\n node = whatNode;\n direction = d || 1;\n }\n return {\n node,\n property: foundProperty,\n value: `${parseInt(global.getComputedStyle(node)[foundProperty], 10) +\n (!node.__fixedWindowMod__ ? (Settings.getScrollbarWidth() * direction) : 0)}px`\n };\n }).forEach((d) => {\n d.node.__fixedWindowMod__ = true;\n d.node.style[d.property] = d.value;\n });\n\n this.touchListener = (e) => {\n e.preventDefault();\n };\n\n let shouldNotMoveUp = false;\n let shouldNotMoveDown = false;\n let neverScroll = false;\n let lastClientY = 0;\n this.touchStartListener = (e) => {\n let { element } = this.getCurrentWidget();\n const closestOverflow = Util.closestCallback(e.target,\n (el) => el instanceof HTMLTextAreaElement ||\n (el.hasAttribute && el.hasAttribute(ALLOW_ELEMENT_OVERFLOW_TOUCH)));\n if (closestOverflow && closestOverflow.scrollHeight !== closestOverflow.offsetHeight) {\n element = closestOverflow;\n }\n if (Util.isPartOfNode(e.target, element)) {\n neverScroll = element.scrollHeight === element.offsetHeight;\n lastClientY = e.touches[0].clientY;\n // never allow scrolling when there is nothing to scroll\n if (neverScroll) {\n return false;\n }\n if (element.scrollTop === 0) {\n element.scrollTop = 1;\n shouldNotMoveUp = true;\n } else if (element.scrollHeight === element.scrollTop + element.offsetHeight) {\n shouldNotMoveDown = true;\n element.scrollTop -= 1;\n }\n }\n };\n\n global.addEventListener('touchmove', this.touchListener);\n global.document.body.addEventListener('touchstart', this.touchStartListener);\n\n this.touchMoveListener = (e) => {\n const { element } = this.getCurrentWidget();\n if (Util.isPartOfNode(e.target, element)) {\n const { clientY } = e.touches[0];\n const isScrollingDown = (lastClientY - clientY) > 0;\n lastClientY = clientY;\n\n if (neverScroll) {\n neverScroll = false;\n return false;\n }\n\n if ((!shouldNotMoveDown && isScrollingDown) ||\n (shouldNotMoveDown && !isScrollingDown) ||\n (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) ||\n (shouldNotMoveDown && shouldNotMoveUp && isScrollingDown)\n ) {\n e.stopImmediatePropagation();\n }\n\n shouldNotMoveUp = false;\n shouldNotMoveDown = false;\n }\n };\n global.document.body.addEventListener('touchmove', this.touchMoveListener);\n\n global.document.documentElement.classList.add(CLS_FIXED_WINDOW);\n this.isFixedWindowActive = true;\n }\n\n /**\n * @private\n */\n _removeFixedContainer() {\n if (this.isFixedWindowActive) {\n // cleanup event listeners\n global.removeEventListener('touchmove', this.touchListener);\n global.document.body.removeEventListener('touchstart', this.touchStartListener);\n global.document.body.removeEventListener('touchmove', this.touchMoveListener);\n\n // reset scrollbar nodes\n Settings.get().scrollbarUpdateNodes.forEach((node) => {\n if (node instanceof Array) {\n const [whatNode, property] = node;\n delete whatNode.__fixedWindowMod__;\n whatNode.style[property] = '';\n } else {\n delete node.__fixedWindowMod__;\n node.style.paddingRight = '';\n }\n });\n global.document.documentElement.classList.remove(CLS_FIXED_WINDOW);\n Event.dispatchAndFire(global.document, EVENT_AFTER_FIXED_REMOVE);\n this.isFixedWindowActive = false;\n }\n }\n\n /**\n * Will close a window when no widgets are opened that need one\n */\n resizeListener() {\n this.windowWidth = global.innerWidth;\n this._checkFixedNeeded();\n }\n\n /**\n * @returns {FixedWindow}\n */\n static getInstance() {\n if (!fixedWindowInstance) {\n fixedWindowInstance = new FixedWindow();\n fixedWindowInstance.windowWidth = global.innerWidth;\n const eventHandler = fixedWindowInstance.resizeListener.bind(fixedWindowInstance);\n global.addEventListener(\n 'resize',\n debounce(eventHandler, 500)\n );\n global.addEventListener('orientationchange', eventHandler);\n }\n return fixedWindowInstance;\n }\n\n /**\n * Request a close of the fixed window\n */\n close() {\n this.widgets.pop();\n if (this.widgets.length === 0) {\n this._removeFixedContainer();\n }\n }\n\n /**\n * Request to open a fixed windows\n * @param {Object|DestroyableWidget} instance\n * @param {HTMLElement} element\n */\n open(instance, element) {\n let fixed = false;\n if (typeof instance === 'object') {\n const widget = instance.constructor;\n const fixedWidget = this.fixedScreenConstraints[instance.constructor];\n if (widget && fixedWidget) {\n fixed = fixedWidget(this.windowWidth);\n }\n const length = this.widgets.length;\n this.widgets.push(\n {\n widget,\n element\n }\n );\n // open a new window if there is no window active\n if (length === 0) {\n if (fixed) {\n this._addFixedContainer();\n }\n }\n }\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/FixedWindow.js\n **/","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 David Heidrich, BowlingX \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/*!\n * FlexCss.Modal\n * Licensed under the MIT License (MIT)\n * Copyright (c) 2015 David Heidrich, BowlingX \n */\n\n/* global KeyboardEvent */\n\nimport Settings from './util/Settings';\nimport Event from './util/Event';\nimport Util from './util/Util';\nimport Widget from './Widget';\nimport FixedWindow from './lib/FixedWindow';\nconst KEY_ESC = 27;\n/* Attribute Names */\nconst ATTR_CREATE_NEW = 'data-new-instance';\nconst ATTR_CLOSE = 'data-close-modal';\nconst ATTR_NAME = 'data-modal';\n\n/* Class names */\nconst CLS_CONTAINER_CURRENT = 'front';\nconst CLS_OPEN = 'open';\nconst CLS_CURRENT = 'current';\nconst CLS_PART_OF_STACK = 'part-of-stack';\nconst CLS_MODAL_CONTAINER = 'modal-container';\nconst CLS_ANIM_END = 'modal-anim-end';\nconst CLS_LOADER_CONTAINER = 'loader-container';\nconst CLS_LOADER = 'loader';\nconst CLS_BACKDROP = 'backdrop';\n\n/* Events */\n\n/**\n * Event triggered when modal is closed\n * @type {string}\n */\nexport const EVENT_MODAL_CLOSED = 'flexcss.modal.closed';\n/**\n * Event triggered before a modal is closed, cancelable\n * @type {string}\n */\nexport const EVENT_MODAL_BEFORE_CLOSED = 'flexcss.modal.beforeClose';\n/**\n * Event triggered when a modal is opened\n * @type {string}\n */\nexport const EVENT_MODAL_OPENED = 'flexcss.modal.opened';\n\n/**\n * Event triggered when modal is initilized, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_INIT = 'flexcss.modal.init';\n\n/**\n * Triggered when the content of an async modal on a target is loaded, called on target\n * @type {string}\n */\nexport const EVENT_MODAL_ASYNC_TARGET_LOADED = 'flexcss.modal.asyncTargetLoaded';\n\n/**\n * A Modal Implementation\n */\nclass Modal {\n constructor(DelegateContainer, options) {\n const doc = global.document;\n const container = DelegateContainer instanceof HTMLElement ?\n DelegateContainer : doc.getElementById(DelegateContainer);\n\n // Instance vars:\n if (!container) {\n throw new Error(`Could not found container element by given ID/Element: ${DelegateContainer}`);\n }\n\n this.currentOpen = null;\n\n this.loading = false;\n\n this.container = container;\n\n /**\n * Default Options\n */\n this.options = {\n classNames: 'modal',\n closeOnEscape: true,\n closeOnBackgroundClick: true,\n destroyOnFinish: false,\n fixedContainer: true,\n containerClassNames: ''\n };\n\n Object.assign(this.options, options);\n\n // Container where events are delegated\n this.eventContainer = null;\n this.eventFunction = null;\n\n this.dataMainPageContainer = global.document.body;\n\n this.currentScrollTop = 0;\n\n this.modalContainer = null;\n\n // Destroy full modal instance when no dialogs are bind to?\n // Otherwise container is recycled\n this.destroyOnFinish = this.options.destroyOnFinish;\n }\n\n /**\n * Removes this modal from global stack\n * Will handle fixing main html element too\n * @private\n * @param n\n */\n _removeModalFromStack(n) {\n const t = Modal._modalInstances.indexOf(n);\n if (t > -1) {\n Modal._modalInstances.splice(t, 1);\n FixedWindow.getInstance().close();\n }\n }\n\n\n /**\n * Modal container that contains all `stacked` modals for this instance\n * @returns {HTMLElement}\n */\n getModalContainer() {\n return this.modalContainer;\n }\n\n /**\n * Closes the current open modal of this stack\n * @params [e], optional event\n * @returns {*}\n */\n close(e) {\n const self = this;\n\n const options = self.currentOpen ? Util.applyOptionsFromElement(\n self.currentOpen, Util.copy(self.options)) : self.options;\n\n // close only on keyboard if instance should\n if (!options.closeOnEscape && e instanceof KeyboardEvent) {\n return false;\n }\n\n // close only on background if instance should\n if (!options.closeOnBackgroundClick && e &&\n e.type === Settings.getTabEvent() && !e.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n\n // if an instance is currently loading, prevent from closing\n if (self.loading) {\n return false;\n }\n\n if (e) {\n e.preventDefault();\n }\n\n if (self.currentOpen) {\n // dispatch beforeClose event, if prevented prevent modal from closing\n const ev = Event.dispatchAndFire(self.currentOpen, EVENT_MODAL_BEFORE_CLOSED);\n if (ev.defaultPrevented) {\n return false;\n }\n\n this._finishState(self.currentOpen);\n // if there is an previous modal\n if (self.currentOpen.prevModal) {\n // switch to the next modal\n return self.switchModals(self.currentOpen.prevModal,\n self.currentOpen.prevModal.prevModal || null);\n }\n\n // finally trigger closed event\n Event.dispatch(self.currentOpen, EVENT_MODAL_CLOSED).withOriginal(e).fire();\n }\n self._removeModalFromStack(self.currentOpen);\n\n // Full stack closed:\n self.currentOpen = null;\n if (self.modalContainer) {\n // setup next open\n const lastContainer = Modal._modalInstances[Modal._modalInstances.length - 1];\n const classList = self.modalContainer.classList;\n classList.remove(CLS_CONTAINER_CURRENT);\n classList.remove(CLS_BACKDROP);\n classList.remove(CLS_OPEN);\n // Remove all current classes from child-nodes\n for (let i = 0; i < self.modalContainer.childNodes.length; i++) {\n const node = self.modalContainer.childNodes[i];\n const cl = node.classList;\n // remove applied styles\n self._finishState(node);\n cl.remove(CLS_CURRENT);\n cl.remove(CLS_PART_OF_STACK);\n }\n if (lastContainer) {\n lastContainer.parentNode.classList.add(CLS_CONTAINER_CURRENT);\n }\n }\n\n if (self.destroyOnFinish) {\n self.destroy();\n }\n return self;\n }\n\n /**\n * Resets a target when newly initilizes\n * @param target\n * @private\n */\n _finishState(target) {\n target.classList.remove(CLS_ANIM_END);\n }\n\n /**\n * Handler called when a Modal has finished an animation\n * @param e\n * @param self\n * @private\n */\n _finishAnim(e, self) {\n e.target.classList.add(CLS_ANIM_END);\n e.target.removeEventListener(e.type, self, true);\n }\n\n /**\n * Brings the given modal to front\n * @param co\n * @param last\n */\n switchModals(co, last) {\n co.prevModal = last;\n Modal._modalInstances.push(co);\n FixedWindow.getInstance().open(this, this.modalContainer);\n if (last) {\n this._finishState(last);\n Util.prefixedAnimateEvent(last, 'AnimationEnd', this._finishAnim);\n last.classList.add(CLS_PART_OF_STACK);\n }\n // set new currentOpen\n this.currentOpen = co;\n\n // bring current container to the front\n const instances = Modal._modalInstances;\n\n for (let m = 0; m < instances.length; m++) {\n instances[m].parentNode.classList.remove(CLS_CONTAINER_CURRENT);\n }\n this.modalContainer.classList.add(CLS_CONTAINER_CURRENT);\n // remove animations if animations has been completed, fixes various bugs:\n // - fixes nested scrolling element issue in iOS Browsers / Mobile-Safari\n Util.prefixedAnimateEvent(co, 'AnimationEnd', this._finishAnim);\n\n for (let i = 0; i < this.modalContainer.childNodes.length; i++) {\n const n = this.modalContainer.childNodes[i];\n const isCurrent = n.classList.contains(CLS_CURRENT);\n if (n === co) {\n co.classList.add(CLS_CURRENT);\n co.classList.remove(CLS_PART_OF_STACK);\n this._finishState(co);\n } else {\n n.classList.remove(CLS_CURRENT);\n if (isCurrent) {\n this._removeModalFromStack(n);\n Event.dispatchAndFire(n, EVENT_MODAL_CLOSED);\n }\n }\n }\n }\n\n /**\n * Creates a Modal and opens it (later)\n * @param e\n * @returns {Promise|boolean}\n */\n createWidget(e) {\n const self = this;\n if (this.loading) {\n return false;\n }\n\n // check if another modal has registered events on this dom path:\n if (e && e.target) {\n const foundInstance = Util.parentsUntil(e.target, (node) => {\n return node && node.flexModalInstance;\n });\n\n // if another instance has been found, abort\n if (foundInstance !== this.container) {\n return false;\n }\n }\n let targetContent;\n let future;\n let widget;\n let target;\n let hasTarget = true;\n const isHtmlElement = e instanceof HTMLElement;\n const isWidget = Widget.isWidget(e);\n if (isHtmlElement || isWidget) {\n if (isHtmlElement) {\n targetContent = e;\n } else {\n widget = e;\n targetContent = widget.element;\n }\n } else {\n target = e.target;\n if (!target) {\n throw new Error('Could not find target, did you pass an event, a HTMLElement or an Widget?');\n }\n hasTarget = target.hasAttribute(ATTR_NAME);\n targetContent = target.getAttribute(ATTR_NAME);\n widget = Widget.findWidget(target);\n if (target.hasAttribute(ATTR_CREATE_NEW) && !e.newInstance) {\n const newInstance = new Modal(this.container)\n .setDestroyOnFinish(true);\n e.newInstance = true;\n newInstance.fromEvent(e).then(() => {\n newInstance.registerEvents(newInstance.getModalContainer());\n });\n return false;\n }\n if (hasTarget) {\n e.stopImmediatePropagation();\n e.preventDefault();\n }\n }\n\n if (!hasTarget) {\n return false;\n }\n\n let modalContainerClasses = this.modalContainer ? this.modalContainer.classList : [];\n\n // lazy create modal container\n if (!this.modalContainer) {\n this.modalContainer = global.document.createElement('div');\n this.modalContainer.className = `${CLS_MODAL_CONTAINER} ${this.options.containerClassNames} ${CLS_OPEN}`;\n const closeModalFunction = (ce) => {\n if (this.loading) {\n return false;\n }\n if (Util.isPartOfNode(ce.target, this.currentOpen)) {\n if (!ce.target.hasAttribute(ATTR_CLOSE)) {\n return false;\n }\n }\n this.close(ce);\n };\n\n this.modalContainer.addEventListener(Settings.getTabEvent(), closeModalFunction, false);\n\n modalContainerClasses = this.modalContainer.classList;\n this.container.appendChild(this.modalContainer);\n } else {\n modalContainerClasses.add(CLS_OPEN);\n }\n\n let loader;\n const doc = global.document;\n const toggleLoader = (show) => {\n if (show) {\n loader = doc.createElement('div');\n loader.className = CLS_LOADER_CONTAINER;\n const loaderLoader = doc.createElement('div');\n loaderLoader.className = CLS_LOADER;\n loader.appendChild(loaderLoader);\n this.modalContainer.appendChild(loader);\n } else {\n loader.parentNode.removeChild(loader);\n }\n };\n modalContainerClasses.add('loading');\n modalContainerClasses.add(CLS_CONTAINER_CURRENT);\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n modalContainerClasses.add(CLS_BACKDROP);\n });\n });\n\n this.loading = true;\n toggleLoader(true);\n const async = widget ? widget.getAsync() : null;\n if (Widget.isWidget(widget) && async) {\n future = async.then((r) => {\n let result;\n if (r instanceof HTMLElement || r instanceof DocumentFragment) {\n result = r;\n } else {\n // Create container Element:\n const element = doc.createElement('div');\n element.className = self.options.classNames;\n element.innerHTML = r;\n element.id = Util.guid();\n result = element;\n }\n widget.finalContent = result;\n Event.dispatchAndFire(target, EVENT_MODAL_ASYNC_TARGET_LOADED);\n return result;\n });\n } else {\n const el = targetContent instanceof HTMLElement ||\n targetContent instanceof DocumentFragment ? targetContent : doc.getElementById(targetContent);\n if (el) {\n future = new Promise((resolve) => {\n resolve(el);\n });\n } else {\n throw new Error(`Could not found given modal element (content) with ID: ${targetContent}`);\n }\n }\n\n Event.dispatchAndFire(target, EVENT_MODAL_INIT);\n\n return future.then((thisEl) => {\n thisEl.hfWidgetInstance = this;\n this.modalContainer.appendChild(thisEl);\n modalContainerClasses.remove('loading');\n this.loading = false;\n toggleLoader(false);\n this.open(thisEl, true, e);\n return thisEl;\n });\n }\n\n /**\n * Open's an already rendered modal\n * @param {HTMLElement} modal\n * @param {Boolean} [internal], set to true to prevent container management\n * @param {Boolean} [maybeEvent], optional event-object that triggered open\n */\n open(modal, internal, maybeEvent) {\n if (!internal) {\n this.modalContainer.classList.add('open');\n }\n this.switchModals(modal, this.currentOpen);\n\n Event.dispatch(modal, EVENT_MODAL_OPENED).withOriginal(maybeEvent).fire();\n }\n\n\n registerEvents(delegate) {\n const delegateContainer = delegate || this.container;\n // Modals should always be fixed\n FixedWindow.getInstance().addScreenConstraint(Modal, () => true);\n // register modal instance so we can detect multiple registrars\n delegateContainer.flexModalInstance = this;\n this.eventFunction = (...args) => {\n this.createWidget.apply(this, args);\n };\n delegateContainer.addEventListener(Settings.getTabEvent(), this.eventFunction, false);\n\n this.eventContainer = delegateContainer;\n return this;\n }\n\n\n /**\n * Creates a new Dialog Instance either directly from HTML Element or a Widget instance\n * @param {HTMLElement|Widget} widget instance or html element\n * @returns {Promise}\n */\n fromWidget(widget) {\n return this.createWidget(widget);\n }\n\n /**\n * Creates a Widget from event\n * @param e\n * @returns {Promise}\n */\n fromEvent(e) {\n return this.createWidget(e);\n }\n\n setDestroyOnFinish(v) {\n this.destroyOnFinish = v;\n return this;\n }\n\n /**\n * Destroy this widget instance, cleans empty DOM nodes\n * Will use fast MutationObserver if available, otherwise falls back to DOMNodeRemoved event\n */\n destroy() {\n const modalContainer = this.modalContainer;\n const isEmptyContainer = modalContainer.childNodes.length === 0;\n // Remove event listener on destroy, do not remove DOM node\n if (this.eventContainer) {\n this.eventContainer.removeEventListener(Settings.getTabEvent(), this.eventFunction, true);\n }\n\n if (isEmptyContainer) {\n if (modalContainer.parentNode) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n }\n if (global.MutationObserver) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach(() => {\n if (modalContainer.childNodes.length === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n observer.disconnect();\n }\n });\n });\n observer.observe(modalContainer,\n {\n childList: true\n }\n );\n } else {\n modalContainer.addEventListener('DOMNodeRemoved', (e) => {\n if (e.target !== modalContainer && (modalContainer.childNodes.length - 1) === 0) {\n modalContainer.parentNode.removeChild(modalContainer);\n }\n });\n }\n }\n}\n\n\n// Static variable that keeps track of all open modals\nModal._modalInstances = [];\n\n// Global keydown listener for modal\nglobal.addEventListener('keydown', (e) => {\n if (e.keyCode === KEY_ESC) {\n const lastModal = Modal._modalInstances[Modal._modalInstances.length - 1];\n if (lastModal) {\n Widget.findWidget(lastModal).close(e);\n }\n }\n});\n\nexport default Modal;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/Modal.js\n **/","export default (fn, ms) => () => {\n clearTimeout(fn.timeout);\n fn.timeout = setTimeout(fn, ms);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/lib/debounce.js\n **/","import Modal from '../Modal';\nimport Settings from '../util/Settings';\nimport Widget from '../Widget';\n\n// default export as component object\nexport default {\n Modal,\n Settings,\n Widget\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main/modules/Modal.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/src/main/OffCanvas.js b/src/main/OffCanvas.js index ea673c9b..71726ea7 100644 --- a/src/main/OffCanvas.js +++ b/src/main/OffCanvas.js @@ -123,6 +123,7 @@ class OffCanvas { const bounds = target.getBoundingClientRect(); const compare = factor > 0 ? calcX <= 0 : calcX >= 0; if (compare) { + e.preventDefault(); style.transition = 'transform 0s ease'; style.webkitTransition = '-webkit-transform 0s ease'; target.mustHide = factor > 0 ? calcX * -1 > diff --git a/src/main/lib/FixedWindow.js b/src/main/lib/FixedWindow.js index f4c3101d..e68de653 100644 --- a/src/main/lib/FixedWindow.js +++ b/src/main/lib/FixedWindow.js @@ -145,15 +145,11 @@ export default class FixedWindow { return false; } - if (!shouldNotMoveDown && isScrollingDown) { - e.stopImmediatePropagation(); - } - - if (shouldNotMoveDown && !isScrollingDown) { - e.stopImmediatePropagation(); - } - - if (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) { + if ((!shouldNotMoveDown && isScrollingDown) || + (shouldNotMoveDown && !isScrollingDown) || + (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) || + (shouldNotMoveDown && shouldNotMoveUp && isScrollingDown) + ) { e.stopImmediatePropagation(); }