diff --git a/dist/assets/images/icons/apple-touch-icon.png b/dist/assets/images/logo/apple-touch-icon.png
similarity index 100%
rename from dist/assets/images/icons/apple-touch-icon.png
rename to dist/assets/images/logo/apple-touch-icon.png
diff --git a/dist/assets/images/icons/logo192.png b/dist/assets/images/logo/logo192.png
similarity index 100%
rename from dist/assets/images/icons/logo192.png
rename to dist/assets/images/logo/logo192.png
diff --git a/dist/assets/images/icons/logo512.png b/dist/assets/images/logo/logo512.png
similarity index 100%
rename from dist/assets/images/icons/logo512.png
rename to dist/assets/images/logo/logo512.png
diff --git a/dist/index.html b/dist/index.html
index 4d111991..2914f2f1 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -1 +1 @@
-
Chisel
\ No newline at end of file
+Chisel
\ No newline at end of file
diff --git a/dist/main.js b/dist/main.js
index 50acf7f1..0c4ce728 100644
--- a/dist/main.js
+++ b/dist/main.js
@@ -1,15 +1,15 @@
-!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=631)}([function(e,t,n){"use strict";e.exports=n(637)},function(e,t,n){e.exports=n(641)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"m",(function(){return E})),n.d(t,"n",(function(){return C})),n.d(t,"k",(function(){return _})),n.d(t,"l",(function(){return x})),n.d(t,"j",(function(){return S})),n.d(t,"r",(function(){return k})),n.d(t,"s",(function(){return O})),n.d(t,"q",(function(){return T})),n.d(t,"p",(function(){return A})),n.d(t,"o",(function(){return P})),n.d(t,"h",(function(){return M})),n.d(t,"b",(function(){return N})),n.d(t,"d",(function(){return j})),n.d(t,"f",(function(){return D})),n.d(t,"i",(function(){return I})),n.d(t,"c",(function(){return L})),n.d(t,"e",(function(){return R})),n.d(t,"g",(function(){return F})),n.d(t,"w",(function(){return B})),n.d(t,"x",(function(){return z})),n.d(t,"G",(function(){return U})),n.d(t,"I",(function(){return K})),n.d(t,"H",(function(){return H})),n.d(t,"A",(function(){return q})),n.d(t,"z",(function(){return V})),n.d(t,"v",(function(){return W})),n.d(t,"y",(function(){return Y})),n.d(t,"u",(function(){return G})),n.d(t,"E",(function(){return $})),n.d(t,"F",(function(){return J})),n.d(t,"D",(function(){return Q})),n.d(t,"C",(function(){return Z})),n.d(t,"B",(function(){return X})),n.d(t,"t",(function(){return ee})),n.d(t,"T",(function(){return te})),n.d(t,"M",(function(){return ne})),n.d(t,"R",(function(){return re})),n.d(t,"J",(function(){return ie})),n.d(t,"S",(function(){return oe})),n.d(t,"K",(function(){return ae})),n.d(t,"N",(function(){return se})),n.d(t,"O",(function(){return le})),n.d(t,"P",(function(){return ue})),n.d(t,"Q",(function(){return ce})),n.d(t,"L",(function(){return de}));n(37),n(78),n(112),n(113),n(114),n(115),n(116),n(90),n(117);var r=n(19),i=n(12),o=n(26),a=n(29),s=n(81),l=n(32);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0];return{type:b,value:e}}function ce(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:w,value:e}}var fe={initEnded:!1,isSidebarVisible:!0,openedPage:E,alertShowing:!1,alertParams:null,modalShowing:!1,modalType:null,modalParams:null,showUnpaidSub:!1,serverProblemA:!1,serverProblemB:!1};function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.a:return c({},e,{showUnpaidSub:t.unpaidSub});case f:var n=!1,r=null;return e.showUnpaidSub&&(n=!0,r={type:l.b,title:"Failed payment",description:"We can't withdraw money for next payment period. Please, update your payment methods.",confirmLabel:"Open payment methods",cancelLabel:"Close",onConfirm:function(){return i.g.push("/".concat(K,"/").concat(X))}}),c({},e,{initEnded:!0,alertShowing:n,alertParams:r});case y:return c({},e,{isSidebarVisible:!e.isSidebarVisible});case o.f:return c({},e,{openedPage:E,initEnded:!1});case v:return c({},e,{openedPage:E});case g:return c({},e,{openedPage:t.openedPage});case d:return c({},e,{alertShowing:!0,alertParams:t.params});case p:return c({},e,{alertShowing:!1});case h:return c({},e,{modalShowing:!0,modalType:t.modalType,modalParams:t.params});case m:return c({},e,{modalShowing:!1});case b:return c({},e,{serverProblemA:t.value});case w:return c({},e,{serverProblemB:t.value});case a.g:return c({},e,{serverProblemB:!0});default:return e}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"_";return e?(e=i(e)).replace(/\W/g,t):""}function a(e,t){return(e=o(e,t)).toLowerCase()}function s(){var e=Math.floor(256*Math.random()),t=Math.floor(256*Math.random()),n=Math.floor(256*Math.random());return"rgba(".concat(e,", ").concat(t,", ").concat(n,", 1)")}function l(e){var t=e.lastIndexOf(".");return t>0?e.slice(0,t):e}function u(e){return new RegExp("^(https?:\\/\\/)((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}function c(e){return/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i.test(e)}function f(e){return e.toLocaleString(r,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"})}function d(e){var t=new Date,n=t-e,i=e.toLocaleString(r,{hour:"numeric",minute:"numeric"});if(n<6e4)return n<1e4?"A few seconds ago":"Less a minute ago";if(n<36e5){var o=Math.floor(n/6e4);return"".concat(o,1==o?" minute ago":" minutes ago")}if(t.getDate()==e.getDate()&&t.getMonth()==e.getMonth()&&t.getFullYear()==e.getFullYear())return"Today, at ".concat(i);var a=new Date(e);return a.setDate(a.getDate()+1),t.getDate()==a.getDate()&&t.getMonth()==a.getMonth()&&t.getFullYear()==a.getFullYear()?"Yesterday, at ".concat(i):f(e)}function p(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n={},r=/([^&=]+)=?([^&]*)/g,i=function(e){return decodeURIComponent(e.replace(/\+/g," "))};for(t||(t=location.search.substring(1));e=r.exec(t);)n[i(e[1])]=i(e[2]);return n}function h(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}var m="Bytes",v="KB",g="MB",y=[m,v,g];function b(e,t,n){switch(n){case m:switch(t){case v:e*=1024;break;case g:e=1024*e*1024}break;case v:switch(t){case m:e=Math.floor(e/1024);break;case g:e*=1024}break;case g:switch(t){case m:e=Math.floor(e/1024/1024);break;case v:e=Math.floor(e/1024)}}return e}var w="Image",E="Text",C="HTML",_="XML",x="Markdown",S="JSON",k="PDF",O="Formatted text",T="Table",A="Presentation",P="Audio",M="Video",N="Archive",j="Windows program",D="Other",I=[w,E,C,_,x,S,k,O,T,A,P,M,N,j,D];function L(e){return"image/"==e.slice(0,6)?w:"text/html"==e?C:"text/xml"==e||"application/xml"==e?_:"text/markdown"==e?x:"application/json"==e?S:"text/"==e.slice(0,5)?E:"application/pdf"==e?k:"application/msword"==e||"application/vnd.openxmlformats-officedocument.wordprocessingml.document"==e||"application/vnd.oasis.opendocument.text"==e||"application/x-iwork-pages-sffpages"==e||"application/rtf"==e?O:"application/vnd.ms-excel"==e||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"==e||"application/vnd.oasis.opendocument.spreadsheet"==e||"application/x-iwork-numbers-sffnumbers"==e?T:"application/vnd.ms-powerpoint"==e||"application/vnd.openxmlformats-officedocument.presentationml.presentation"==e||"application/vnd.oasis.opendocument.presentation"==e||"application/x-iwork-keynote-sffkey"==e?A:"audio/"==e.slice(0,6)?P:"video/"==e.slice(0,6)?M:"application/zip"==e||"application/gzip"==e||"application/x-7z-compressed"==e||"application/x-rar-compressed"==e||"application/x-tar"==e?N:"application/vnd.microsoft.portable-executable"==e||"application/octet-stream"==e||"application/exe"==e||"application/x-exe"==e?j:D}function R(e,t){t>2147483647?setTimeout((function(){return R(e,t-2147483647)}),2147483647):setTimeout(e,t)}function F(e,t){var n,r,i=!1;return function o(){if(i)return n=arguments,void(r=this);e.apply(this,arguments),i=!0,setTimeout((function(){i=!1,n&&(o.apply(r,n),n=r=null)}),t)}}function B(){return navigator.userAgent.toLowerCase().indexOf(" electron/")>-1}function z(e,t){if(B()&&e){var n=window.require("electron").remote,r=t?[{role:"copy"},{role:"selectall"}]:[{role:"undo"},{role:"redo"},{type:"separator"},{role:"cut"},{role:"copy"},{role:"paste"},{role:"selectall"}],i=n.Menu.buildFromTemplate(r);e.addEventListener("contextmenu",(function(e){e.preventDefault(),i.popup({window:n.getCurrentWindow()})}),!1)}}var U=0;function K(){return U++}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(234)),i=s(n(672)),o=s(n(770)),a=s(n(782));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e,t,n){var s,l=void 0,u=(0,a.default)(n);return l="prototype"in(s=e)&&(0,r.default)(s.prototype.render)?(0,i.default)(e,t,u):(0,o.default)(e,t,u),e.displayName?l.displayName=e.displayName:l.displayName=e.name,l},u=function(e,t){return function(n){return l(n,e,t)}};t.default=function(){return(0,r.default)(arguments.length<=0?void 0:arguments[0])?l(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2]):u(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1])},e.exports=t.default},function(e,t,n){"use strict";n.d(t,"e",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return d})),n.d(t,"a",(function(){return h})),n.d(t,"h",(function(){return C})),n.d(t,"g",(function(){return _}));n(36),n(1077),n(59),n(127),n(541),n(119),n(38),n(94),n(66);var r=n(27),i=n.n(r),o=(n(147),n(22)),a=n(2),s=100,l=101,u=141,c=202,f=203,d=205,p=209,h=701,m=7e3,v=3e4,g=0,y=[];function b(e){g||(g=setInterval(E,1e3)),y.push(e)}function w(e){if(y.splice(y.indexOf(e),1),!y.length){clearInterval(g),g=0;var t=o.store.getState().nav,n=t.serverProblemA,r=t.serverProblemB;n&&o.store.dispatch(Object(a.P)(!1)),r&&o.store.dispatch(Object(a.Q)(!1))}}function E(){var e=Date.now()-y[0];e>v?(clearInterval(g),o.store.dispatch(Object(a.Q)())):e>m&&o.store.dispatch(Object(a.P)())}function C(e){var t,n;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return b(t=Date.now()),r.prev=2,r.next=5,i.a.awrap(e);case 5:return n=r.sent,w(t),r.abrupt("return",n);case 10:throw r.prev=10,r.t0=r.catch(2),r.t0.code==p&&(localStorage.clear(),window.location="/"),r.t0.code==s?(clearInterval(g),o.store.dispatch(Object(a.Q)())):w(t),r.t0;case 15:case"end":return r.stop()}}),null,null,[[2,10]])}function _(e){var t=[];return function n(){var r,o,a=arguments;return i.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return r=a.length>0&&void 0!==a[0]?a[0]:0,s.next=3,i.a.awrap(e.limit(90).skip(r).find());case 3:if((o=s.sent).length){s.next=6;break}return s.abrupt("return",t);case 6:return t=t.concat(o),s.abrupt("return",n(r+90));case 8:case"end":return s.stop()}}))}()}},function(e,t,n){"use strict";var r=n(21),i=n.n(r),o=n(0),a=n.n(o),s=n(69),l=n.n(s),u=n(1),c=n.n(u);n(129);function f(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var d=Object.create(null);function p(e){return d[e]||(d[e]=function(e){for(var t="",n=[],r=[],i=void 0,o=0,a=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g;i=a.exec(e);)i.index!==o&&(r.push(e.slice(o,i.index)),t+=f(e.slice(o,i.index))),i[1]?(t+="([^/]+)",n.push(i[1])):"**"===i[0]?(t+="(.*)",n.push("splat")):"*"===i[0]?(t+="(.*?)",n.push("splat")):"("===i[0]?t+="(?:":")"===i[0]?t+=")?":"\\("===i[0]?t+="\\(":"\\)"===i[0]&&(t+="\\)"),r.push(i[0]),o=a.lastIndex;return o!==e.length&&(r.push(e.slice(o,e.length)),t+=f(e.slice(o,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}(e)),d[e]}function h(e,t){"/"!==e.charAt(0)&&(e="/"+e);var n=p(e),r=n.regexpSource,i=n.paramNames,o=n.tokens;"/"!==e.charAt(e.length-1)&&(r+="/?"),"*"===o[o.length-1]&&(r+="$");var a=t.match(new RegExp("^"+r,"i"));if(null==a)return null;var s=a[0],l=t.substr(s.length);if(l){if("/"!==s.charAt(s.length-1))return null;l="/"+l}return{remainingPathname:l,paramNames:i,paramValues:a.slice(1).map((function(e){return e&&decodeURIComponent(e)}))}}function m(e){return p(e).paramNames}function v(e,t){t=t||{};for(var n=p(e).tokens,r=0,o="",a=0,s=[],l=void 0,u=void 0,c=0,f=n.length;c0||i()(!1),null!=u&&(o+=encodeURI(u));else if("("===l)s[r]="",r+=1;else if(")"===l){var d=s.pop();(r-=1)?s[r-1]+=d:o+=d}else if("\\("===l)o+="(";else if("\\)"===l)o+=")";else if(":"===l.charAt(0))if(null!=(u=t[l.substring(1)])||r>0||i()(!1),null==u){if(r){s[r-1]="";for(var h=n.indexOf(l),m=n.slice(h,n.length),v=-1,g=0;g0||i()(!1),c=h+v-1}}else r?s[r-1]+=encodeURIComponent(u):o+=encodeURIComponent(u);else r?s[r-1]+=l:o+=l;return r<=0||i()(!1),o.replace(/\/+/g,"/")}var g=function(e,t){var n=e&&e.routes,r=t.routes,i=void 0,o=void 0,a=void 0;if(n){var s=!1;(i=n.filter((function(n){if(s)return!0;var i=-1===r.indexOf(n)||function(e,t,n){return!!e.path&&m(e.path).some((function(e){return t.params[e]!==n.params[e]}))}(n,e,t);return i&&(s=!0),i}))).reverse(),a=[],o=[],r.forEach((function(e){var t=-1===n.indexOf(e),r=-1!==i.indexOf(e);t||r?a.push(e):o.push(e)}))}else i=[],o=[],a=r;return{leaveRoutes:i,changeRoutes:o,enterRoutes:a}};function y(e,t,n){var r=0,i=!1,o=!1,a=!1,s=void 0;function l(){i=!0,o?s=[].concat(Array.prototype.slice.call(arguments)):n.apply(this,arguments)}!function u(){if(!i&&(a=!0,!o)){for(o=!0;!i&&r=e&&a&&(i=!0,n())}}()}function b(e,t,n){var r=e.length,i=[];if(0===r)return n(null,i);var o=!1,a=0;e.forEach((function(e,s){t(e,s,(function(e,t){!function(e,t,s){o||(t?(o=!0,n(t)):(i[e]=s,(o=++a===r)&&n(null,i)))}(s,e,t)}))}))}var w=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=[],this.add=function(e){return t.hooks.push(e)},this.remove=function(e){return t.hooks=t.hooks.filter((function(t){return t!==e}))},this.has=function(e){return-1!==t.hooks.indexOf(e)},this.clear=function(){return t.hooks=[]}};function E(){var e=new w,t=new w;function n(e,t,n,r){var i=e.length4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];void 0===r&&("/"!==t.pathname.charAt(0)&&(t=j({},t,{pathname:"/"+t.pathname})),r=t.pathname),y(e.length,(function(n,a,s){L(e[n],t,r,i,o,(function(e,t){e||t?s(e,t):a()}))}),n)}var F=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];return e.__id__||t&&(e.__id__=c++)}var d=Object.create(null);function p(e){return e.map((function(e){return d[f(e)]})).filter((function(e){return e}))}function h(e,r){R(t,e,(function(t,i){if(null!=i){s=F({},i,{location:e});for(var o=p(g(n,s).leaveRoutes),a=void 0,l=0,u=o.length;null==a&&l should not have a "'+t+'" prop')}Object(u.shape)({listen:u.func.isRequired,push:u.func.isRequired,replace:u.func.isRequired,go:u.func.isRequired,goBack:u.func.isRequired,goForward:u.func.isRequired});var K=u.elementType,H=Object(u.oneOfType)([K,u.object]),q=Object(u.oneOfType)([u.object,u.element]),V=Object(u.oneOfType)([q,Object(u.arrayOf)(q)]),W=n(222);var Y=function(e,t){var n={};return e.path?(m(e.path).forEach((function(e){Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})),n):n},G=c.a.shape({subscribe:c.a.func.isRequired,eventIndex:c.a.number.isRequired});function $(e){return"@@contextSubscriber/"+e}var J=void 0!==a.a.forwardRef;function Q(e){var t,n,r=$(e),i=r+"/lastRenderedEventIndex",o=r+"/handleContextUpdate",a=r+"/unsubscribe",s=((n={contextTypes:(t={},t[r]=G,t),getInitialState:function(){var e;return this.context[r]?((e={})[i]=this.context[r].eventIndex,e):{}},componentDidMount:function(){this.context[r]&&(this[a]=this.context[r].subscribe(this[o]))},componentWillReceiveProps:function(){var e;this.context[r]&&this.setState(((e={})[i]=this.context[r].eventIndex,e))},componentWillUnmount:function(){this[a]&&(this[a](),this[a]=null)}})[o]=function(e){var t;e!==this.state[i]&&this.setState(((t={})[i]=e,t))},n);return J&&(s.UNSAFE_componentWillReceiveProps=s.componentWillReceiveProps,delete s.componentWillReceiveProps),s}var Z,X,ee,te,ne,re,ie,oe,ae=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(o,["createElement","render"]);return null==t?null:(Object.keys(pe).forEach((function(e){return delete l[e]})),s(de({},l,{router:this.router,location:t,routes:n,params:r,components:i,createElement:a})))}});he&&(me.prototype.UNSAFE_componentWillReceiveProps=me.prototype.componentWillReceiveProps,me.prototype.UNSAFE_componentWillMount=me.prototype.componentWillMount,delete me.prototype.componentWillReceiveProps,delete me.prototype.componentWillMount);var ve=me,ge=Object(u.shape)({push:u.func.isRequired,replace:u.func.isRequired,go:u.func.isRequired,goBack:u.func.isRequired,goForward:u.func.isRequired,setRouteLeaveHook:u.func.isRequired,isActive:u.func.isRequired}),ye=(Object(u.shape)({pathname:u.string.isRequired,search:u.string.isRequired,state:u.object,action:u.string.isRequired,key:u.string}),Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["to","activeClassName","activeStyle","onlyActiveOnIndex","innerRef"]),l=this.context.router;if(l){if(!t)return a.a.createElement("a",ye({},s,{ref:o}));var u=be(t,l);s.href=l.createHref(u),(n||null!=r&&!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(r))&&l.isActive(u,i)&&(n&&(s.className?s.className+=" "+n:s.className=n),r&&(s.style=ye({},s.style,r)))}return a.a.createElement("a",ye({},s,{onClick:this.handleClick,ref:o}))}}),Ee=Object.assign||function(e){for(var t=1;t=0;r--){var i=e[r].path||"";if(n=i.replace(/\/*$/,"/")+n,0===i.indexOf("/"))break}return"/"+n}},propTypes:{path:u.string,from:u.string,to:u.string.isRequired,query:u.object,state:u.object,onEnter:U,children:U},render:function(){i()(!1)}}),_e=Ce,xe=l()({displayName:"IndexRedirect",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=_e.createRouteFromReactElement(e))}},propTypes:{to:u.string.isRequired,query:u.object,state:u.object,onEnter:U,children:U},render:function(){i()(!1)}}),Se=(l()({displayName:"IndexRoute",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=P(e))}},propTypes:{path:U,component:K,components:H,getComponent:u.func,getComponents:u.func},render:function(){i()(!1)}}),l()({displayName:"Route",statics:{createRouteFromReactElement:P},propTypes:{path:u.string,component:K,components:H,getComponent:u.func,getComponents:u.func},render:function(){i()(!1)}})),ke=(n(221),n(306)),Oe=n.n(ke),Te=n(307),Ae=n.n(Te);n(587);Object.assign;var Pe=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:o.createElement;return function(t,n){return i.reduceRight((function(e,t){return t(e,n)}),e(t,n))}};return function(e){return r.reduceRight((function(t,n){return n(t,e)}),a.a.createElement(le,Pe({},e,{createElement:s(e.createElement)})))}},Ne=n(588),je=n.n(Ne),De=!("undefined"==typeof window||!window.document||!window.document.createElement);function Ie(e){var t=void 0;return De&&(t=function(e){return function(t){return Oe()(Ae()(e))(t)}}(e)()),t}var Le=Ie(je.a),Re=n(589);Ie(n.n(Re).a);n.d(t,"e",(function(){return ve})),n.d(t,"b",(function(){return we})),n.d(t,"a",(function(){return xe})),n.d(t,"c",(function(){return _e})),n.d(t,"d",(function(){return Se})),n.d(t,"f",(function(){return Me})),n.d(t,"g",(function(){return Le}))},function(e,t,n){e.exports=n(816)},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));n(36);var r,i=n(4),o=n(3),a=n(7),s=n(5),l=n(8),u=n(0),c=n.n(u),f=n(10),d=n.n(f),p=n(9),h=n(309),m=n(595),v=n.n(m),g=d()(v.a,{allowMultiple:!0})(r=function(e){function t(){var e,n;Object(i.a)(this,t);for(var r=arguments.length,o=new Array(r),l=0;l2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return null;var r=Object(a.z)(e);return function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=i?"".concat(r,"_").concat(i):r;if(-1!=n.indexOf(o))return e(++i);var a=!0,s=!1,l=void 0;try{for(var u,c=t[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var f=u.value;if(f.nameId==o)return e(++i)}}catch(e){s=!0,l=e}finally{try{a||null==c.return||c.return()}finally{if(s)throw l}}return o}()}function B(e){var t=i.store.getState().pay.payPlans,n=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var l=a.value;if(l.origin&&l.origin.id==e)return l}}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return null}function z(){var e=i.store.getState().pay.payPlans,t=!0,n=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var s=o.value;if(s.isFree)return s}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}return null}function U(e){if(!e)return!1;var t=i.store.getState().pay.payPlans,n=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){if(a.value.greaterThan(e))return!1}}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return!0}function K(e){var t=i.store.getState().pay.stripeData;if(!t||!t.sources||!e)return null;var n=!0,r=!1,o=void 0;try{for(var a,s=t.sources[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var l=a.value;if(l.id==e)return l}}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return null}},function(e,t,n){"use strict";var r=n(53),i=n(158).f,o=n(478),a=n(41),s=n(85),l=n(122),u=n(91),c=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,f,d,p,h,m,v,g,y=e.target,b=e.global,w=e.stat,E=e.proto,C=b?r:w?r[y]:(r[y]||{}).prototype,_=b?a:a[y]||(a[y]={}),x=_.prototype;for(d in t)n=!o(b?d:y+(w?".":"#")+d,e.forced)&&C&&u(C,d),h=_[d],n&&(m=e.noTargetGet?(g=i(C,d))&&g.value:C[d]),p=n&&m?m:t[d],n&&typeof h==typeof p||(v=e.bind&&n?s(p,r):e.wrap&&n?c(p):E&&"function"==typeof p?s(Function.call,p):p,(e.sham||p&&p.sham||h&&h.sham)&&l(v,"sham",!0),_[d]=v,E&&(u(a,f=y+"Prototype")||l(a,f,{}),a[f][d]=p,e.real&&x&&!x[d]&&l(x,d,p)))}},function(e,t,n){var r=n(43),i=n(175).f,o=n(107),a=n(108),s=n(313),l=n(405),u=n(230);e.exports=function(e,t){var n,c,f,d,p,h=e.target,m=e.global,v=e.stat;if(n=m?r:v?r[h]||s(h,{}):(r[h]||{}).prototype)for(c in t){if(d=t[c],f=e.noTargetGet?(p=i(n,c))&&p.value:n[c],!u(m?c:h+(v?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;l(d,f)}(e.sham||f&&f.sham)&&o(d,"sham",!0),a(n,c,d,e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,i=n(4),o=n(3),a=n(7),s=n(5),l=n(8),u=n(0),c=n.n(u),f=n(10),d=n.n(f),p=n(151),h=n(594),m=n.n(h),v=d()(m.a,{allowMultiple:!0})(r=function(e){function t(){return Object(i.a)(this,t),Object(a.a)(this,Object(s.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(o.a)(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.color,r=e.onClick,i=e.type,o=e.disabled,a=e.DOMRef,s=e.showLoader;i||(i="button");var l="ButtonControl";return o?(r=null,l+=" ButtonControl-disabled"):n&&(l+=" ButtonControl-"+n),c.a.createElement("button",{styleName:l,onClick:r,type:i,ref:a},t,s&&c.a.createElement("div",{styleName:"loader-wrapper"},c.a.createElement(p.a,null)))}}]),t}(u.Component))||r},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.assign||function(e){for(var t=1;t: `children` prop will be ignored.")}},{key:"render",value:function(){var e=void 0,t=void 0,n=void 0,r=this.props,o=r.element,a=r.raw,l=r.src,c=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(r,["element","raw","src"]);return!0===a&&(e="svg",n=(0,u.extractSVGProps)(l),t=(0,u.getSVGFromSource)(l).innerHTML),t=t||l,e=e||o,n=n||{},s.default.createElement(e,i({},n,c,{src:null,children:null,dangerouslySetInnerHTML:{__html:t}}))}}]),t}(s.default.Component);t.default=f,f.defaultProps={element:"i",raw:!1,src:""},f.propTypes={src:l.string.isRequired,element:l.string,raw:l.bool}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";n.r(t);n(36);var r=n(4),i=n(3),o=n(7),a=n(5),s=n(8),l={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(l.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&u.indexOf(Object.prototype.toString.call(e))>-1};function f(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return l.iterable&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function m(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function v(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=v(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:l.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:l.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():l.arrayBuffer&&l.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,n,r=m(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=v(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function C(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function _(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},b.call(E.prototype),b.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];_.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})};var S=self.DOMException;try{new S}catch(e){(S=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),S.prototype.constructor=S}function k(e,t){return new Promise((function(n,r){var i=new E(e,t);if(i.signal&&i.signal.aborted)return r(new S("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;n(new _(i,r))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.onabort=function(){r(new S("Aborted","AbortError"))},o.open(i.method,i.url,!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&l.blob&&(o.responseType="blob"),i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}k.polyfill=!0,self.fetch||(self.fetch=k,self.Headers=h,self.Request=E,self.Response=_);n(634),n(635),n(636);var O=n(0),T=n.n(O),A=n(64),P=n.n(A),M=n(1),N=n.n(M),j=T.a.createContext(null);var D=function(e){e()},I=function(){return D},L=null,R={notify:function(){}};var F=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=R,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t,n;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=(e=I(),t=[],n=[],{clear:function(){n=L,t=L},notify:function(){var r=t=n;e((function(){for(var e=0;e=0||(i[n]=e[n]);return i}var H=n(395),q=n.n(H),V=n(21),W=n.n(V),Y=n(222),G="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?O.useLayoutEffect:O.useEffect,$=[],J=[null,null];function Q(e,t){var n=e[1];return[t.payload,n+1]}var Z=function(){return[null,0]};function X(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,i=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,o=n.methodName,a=void 0===o?"connectAdvanced":o,s=n.renderCountProp,l=void 0===s?void 0:s,u=n.shouldHandleStateChanges,c=void 0===u||u,f=n.storeKey,d=void 0===f?"store":f,p=n.withRef,h=void 0!==p&&p,m=n.forwardRef,v=void 0!==m&&m,g=n.context,y=void 0===g?j:g,b=K(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);W()(void 0===l,"renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension"),W()(!h,"withRef is removed. To access the wrapped instance, use a ref on the connected component");W()("store"===d,"storeKey has been removed and does not do anything. To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: . You may also pass a {context : MyContext} option to connect");var w=y;return function(t){var n=t.displayName||t.name||"Component",r=i(n),o=U({},b,{getDisplayName:i,methodName:a,renderCountProp:l,shouldHandleStateChanges:c,storeKey:d,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=b.pure;var u=s?O.useMemo:function(e){return e()};function f(n){var i=Object(O.useMemo)((function(){var e=n.forwardedRef,t=K(n,["forwardedRef"]);return[n.context,e,t]}),[n]),a=i[0],s=i[1],l=i[2],f=Object(O.useMemo)((function(){return a&&a.Consumer&&Object(Y.isContextConsumer)(T.a.createElement(a.Consumer,null))?a:w}),[a,w]),d=Object(O.useContext)(f),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),h=Boolean(d)&&Boolean(d.store);W()(p||h,'Could not find "store" in the context of "'+r+'". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to '+r+" in connect options.");var m=p?n.store:d.store,v=Object(O.useMemo)((function(){return function(t){return e(t.dispatch,o)}(m)}),[m]),g=Object(O.useMemo)((function(){if(!c)return J;var e=new F(m,p?null:d.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[m,p,d]),y=g[0],b=g[1],E=Object(O.useMemo)((function(){return p?d:U({},d,{subscription:y})}),[p,d,y]),C=Object(O.useReducer)(Q,$,Z),_=C[0][0],x=C[1];if(_&&_.error)throw _.error;var S=Object(O.useRef)(),k=Object(O.useRef)(l),A=Object(O.useRef)(),P=Object(O.useRef)(!1),M=u((function(){return A.current&&l===k.current?A.current:v(m.getState(),l)}),[m,_,l]);G((function(){k.current=l,S.current=M,P.current=!1,A.current&&(A.current=null,b())})),G((function(){if(c){var e=!1,t=null,n=function(){if(!e){var n,r,i=m.getState();try{n=v(i,k.current)}catch(e){r=e,t=e}r||(t=null),n===S.current?P.current||b():(S.current=n,A.current=n,P.current=!0,x({type:"STORE_UPDATED",payload:{error:r}}))}};y.onStateChange=n,y.trySubscribe(),n();return function(){if(e=!0,y.tryUnsubscribe(),y.onStateChange=null,t)throw t}}}),[m,y,v]);var N=Object(O.useMemo)((function(){return T.a.createElement(t,U({},M,{ref:s}))}),[s,t,M]);return Object(O.useMemo)((function(){return c?T.a.createElement(f.Provider,{value:E},N):N}),[f,N,E])}var p=s?T.a.memo(f):f;if(p.WrappedComponent=t,p.displayName=r,v){var h=T.a.forwardRef((function(e,t){return T.a.createElement(p,U({},e,{forwardedRef:t}))}));return h.displayName=r,h.WrappedComponent=t,q()(h,t)}return q()(p,t)}}var ee=Object.prototype.hasOwnProperty;function te(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function ne(e,t){if(te(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Oe(e,t){return e===t}var Te,Ae,Pe,Me,Ne,je,De,Ie,Le,Re,Fe,Be,ze=(Pe=(Ae=void 0===Te?{}:Te).connectHOC,Me=void 0===Pe?X:Pe,Ne=Ae.mapStateToPropsFactories,je=void 0===Ne?we:Ne,De=Ae.mapDispatchToPropsFactories,Ie=void 0===De?be:De,Le=Ae.mergePropsFactories,Re=void 0===Le?Ce:Le,Fe=Ae.selectorFactory,Be=void 0===Fe?Se:Fe,function(e,t,n,r){void 0===r&&(r={});var i=r,o=i.pure,a=void 0===o||o,s=i.areStatesEqual,l=void 0===s?Oe:s,u=i.areOwnPropsEqual,c=void 0===u?ne:u,f=i.areStatePropsEqual,d=void 0===f?ne:f,p=i.areMergedPropsEqual,h=void 0===p?ne:p,m=K(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),v=ke(e,je,"mapStateToProps"),g=ke(t,Ie,"mapDispatchToProps"),y=ke(n,Re,"mergeProps");return Me(Be,U({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:v,initMapDispatchToProps:g,initMergeProps:y,pure:a,areStatesEqual:l,areOwnPropsEqual:c,areStatePropsEqual:d,areMergedPropsEqual:h},m))});function Ue(){var e=Object(O.useContext)(j);return W()(e,"could not find react-redux context value; please ensure the component is wrapped in a "),e}function Ke(e){void 0===e&&(e=j);var t=e===j?Ue:function(){return Object(O.useContext)(e)};return function(){return t().store}}var He=Ke();!function(e){void 0===e&&(e=j);var t=e===j?He:Ke(e)}();var qe=function(e,t){return e===t};var Ve;!function(e){void 0===e&&(e=j);var t=e===j?Ue:function(){return Object(O.useContext)(e)}}();Ve=A.unstable_batchedUpdates,D=Ve;var We=n(12),Ye=n(190),Ge=n(308),$e=n(191),Je=n(590),Qe=n.n(Je),Ze=n(591),Xe=n.n(Ze),et={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},tt=Object.keys(et).map((function(e){return et[e]})),nt={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},rt=Object.keys(nt).reduce((function(e,t){return e[nt[t]]=t,e}),{}),it=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},ot=function(e){var t=it(e,et.TITLE),n=it(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,(function(){return t}));var r=it(e,"defaultTitle");return t||r||void 0},at=function(e){return it(e,"onChangeClientState")||function(){}},st=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return Object.assign({},e,t)}),{})},lt=function(e,t){return t.filter((function(e){return void 0!==e[et.BASE]})).map((function(e){return e[et.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")},pt=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},ht=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce((function(t,n){return t[nt[n]||n]=e[n],t}),t)},mt=function(e,t,n){switch(e){case et.TITLE:return{toComponent:function(){return n=ht(t.titleAttributes,{key:e=t.title,"data-rh":!0}),[T.a.createElement(et.TITLE,n,e)];var e,n},toString:function(){return function(e,n,r,i){var o=pt(t.titleAttributes),a=ct(n);return o?"<"+e+' data-rh="true" '+o+">"+dt(a,i)+""+e+">":"<"+e+' data-rh="true">'+dt(a,i)+""+e+">"}(e,t.title,0,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return ht(t)},toString:function(){return pt(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r={key:n,"data-rh":!0};return Object.keys(t).forEach((function(e){var n=nt[e]||e;"innerHTML"===n||"cssText"===n?r.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:r[n]=t[e]})),T.a.createElement(e,r)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var i=Object.keys(r).filter((function(e){return!("innerHTML"===e||"cssText"===e)})).reduce((function(e,t){var i=void 0===r[t]?t:t+'="'+dt(r[t],n)+'"';return e?e+" "+i:i}),""),o=r.innerHTML||r.cssText||"",a=-1===ft.indexOf(e);return t+"<"+e+' data-rh="true" '+i+(a?"/>":">"+o+""+e+">")}),"")}(e,t,n)}}}},vt=function(e){var t=e.bodyAttributes,n=e.encode,r=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,s=e.scriptTags,l=e.styleTags,u=e.title;void 0===u&&(u="");var c=e.titleAttributes;return{base:mt(et.BASE,e.baseTag,n),bodyAttributes:mt("bodyAttributes",t,n),htmlAttributes:mt("htmlAttributes",r,n),link:mt(et.LINK,i,n),meta:mt(et.META,o,n),noscript:mt(et.NOSCRIPT,a,n),script:mt(et.SCRIPT,s,n),style:mt(et.STYLE,l,n),title:mt(et.TITLE,{title:u,titleAttributes:c},n)}},gt=T.a.createContext({}),yt=N.a.shape({setHelmet:N.a.func,helmetInstances:N.a.shape({get:N.a.func,add:N.a.func,remove:N.a.func})}),bt="undefined"!=typeof document,wt=function(e){function t(n){var r=this;e.call(this,n),this.instances=[],this.value={setHelmet:function(e){r.props.context.helmet=e},helmetInstances:{get:function(){return r.instances},add:function(e){r.instances.push(e)},remove:function(e){var t=r.instances.indexOf(e);r.instances.splice(t,1)}}},t.canUseDOM||(n.context.helmet=vt({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.render=function(){return T.a.createElement(gt.Provider,{value:this.value},this.props.children)},t}(O.Component);wt.canUseDOM=bt,wt.propTypes={context:N.a.shape({helmet:N.a.shape()}),children:N.a.node.isRequired},wt.defaultProps={context:{}},wt.displayName="HelmetProvider";var Et=function(e,t){var n,r=document.head||document.querySelector(et.HEAD),i=r.querySelectorAll(e+"[data-rh]"),o=[].slice.call(i),a=[];return t&&t.length&&t.forEach((function(t){var r=document.createElement(e);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&("innerHTML"===i?r.innerHTML=t.innerHTML:"cssText"===i?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(i,void 0===t[i]?"":t[i]));r.setAttribute("data-rh","true"),o.some((function(e,t){return n=t,r.isEqualNode(e)}))?o.splice(n,1):a.push(r)})),o.forEach((function(e){return e.parentNode.removeChild(e)})),a.forEach((function(e){return r.appendChild(e)})),{oldTags:o,newTags:a}},Ct=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),i=r?r.split(","):[],o=[].concat(i),a=Object.keys(t),s=0;s=0;f-=1)n.removeAttribute(o[f]);i.length===o.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==a.join(",")&&n.setAttribute("data-rh",a.join(","))}},_t=function(e,t){var n=e.baseTag,r=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,s=e.onChangeClientState,l=e.scriptTags,u=e.styleTags,c=e.title,f=e.titleAttributes;Ct(et.BODY,e.bodyAttributes),Ct(et.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=ct(e)),Ct(et.TITLE,t)}(c,f);var d={baseTag:Et(et.BASE,n),linkTags:Et(et.LINK,i),metaTags:Et(et.META,o),noscriptTags:Et(et.NOSCRIPT,a),scriptTags:Et(et.SCRIPT,l),styleTags:Et(et.STYLE,u)},p={},h={};Object.keys(d).forEach((function(e){var t=d[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(h[e]=d[e].oldTags)})),t&&t(),s(e,p,h)},xt=null,St=function(e){function t(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];e.apply(this,t),this.rendered=!1}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.shouldComponentUpdate=function(e){return!Xe()(e,this.props)},t.prototype.componentDidUpdate=function(){this.emitChange()},t.prototype.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},t.prototype.emitChange=function(){var e,t,n=this.props.context,r=n.setHelmet,i=null,o=(e=n.helmetInstances.get().map((function(e){var t=Object.assign({},e.props);return delete t.context,t})),{baseTag:lt(["href"],e),bodyAttributes:st("bodyAttributes",e),defer:it(e,"defer"),encode:it(e,"encodeSpecialCharacters"),htmlAttributes:st("htmlAttributes",e),linkTags:ut(et.LINK,["rel","href"],e),metaTags:ut(et.META,["name","charset","http-equiv","property","itemprop"],e),noscriptTags:ut(et.NOSCRIPT,["innerHTML"],e),onChangeClientState:at(e),scriptTags:ut(et.SCRIPT,["src","innerHTML"],e),styleTags:ut(et.STYLE,["cssText"],e),title:ot(e),titleAttributes:st("titleAttributes",e)});wt.canUseDOM?(t=o,xt&&cancelAnimationFrame(xt),t.defer?xt=requestAnimationFrame((function(){_t(t,(function(){xt=null}))})):(_t(t),xt=null)):vt&&(i=vt(o)),r(i)},t.prototype.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},t.prototype.render=function(){return this.init(),null},t}(O.Component);function kt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}St.propTypes={context:yt.isRequired},St.displayName="HelmetDispatcher";var Ot=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.shouldComponentUpdate=function(e){return!Qe()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case et.SCRIPT:case et.NOSCRIPT:return{innerHTML:t};case et.STYLE:return{cssText:t};default:throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return Object.assign({},r,((t={})[n.type]=(r[n.type]||[]).concat([Object.assign({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,i=e.newProps,o=e.newChildProps,a=e.nestedChildren;switch(r.type){case et.TITLE:return Object.assign({},i,((t={})[r.type]=a,t),{titleAttributes:Object.assign({},o)});case et.BODY:return Object.assign({},i,{bodyAttributes:Object.assign({},o)});case et.HTML:return Object.assign({},i,{htmlAttributes:Object.assign({},o)});default:return Object.assign({},i,((n={})[r.type]=Object.assign({},o),n))}},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=Object.assign({},t);return Object.keys(e).forEach((function(t){var r;n=Object.assign({},n,((r={})[t]=e[t],r))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return W()(tt.some((function(t){return e.type===t})),"function"==typeof e.type?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+tt.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),W()(!t||"string"==typeof t||Array.isArray(t)&&!t.some((function(e){return"string"!=typeof e})),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}"+e.type+"> ) Refer to our API for more information."),!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return T.a.Children.forEach(e,(function(e){if(e&&e.props){var i=e.props,o=i.children,a=kt(i,["children"]),s=Object.keys(a).reduce((function(e,t){return e[rt[t]||t]=a[t],e}),{}),l=e.type;switch("symbol"==typeof l?l=l.toString():n.warnOnInvalidChildren(e,o),l){case et.FRAGMENT:t=n.mapChildrenToProps(o,t);break;case et.LINK:case et.META:case et.NOSCRIPT:case et.SCRIPT:case et.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:s,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:o})}}})),this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=kt(e,["children"]),r=Object.assign({},n);return t&&(r=this.mapChildrenToProps(t,r)),T.a.createElement(gt.Consumer,null,(function(e){return T.a.createElement(St,Object.assign({},r,{context:e}))}))},t}(O.Component);Ot.propTypes={base:N.a.object,bodyAttributes:N.a.object,children:N.a.oneOfType([N.a.arrayOf(N.a.node),N.a.node]),defaultTitle:N.a.string,defer:N.a.bool,encodeSpecialCharacters:N.a.bool,htmlAttributes:N.a.object,link:N.a.arrayOf(N.a.object),meta:N.a.arrayOf(N.a.object),noscript:N.a.arrayOf(N.a.object),onChangeClientState:N.a.func,script:N.a.arrayOf(N.a.object),style:N.a.arrayOf(N.a.object),title:N.a.string,titleAttributes:N.a.object,titleTemplate:N.a.string},Ot.defaultProps={defer:!0,encodeSpecialCharacters:!0},Ot.displayName="Helmet";var Tt=n(10),At=n.n(Tt);function Pt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Mt(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Nt=!1,jt=T.a.createContext(null),Dt="unmounted",It="exited",Lt="entering",Rt="entered",Ft=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=It,r.appearStatus=Lt):i=Rt:i=t.unmountOnExit||t.mountOnEnter?Dt:It,r.state={status:i},r.nextCallback=null,r}Pt(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Dt?{status:It}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Lt&&n!==Rt&&(t=Lt):n!==Lt&&n!==Rt||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=P.a.findDOMNode(this);t===Lt?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===It&&this.setState({status:Dt})},n.performEnter=function(e,t){var n=this,r=this.props.enter,i=this.context?this.context.isMounting:t,o=this.getTimeouts(),a=i?o.appear:o.enter;!t&&!r||Nt?this.safeSetState({status:Rt},(function(){n.props.onEntered(e)})):(this.props.onEnter(e,i),this.safeSetState({status:Lt},(function(){n.props.onEntering(e,i),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:Rt},(function(){n.props.onEntered(e,i)}))}))})))},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n&&!Nt?(this.props.onExit(e),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:It},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:It},(function(){t.props.onExited(e)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Dt)return null;var t=this.props,n=t.children,r=K(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return T.a.createElement(jt.Provider,{value:null},n(e,r));var i=T.a.Children.only(n);return(T.a.createElement(jt.Provider,{value:null},T.a.cloneElement(i,r)))},t}(T.a.Component);function Bt(){}Ft.contextType=jt,Ft.propTypes={},Ft.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Bt,onEntering:Bt,onEntered:Bt,onExit:Bt,onExiting:Bt,onExited:Bt},Ft.UNMOUNTED=0,Ft.EXITED=1,Ft.ENTERING=2,Ft.ENTERED=3,Ft.EXITING=4;var zt=Ft,Ut=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Mt(n.className,r):n.setAttribute("class",Mt(n.className&&n.className.baseVal||"",r)));var n,r}))},Kt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;ithis.max&&(t=this.max),t}},{key:"render",value:function(){var e=this.props,t=e.type,n=e.label,r=e.placeholder,i=e.readOnly,o=e.autoFocus,a=e.onKeyDown,s=e.DOMRef,l=e.icon;return T.a.createElement(rn.a,{value:this.state.value,onChange:this.onChange,onBlur:this.onBlur,type:t,label:n,icon:l,onKeyDown:a,placeholder:r,autoFocus:o,readOnly:i,DOMRef:s})}}]),t}(O.Component)),Mn=n(600),Nn=n.n(Mn),jn=At()(Nn.a,{allowMultiple:!0})($t=function(e){function t(e){var n;return Object(r.a)(this,t),(n=Object(o.a)(this,Object(a.a)(t).call(this,e))).state={values:[]},n.inputs=[],n.onKeyDown=function(e,t){e.stopPropagation();var r=e.keyCode;13==r||40==r?n.inputs[t+1]?n.inputs[t+1].focus():n.onPlus(t):38==r&&t&&n.inputs[--t].focus()},n.onPlus=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!n.props.readOnly){var t=n.state.values?n.state.values:[""],r=t.slice(0,e+1),i=t.slice(e+1);t=r.concat("",i),n.props.onChange(t)}},n.onMinus=function(e){if(!n.props.readOnly){var t=n.state.values.slice();t.splice(e,1),n.setState({values:t}),n.props.onChange(t)}},n.onChange=function(e,t){var r=n.state.values.slice();r[t]=e,n.setState({values:r}),n.props.onChange(r)},e.values&&(n.state.values=e.values),n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.values;t||(t=[]),this.setState({values:t})}},{key:"isFocused",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=this.inputs[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){if(r.value===document.activeElement)return!0}}catch(e){t=!0,n=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw n}}return!1}},{key:"render",value:function(){var e=this,t=this.props,n=t.disableEmpty,r=t.readOnly,i=t.numeric,o=t.numericInt,a=t.titled,s=n?[""]:[];if(this.state.values.length&&(s=this.state.values),this.inputs=[],s.length){for(var l=[],u=function(t){var u=void 0;u=i?T.a.createElement(Pn,{type:"big",isInt:o,value:s[t],readOnly:r,titled:a,onChange:function(n){return e.onChange(n,t)},DOMRef:function(n){return e.inputs[t]=n},onKeyDown:function(n){return e.onKeyDown(n,t)}}):T.a.createElement(rn.a,{type:"big",value:s[t],readOnly:r,titled:a,DOMRef:function(n){return e.inputs[t]=n},onChange:function(n){return e.onChange(n,t)},onKeyDown:function(n){return e.onKeyDown(n,t)}}),l.push(T.a.createElement("div",{styleName:"item",key:t},u,!r&&T.a.createElement("div",{styleName:"item-plus",onClick:function(){return e.onPlus(t)}},"+"),!r&&(t>0||!n)&&T.a.createElement("div",{styleName:"item-minus",onClick:function(){return e.onMinus(t)}},"–")))},c=0;ct.max,t.isError=e}break;case on.y:switch(this.state.appearance){case on.m:case on.l:var n=this.validations.range;e=n&&n.active&&n.minActive&&n.maxActive&&n.min>n.max,n.isError=e}break;case on.x:switch(this.state.appearance){case on.h:var r=this.validations.range;e=r&&r.active&&r.minActive&&r.maxActive&&r.min>r.max,r.isError=e;break;case on.j:}break;case on.w:switch(this.state.appearance){case on.f:var i=this.validations.range;e=i&&i.active&&i.minActive&&i.maxActive&&i.min>i.max,i.isError=e}break;case on.v:switch(this.state.appearance){case on.c:case on.d:case on.e:var o=this.validations.rangeDate;if(o&&o.active&&o.minActive&&o.maxActive)e=new Date(o.min)>new Date(o.max);o.isError=e}break;case on.A:var a=this.validations.models;a&&a.active&&!a.modelsList.length&&(e=!0),a.isError=e;break;case on.z:var s=this.validations.fileSize,l=!1;if(s&&s.active&&s.minActive&&s.maxActive)l=Object(sn.y)(s.min,s.minUnit,sn.a)>Object(sn.y)(s.max,s.maxUnit,sn.a);s.isError=l;var u=this.validations.fileTypes,c=!1;u&&u.active&&!u.types.length&&(c=!0),u.isError=c,e=l||c}return e}},{key:"render",value:function(){var e=this,t=this.state.name.length?this.state.name:"?",n="tab",r="tab",i="tab",o=null;switch(this.state.tab){case vr:n+=" active",o=T.a.createElement("div",null,T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(rn.a,{label:"Title",placeholder:"Main Title",DOMRef:function(t){return e.focusElm=t},onChange:this.onChangeName,titled:!0,value:this.state.name})),this.state.errorName&&T.a.createElement("div",{styleName:"error-same-name"},"This name is already in use."),T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(rn.a,{label:"Field ID",icon:"lock",value:this.state.nameId,titled:!0,readOnly:!0})),T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(An,{label:"Type",disabled:this.updating||this.state.isTitle,list:this.typeList,onSuggest:this.onChangeType,titled:!0,current:this.state.type})),T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(mn,{label:"List (keeping multiple values instead of one)",checked:this.state.isList,onChange:this.onChangeIsList,disabled:!Object(on.G)(this.state)||this.updating})),T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(mn,{label:"Entry Title",checked:this.state.isTitle,onChange:this.onChangeIsTitle,disabled:!Object(on.H)(this.state)})),T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(mn,{label:"Disabled",checked:this.state.isDisabled,onChange:this.onChangeIsDisabled,disabled:this.state.isTitle})));break;case"TAB_APPEARANCE":r+=" active";var a=null;switch(this.state.type){case on.B:switch(this.state.appearance){case on.o:a=T.a.createElement("div",null,T.a.createElement("div",{styleName:"label"},"Valid values:"),T.a.createElement(jn,{values:this.state.validValues,ref:function(t){return e.validValuesList=t},onChange:this.onValidValuesChange,disableEmpty:!0}))}break;case on.x:case on.w:switch(this.state.appearance){case on.i:case on.g:a=T.a.createElement("div",null,T.a.createElement("div",{styleName:"label"},"Valid values:"),T.a.createElement(jn,{values:this.state.validValues,ref:function(t){return e.validValuesList=t},numeric:!0,numericInt:this.state.type==on.x,onChange:this.onValidValuesChange,disableEmpty:!0}))}break;case on.u:switch(this.state.appearance){case on.a:a=T.a.createElement("div",{styleName:"input-wrapper boolean-text"},T.a.createElement("div",{styleName:"input"},T.a.createElement(rn.a,{placeholder:"Text for yes",onChange:this.onChangeBoolTextYes,value:this.state.boolTextYes})),T.a.createElement("div",{styleName:"input"},T.a.createElement(rn.a,{placeholder:"Text for no",onChange:this.onChangeBoolTextNo,value:this.state.boolTextNo})))}}o=T.a.createElement("div",null,T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(An,{label:"Appearance",disabled:this.state.isTitle,list:this.state.appList,onSuggest:this.onChangeAppearance,current:this.state.appearance})),a);break;case gr:i+=" active";var s=null;switch(this.state.type){case on.B:switch(this.state.appearance){case on.p:case on.q:s=T.a.createElement(qn,{validations:this.validations,update:this.onUpdateValidations})}break;case on.y:switch(this.state.appearance){case on.m:case on.l:s=T.a.createElement(qn,{validations:this.validations,update:this.onUpdateValidations})}break;case on.x:switch(this.state.appearance){case on.h:s=T.a.createElement(zn,{validations:this.validations,update:this.onUpdateValidations});break;case on.j:}break;case on.w:switch(this.state.appearance){case on.f:s=T.a.createElement(zn,{validations:this.validations,update:this.onUpdateValidations})}break;case on.v:switch(this.state.appearance){case on.c:case on.d:case on.e:s=T.a.createElement(Jn,{appearance:this.state.appearance,validations:this.validations,update:this.onUpdateValidations})}break;case on.A:s=T.a.createElement(er,{validations:this.validations,models:this.models,update:this.onUpdateValidations});break;case on.z:s=T.a.createElement(mr,{validations:this.validations,update:this.onUpdateValidations})}o=T.a.createElement("div",null,T.a.createElement("div",{styleName:"validation"},T.a.createElement("div",{styleName:"switch"},T.a.createElement(yn,{title:"Required",checked:this.state.isRequired,onChange:this.onChangeIsRequired,disabled:this.state.isTitle}))),Object(on.I)(this.state)&&T.a.createElement("div",{styleName:"validation"},T.a.createElement("div",{styleName:"switch"},T.a.createElement(yn,{title:"Unique value",checked:this.state.isUnique,onChange:this.onChangeIsUnique}))),s)}return T.a.createElement("div",{styleName:"modal",onClick:this.close},T.a.createElement("div",{styleName:"modal-inner",onClick:function(e){return e.stopPropagation()}},T.a.createElement("div",{styleName:"modal-header"},T.a.createElement("div",{styleName:"titles"},T.a.createElement("div",{styleName:"title"},t)),T.a.createElement("div",{styleName:"tabs"},T.a.createElement("div",{styleName:n,ref:function(t){e.tabRef||(e.tabRef=t)},onClick:function(t){return e.onClickTab(t,vr)}},"General"),T.a.createElement("div",{styleName:r,onClick:function(t){return e.onClickTab(t,"TAB_APPEARANCE")}},"Appearance"),T.a.createElement("div",{styleName:i,onClick:function(t){return e.onClickTab(t,gr)}},"Validations"),T.a.createElement("div",{styleName:"caret",ref:function(t){e.caretRef=t}}))),T.a.createElement("div",{styleName:"content"},T.a.createElement("form",null,o,T.a.createElement("div",{styleName:"input-wrapper buttons-wrapper"},T.a.createElement("div",{styleName:"buttons-inner"},T.a.createElement(nn.a,{color:"black",value:"Cancel",onClick:this.close})),T.a.createElement("div",{styleName:"buttons-inner"},T.a.createElement(nn.a,{color:"purple",value:"Save Changes",onClick:this.onSave})))))))}}]),t}(O.Component))||ir,br=n(601),wr=n.n(br),Er=At()(wr.a,{allowMultiple:!0})(or=function(e){function t(){return Object(r.a)(this,t),Object(o.a)(this,Object(a.a)(t).apply(this,arguments))}return Object(s.a)(t,e),Object(i.a)(t,[{key:"getIconName",value:function(e){switch(Object(sn.w)(e)){case sn.q:return"txt";case sn.i:return"html";case sn.s:return"xml";case sn.l:return"md";case sn.k:return"json";case sn.n:return"pdf";case sn.h:return"doc";case sn.p:return"xls";case sn.o:return"ppt";case sn.e:return"archive";case sn.g:return"exe"}return"other"}},{key:"getIcon",value:function(e){var t=this.getIconName(e.type);return T.a.createElement("a",{styleName:"link",href:e.file.url(),target:"_blank"},T.a.createElement(Cn.a,{styleName:"icon",src:n(1091)("./".concat(t,".svg"))}))}},{key:"render",value:function(){var e=this.props.item;if(!e||!e.file)return null;switch(Object(sn.w)(e.type)){case sn.j:return T.a.createElement("a",{href:e.file.url(),target:"_blank"},T.a.createElement("div",{styleName:"image",style:{backgroundImage:"url(".concat(e.file.url(),")")}}));case sn.f:return T.a.createElement("audio",{src:e.file.url(),type:e.type,controls:!0,styleName:"audio"});case sn.r:return T.a.createElement("video",{src:e.file.url(),type:e.type,controls:!0,styleName:"video"});default:return this.getIcon(e)}}}]),t}(O.Component))||or,Cr=n(602),_r=n.n(Cr),xr=At()(_r.a,{allowMultiple:!0})(ar=function(e){function t(e){var n;return Object(r.a)(this,t),(n=Object(o.a)(this,Object(a.a)(t).call(this,e))).state={selectedItems:[],searchText:""},n.isMult=!1,n.filters=null,n.active=!1,n.callback=null,n.items=[],n.focusElm=null,n.onKeyDown=function(e){e||(e=window.event),e.stopPropagation(),13==e.keyCode?setTimeout(n.onChoose,1):27==e.keyCode&&(n.state.searchText?n.setState({searchText:""}):setTimeout(n.close,1))},n.onSearch=function(e){n.setState({searchText:e,selectedItems:[]})},n.onSelect=function(e){if(n.isMult){var t=n.state.selectedItems,r=t.indexOf(e);-1==r?t.push(e):t.splice(r,1),n.setState({selectedItems:t})}else n.setState({selectedItems:[e]})},n.onSearchClear=function(){n.setState({searchText:""}),n.focusElm.focus()},n.onChoose=function(){n.state.selectedItems.length&&n.active&&(n.callback(n.state.selectedItems),n.close())},n.close=function(){n.active=!1,n.props.onClose()},n.filterSize=function(e){if(!e.size||!n.filters)return!0;var t=n.filters.fileSize;if(!t||!t.active)return!0;var r=0;t.minActive&&(r=Object(sn.y)(t.min,t.minUnit,sn.a));var i=tr.a;return t.maxActive&&(i=Object(sn.y)(t.max,t.maxUnit,sn.a)),e.size>=r&&e.size<=i},n.filterType=function(e){if(!e.type||!n.filters)return!0;var t=n.filters.fileTypes;if(!(t&&t.active&&t.types&&t.types.length))return!0;var r=Object(sn.w)(e.type),i=!0,o=!1,a=void 0;try{for(var s,l=t.types[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){if(r==s.value)return!0}}catch(e){o=!0,a=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw a}}return!1},n.isMult=e.params.isMult,n.filters=e.params.filters,n.callback=e.params.callback,n.items=zu.getState().media.items,n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.active=!0,document.addEventListener("keydown",this.onKeyDown),this.focusElm&&setTimeout((function(){return e.focusElm.focus()}),2)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.onKeyDown)}},{key:"searchMatch",value:function(e){if(!this.state.searchText)return!0;var t=this.state.searchText.toLowerCase();return-1!=e.toLowerCase().indexOf(t)}},{key:"render",value:function(){var e=this;return T.a.createElement("div",{styleName:"modal",onClick:this.close},T.a.createElement("div",{styleName:"modal-inner",onClick:function(e){return e.stopPropagation()}},T.a.createElement("div",{styleName:"content"},T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(rn.a,{type:"big",label:"search media files",DOMRef:function(t){return e.focusElm=t},value:this.state.searchText,icon:this.state.searchText?"cross":"search",onIconClick:this.state.searchText?this.onSearchClear:null,onChange:this.onSearch})),T.a.createElement("div",{styleName:"media"},this.items.filter((function(e){return!e.assigned})).filter(this.filterSize).filter(this.filterType).filter((function(t){return e.searchMatch(t.name)})).map((function(t){var n="media-item";return-1!=e.state.selectedItems.indexOf(t)&&(n+=" media-chosen"),T.a.createElement("div",{styleName:n,key:t.origin.id},T.a.createElement("div",{styleName:"media-header",onClick:function(){return e.onSelect(t)}},t.name),T.a.createElement(Er,{item:t}))}))),T.a.createElement("div",{styleName:"input-wrapper buttons-wrapper"},T.a.createElement("div",{styleName:"buttons-inner"},T.a.createElement(nn.a,{color:"green",value:"Choose",disabled:!this.state.selectedItems.length,onClick:this.onChoose})),T.a.createElement("div",{styleName:"buttons-inner"},T.a.createElement(nn.a,{color:"gray",value:"Cancel",onClick:this.close}))))))}}]),t}(O.Component))||ar,Sr=(n(545),n(546),n(310)),kr=n.n(Sr),Or=n(603),Tr=n.n(Or),Ar=n(140),Pr=n.n(Ar),Mr=At()(Tr.a,{allowMultiple:!0})(sr=function(e){function t(e){var n;return Object(r.a)(this,t),(n=Object(o.a)(this,Object(a.a)(t).call(this,e))).text="",n.onClose=null,n.callback=null,n.onClosing=function(){n.callback(n.text),n.onClose()},n.onChange=function(e){n.text=e},n.onClose=e.onClose,n.callback=e.params.callback,n.text=e.params.text,n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){return T.a.createElement("div",{styleName:"wrapper"},T.a.createElement("div",{styleName:"return",onClick:this.onClosing},T.a.createElement(Cn.a,{styleName:"cross",src:Pr.a})),T.a.createElement(kr.a,{styleName:"editor",text:this.text,onChange:this.onChange}))}}]),t}(O.Component))||sr,Nr=(n(94),n(398)),jr=n.n(Nr),Dr=n(604),Ir=n(605),Lr=n.n(Ir),Rr=(n(1212),"tabbed"),Fr=At()(Lr.a,{allowMultiple:!0})(lr=function(e){function t(e){var n;return Object(r.a)(this,t),(n=Object(o.a)(this,Object(a.a)(t).call(this,e))).state={mdeState:{markdown:""}},n.onChange=void 0,n.layout=Rr,n.converter=null,n.onChangeMde=function(e){var t=n.state.mdeState.markdown;n.setState({mdeState:e}),e.markdown!=t&&n.onChange(e.markdown)},n.genPreview=function(e){return Promise.resolve(n.converter.makeHtml(e))},e.value&&(n.state.mdeState.markdown=e.value),n.onChange=e.onChange,e.layout&&(n.layout=e.layout),n.converter=new Dr.Converter({tables:!0,simplifiedAutoLink:!0,simpleLineBreaks:!0,tasklists:!0,strikethrough:!0}),n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"componentWillReceiveProps",value:function(e){var t=this,n=this.state.mdeState,r=e.value?e.value:"";r!=n.markdown&&Nr.DraftUtil.buildNewMdeState(n,this.genPreview,r).then((function(e){return t.setState({mdeState:e})}))}},{key:"render",value:function(){var e=this.props.readOnly;return T.a.createElement(jr.a,{className:this.props.className,onChange:this.onChangeMde,editorState:this.state.mdeState,generateMarkdownPreview:this.genPreview,layout:this.layout,readOnly:e})}}]),t}(O.Component))||lr,Br=n(606),zr=n.n(Br),Ur=At()(zr.a,{allowMultiple:!0})(ur=function(e){function t(e){var n;return Object(r.a)(this,t),(n=Object(o.a)(this,Object(a.a)(t).call(this,e))).text="",n.onClose=null,n.callback=null,n.onClosing=function(){n.callback(n.text),n.onClose()},n.onChange=function(e){n.text=e},n.onClose=e.onClose,n.callback=e.params.callback,n.text=e.params.text,n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){var e=this.props.params.readOnly;return T.a.createElement("div",{styleName:"wrapper"},T.a.createElement("div",{styleName:"return",onClick:this.onClosing},T.a.createElement(Cn.a,{styleName:"cross",src:Pr.a})),T.a.createElement(Fr,{layout:"horizontal",value:this.text,readOnly:e,onChange:this.onChange}))}}]),t}(O.Component))||ur,Kr=n(607),Hr=n.n(Kr),qr=At()(Hr.a,{allowMultiple:!0})(cr=function(e){function t(e){var n;Object(r.a)(this,t),(n=Object(o.a)(this,Object(a.a)(t).call(this,e))).state={selectedItems:[],searchText:""},n.isMult=!1,n.callback=null,n.items=[],n.focusElm=null,n.active=!1,n.onKeyDown=function(e){e||(e=window.event),e.stopPropagation(),13==e.keyCode?setTimeout(n.onChoose,1):27==e.keyCode&&(n.state.searchText?n.setState({searchText:""}):setTimeout(n.close,1))},n.onSearch=function(e){n.setState({searchText:e,selectedItems:[]})},n.onSelect=function(e){if(n.isMult){var t=n.state.selectedItems,r=t.indexOf(e);-1==r?t.push(e):t.splice(r,1),n.setState({selectedItems:t})}else n.setState({selectedItems:[e]})},n.onSearchClear=function(){n.setState({searchText:""}),n.focusElm.focus()},n.onChoose=function(){n.state.selectedItems.length&&n.active&&(n.callback(n.isMult?n.state.selectedItems:n.state.selectedItems[0]),n.close())},n.close=function(){n.active=!1,n.props.onClose()},n.isMult=e.params.isMult,n.callback=e.params.callback;var i=e.params,s=i.currentItem,l=i.existingItems,u=i.validModels,c=e.contentItems,f=e.currentSite;return n.items=c.filter((function(e){return(!e.model.site||e.model.site==f)&&-1==l.indexOf(e)&&e!=s})),u&&(n.items=n.items.filter((function(e){return-1!=u.indexOf(e.model.nameId)}))),n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.active=!0,document.addEventListener("keydown",this.onKeyDown),this.focusElm&&setTimeout((function(){return e.focusElm.focus()}),2)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.onKeyDown)}},{key:"searchMatch",value:function(e){if(!this.state.searchText)return!0;var t=this.state.searchText.toLowerCase();return-1!=e.toLowerCase().indexOf(t)}},{key:"render",value:function(){var e=this;return T.a.createElement("div",{styleName:"modal",onClick:this.close},T.a.createElement("div",{styleName:"modal-inner",onClick:function(e){return e.stopPropagation()}},T.a.createElement("div",{styleName:"content"},T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(rn.a,{type:"big",label:"search entries",icon:this.state.searchText?"cross":"search",onIconClick:this.state.searchText?this.onSearchClear:null,value:this.state.searchText,DOMRef:function(t){return e.focusElm=t},onChange:this.onSearch})),T.a.createElement("div",{styleName:"reference"},this.items.filter((function(t){return e.searchMatch(t.title)})).map((function(t){var n="reference-item";-1!=e.state.selectedItems.indexOf(t)&&(n+=" reference-chosen");var r=t.title;return r||(r=T.a.createElement("span",{styleName:"untitled"},"Untitled")),T.a.createElement("div",{styleName:n,key:t.origin.id,onClick:function(){return e.onSelect(t)}},"[",t.model.name,"] ",r)}))),T.a.createElement("div",{styleName:"input-wrapper buttons-wrapper"},T.a.createElement("div",{styleName:"buttons-inner"},T.a.createElement(nn.a,{color:"green",value:"Choose",disabled:!this.state.selectedItems.length,onClick:this.onChoose})),T.a.createElement("div",{styleName:"buttons-inner"},T.a.createElement(nn.a,{color:"gray",value:"Cancel",onClick:this.close}))))))}}]),t}(O.Component))||cr,Vr=n(608),Wr=n.n(Vr),Yr=At()(Wr.a,{allowMultiple:!0})(fr=function(e){function t(e){var n;Object(r.a)(this,t),(n=Object(o.a)(this,Object(a.a)(t).call(this,e))).state={selectedModel:null},n.isMult=!1,n.callback=null,n.models=[],n.focusElm=null,n.active=!1,n.onKeyDown=function(e){e||(e=window.event),e.stopPropagation(),13==e.keyCode?setTimeout(n.onChoose,1):27==e.keyCode&&setTimeout(n.close,1)},n.onSelect=function(e){n.setState({selectedModel:e})},n.onChoose=function(){n.state.selectedModel&&n.active&&(n.callback(n.state.selectedModel),n.close())},n.close=function(){n.active=!1,n.props.onClose()},n.callback=e.params.callback;var i=e.params.validModels;return n.models=i?e.models.filter((function(e){return-1!=i.indexOf(e.nameId)})):e.models,n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.active=!0,document.addEventListener("keydown",this.onKeyDown),this.focusElm&&setTimeout((function(){return e.focusElm.focus()}),2)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.onKeyDown)}},{key:"render",value:function(){var e=this;return T.a.createElement("div",{styleName:"modal",onClick:this.close},T.a.createElement("div",{styleName:"modal-inner",onClick:function(e){return e.stopPropagation()}},T.a.createElement("div",{styleName:"modal-header"},T.a.createElement("div",{styleName:"title"},"Select model for new item")),T.a.createElement("div",{styleName:"content"},T.a.createElement("div",{styleName:"model"},this.models.map((function(t){var n="model-item";return e.state.selectedModel==t&&(n+=" model-chosen"),T.a.createElement("div",{styleName:n,key:t.origin.id,onClick:function(){return e.onSelect(t)}},t.name)}))),T.a.createElement("div",{styleName:"input-wrapper buttons-wrapper"},T.a.createElement("div",{styleName:"buttons-inner"},T.a.createElement(nn.a,{color:"green",value:"Choose",disabled:!this.state.selectedModel,onClick:this.onChoose})),T.a.createElement("div",{styleName:"buttons-inner"},T.a.createElement(nn.a,{color:"gray",value:"Cancel",onClick:this.close}))))))}}]),t}(O.Component))||fr,Gr=n(28),$r=n(399),Jr=n.n($r),Qr=[{role:Gr.d,description:"Editor can read/write content items and read site settings."},{role:Gr.c,description:"Developer only can read content items, site settings and API docs."},{role:Gr.b,description:"Admin has unlimited rights, include site removing."}],Zr=At()(Jr.a,{allowMultiple:!0})(dr=function(e){function t(e){var n;return Object(r.a)(this,t),(n=Object(o.a)(this,Object(a.a)(t).call(this,e))).state={checked:!1},n.role=null,n.onClick=function(){n.props.onChange(n.role)},n.role=e.role,n.state.checked=e.checked,n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.checked;this.setState({checked:t})}},{key:"render",value:function(){var e="role-content";return this.state.checked&&(e+=" checked"),T.a.createElement("div",{styleName:"RoleControl",onClick:this.onClick},T.a.createElement("div",{styleName:e},T.a.createElement("div",{styleName:"title"},this.role.role),T.a.createElement("div",{styleName:"description"},this.role.description)))}}]),t}(O.Component))||dr,Xr=At()(Jr.a,{allowMultiple:!0})(pr=function(e){function t(e){var n;return Object(r.a)(this,t),(n=Object(o.a)(this,Object(a.a)(t).call(this,e))).state={role:null},n.active=!1,n.focusElm=null,n.onKeyDown=function(e){e||(e=window.event),e.stopPropagation(),13==e.keyCode?setTimeout(n.onConfirm,1):27==e.keyCode&&setTimeout(n.close,1)},n.onChangeRole=function(e){var t=e.role;n.setState({role:t})},n.onConfirm=function(){n.active&&(n.props.params.callback(n.state.role),n.close())},n.close=function(){n.active=!1,n.props.onClose()},n.state.role=e.params.role,n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.active=!0,document.addEventListener("keydown",this.onKeyDown),this.focusElm&&setTimeout((function(){return e.focusElm.focus()}),2)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.onKeyDown)}},{key:"render",value:function(){var e=this;return T.a.createElement("div",{styleName:"modal",onClick:this.close},T.a.createElement("div",{styleName:"modal-inner",onClick:function(e){return e.stopPropagation()}},T.a.createElement("div",{styleName:"modal-header"},T.a.createElement("div",{styleName:"title"},"Changing user's role")),T.a.createElement("div",{styleName:"content"},T.a.createElement("div",null,T.a.createElement("div",{styleName:"label"},"Choose role:"),T.a.createElement("div",null,Qr.map((function(t){return T.a.createElement(Zr,{role:t,key:t.role,checked:e.state.role==t.role,onChange:e.onChangeRole})})))),T.a.createElement("div",{styleName:"buttons-wrapper"},T.a.createElement("div",{styleName:"buttons-inner"},T.a.createElement(nn.a,{color:"green",value:"OK",onClick:this.onConfirm})),T.a.createElement("div",{styleName:"buttons-inner"},T.a.createElement(nn.a,{color:"gray",value:"Cancel",onClick:this.close}))))))}}]),t}(O.Component))||pr,ei=n(32),ti=n(2),ni=n(29),ri=n(192),ii=n.n(ri),oi=At()(ii.a,{allowMultiple:!0})(hr=function(e){function t(){var e,n;Object(r.a)(this,t);for(var i=arguments.length,s=new Array(i),l=0;l0&&void 0!==arguments[0]?arguments[0]:qi,i=arguments.length>1?arguments[1]:void 0;switch(i.type){case Ci:e=i.items,t=i.itemsDraft;var o=!0,a=!1,s=void 0;try{for(var l,u=e[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){l.value.postInit(e)}}catch(e){a=!0,s=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw s}}var c=!0,f=!1,d=void 0;try{for(var p,h=t[Symbol.iterator]();!(c=(p=h.next()).done);c=!0){p.value.postInit(e)}}catch(e){f=!0,d=e}finally{try{c||null==h.return||h.return()}finally{if(f)throw d}}var m=!0,v=!1,g=void 0;try{for(var y,b=t[Symbol.iterator]();!(m=(y=b.next()).done);m=!0){var w=y.value,E=w.origin.get("t__owner"),C=!0,_=!1,x=void 0;try{for(var S,k=e[Symbol.iterator]();!(C=(S=k.next()).done);C=!0){var O=S.value;if(O.origin.id==E.id){O.draft=w,w.owner=O;break}}}catch(e){_=!0,x=e}finally{try{C||null==k.return||k.return()}finally{if(_)throw x}}}}catch(e){v=!0,g=e}finally{try{m||null==b.return||b.return()}finally{if(v)throw g}}return Ei({},r,{items:e,itemsDraft:t});case Pi:return Ei({},r,{currentItem:i.currentItem});case _i:return(e=r.items).push(i.item),Ei({},r,{items:e});case xi:case ki:case Oi:case Ti:return Ei({},r);case Si:return i.isNewDraft?((t=r.itemsDraft).push(i.item.draft),Ei({},r,{itemsDraft:t})):Ei({},r);case Ai:var T=i.item;return e=r.items,t=r.itemsDraft,e.splice(e.indexOf(T),1),T.draft&&t.splice(t.indexOf(T.draft),1),Ei({},r,{items:e,itemsDraft:t});case Mi:var A=r.filteredModels,P=new Set(A);return A.has(i.model)?P.delete(i.model):P.add(i.model),Ei({},r,{filteredModels:P});case Ni:var M=r.filteredStatuses,N=new Set(M);return M.has(i.status)?N.delete(i.status):N.add(i.status),Ei({},r,{filteredStatuses:N});case ni.e:e=r.items,t=r.itemsDraft,n=Object(an.s)(i.model,e);var j=!0,D=!1,I=void 0;try{for(var L,R=n[Symbol.iterator]();!(j=(L=R.next()).done);j=!0){var F=L.value;e.splice(e.indexOf(F),1),F.draft&&t.splice(t.indexOf(F.draft),1)}}catch(e){D=!0,I=e}finally{try{j||null==R.return||R.return()}finally{if(D)throw I}}return Ei({},r,{items:e,itemsDraft:t});case ni.h:e=r.items,t=r.itemsDraft,n=Object(an.t)(i.site,e);var B=!0,z=!1,U=void 0;try{for(var K,H=n[Symbol.iterator]();!(B=(K=H.next()).done);B=!0){var q=K.value;e.splice(e.indexOf(q),1),q.draft&&t.splice(t.indexOf(q.draft),1)}}catch(e){z=!0,U=e}finally{try{B||null==H.return||H.return()}finally{if(z)throw U}}return Ei({},r,{items:e,itemsDraft:t});case ni.a:case ni.c:case ni.b:e=r.items,t=r.itemsDraft;var V=i.field.model,W=!0,Y=!1,G=void 0;try{for(var $,J=e[Symbol.iterator]();!(W=($=J.next()).done);W=!0){var Q=$.value;Q.model==V&&(Q.model=V)}}catch(e){Y=!0,G=e}finally{try{W||null==J.return||J.return()}finally{if(Y)throw G}}var Z=!0,X=!1,ee=void 0;try{for(var te,ne=t[Symbol.iterator]();!(Z=(te=ne.next()).done);Z=!0){var re=te.value;re.model==V&&(re.model=V)}}catch(e){X=!0,ee=e}finally{try{Z||null==ne.return||ne.return()}finally{if(X)throw ee}}return Ei({},r,{items:e,itemsDraft:t});case yi.f:return Ei({},r,{currentItem:null});default:return r}},nav:ti.L,user:yi.j,media:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:io,t=arguments.length>1?arguments[1]:void 0,n=e.items;switch(t.type){case Ji:return $i({},e,{items:t.items});case Qi:return n.push(t.item),$i({},e,{items:n});case Xi:return n.splice(n.indexOf(t.item),1),$i({},e,{items:n});case Zi:return $i({},e);default:return e}},pay:oo.d,routing:Ye.routerReducer}),so=function(e){return function(e){return function(t){e(t),t.type!=yi.h&&t.type!=yi.e||!t.authorized||e(Object(ni.t)()),t.type==ni.d&&e(eo()),t.type==Ji&&e((function(e){var t=zu.getState().models.sites,n=[],r=[],i=[],o=!0,a=!1,s=void 0;try{for(var l,u=t[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value,f=!0,d=!1,p=void 0;try{for(var h,m=c.models[Symbol.iterator]();!(f=(h=m.next()).done);f=!0){var v=h.value;i.push(ji(v,n,r))}}catch(e){d=!0,p=e}finally{try{f||null==m.return||m.return()}finally{if(d)throw p}}}}catch(e){a=!0,s=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw s}}Promise.all(i).then((function(){e({type:Ci,items:n,itemsDraft:r})}))})),t.type==Ci&&e(Object(oo.e)()),t.type==oo.a&&(e(Object(yi.i)()),e(Object(ti.M)()))}}},lo="/",uo=null,co=function(e){return function(t){return function(n){n.type!=yi.h&&n.type!=yi.e||n.authorized||function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=ti.t[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value;if(-1!=e.indexOf(a))return!0}}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}return!1}(lo)||-1!=lo.indexOf(ti.G)||We.g.push("/".concat(ti.G)),t(n);var r=function(){var n=lo;if(lo="/",-1!=n.indexOf(ti.I)){var r=e.getState().models.currentSite,i=function(){if(r)We.g.replace("/".concat(ti.I,"/").concat(ti.H).concat(r.nameId));else{var t=e.getState().models.sites;t.length?We.g.replace("/".concat(ti.I,"/").concat(ti.H).concat(t[0].nameId)):n!="/".concat(ti.I)&&We.g.replace("/".concat(ti.I))}},o=function(e,t){var n=e.indexOf(t);if(-1==n)return null;var r=e.slice(n).slice(t.length),i=r.indexOf("/");return i>0&&(r=r.slice(0,i)),r}(n,ti.H);if(o){if(!r||o!=r.nameId){var a=Object(an.D)(o);a?t(Object(ni.v)(a)):i()}}else-1==n.indexOf(ti.D)&&-1==n.indexOf(ti.C)&&-1==n.indexOf(ti.B)&&i()}};switch(n.type){case Ye.LOCATION_CHANGE:-1==(lo=n.payload.pathname).indexOf(ti.I)||uo||(uo=lo),e.getState().nav.initEnded&&r();break;case ti.a:uo?(lo=uo,uo=null,We.g.replace(lo)):-1==lo.indexOf(ti.I)&&-1==lo.indexOf(ti.w)&&-1==lo.indexOf(ti.x)&&We.g.replace("/".concat(ti.I)),r();break;case ni.f:We.g.push("/".concat(ti.I,"/").concat(ti.H).concat(n.site.nameId));break;case yi.f:We.g.push("/".concat(ti.G))}}}};var fo=n(70),po=n(96),ho=n.n(po),mo=function(){return T.a.createElement("div",{className:"start-working"},T.a.createElement(Cn.a,{className:"hammer",src:ho.a}),"You don't have rights to access this section.")},vo=function(e){function t(){return Object(r.a)(this,t),Object(o.a)(this,Object(a.a)(t).apply(this,arguments))}return Object(s.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){return T.a.createElement("div",{className:"start-working"},T.a.createElement(Cn.a,{className:"hammer",src:ho.a}),T.a.createElement("div",{className:"docs"},"Parse Server has extensive ",T.a.createElement("a",{className:"docs-link",href:"http://parseplatform.github.io/docs/",target:"_blank"},"Documentation"),". Take a look!",T.a.createElement("div",{className:"hint"},"Our Interactive API Docs will be coming soon...")))}}]),t}(O.Component),go=function(e){function t(){return Object(r.a)(this,t),Object(o.a)(this,Object(a.a)(t).apply(this,arguments))}return Object(s.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){var e=this.props.models,t="Chisel",n=T.a.createElement(mo,{key:"content"}),r=e.currentSite;r&&(t="API - Site: ".concat(r.name," - Chisel"),e.role!=Gr.d&&(n=T.a.createElement(vo,{key:"content"})));return[T.a.createElement(Ot,{key:"helmet"},T.a.createElement("title",null,t)),n]}}]),t}(O.Component);var yo,bo=ze((function(e){return{models:e.models}}))(go),wo=n(610),Eo=n.n(wo),Co=n.p+"assets/images/chisel_login_illustration.png",_o=n(393),xo=n.n(_o),So=n(392),ko=n.n(So),Oo="login",To="register_mail",Ao=At()(Eo.a,{allowMultiple:!0})(yo=function(e){function t(e){var n;Object(r.a)(this,t),(n=Object(o.a)(this,Object(a.a)(t).call(this,e))).state={mode:Oo,email:"",password:"",passwordConfirm:"",error:null,lock:!1},n.elmEmail=void 0,n.elmPassword=void 0,n.elmPasswordConfirm=void 0,n.elmCheckbox=void 0,n.onEmailChange=function(e){n.setState({email:e.target.value,error:null})},n.onPasswordChange=function(e){n.setState({password:e.target.value,error:null})},n.onPasswordConfirmChange=function(e){n.setState({passwordConfirm:e.target.value,error:null})},n.onLogin=function(e){return e.preventDefault(),!!n.getLoginAvail()&&((0,n.props.userActions.login)(n.state.email,n.state.password),n.setState({lock:!0}),!1)},n.onReg=function(e){return e.preventDefault(),!!n.getRegAvail()&&((0,n.props.userActions.register)(n.state.email,n.state.password),n.setState({lock:!0}),!1)},n.onRestore=function(e){return e.preventDefault(),!!n.getForgotAvail()&&((0,n.props.userActions.restorePassword)(n.state.email),n.setState({lock:!0}),!1)},n.onResend=function(){(0,n.props.userActions.resendVerEmail)(n.state.email),n.setState({mode:To})};var i=Object(sn.G)();return i.mode&&(n.state.mode=i.mode),i.email&&(n.state.email=i.email),e.userActions.resetStatus(),n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.user;if(e.nav.serverProblemB)this.setState({error:null,lock:!1,mode:"server_down"});else{var n=t.status;if(n){var r=this.state.mode;"register"==r&&n==yi.g?r=To:"forgot"==r&&n==yi.g?r="forgot_mail":r==Oo&&n==yi.b&&(r="unverified"),this.props.userActions.resetStatus(),this.setState({error:n,lock:!n,mode:r})}}}},{key:"getLoginAvail",value:function(){return!this.state.lock&&this.state.email&&this.state.password}},{key:"getRegAvail",value:function(){return!this.state.lock&&this.state.email&&this.state.password&&this.state.password==this.state.passwordConfirm}},{key:"getForgotAvail",value:function(){return!this.state.lock&&this.state.email}},{key:"setMode",value:function(e){this.setState({mode:e,error:null,password:"",passwordConfirm:""})}},{key:"render",value:function(){var e,t,n,r,i=this;switch(this.elmEmail=T.a.createElement("div",{styleName:"input-wrapper"},"Email",T.a.createElement("input",{styleName:"input",type:"text",autoFocus:!0,value:this.state.email,onChange:this.onEmailChange})),this.elmPassword=T.a.createElement("div",{styleName:"input-wrapper"},"Password",T.a.createElement("input",{styleName:"input",type:"password",value:this.state.password,onChange:this.onPasswordChange})),this.elmPasswordConfirm=T.a.createElement("div",{styleName:"input-wrapper"},"Confirm Password",T.a.createElement("input",{styleName:"input",type:"password",value:this.state.passwordConfirm,onChange:this.onPasswordConfirmChange})),this.elmCheckbox=T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(yn,{title:"Remember Me"})),this.state.mode){case Oo:e=T.a.createElement("form",{styleName:"form",onSubmit:this.onLogin},this.elmEmail,this.elmPassword,T.a.createElement("div",{styleName:"checkbox-wrapper"},this.elmCheckbox,T.a.createElement("div",{styleName:"forgot",onClick:function(){return i.setMode("forgot")}},"Forgot password?")),T.a.createElement("div",{styleName:"button"},T.a.createElement(nn.a,{color:"purple",type:"submit",disabled:!this.getLoginAvail(),value:"Log In"})),T.a.createElement("div",{styleName:"errors"},this.state.error==yi.d&&T.a.createElement("div",{styleName:"error"},"Wrong email or password!"))),t=T.a.createElement("div",{styleName:"bottom-content"},"No account? No problem!",T.a.createElement("div",{styleName:"button-wrapper"},T.a.createElement(nn.a,{color:"black",type:"submit",value:"Sign Up",onClick:function(){return i.setMode("register")}}))),n=T.a.createElement("div",{styleName:"title"},"Welcome to Chisel ",T.a.createElement("br",null),"A simple powerful headless CMS"),r=T.a.createElement(Cn.a,{src:xo.a});break;case"register":e=T.a.createElement("form",{styleName:"form",onSubmit:this.onReg},this.elmEmail,this.elmPassword,this.elmPasswordConfirm,T.a.createElement("div",{styleName:"button"},T.a.createElement(nn.a,{color:"green",type:"submit",disabled:!this.getRegAvail(),value:"Register"})),T.a.createElement("div",{styleName:"errors"},this.state.error==yi.c&&T.a.createElement("div",{styleName:"error"},"This email is already in use!"))),t=T.a.createElement("div",{styleName:"bottom-content"},T.a.createElement("div",{styleName:"reg-info"},"By clicking “Create Account”, you agree to our ",T.a.createElement("br",null),T.a.createElement("a",{href:"#"},"Terms of Service")," and ",T.a.createElement("a",{href:"#"},"Privacy Policy"),"."),T.a.createElement("div",{styleName:"reg-text"},"Already have an account?"),T.a.createElement("div",{styleName:"button-wrapper"},T.a.createElement(nn.a,{color:"black",type:"submit",value:"Log In",onClick:function(){return i.setMode(Oo)}}))),n=T.a.createElement("div",{styleName:"title"},"Create your new account ",T.a.createElement("br",null),"and get started with Chisel today."),r=T.a.createElement(Cn.a,{src:ko.a});break;case To:e=T.a.createElement("div",{styleName:"form"},T.a.createElement("div",{styleName:"description"},"We send to your email a link to confirm your registration. Please, open it."),T.a.createElement("div",{styleName:"forgot",onClick:function(){return i.setMode(Oo)}},"Return to log in"));break;case"unverified":e=T.a.createElement("div",{styleName:"form"},T.a.createElement("div",{styleName:"description"},T.a.createElement("p",null,"It looks like your email is not verified yet."),T.a.createElement("p",null,"Please check your inbox for an email from us.")),T.a.createElement("div",{styleName:"forgot",onClick:this.onResend},"Resend verification email"),T.a.createElement("div",{styleName:"forgot",onClick:function(){return i.setMode(Oo)}},"Return to log in"));break;case"forgot":e=T.a.createElement("form",{styleName:"form",onSubmit:this.onRestore},T.a.createElement("div",{styleName:"description"},"Enter your email address and we will send you a a link to reset your password."),this.elmEmail,T.a.createElement("div",{styleName:"button"},T.a.createElement(nn.a,{color:"green",type:"submit",disabled:!this.getForgotAvail(),value:"Restore Password"})),T.a.createElement("div",{styleName:"errors"},this.state.error==yi.a&&T.a.createElement("div",{styleName:"error"},"Wrong email!")),T.a.createElement("div",{styleName:"forgot",onClick:function(){return i.setMode(Oo)}},"Return to log in"));break;case"forgot_mail":e=T.a.createElement("div",{styleName:"form"},T.a.createElement("div",{styleName:"description"},"The mail have sended. Please, check your inbox."),T.a.createElement("div",{styleName:"forgot",onClick:function(){return i.setMode(Oo)}},"Return to log in"));break;case"server_down":e=T.a.createElement("div",{styleName:"form"},T.a.createElement("div",{styleName:"description"},"We are sorry, but we have some problems with our service. Please, come back later."),T.a.createElement("div",{styleName:"forgot",onClick:function(){return i.setMode(Oo)}},"Return to log in"))}return T.a.createElement("div",{styleName:"Sign"},T.a.createElement(Ot,null,T.a.createElement("title",null,"Sign in / Sign up - Chisel")),T.a.createElement("div",{styleName:"image"},T.a.createElement("img",{src:Co})),T.a.createElement("div",{styleName:"content"},T.a.createElement("div",{styleName:"inner"},T.a.createElement("div",{styleName:"logo"},r),n||"Welcome",e),t))}}]),t}(O.Component))||yo;var Po,Mo,No,jo=ze((function(e){return{nav:e.nav,user:e.user}}),(function(e){return{userActions:ce({login:yi.l,register:yi.n,restorePassword:yi.q,resendVerEmail:yi.o,resetStatus:yi.p},e)}}))(Ao),Do=n(152),Io=n.n(Do),Lo=At()(Io.a,{allowMultiple:!0})(Po=function(e){function t(){var e,n;Object(r.a)(this,t);for(var i=arguments.length,s=new Array(i),l=0;l=n.sitesLimit){var i={title:"Warning",type:ei.a,description:"You can't add new site because you have exhausted your limit (".concat(n.sitesLimit," ").concat(1==n.sitesLimit?"site":"sites",").")};r&&(i.type=ei.b,i.confirmLabel="Upgrade my account",i.cancelLabel="Close",i.onConfirm=function(){return We.g.push("/".concat(ti.I,"/").concat(ti.C))}),n.props.showAlert(i)}else n.props.showModal(ti.h)},n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"componentWillReceiveProps",value:function(e){this.setState({site:e.currentSite});var t=e.payPlan;this.sitesLimit=t?t.limitSites:0}},{key:"render",value:function(){var e=this,t=this.props.sites;return T.a.createElement("div",{styleName:"sites"},T.a.createElement("div",{styleName:"header"},T.a.createElement("div",{styleName:"title"},"Your sites"),this.sitesLimit?T.a.createElement("div",{styleName:"counter"},t.length,"/",this.sitesLimit):T.a.createElement("div",{styleName:"counter"},t.length)),T.a.createElement("div",{styleName:"list"},t.map((function(t){var n="element";return e.state.site==t&&(n+=" element-active"),T.a.createElement("div",{styleName:n,onClick:function(){return e.onClickSite(t)},key:t.origin.id},t.icon?T.a.createElement("img",{styleName:"icon-img",src:t.icon.url()}):T.a.createElement("div",{styleName:"icon"},T.a.createElement(Cn.a,{src:ho.a})),T.a.createElement("div",{styleName:"site-name"},t.name),t.domain?T.a.createElement("a",{href:t.domain,target:"_blank",styleName:"link"},T.a.createElement(Cn.a,{src:oa.a})):T.a.createElement("div",{styleName:"link-disabled"},T.a.createElement(Cn.a,{src:oa.a})))}))),T.a.createElement("div",{styleName:"new-site",onClick:this.onClickAdd},"Create New Site"))}}]),t}(O.Component))||Xo,sa=n(401),la=n.n(sa),ua=(n(1217),At()(la.a,{allowMultiple:!0})(ea=function(e){function t(){return Object(r.a)(this,t),Object(o.a)(this,Object(a.a)(t).apply(this,arguments))}return Object(s.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){var e=this.props,t=e.models,n=e.isSidebarVisible,r=this.props.user.userData,i=this.props.pay,o=i.stripeInitError,a=(i.payPlans,this.props.navActions),s=a.showModal,l=a.showAlert,u=!!r.payPlan&&!o&&!Object(an.F)(r.payPlan);return T.a.createElement("div",{styleName:"sidebar",className:n?"sidebar-visible":sa.sidebarHidden},T.a.createElement(We.b,{styleName:"header",to:"/"},"Chisel"),T.a.createElement("div",{styleName:"sites-wrapper"},T.a.createElement(aa,{sites:t.sites,currentSite:t.currentSite,gotoSite:function(e){var t=e.nameId;We.g.push("/".concat(ti.I,"/").concat(ti.H).concat(t))},payPlan:r.payPlan,showPayUpgrade:u,showModal:s,showAlert:l})),T.a.createElement("div",{styleName:"bottom-panel"},u&&T.a.createElement(We.b,{styleName:"pay-plans",to:"/".concat(ti.I,"/").concat(ti.C,"/")},"Upgrade your account")))}}]),t}(O.Component))||ea);var ca,fa=ze((function(e){return{models:e.models,user:e.user,pay:e.pay}}),(function(e){return{navActions:ce({showModal:ti.S,showAlert:ti.R},e)}}))(ua),da=n(616),pa=n.n(da),ha=At()(pa.a,{allowMultiple:!0})(ca=function(e){function t(){var e,n;Object(r.a)(this,t);for(var i=arguments.length,s=new Array(i),l=0;l1048576)){i.next=9;break}return n.setState({errorFile:"Your file's size exceeds a limit of 1 MB!"}),i.abrupt("return");case 9:return n.setState({errorFile:null}),r=new fi.Parse.File(Object(sn.z)(t.name),t,t.type),i.next=13,ba.a.awrap(r.save());case 13:n.setState({dirty:!0,icon:r});case 14:case"end":return i.stop()}}))},n.onSave=function(e){e.preventDefault(),n.state.dirty&&!n.state.error&&n.validate()&&(n.setState({dirty:!1}),n.site.name=n.state.name,n.site.domain=n.state.domain,n.site.webhook=n.state.webhook,n.site.icon=n.state.icon,n.props.updateSite(n.site))},n.onDelete=function(){var e=n.props,t=e.showAlert,r=e.deleteSite;t({type:ei.b,title:"Deleting ".concat(n.state.name),description:"You are trying to remove the site with all content. This action cannot be undone. Are you sure?
Please, type site name to confirm:",confirmString:n.site.name,onConfirm:function(){return r(n.site)}})},n.onExport=function(){var e=JSON.stringify(n.site.models,null,2),t="data:text/json;charset=utf-8,"+encodeURIComponent(e);n.downloadElm.setAttribute("href",t),n.downloadElm.setAttribute("download","".concat(Object(sn.z)(n.site.name),".json")),n.downloadElm.click()},n.site=e.site,n.state.name=n.site.name,n.state.domain=n.site.domain,n.state.webhook=n.site.webhook,n.state.icon=n.site.icon,n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"componentWillReceiveProps",value:function(e){this.site=e.site,this.setState({name:this.site.name,domain:this.site.domain,webhook:this.site.webhook})}},{key:"validate",value:function(){if(!this.state.name)return this.setState({error:"The name is required!"}),!1;var e=Object(an.m)(this.state.domain,this.site);return e==an.e?(this.setState({error:"The domain URL is wrong!"}),!1):e==an.d?(this.setState({error:"This domain URL is already exists"}),!1):this.state.webhook&&!Object(sn.x)(this.state.webhook)?(this.setState({error:"The webhook URL is wrong!"}),!1):Object(an.n)(this.state.name,this.site)?(this.setState({error:"This name is already exists"}),!1):(this.setState({error:null}),!0)}},{key:"getIcon",value:function(){var e=this.props.isEditable,t="icon-button";e||(t+=" icon-button-disabled");var n=null;return this.state.icon&&(n=T.a.createElement("img",{styleName:"icon-img",src:this.state.icon.url()})),T.a.createElement("div",{styleName:"field field-icon"},T.a.createElement("div",{styleName:"field-title"},"Site Icon"),T.a.createElement("div",{styleName:"icon-img__wrapper"},n),T.a.createElement("div",{styleName:"button-wrapper"},T.a.createElement("div",{styleName:t+" icon-upload"},"Upload Site Icon",T.a.createElement("input",{styleName:"icon-hidden",type:"file",disabled:!e,onChange:this.onChangeIcon}))),this.state.errorFile&&T.a.createElement("div",{styleName:"field-error"},this.state.errorFile))}},{key:"render",value:function(){var e=this,t=this.props.isEditable;return T.a.createElement(Ca,{title:"".concat(this.state.name," settings")},T.a.createElement("form",{styleName:"content",onSubmit:this.onSave},T.a.createElement("div",{styleName:"field"},T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(rn.a,{type:"big",value:this.state.name,label:"Site Name",titled:!0,readOnly:!t,onChange:this.onChangeName}))),T.a.createElement("div",{styleName:"field"},T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(rn.a,{type:"big",value:this.state.domain,label:"Site Domain URL",titled:!0,readOnly:!t,onChange:this.onChangeDomain}))),T.a.createElement("div",{styleName:"field"},T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(rn.a,{type:"big",value:this.state.webhook,titled:!0,label:"Webhook URL",readOnly:!t,onChange:this.onChangeWebhook}))),T.a.createElement("div",{styleName:"field"},T.a.createElement("div",{styleName:"input-wrapper"},T.a.createElement(rn.a,{type:"big",titled:!0,label:"Site ID",value:this.site.origin.id,readOnly:!0}))),this.getIcon(),T.a.createElement("div",{styleName:"buttons"},t&&T.a.createElement("div",{styleName:"field button-wrapper"},T.a.createElement(nn.a,{color:"red",value:"Delete Site",onClick:this.onDelete})),T.a.createElement("div",{styleName:"field button-wrapper button-export"},T.a.createElement(nn.a,{color:"black",value:"Export Models",onClick:this.onExport})),t&&T.a.createElement("div",{styleName:"field button-wrapper"},T.a.createElement(nn.a,{color:"purple",type:"submit",disabled:!this.state.dirty||this.state.error,value:"Save Changes"})),T.a.createElement("a",{style:{display:"none"},ref:function(t){return e.downloadElm=t}})),this.state.error&&T.a.createElement("div",{styleName:"field-error"},this.state.error)))}}]),t}(O.Component))||va,ka=function(e){function t(){return Object(r.a)(this,t),Object(o.a)(this,Object(a.a)(t).apply(this,arguments))}return Object(s.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){var e=this.props.models,t=this.props.modelsActions,n=t.updateSite,r=t.deleteSite,i=this.props.navActions.showAlert,o=e.currentSite;if(!o)return null;var a="Settings - Site: ".concat(o.name," - Chisel");return[T.a.createElement(Ot,{key:"helmet"},T.a.createElement("title",null,a)),T.a.createElement(Sa,{key:"content",site:o,updateSite:n,deleteSite:function(e){r(e),We.g.push("/".concat(ti.I))},showAlert:i,isEditable:e.role==Gr.e||e.role==Gr.b})]}}]),t}(O.Component);var Oa=ze((function(e){return{models:e.models}}),(function(e){return{modelsActions:ce({updateSite:ni.z,deleteSite:ni.s},e),navActions:ce({showAlert:ti.R},e)}}))(ka);function Ta(e){var t=!1;return function(){t||(console.warn(e),t=!0)}}Ta("\n>> Error, via react-flip-move <<\n\nYou provided a stateless functional component as a child to . Unfortunately, SFCs aren't supported, because Flip Move needs access to the backing instances via refs, and SFCs don't have a public instance that holds that info.\n\nPlease wrap your components in a native element (eg.
), or a non-functional component.\n"),Ta("\n>> Error, via react-flip-move <<\n\nYou provided a primitive (text or number) node as a child to . Flip Move needs containers with unique keys to move children around.\n\nPlease wrap your value in a native element (eg. ), or a component.\n");var Aa=Ta("\n>> Warning, via react-flip-move <<\n\nWhen using \"wrapperless\" mode (by supplying 'typeName' of 'null'), strange things happen when the direct parent has the default \"static\" position.\n\nFlipMove has added 'position: relative' to this node, to ensure Flip Move animates correctly.\n\nTo avoid seeing this warning, simply apply a non-static position to that parent node.\n"),Pa=Ta("\n>> Warning, via react-flip-move <<\n\nOne or more of Flip Move's child elements have the html attribute 'disabled' set to true.\n\nPlease note that this will cause animations to break in Internet Explorer 11 and below. Either remove the disabled attribute or set 'animation' to false.\n"),Ma={elevator:{from:{transform:"scale(0)",opacity:"0"},to:{transform:"",opacity:""}},fade:{from:{opacity:"0"},to:{opacity:""}},accordionVertical:{from:{transform:"scaleY(0)",transformOrigin:"center top"},to:{transform:"",transformOrigin:"center top"}},accordionHorizontal:{from:{transform:"scaleX(0)",transformOrigin:"left center"},to:{transform:"",transformOrigin:"left center"}},none:null},Na={elevator:{from:{transform:"scale(1)",opacity:"1"},to:{transform:"scale(0)",opacity:"0"}},fade:{from:{opacity:"1"},to:{opacity:"0"}},accordionVertical:{from:{transform:"scaleY(1)",transformOrigin:"center top"},to:{transform:"scaleY(0)",transformOrigin:"center top"}},accordionHorizontal:{from:{transform:"scaleX(1)",transformOrigin:"left center"},to:{transform:"scaleX(0)",transformOrigin:"left center"}},none:null},ja=Ma,Da="elevator",Ia="none",La=function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:[],n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}(this.props,n);return r.style=qa({position:"relative"},r.style),t.delegated=r,t},n.prototype.convertTimingProp=function(e){var t=this.props[e],r="number"==typeof t?t:parseInt(t,10);return isNaN(r)?n.defaultProps[e]:r},n.prototype.convertAnimationProp=function(e,t){switch(void 0===e?"undefined":Ka(e)){case"boolean":return t[e?Da:Ia];case"string":return-1===Object.keys(t).indexOf(e)?t[Da]:t[e];default:return e}},n.prototype.render=function(){return T.a.createElement(e,this.convertProps(this.props))},n}(O.Component),t.defaultProps={easing:"ease-in-out",duration:350,delay:0,staggerDurationBy:0,staggerDelayBy:0,typeName:"div",enterAnimation:Da,leaveAnimation:Da,disableAllAnimations:!1,getPosition:function(e){return e.getBoundingClientRect()},maintainContainerHeight:!1,verticalAlignment:"top"},n}function Ga(e){var t=e.domNode,n=e.styles;Object.keys(n).forEach((function(e){t.style.setProperty(Ua(e),n[e])}))}var $a=function(e){var t=e.childDomNode,n={top:0,left:0,right:0,bottom:0,height:0,width:0},r=e.childBoundingBox||n,i=e.parentBoundingBox||n,o=(0,e.getPosition)(t),a=o.top-i.top,s=o.left-i.left;return[r.left-s,r.top-a]},Ja=function(e,t){var n=t.delay,r=t.duration,i=t.staggerDurationBy,o=t.staggerDelayBy,a=t.easing;n+=e*o,r+=e*i;return["transform","opacity"].map((function(e){return e+" "+r+"ms "+a+" "+n+"ms"})).join(", ")},Qa=function(){var e={transition:"transitionend","-o-transition":"oTransitionEnd","-moz-transition":"transitionend","-webkit-transition":"webkitTransitionEnd"};if("undefined"==typeof document)return"";var t=document.createElement("fakeelement"),n=La((function(e){return void 0!==t.style.getPropertyValue(e)}),Object.keys(e));return n?e[n]:""}(),Za=!Qa;function Xa(e){return e.key||""}function es(e){return O.Children.toArray(e)}var ts,ns=Ya(function(e){function t(){var n,r;Ha(this,t);for(var i=arguments.length,o=Array(i),a=0;a0?a+"px":"0"}})}}({domNode:this.heightPlaceholderData.domNode,parentData:this.parentData,getPosition:i}));this.state.children.forEach((function(t){var n=e.getChildData(Xa(t)).domNode;n&&(t.entering||t.leaving||Ga({domNode:n,styles:{transition:""}}))}))},t.prototype.UNSAFE_componentWillReceiveProps=function(e){this.updateBoundingBoxCaches();var t=es(e.children);this.setState({children:this.isAnimationDisabled(e)?t.map((function(e){return qa({},e,{element:e})})):this.calculateNextSetOfChildren(t)})},t.prototype.animateChild=function(e,t,n){var r=this,i=this.getChildData(Xa(e)).domNode;i&&(Ga({domNode:i,styles:n}),this.props.onStart&&this.props.onStart(e,i),requestAnimationFrame((function(){requestAnimationFrame((function(){var n={transition:Ja(t,r.props),transform:"",opacity:""};e.appearing&&r.props.appearAnimation?n=qa({},n,r.props.appearAnimation.to):e.entering&&r.props.enterAnimation?n=qa({},n,r.props.enterAnimation.to):e.leaving&&r.props.leaveAnimation&&(n=qa({},n,r.props.leaveAnimation.to)),Ga({domNode:i,styles:n})}))})),this.bindTransitionEndHandler(e))},t.prototype.bindTransitionEndHandler=function(e){var t=this,n=this.getChildData(Xa(e)).domNode;if(n){n.addEventListener(Qa,(function r(i){i.target===n&&(n.style.transition="",t.triggerFinishHooks(e,n),n.removeEventListener(Qa,r),e.leaving&&t.removeChildData(Xa(e)))}))}},t.prototype.triggerFinishHooks=function(e,t){var n=this;if(this.props.onFinish&&this.props.onFinish(e,t),this.remainingAnimations-=1,0===this.remainingAnimations){var r=this.state.children.filter((function(e){return!e.leaving})).map((function(e){return qa({},e,{element:e.element,appearing:!1,entering:!1})}));this.setState({children:r},(function(){"function"==typeof n.props.onFinishAll&&n.callChildrenHook(n.props.onFinishAll),n.childrenToAnimate=[]})),this.heightPlaceholderData.domNode&&(this.heightPlaceholderData.domNode.style.height="0")}},t.prototype.callChildrenHook=function(e){var t=this,n=[],r=[];this.childrenToAnimate.forEach((function(e){var i=t.findChildByKey(e);i&&(n.push(i),t.hasChildData(e)&&r.push(t.getChildData(e).domNode))})),e(n,r)},t.prototype.updateBoundingBoxCaches=function(){var e=this,t=this.parentData.domNode;if(t){this.parentData.boundingBox=this.props.getPosition(t);var n=[];this.state.children.forEach((function(r){var i=Xa(r);if(i)if(e.hasChildData(i)){var o=e.getChildData(i);o.domNode&&r?n.push(function(e){var t=e.childDomNode,n=e.parentDomNode,r=e.getPosition,i=r(n),o=r(t),a=o.top,s=o.left,l=o.right,u=o.bottom,c=o.width,f=o.height;return{top:a-i.top,left:s-i.left,right:i.right-l,bottom:i.bottom-u,width:c,height:f}}({childDomNode:o.domNode,parentDomNode:t,getPosition:e.props.getPosition})):n.push(null)}else n.push(null);else n.push(null)})),this.state.children.forEach((function(t,r){var i=Xa(t),o=n[r];i&&e.setChildData(i,{boundingBox:o})}))}},t.prototype.computeInitialStyles=function(e){if(e.appearing)return this.props.appearAnimation?this.props.appearAnimation.from:{};if(e.entering)return this.props.enterAnimation?qa({position:"",top:"",left:"",right:"",bottom:""},this.props.enterAnimation.from):{};if(e.leaving)return this.props.leaveAnimation?this.props.leaveAnimation.from:{};var t=this.getChildData(Xa(e)),n=t.domNode,r=t.boundingBox,i=this.parentData.boundingBox;if(!n)return{};var o=$a({childDomNode:n,childBoundingBox:r,parentBoundingBox:i,getPosition:this.props.getPosition});return{transform:"translate("+o[0]+"px, "+o[1]+"px)"}},t.prototype.isAnimationDisabled=function(e){return Za||e.disableAllAnimations||0===e.duration&&0===e.delay&&0===e.staggerDurationBy&&0===e.staggerDelayBy},t.prototype.findChildByKey=function(e){return La((function(t){return Xa(t)===e}),this.state.children)},t.prototype.hasChildData=function(e){return Object.prototype.hasOwnProperty.call(this.childrenData,e)},t.prototype.getChildData=function(e){return this.hasChildData(e)?this.childrenData[e]:{}},t.prototype.setChildData=function(e,t){this.childrenData[e]=qa({},this.getChildData(e),t)},t.prototype.removeChildData=function(e){delete this.childrenData[e],this.setState((function(t){return qa({},t,{children:t.children.filter((function(t){return t.element.key!==e}))})}))},t.prototype.createHeightPlaceholder=function(){var e=this,t=this.props.typeName,n="ul"===t||"ol"===t?"li":"div";return Object(O.createElement)(n,{key:"height-placeholder",ref:function(t){e.heightPlaceholderData.domNode=t},style:{visibility:"hidden",height:0}})},t.prototype.childrenWithRefs=function(){var e=this;return this.state.children.map((function(t){return Object(O.cloneElement)(t.element,{ref:function(n){if(n){var r=function(e){if("undefined"==typeof HTMLElement)return null;if(e instanceof HTMLElement)return e;var t=Object(A.findDOMNode)(e);return t&&t.nodeType===Node.TEXT_NODE?null:t}(n);e.setChildData(Xa(t),{domNode:r})}}})}))},t.prototype.render=function(){var e=this,t=this.props,n=t.typeName,r=t.delegated,i=t.leaveAnimation,o=t.maintainContainerHeight,a=this.childrenWithRefs();if(i&&o&&a.push(this.createHeightPlaceholder()),!n)return a;var s=qa({},r,{children:a,ref:function(t){e.parentData.domNode=t}});return Object(O.createElement)(n,s)},t}(O.Component)),rs=n(619),is=n.n(rs),os=At()(is.a,{allowMultiple:!0})(ts=function(e){function t(e){var n;return Object(r.a)(this,t),(n=Object(o.a)(this,Object(a.a)(t).call(this,e))).state={collaborations:[],input:""},n.activeInput=null,n.returnFocus=!1,n.onInputChange=function(e){n.setState({input:e})},n.onKeyDown=function(e){n.props.alertShowing||(13==e.keyCode?n.onAddCollaboration():27==e.keyCode&&n.setState({input:""}))},n.onAddCollaboration=function(e){var t=n.state.input;if(t)return Object(sn.v)(t)?void Object(an.E)(t).then((function(e){switch(Object(an.h)(e)){case an.a:n.props.addCollaboration(e,t),n.setState({input:""});break;case an.c:n.props.showAlert({title:"Error",description:"You are trying to add yourself!",buttonText:"OK"}),n.returnFocus=!0;break;case an.b:n.props.showAlert({title:"Error",description:"This user already exists",buttonText:"OK"}),n.returnFocus=!0}})).catch((function(e){n.props.showAlert({type:ei.b,title:"New User",description:"The user ".concat(t," is not registered at Chisel. Would you like to send an invitation?"),onConfirm:function(){return n.props.addInviteCollaboration(t)}}),n.returnFocus=!0,n.setState({input:""})})):(n.props.showAlert({title:"Error",description:"The email is not correct!",buttonText:"OK"}),void(n.returnFocus=!0))},n.state.collaborations=e.collaborations,n}return Object(s.a)(t,e),Object(i.a)(t,[{key:"componentWillReceiveProps",value:function(e){var t=this;!e.alertShowing&&this.activeInput&&this.returnFocus&&(this.returnFocus=!1,setTimeout((function(){return t.activeInput.focus()}),1)),e.collaborations!=this.state.collaborations&&this.setState({collaborations:e.collaborations,input:""})}},{key:"onRoleClick",value:function(e,t){var n=this;e.stopPropagation(),this.props.showModal(ti.g,{role:t.role,callback:function(e){t.role=e,n.props.updateCollaboration(t)}})}},{key:"onDeleteClick",value:function(e,t){e.stopPropagation();var n="This action cannot be undone. Type CONFIRM to complete",r=this.props.deleteCollaboration,i="CONFIRM",o=t.email;t.user&&t.user.origin.id==fi.Parse.User.current().id&&(n="You are trying to stop managing this site. ".concat(n,"