diff --git a/composer.json b/composer.json index b2734f2..7c420a3 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "unclecheese/silverstripe-kickassets", + "name": "heyday/silverstripe-kickassets", "description": "Provides an alternative file management interface for SilverStripe CMS with drag-and-drop, multi-selection, and several other desktop-like UI conventions.", "type": "silverstripe-module", "keywords": ["silverstripe", "assets", "files", "AssetAdmin", "upload"], diff --git a/javascript/build/bundle.js b/javascript/build/bundle.js index 41311da..1c9a809 100644 --- a/javascript/build/bundle.js +++ b/javascript/build/bundle.js @@ -54783,7 +54783,9 @@ var error = undefined; - if (!_storesSelectedItemsStore2['default'].isValidCount()) { + if (items.length === 0) { + error = (0, _utilsLang.sf)((0, _utilsLang2['default'])('KickAssets.NOFILESELECTED', "You haven't selected any file.")); + } else if (!_storesSelectedItemsStore2['default'].isValidCount()) { error = (0, _utilsLang.sf)((0, _utilsLang2['default'])('KickAssets.TOOMANYSELECTED', 'You have selected too many items. Please select no more than %s.'), max); } else if (!_storesSelectedItemsStore2['default'].isValidTypes()) { error = (0, _utilsLang.sf)((0, _utilsLang2['default'])('KickAssets.INVALIDTYPESSELECTED', 'You have selected some invalid items. Please select only %s'), types.join(', ')); diff --git a/javascript/build/bundle.min.js b/javascript/build/bundle.min.js index 960ed24..9e00d7f 100644 --- a/javascript/build/bundle.min.js +++ b/javascript/build/bundle.min.js @@ -30,9 +30,9 @@ function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;va l==G?l=te:l!=te&&(s=qo(e))),u||(c=ra.call(t),c==G?c=te:c!=te&&(u=qo(t)));var p=l==te,d=c==te,f=l==c;if(f&&!s&&!p)return Un(e,t,l);if(!o){var h=p&&ta.call(e,"__wrapped__"),m=d&&ta.call(t,"__wrapped__");if(h||m)return n(h?e.value():e,m?t.value():t,r,o,i,a)}if(!f)return!1;i||(i=[]),a||(a=[]);for(var v=i.length;v--;)if(i[v]==e)return a[v]==t;i.push(e),a.push(t);var y=(s?Fn:Vn)(e,t,n,r,o,i,a);return i.pop(),a.pop(),y}function jt(e,t,n){var r=t.length,o=r,i=!n;if(null==e)return!o;for(e=pr(e);r--;){var a=t[r];if(i&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++rt&&(t=-t>o?0:o+t),n=n===D||n>o?o:+n||0,0>n&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Bi(o);++r=z,u=a?mn():null,l=[];u?(r=Xe,i=!1):(a=!1,u=t?[]:l);e:for(;++n=o){for(;o>r;){var i=r+o>>>1,a=e[i];(n?t>=a:t>a)&&null!==a?r=i+1:o=i}return o}return on(e,t,Ti,n)}function on(e,t,n,r){t=n(t);for(var o=0,i=e?e.length:0,a=t!==t,s=null===t,u=t===D;i>o;){var l=ga((o+i)/2),c=n(e[l]),p=c!==D,d=c===c;if(a)var f=d||r;else f=s?d&&p&&(r||null!=c):u?d&&(r||p):null==c?!1:r?t>=c:t>c;f?o=l+1:i=l}return Na(i,Sa)}function an(e,t,n){if("function"!=typeof e)return Ti;if(t===D)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,i){return e.call(t,n,r,o,i)};case 5:return function(n,r,o,i,a){return e.call(t,n,r,o,i,a)}}return function(){return e.apply(t,arguments)}}function sn(e){var t=new aa(e.byteLength),n=new ha(t);return n.set(new ha(e)),t}function un(e,t,n){for(var r=n.length,o=-1,i=wa(e.length-r,0),a=-1,s=t.length,u=Bi(s+i);++a2?n[o-2]:D,a=o>2?n[2]:D,s=o>1?n[o-1]:D;for("function"==typeof i?(i=an(i,s,5),o-=2):(i="function"==typeof s?s:D,o-=i?1:0),a&&Zn(n[0],n[1],a)&&(i=3>o?D:i,o=1);++r-1?n[i]:D}return Tt(n,r,e)}}function wn(e){return function(t,n,r){return t&&t.length?(n=Bn(n,r,3),a(t,n,e)):-1}}function Nn(e){return function(t,n,r){return n=Bn(n,r,3),Tt(t,n,e,!0)}}function On(e){return function(){for(var t,n=arguments.length,o=e?n:-1,i=0,a=Bi(n);e?o--:++o=z)return t.plant(r).value();for(var o=0,i=n?a[o].apply(this,e):r;++og){var O=s?et(s):D,C=wa(l-g,0),x=h?N:D,T=h?D:N,M=h?b:D,I=h?D:b;t|=h?R:A,t&=~(h?A:R),m||(t&=~(P|S));var k=[e,t,n,M,x,I,T,O,u,C],L=In.apply(D,k);return tr(e)&&Ka(L,k),L.placeholder=w,L}}var j=d?n:this,F=f?j[e]:e;return s&&(b=ur(b,s)),p&&u=t||!ba(t))return"";var o=t-r;return n=null==n?" ":n+"",yi(n,va(o/n.length)).slice(0,o)}function Rn(e,t,n,r){function o(){for(var t=-1,s=arguments.length,u=-1,l=r.length,c=Bi(l+s);++uu))return!1;for(;++s-1&&e%1==0&&t>e}function Zn(e,t,n){if(!Ao(n))return!1;var r=typeof t;if("number"==r?Xn(n)&&$n(t,n.length):"string"==r&&t in n){var o=n[t];return e===e?e===o:o!==o}return!1}function er(e,t){var n=typeof e;if("string"==n&&De.test(e)||"number"==n)return!0;if(Ps(e))return!1;var r=!xe.test(e);return r||null!=t&&e in pr(t)}function tr(e){var n=zn(e);if(!(n in o.prototype))return!1;var r=t[n];if(e===r)return!0;var i=Ba(r);return!!i&&e===i[0]}function nr(e){return"number"==typeof e&&e>-1&&e%1==0&&Ia>=e}function rr(e){return e===e&&!Ao(e)}function or(e,t){var n=e[1],r=t[1],o=n|r,i=L>o,a=r==L&&n==I||r==L&&n==j&&e[7].length<=t[8]||r==(L|j)&&n==I;if(!i&&!a)return e;r&P&&(e[2]=t[2],o|=n&P?0:M);var s=t[3];if(s){var u=e[3];e[3]=u?un(u,s,t[4]):et(s),e[4]=u?E(e[3],H):et(t[4])}return s=t[5],s&&(u=e[5],e[5]=u?ln(u,s,t[6]):et(s),e[6]=u?E(e[5],H):et(t[6])),s=t[7],s&&(e[7]=et(s)),r&L&&(e[8]=null==e[8]?t[8]:Na(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function ir(e,t){return e===D?t:Ss(e,t,ir)}function ar(e,t){e=pr(e);for(var n=-1,r=t.length,o={};++nr;)a[++i]=Yt(e,r,r+=t);return a}function mr(e){for(var t=-1,n=e?e.length:0,r=-1,o=[];++tt?0:t)):[]}function yr(e,t,n){var r=e?e.length:0;return r?((n?Zn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Yt(e,0,0>t?0:t)):[]}function gr(e,t,n){return e&&e.length?tn(e,Bn(t,n,3),!0,!0):[]}function _r(e,t,n){return e&&e.length?tn(e,Bn(t,n,3),!0):[]}function br(e,t,n,r){var o=e?e.length:0;return o?(n&&"number"!=typeof n&&Zn(e,t,n)&&(n=0,r=o),xt(e,t,n,r)):[]}function Er(e){return e?e[0]:D}function wr(e,t,n){var r=e?e.length:0;return n&&Zn(e,t,n)&&(t=!1),r?Pt(e,t):[]}function Nr(e){var t=e?e.length:0;return t?Pt(e,!0):[]}function Or(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?wa(r+n,0):n;else if(n){var o=rn(e,t);return r>o&&(t===t?t===e[o]:e[o]!==e[o])?o:-1}return s(e,t,n||0)}function Cr(e){return yr(e,1)}function xr(e){var t=e?e.length:0;return t?e[t-1]:D}function Dr(e,t,n){var r=e?e.length:0;if(!r)return-1;var o=r;if("number"==typeof n)o=(0>n?wa(r+n,0):Na(n||0,r-1))+1;else if(n){o=rn(e,t,!0)-1;var i=e[o];return(t===t?t===i:i!==i)?o:-1}if(t!==t)return g(e,o,!0);for(;o--;)if(e[o]===t)return o;return-1}function Tr(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var n=0,r=Kn(),o=e.length;++n-1;)fa.call(t,i,1);return t}function Pr(e,t,n){var r=[];if(!e||!e.length)return r;var o=-1,i=[],a=e.length;for(t=Bn(t,n,3);++ot?0:t)):[]}function kr(e,t,n){var r=e?e.length:0;return r?((n?Zn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Yt(e,0>t?0:t)):[]}function Rr(e,t,n){return e&&e.length?tn(e,Bn(t,n,3),!1,!0):[]}function Ar(e,t,n){return e&&e.length?tn(e,Bn(t,n,3)):[]}function Lr(e,t,n,r){var o=e?e.length:0;if(!o)return[];null!=t&&"boolean"!=typeof t&&(r=n,n=Zn(e,t,r)?D:t,t=!1);var i=Bn();return(null!=n||i!==bt)&&(n=i(n,r,3)),t&&Kn()==s?w(e,n):Zt(e,n)}function jr(e){if(!e||!e.length)return[];var t=-1,n=0;e=st(e,function(e){return Xn(e)?(n=wa(e.length,n),!0):void 0});for(var r=Bi(n);++tn?wa(o+n,0):n||0,"string"==typeof e||!Ps(e)&&Ko(e)?o>=n&&e.indexOf(t,n)>-1:!!o&&Kn(e,t,n)>-1}function eo(e,t,n){var r=Ps(e)?ut:Ft;return t=Bn(t,n,3),r(e,t)}function to(e,t){return eo(e,Ri(t))}function no(e,t,n){var r=Ps(e)?st:Dt;return t=Bn(t,n,3),r(e,function(e,n,r){return!t(e,n,r)})}function ro(e,t,n){if(n?Zn(e,t,n):null==t){e=cr(e);var r=e.length;return r>0?e[Ht(0,r-1)]:D}var o=-1,i=Yo(e),r=i.length,a=r-1;for(t=Na(0>t?0:+t||0,r);++o0&&(n=t.apply(this,arguments)),1>=e&&(t=D),n}}function ho(e,t,n){function r(){f&&sa(f),l&&sa(l),m=0,l=f=h=D}function o(t,n){n&&sa(n),l=f=h=D,t&&(m=ms(),c=e.apply(d,u),f||l||(u=d=D))}function i(){var e=t-(ms()-p);0>=e||e>t?o(h,l):f=da(i,e)}function a(){o(y,f)}function s(){if(u=arguments,p=ms(),d=this,h=y&&(f||!g),v===!1)var n=g&&!f;else{l||g||(m=p);var r=v-(p-m),o=0>=r||r>v;o?(l&&(l=sa(l)),m=p,c=e.apply(d,u)):l||(l=da(a,r))}return o&&f?f=sa(f):f||t===v||(f=da(i,t)),n&&(o=!0,c=e.apply(d,u)),!o||f||l||(u=d=D),c}var u,l,c,p,d,f,h,m=0,v=!1,y=!0;if("function"!=typeof e)throw new Ji(W);if(t=0>t?0:+t||0,n===!0){var g=!0;y=!1}else Ao(n)&&(g=!!n.leading,v="maxWait"in n&&wa(+n.maxWait||0,t),y="trailing"in n?!!n.trailing:y);return s.cancel=r,s}function mo(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Ji(W);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new mo.Cache,n}function vo(e){if("function"!=typeof e)throw new Ji(W);return function(){return!e.apply(this,arguments)}}function yo(e){return fo(2,e)}function go(e,t){if("function"!=typeof e)throw new Ji(W);return t=wa(t===D?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,o=wa(n.length-t,0),i=Bi(o);++rt}function Co(e,t){return e>=t}function xo(e){return _(e)&&Xn(e)&&ta.call(e,"callee")&&!ca.call(e,"callee")}function Do(e){return e===!0||e===!1||_(e)&&ra.call(e)==Q}function To(e){return _(e)&&ra.call(e)==J}function Po(e){return!!e&&1===e.nodeType&&_(e)&&!Bo(e)}function So(e){return null==e?!0:Xn(e)&&(Ps(e)||Ko(e)||xo(e)||_(e)&&Ro(e.splice))?!e.length:!Vs(e).length}function Mo(e,t,n,r){n="function"==typeof n?an(n,r,3):D;var o=n?n(e,t):D;return o===D?At(e,t,n):!!o}function Io(e){return _(e)&&"string"==typeof e.message&&ra.call(e)==X}function ko(e){return"number"==typeof e&&ba(e)}function Ro(e){return Ao(e)&&ra.call(e)==$}function Ao(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Lo(e,t,n,r){return n="function"==typeof n?an(n,r,3):D,jt(e,qn(t),n)}function jo(e){return Vo(e)&&e!=+e}function Fo(e){return null==e?!1:Ro(e)?ia.test(ea.call(e)):_(e)&&Le.test(e)}function Uo(e){return null===e}function Vo(e){return"number"==typeof e||_(e)&&ra.call(e)==ee}function Bo(e){var t;if(!_(e)||ra.call(e)!=te||xo(e)||!ta.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return St(e,function(e,t){n=t}),n===D||ta.call(e,n)}function zo(e){return Ao(e)&&ra.call(e)==ne}function Ko(e){return"string"==typeof e||_(e)&&ra.call(e)==oe}function qo(e){return _(e)&&nr(e.length)&&!!qe[ra.call(e)]}function Wo(e){return e===D}function Ho(e,t){return t>e}function Go(e,t){return t>=e}function Yo(e){var t=e?za(e):0;return nr(t)?t?et(e):[]:ai(e)}function Qo(e){return _t(e,ti(e))}function Jo(e,t,n){var r=Aa(e);return n&&Zn(e,t,n)&&(t=D),t?yt(r,t):r}function Xo(e){return kt(e,ti(e))}function $o(e,t,n){var r=null==e?D:Rt(e,dr(t),t+"");return r===D?n:r}function Zo(e,t){if(null==e)return!1;var n=ta.call(e,t);if(!n&&!er(t)){if(t=dr(t),e=1==t.length?e:Rt(e,Yt(t,0,-1)),null==e)return!1;t=xr(t),n=ta.call(e,t)}return n||nr(e.length)&&$n(t,e.length)&&(Ps(e)||xo(e))}function ei(e,t,n){n&&Zn(e,t,n)&&(t=D);for(var r=-1,o=Vs(e),i=o.length,a={};++r0;++r=Na(t,n)&&en?0:+n||0,r),n-=t.length,n>=0&&e.indexOf(t,n)==n}function fi(e){return e=l(e),e&&we.test(e)?e.replace(be,m):e}function hi(e){return e=l(e),e&&Se.test(e)?e.replace(Pe,v):e||"(?:)"}function mi(e,t,n){e=l(e),t=+t;var r=e.length;if(r>=t||!ba(t))return e;var o=(t-r)/2,i=ga(o),a=va(o);return n=kn("",a,n),n.slice(0,i)+e+n}function vi(e,t,n){return(n?Zn(e,t,n):null==t)?t=0:t&&(t=+t),e=bi(e),Ca(e,t||(Ae.test(e)?16:10))}function yi(e,t){var n="";if(e=l(e),t=+t,1>t||!e||!ba(t))return n;do t%2&&(n+=e),t=ga(t/2),e+=e;while(t);return n}function gi(e,t,n){return e=l(e),n=null==n?0:Na(0>n?0:+n||0,e.length),e.lastIndexOf(t,n)==n}function _i(e,n,r){var o=t.templateSettings;r&&Zn(e,n,r)&&(n=r=D),e=l(e),n=vt(yt({},r||n),o,mt);var i,a,s=vt(yt({},n.imports),o.imports,mt),u=Vs(s),c=en(s,u),p=0,d=n.interpolate||Ue,f="__p += '",h=Yi((n.escape||Ue).source+"|"+d.source+"|"+(d===Ce?ke:Ue).source+"|"+(n.evaluate||Ue).source+"|$","g"),m="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Ke+"]")+"\n";e.replace(h,function(t,n,r,o,s,u){return r||(r=o),f+=e.slice(p,u).replace(Ve,y),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),p=u+t.length,t}),f+="';\n";var v=n.variable;v||(f="with (obj) {\n"+f+"\n}\n"),f=(a?f.replace(ve,""):f).replace(ye,"$1").replace(ge,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=Xs(function(){return qi(u,m+"return "+f).apply(D,c)});if(g.source=f,Io(g))throw g;return g}function bi(e,t,n){var r=e;return(e=l(e))?(n?Zn(r,t,n):null==t)?e.slice(N(e),O(e)+1):(t+="",e.slice(c(e,t),p(e,t)+1)):e}function Ei(e,t,n){var r=e;return e=l(e),e?(n?Zn(r,t,n):null==t)?e.slice(N(e)):e.slice(c(e,t+"")):e}function wi(e,t,n){var r=e;return e=l(e),e?(n?Zn(r,t,n):null==t)?e.slice(0,O(e)+1):e.slice(0,p(e,t+"")+1):e}function Ni(e,t,n){n&&Zn(e,t,n)&&(t=D);var r=F,o=U;if(null!=t)if(Ao(t)){var i="separator"in t?t.separator:i;r="length"in t?+t.length||0:r,o="omission"in t?l(t.omission):o}else r=+t||0;if(e=l(e),r>=e.length)return e;var a=r-o.length;if(1>a)return o;var s=e.slice(0,a);if(null==i)return s+o;if(zo(i)){if(e.slice(a).search(i)){var u,c,p=e.slice(0,a);for(i.global||(i=Yi(i.source,(Re.exec(i)||"")+"g")),i.lastIndex=0;u=i.exec(p);)c=u.index;s=s.slice(0,null==c?a:c)}}else if(e.indexOf(i,a)!=a){var d=s.lastIndexOf(i);d>-1&&(s=s.slice(0,d))}return s+o}function Oi(e){return e=l(e),e&&Ee.test(e)?e.replace(_e,C):e}function Ci(e,t,n){return n&&Zn(e,t,n)&&(t=D),e=l(e),e.match(t||Be)||[]}function xi(e,t,n){return n&&Zn(e,t,n)&&(t=D),_(e)?Pi(e):bt(e,t)}function Di(e){return function(){return e}}function Ti(e){return e}function Pi(e){return Ut(Et(e,!0))}function Si(e,t){return Vt(e,Et(t,!0))}function Mi(e,t,n){if(null==n){var r=Ao(t),o=r?Vs(t):D,i=o&&o.length?kt(t,o):D;(i?i.length:r)||(i=!1,n=t,t=e,e=this)}i||(i=kt(t,Vs(t)));var a=!0,s=-1,u=Ro(e),l=i.length;n===!1?a=!1:Ao(n)&&"chain"in n&&(a=n.chain);for(;++se||!ba(e))return[];var r=-1,o=Bi(Na(e,Pa));for(t=an(t,n,1);++rr?o[r]=t(r):t(r);return o}function Fi(e){var t=++na;return l(e)+t}function Ui(e,t){return(+e||0)+(+t||0)}function Vi(e,t,n){return n&&Zn(e,t,n)&&(t=D),t=Bn(t,n,3),1==t.length?ft(Ps(e)?e:cr(e),t):$t(e,t)}e=e?ot.defaults(rt.Object(),e,ot.pick(rt,ze)):rt;var Bi=e.Array,zi=e.Date,Ki=e.Error,qi=e.Function,Wi=e.Math,Hi=e.Number,Gi=e.Object,Yi=e.RegExp,Qi=e.String,Ji=e.TypeError,Xi=Bi.prototype,$i=Gi.prototype,Zi=Qi.prototype,ea=qi.prototype.toString,ta=$i.hasOwnProperty,na=0,ra=$i.toString,oa=rt._,ia=Yi("^"+ea.call(ta).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),aa=e.ArrayBuffer,sa=e.clearTimeout,ua=e.parseFloat,la=Wi.pow,ca=$i.propertyIsEnumerable,pa=Wn(e,"Set"),da=e.setTimeout,fa=Xi.splice,ha=e.Uint8Array,ma=Wn(e,"WeakMap"),va=Wi.ceil,ya=Wn(Gi,"create"),ga=Wi.floor,_a=Wn(Bi,"isArray"),ba=e.isFinite,Ea=Wn(Gi,"keys"),wa=Wi.max,Na=Wi.min,Oa=Wn(zi,"now"),Ca=e.parseInt,xa=Wi.random,Da=Hi.NEGATIVE_INFINITY,Ta=Hi.POSITIVE_INFINITY,Pa=4294967295,Sa=Pa-1,Ma=Pa>>>1,Ia=9007199254740991,ka=ma&&new ma,Ra={};t.support={};t.templateSettings={escape:Ne,evaluate:Oe,interpolate:Ce,variable:"",imports:{_:t}};var Aa=function(){function e(){}return function(t){if(Ao(t)){e.prototype=t;var n=new e;e.prototype=D}return n||{}}}(),La=dn(Mt),ja=dn(It,!0),Fa=fn(),Ua=fn(!0),Va=ka?function(e,t){return ka.set(e,t),e}:Ti,Ba=ka?function(e){return ka.get(e)}:ki,za=Kt("length"),Ka=function(){var e=0,t=0;return function(n,r){var o=ms(),i=B-(o-t);if(t=o,i>0){if(++e>=V)return n}else e=0;return Va(n,r)}}(),qa=go(function(e,t){return _(e)&&Xn(e)?Nt(e,Pt(t,!1,!0)):[]}),Wa=wn(),Ha=wn(!0),Ga=go(function(e){for(var t=e.length,n=t,r=Bi(p),o=Kn(),i=o==s,a=[];n--;){var u=e[n]=Xn(u=e[n])?u:[];r[n]=i&&u.length>=120?mn(n&&u):null}var l=e[0],c=-1,p=l?l.length:0,d=r[0];e:for(;++c2?e[t-2]:D,r=t>1?e[t-1]:D;return t>2&&"function"==typeof n?t-=2:(n=t>1&&"function"==typeof r?(--t,r):D,r=D),e.length=t,Fr(e,n,r)}),ts=go(function(e){return e=Pt(e),this.thru(function(t){return Ze(Ps(t)?t:[pr(t)],e)})}),ns=go(function(e,t){return gt(e,Pt(t))}),rs=cn(function(e,t,n){ta.call(e,n)?++e[n]:e[n]=1}),os=En(La),is=En(ja,!0),as=Cn(tt,La),ss=Cn(nt,ja),us=cn(function(e,t,n){ta.call(e,n)?e[n].push(t):e[n]=[t]}),ls=cn(function(e,t,n){e[n]=t}),cs=go(function(e,t,n){var r=-1,o="function"==typeof t,i=er(t),a=Xn(e)?Bi(e.length):[];return La(e,function(e){var s=o?t:i&&null!=e?e[t]:D;a[++r]=s?s.apply(e,n):Jn(e,t,n)}),a}),ps=cn(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ds=Mn(ct,La),fs=Mn(pt,ja),hs=go(function(e,t){if(null==e)return[];var n=t[2];return n&&Zn(t[0],t[1],n)&&(t.length=1),Xt(e,Pt(t),[])}),ms=Oa||function(){return(new zi).getTime()},vs=go(function(e,t,n){var r=P;if(n.length){var o=E(n,vs.placeholder);r|=R}return jn(e,r,t,n,o)}),ys=go(function(e,t){t=t.length?Pt(t):Xo(e);for(var n=-1,r=t.length;++n0||0>t)?new o(n):(0>e?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==D&&(t=+t||0,n=0>t?n.dropRight(-t):n.take(t-e)),n)},o.prototype.takeRightWhile=function(e,t){return this.reverse().takeWhile(e,t).reverse()},o.prototype.toArray=function(){return this.take(Ta)},Mt(o.prototype,function(e,n){var i=/^(?:filter|map|reject)|While$/.test(n),a=/^(?:first|last)$/.test(n),s=t[a?"take"+("last"==n?"Right":""):n];s&&(t.prototype[n]=function(){var t=a?[1]:arguments,n=this.__chain__,u=this.__wrapped__,l=!!this.__actions__.length,c=u instanceof o,p=t[0],d=c||Ps(u);d&&i&&"function"==typeof p&&1!=p.length&&(c=d=!1);var f=function(e){return a&&n?s(e,1)[0]:s.apply(D,lt([e],t))},h={func:Kr,args:[f],thisArg:D},m=c&&!l;if(a&&!n)return m?(u=u.clone(),u.__actions__.push(h),e.call(u)):s.call(D,this.value())[0];if(!a&&d){u=m?u:new o(this);var v=e.apply(u,t);return v.__actions__.push(h),new r(v,n)}return this.thru(f)})}),tt(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(e){var n=(/^(?:replace|split)$/.test(e)?Zi:Xi)[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:join|pop|replace|shift)$/.test(e);t.prototype[e]=function(){var e=arguments;return o&&!this.__chain__?n.apply(this.value(),e):this[r](function(t){return n.apply(t,e)})}}),Mt(o.prototype,function(e,n){var r=t[n];if(r){var o=r.name,i=Ra[o]||(Ra[o]=[]);i.push({name:n,func:r})}}),Ra[In(D,S).name]=[{name:"wrapper",func:D}],o.prototype.clone=b,o.prototype.reverse=Z,o.prototype.value=re,t.prototype.chain=qr,t.prototype.commit=Wr,t.prototype.concat=ts,t.prototype.plant=Hr,t.prototype.reverse=Gr,t.prototype.toString=Yr,t.prototype.run=t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=Qr,t.prototype.collect=t.prototype.map,t.prototype.head=t.prototype.first,t.prototype.select=t.prototype.filter,t.prototype.tail=t.prototype.rest,t}var D,T="3.10.1",P=1,S=2,M=4,I=8,k=16,R=32,A=64,L=128,j=256,F=30,U="...",V=150,B=16,z=200,K=1,q=2,W="Expected a function",H="__lodash_placeholder__",G="[object Arguments]",Y="[object Array]",Q="[object Boolean]",J="[object Date]",X="[object Error]",$="[object Function]",Z="[object Map]",ee="[object Number]",te="[object Object]",ne="[object RegExp]",re="[object Set]",oe="[object String]",ie="[object WeakMap]",ae="[object ArrayBuffer]",se="[object Float32Array]",ue="[object Float64Array]",le="[object Int8Array]",ce="[object Int16Array]",pe="[object Int32Array]",de="[object Uint8Array]",fe="[object Uint8ClampedArray]",he="[object Uint16Array]",me="[object Uint32Array]",ve=/\b__p \+= '';/g,ye=/\b(__p \+=) '' \+/g,ge=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_e=/&(?:amp|lt|gt|quot|#39|#96);/g,be=/[&<>"'`]/g,Ee=RegExp(_e.source),we=RegExp(be.source),Ne=/<%-([\s\S]+?)%>/g,Oe=/<%([\s\S]+?)%>/g,Ce=/<%=([\s\S]+?)%>/g,xe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,De=/^\w*$/,Te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Pe=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Se=RegExp(Pe.source),Me=/[\u0300-\u036f\ufe20-\ufe23]/g,Ie=/\\(\\)?/g,ke=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Re=/\w*$/,Ae=/^0[xX]/,Le=/^\[object .+?Constructor\]$/,je=/^\d+$/,Fe=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Ue=/($^)/,Ve=/['\n\r\u2028\u2029\\]/g,Be=function(){var e="[A-Z\\xc0-\\xd6\\xd8-\\xde]",t="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(e+"+(?="+e+t+")|"+e+"?"+t+"|"+e+"+|[0-9]+","g")}(),ze=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Ke=-1,qe={};qe[se]=qe[ue]=qe[le]=qe[ce]=qe[pe]=qe[de]=qe[fe]=qe[he]=qe[me]=!0,qe[G]=qe[Y]=qe[ae]=qe[Q]=qe[J]=qe[X]=qe[$]=qe[Z]=qe[ee]=qe[te]=qe[ne]=qe[re]=qe[oe]=qe[ie]=!1;var We={};We[G]=We[Y]=We[ae]=We[Q]=We[J]=We[se]=We[ue]=We[le]=We[ce]=We[pe]=We[ee]=We[te]=We[ne]=We[oe]=We[de]=We[fe]=We[he]=We[me]=!0,We[X]=We[$]=We[Z]=We[re]=We[ie]=!1;var He={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ge={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ye={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Qe={"function":!0,object:!0},Je={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Xe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$e=Qe[typeof t]&&t&&!t.nodeType&&t,Ze=Qe[typeof e]&&e&&!e.nodeType&&e,et=$e&&Ze&&"object"==typeof o&&o&&o.Object&&o,tt=Qe[typeof self]&&self&&self.Object&&self,nt=Qe[typeof window]&&window&&window.Object&&window,rt=(Ze&&Ze.exports===$e&&$e,et||nt!==(this&&this.window)&&nt||tt||this),ot=x();rt._=ot,r=function(){return ot}.call(t,n,t,e),!(r!==D&&(e.exports=r))}).call(this)}).call(t,n(187)(e),function(){return this}())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{"default":e}},o=n(1),i=r(o),a=n(29),s=r(a),u=n(83),l=r(u),c={propTypes:{offset:i["default"].PropTypes.number,offsetTop:i["default"].PropTypes.number,offsetBottom:i["default"].PropTypes.number},getInitialState:function(){return{affixClass:"affix-top"}},getPinnedOffset:function(e){return this.pinnedOffset?this.pinnedOffset:(e.className=e.className.replace(/affix-top|affix-bottom|affix/,""),e.className+=e.className.length?" affix":"affix",this.pinnedOffset=s["default"].getOffset(e).top-window.pageYOffset,this.pinnedOffset)},checkPosition:function(){var e=void 0,t=void 0,n=void 0,r=void 0,o=void 0,a=void 0,u=void 0,l=void 0,c=void 0;this.isMounted()&&(e=i["default"].findDOMNode(this),t=document.documentElement.offsetHeight,n=window.pageYOffset,r=s["default"].getOffset(e),"top"===this.affixed&&(r.top+=n),o=null!=this.props.offsetTop?this.props.offsetTop:this.props.offset,a=null!=this.props.offsetBottom?this.props.offsetBottom:this.props.offset,(null!=o||null!=a)&&(null==o&&(o=0),null==a&&(a=0),u=null!=this.unpin&&n+this.unpin<=r.top?!1:null!=a&&r.top+e.offsetHeight>=t-a?"bottom":null!=o&&o>=n?"top":!1,this.affixed!==u&&(null!=this.unpin&&(e.style.top=""),l="affix"+(u?"-"+u:""),this.affixed=u,this.unpin="bottom"===u?this.getPinnedOffset(e):null,"bottom"===u&&(e.className=e.className.replace(/affix-top|affix-bottom|affix/,"affix-bottom"),c=t-a-e.offsetHeight-s["default"].getOffset(e).top),this.setState({affixClass:l,affixPositionTop:c}))))},checkPositionWithEventLoop:function(){setTimeout(this.checkPosition,0)},componentDidMount:function(){this._onWindowScrollListener=l["default"].listen(window,"scroll",this.checkPosition),this._onDocumentClickListener=l["default"].listen(s["default"].ownerDocument(this),"click",this.checkPositionWithEventLoop)},componentWillUnmount:function(){this._onWindowScrollListener&&this._onWindowScrollListener.remove(),this._onDocumentClickListener&&this._onDocumentClickListener.remove()},componentDidUpdate:function(e,t){t.affixClass===this.state.affixClass&&this.checkPositionWithEventLoop()}};t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{"default":e}},o=n(1),i=r(o),a=n(9),s=r(a),u=n(50),l=r(u),c=n(4),p=r(c),d=n(29),f=r(d),h=n(85),m=r(h),v=n(17),y=r(v),g=n(28),_=r(g),b=i["default"].createClass({displayName:"CollapsibleNav",mixins:[s["default"],l["default"]],propTypes:{onSelect:i["default"].PropTypes.func,activeHref:i["default"].PropTypes.string,activeKey:i["default"].PropTypes.any,collapsable:i["default"].PropTypes.bool,expanded:i["default"].PropTypes.bool,eventKey:i["default"].PropTypes.any},getCollapsibleDOMNode:function(){return this.getDOMNode()},getCollapsibleDimensionValue:function(){var e=0,t=this.refs;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n].getDOMNode(),o=r.offsetHeight,i=f["default"].getComputedStyles(r);e+=o+parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)}return e},componentDidMount:function(){this.constructor.__deprecated__&&m["default"]("CollapsableNav","CollapsibleNav","https://github.com/react-bootstrap/react-bootstrap/issues/425#issuecomment-97110963")},render:function(){var e=this.props.collapsable?this.getCollapsibleClassSet():{};return(void 0===this.props.className||-2===this.props.className.split(" ").indexOf("navbar-collapse"))&&(e["navbar-collapse"]=this.props.collapsable),i["default"].createElement("div",{eventKey:this.props.eventKey,className:p["default"](this.props.className,e)},y["default"].map(this.props.children,this.props.collapsable?this.renderCollapsibleNavChildren:this.renderChildren))},getChildActiveProp:function(e){return e.props.active?!0:null!=this.props.activeKey&&e.props.eventKey===this.props.activeKey?!0:null!=this.props.activeHref&&e.props.href===this.props.activeHref?!0:e.props.active},renderChildren:function(e,t){var n=e.key?e.key:t;return o.cloneElement(e,{activeKey:this.props.activeKey,activeHref:this.props.activeHref,ref:"nocollapse_"+n,key:n,navItem:!0})},renderCollapsibleNavChildren:function(e,t){var n=e.key?e.key:t;return o.cloneElement(e,{active:this.getChildActiveProp(e),activeKey:this.props.activeKey,activeHref:this.props.activeHref,onSelect:_["default"](e.props.onSelect,this.props.onSelect),ref:"collapsible_"+n,key:n,navItem:!0})}});t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n=e.querySelectorAll("."+t.join("."));n=[].map.call(n,function(e){return e});for(var r=0;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},i=Object.assign||function(e){for(var t=1;tl;++l)if(s=u[l],o[s]!==n[s])return!1;return r(i,a)&&r(a,i)})}function i(e,t){for(var n,r=0,o=e.length;o>r;++r)n=e[r],n.name&&(d(null==t[n.name],'You may not have more than one route named "%s"',n.name),t[n.name]=n),n.childRoutes&&i(n.childRoutes,t)}function a(e,t){return e.some(function(e){return e.name===t})}function s(e,t){for(var n in t)if(String(e[n])!==String(t[n]))return!1;return!0}function u(e,t){for(var n in t)if(String(e[n])!==String(t[n]))return!1;return!0}function l(e){e=e||{},w(e)&&(e={routes:e});var n=[],r=e.location||I,l=e.scrollBehavior||k,m={},R={},A=null,L=null;"string"==typeof r&&(r=new _(r)),r instanceof _?p(!f||"test"===t.env.NODE_ENV,"You should not use a static location in a DOM environment because the router will not be kept in sync with the current URL"):d(f||r.needsDOM===!1,"You cannot use %s without a DOM",r),r!==y||S()||(r=g);var j=c.createClass({displayName:"Router",statics:{isRunning:!1,cancelPendingTransition:function(){A&&(A.cancel(),A=null)},clearAllRoutes:function(){j.cancelPendingTransition(),j.namedRoutes={},j.routes=[]},addRoutes:function(e){w(e)&&(e=E(e)),i(e,j.namedRoutes),j.routes.push.apply(j.routes,e)},replaceRoutes:function(e){j.clearAllRoutes(),j.addRoutes(e),j.refresh()},match:function(e){return T.findMatch(j.routes,e)},makePath:function(e,t,n){var r;if(M.isAbsolute(e))r=e;else{var o=e instanceof P?e:j.namedRoutes[e];d(o instanceof P,'Cannot find a route named "%s"',e),r=o.path}return M.withQuery(M.injectParams(r,t),n)},makeHref:function(e,t,n){var o=j.makePath(e,t,n);return r===v?"#"+o:o},transitionTo:function(e,t,n){var o=j.makePath(e,t,n);A?r.replace(o):r.push(o)},replaceWith:function(e,t,n){r.replace(j.makePath(e,t,n))},goBack:function(){return x.length>1||r===g?(r.pop(),!0):(p(!1,"goBack() was ignored because there is no router history"),!1)},handleAbort:e.onAbort||function(e){if(r instanceof _)throw new Error("Unhandled aborted transition! Reason: "+e);e instanceof D||(e instanceof C?r.replace(j.makePath(e.to,e.params,e.query)):r.pop())},handleError:e.onError||function(e){throw e},handleLocationChange:function(e){j.dispatch(e.path,e.type)},dispatch:function(e,t){ j.cancelPendingTransition();var r=m.path,i=null==t;if(r!==e||i){r&&t===h.PUSH&&j.recordScrollPosition(r);var a=j.match(e);p(null!=a,'No route matches path "%s". Make sure you have somewhere in your routes',e,e),null==a&&(a={});var s,u,l=m.routes||[],c=m.params||{},d=m.query||{},f=a.routes||[],v=a.params||{},y=a.query||{};l.length?(s=l.filter(function(e){return!o(f,e,c,v,d,y)}),u=f.filter(function(e){return!o(l,e,c,v,d,y)})):(s=[],u=f);var g=new N(e,j.replaceWith.bind(j,e));A=g;var _=n.slice(l.length-s.length);N.from(g,s,_,function(n){return n||g.abortReason?L.call(j,n,g):void N.to(g,u,v,y,function(n){L.call(j,n,g,{path:e,action:t,pathname:a.pathname,routes:f,params:v,query:y})})})}},run:function(e){d(!j.isRunning,"Router is already running"),L=function(t,n,r){t&&j.handleError(t),A===n&&(A=null,n.abortReason?j.handleAbort(n.abortReason):e.call(j,j,R=r))},r instanceof _||(r.addChangeListener&&r.addChangeListener(j.handleLocationChange),j.isRunning=!0),j.refresh()},refresh:function(){j.dispatch(r.getCurrentPath(),null)},stop:function(){j.cancelPendingTransition(),r.removeChangeListener&&r.removeChangeListener(j.handleLocationChange),j.isRunning=!1},getLocation:function(){return r},getScrollBehavior:function(){return l},getRouteAtDepth:function(e){var t=m.routes;return t&&t[e]},setRouteComponentAtDepth:function(e,t){n[e]=t},getCurrentPath:function(){return m.path},getCurrentPathname:function(){return m.pathname},getCurrentParams:function(){return m.params},getCurrentQuery:function(){return m.query},getCurrentRoutes:function(){return m.routes},isActive:function(e,t,n){return M.isAbsolute(e)?e===m.path:a(m.routes,e)&&s(m.params,t)&&(null==n||u(m.query,n))}},mixins:[b],propTypes:{children:O.falsy},childContextTypes:{routeDepth:O.number.isRequired,router:O.router.isRequired},getChildContext:function(){return{routeDepth:1,router:j}},getInitialState:function(){return m=R},componentWillReceiveProps:function(){this.setState(m=R)},componentWillUnmount:function(){j.stop()},render:function(){var e=j.getRouteAtDepth(0);return e?c.createElement(e.handler,this.props):null}});return j.clearAllRoutes(),e.routes&&j.addRoutes(e.routes),j}var c=n(1),p=n(88),d=n(31),f=n(64),h=n(51),m=n(142),v=n(148),y=n(87),g=n(149),_=n(150),b=n(269),E=n(147),w=n(276),N=n(271),O=n(30),C=n(141),x=n(45),D=n(140),T=n(267),P=n(37),S=n(279),M=n(86),I=f?v:"/",k=f?m:null;e.exports=l}).call(t,n(2))},function(e,t,n){"use strict";function r(e,t,n){e=e||"UnknownComponent";for(var r in t)if(t.hasOwnProperty(r)){var o=t[r](n,r,e);o instanceof Error&&l(!1,o.message)}}function o(e){var t=u({},e),n=t.handler;return n&&(t.onEnter=n.willTransitionTo,t.onLeave=n.willTransitionFrom),t}function i(e){if(s.isValidElement(e)){var t=e.type,n=u({},t.defaultProps,e.props);return t.propTypes&&r(t.displayName,t.propTypes,n),t===c?f.createDefaultRoute(o(n)):t===p?f.createNotFoundRoute(o(n)):t===d?f.createRedirect(o(n)):f.createRoute(o(n),function(){n.children&&a(n.children)})}}function a(e){var t=[];return s.Children.forEach(e,function(e){(e=i(e))&&t.push(e)}),t}var s=n(1),u=n(5),l=n(88),c=n(143),p=n(144),d=n(145),f=n(37);e.exports=a},function(e,t,n){"use strict";function r(e){e===s.PUSH&&(u.length+=1);var t={path:p.getCurrentPath(),type:e};l.forEach(function(e){e.call(p,t)})}function o(){var e=p.getCurrentPath();return"/"===e.charAt(0)?!0:(p.replace("/"+e),!1)}function i(){if(o()){var e=a;a=null,r(e||s.POP)}}var a,s=n(51),u=n(45),l=[],c=!1,p={addChangeListener:function(e){l.push(e),o(),c||(window.addEventListener?window.addEventListener("hashchange",i,!1):window.attachEvent("onhashchange",i),c=!0)},removeChangeListener:function(e){l=l.filter(function(t){return t!==e}),0===l.length&&(window.removeEventListener?window.removeEventListener("hashchange",i,!1):window.removeEvent("onhashchange",i),c=!1)},push:function(e){a=s.PUSH,window.location.hash=e},replace:function(e){a=s.REPLACE,window.location.replace(window.location.pathname+window.location.search+"#"+e)},pop:function(){a=s.POP,u.back()},getCurrentPath:function(){return decodeURI(window.location.href.split("#")[1]||"")},toString:function(){return""}};e.exports=p},function(e,t,n){"use strict";var r=n(87),o=n(45),i={push:function(e){window.location=e},replace:function(e){window.location.replace(e)},pop:o.back,getCurrentPath:r.getCurrentPath,toString:function(){return""}};e.exports=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){a(!1,"You cannot modify a static location")}var i=function(){function e(e,t){for(var n=0;n'}}]),e}();s.prototype.push=o,s.prototype.replace=o,s.prototype.pop=o,e.exports=s},function(e,t){t.arrayToObject=function(e){for(var t={},n=0,r=e.length;r>n;++n)"undefined"!=typeof e[n]&&(t[n]=e[n]);return t},t.merge=function(e,n){if(!n)return e;if("object"!=typeof n)return Array.isArray(e)?e.push(n):e[n]=!0,e;if("object"!=typeof e)return e=[e].concat(n);Array.isArray(e)&&!Array.isArray(n)&&(e=t.arrayToObject(e));for(var r=Object.keys(n),o=0,i=r.length;i>o;++o){var a=r[o],s=n[a];e[a]?e[a]=t.merge(e[a],s):e[a]=s}return e},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;n=n||[];var r=n.indexOf(e);if(-1!==r)return n[r];if(n.push(e),Array.isArray(e)){for(var o=[],i=0,a=e.length;a>i;++i)"undefined"!=typeof e[i]&&o.push(e[i]);return o}var s=Object.keys(e);for(i=0,a=s.length;a>i;++i){var u=s[i];e[u]=t.compact(e[u],n)}return e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null===e||"undefined"==typeof e?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var i={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};e.exports=a},function(e,t,n){(function(t){"use strict";var r=n(152),o=n(12),i=n(344),a=n(349),s=n(356),u=n(360),l=n(8),c=u(function(e){return s(e)}),p="cssFloat";if(o.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(p="styleFloat"),"production"!==t.env.NODE_ENV)var d=/^(?:webkit|moz|o)[A-Z]/,f=/;\s*$/,h={},m={},v=function(e){h.hasOwnProperty(e)&&h[e]||(h[e]=!0,"production"!==t.env.NODE_ENV?l(!1,"Unsupported style property %s. Did you mean %s?",e,i(e)):null)},y=function(e){h.hasOwnProperty(e)&&h[e]||(h[e]=!0,"production"!==t.env.NODE_ENV?l(!1,"Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)):null)},g=function(e,n){m.hasOwnProperty(n)&&m[n]||(m[n]=!0,"production"!==t.env.NODE_ENV?l(!1,'Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',e,n.replace(f,"")):null)},_=function(e,t){e.indexOf("-")>-1?v(e):d.test(e)?y(e):f.test(t)&&g(e,t)};var b={createMarkupForStyles:function(e){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];"production"!==t.env.NODE_ENV&&_(r,o),null!=o&&(n+=c(r)+":",n+=a(r,o)+";")}return n||null},setValueForStyles:function(e,n){var o=e.style;for(var i in n)if(n.hasOwnProperty(i)){"production"!==t.env.NODE_ENV&&_(i,n[i]);var s=a(i,n[i]);if("float"===i&&(i=p),s)o[i]=s;else{var u=r.shorthandPropertyExpansions[i];if(u)for(var l in u)o[l]="";else o[i]=""}}}};e.exports=b}).call(t,n(2))},function(e,t,n){(function(t){"use strict";function r(){if(s)for(var e in u){var n=u[e],r=s.indexOf(e);if("production"!==t.env.NODE_ENV?a(r>-1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e):a(r>-1),!l.plugins[r]){"production"!==t.env.NODE_ENV?a(n.extractEvents,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e):a(n.extractEvents),l.plugins[r]=n;var i=n.eventTypes;for(var c in i)"production"!==t.env.NODE_ENV?a(o(i[c],n,c),"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",c,e):a(o(i[c],n,c))}}}function o(e,n,r){"production"!==t.env.NODE_ENV?a(!l.eventNameDispatchConfigs.hasOwnProperty(r),"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",r):a(!l.eventNameDispatchConfigs.hasOwnProperty(r)),l.eventNameDispatchConfigs[r]=e;var o=e.phasedRegistrationNames;if(o){for(var s in o)if(o.hasOwnProperty(s)){var u=o[s];i(u,n,r)}return!0}return e.registrationName?(i(e.registrationName,n,r),!0):!1}function i(e,n,r){"production"!==t.env.NODE_ENV?a(!l.registrationNameModules[e],"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e):a(!l.registrationNameModules[e]),l.registrationNameModules[e]=n,l.registrationNameDependencies[e]=n.eventTypes[r].dependencies}var a=n(3),s=null,u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){"production"!==t.env.NODE_ENV?a(!s,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."):a(!s),s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var n=!1;for(var o in e)if(e.hasOwnProperty(o)){var i=e[o];u.hasOwnProperty(o)&&u[o]===i||("production"!==t.env.NODE_ENV?a(!u[o],"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",o):a(!u[o]),u[o]=i,n=!0)}n&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=l}).call(t,n(2))},function(e,t,n){(function(t){"use strict";function r(e,t){this.forEachFunction=e,this.forEachContext=t}function o(e,t,n,r){var o=e;o.forEachFunction.call(o.forEachContext,t,r)}function i(e,t,n){if(null==e)return e;var i=r.getPooled(t,n);f(e,o,i),r.release(i)}function a(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function s(e,n,r,o){var i=e,a=i.mapResult,s=!a.hasOwnProperty(r);if("production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?h(s,"ReactChildren.map(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.",r):null),s){var u=i.mapFunction.call(i.mapContext,n,o);a[r]=u}}function u(e,t,n){if(null==e)return e;var r={},o=a.getPooled(r,t,n);return f(e,s,o),a.release(o),d.create(r)}function l(e,t,n,r){return null}function c(e,t){return f(e,l,null)}var p=n(32),d=n(48),f=n(182),h=n(8),m=p.twoArgumentPooler,v=p.threeArgumentPooler;p.addPoolingTo(r,m),p.addPoolingTo(a,v);var y={forEach:i,map:u,count:c};e.exports=y}).call(t,n(2))},function(e,t,n){(function(t){"use strict";function r(e,t){this.props=e,this.context=t}var o=n(99),i=n(3),a=n(8);if(r.prototype.setState=function(e,n){"production"!==t.env.NODE_ENV?i("object"==typeof e||"function"==typeof e||null==e,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."):i("object"==typeof e||"function"==typeof e||null==e),"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?a(null!=e,"setState(...): You passed an undefined or null state object; instead, use forceUpdate()."):null),o.enqueueSetState(this,e),n&&o.enqueueCallback(this,n)},r.prototype.forceUpdate=function(e){o.enqueueForceUpdate(this),e&&o.enqueueCallback(this,e)},"production"!==t.env.NODE_ENV){var s={getDOMNode:["getDOMNode","Use React.findDOMNode(component) instead."],isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceProps:["replaceProps","Instead, call React.render again at the top level."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."],setProps:["setProps","Instead, call React.render again at the top level."]},u=function(e,n){try{Object.defineProperty(r.prototype,e,{get:function(){"production"!==t.env.NODE_ENV?a(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",n[0],n[1]):null}})}catch(o){}};for(var l in s)s.hasOwnProperty(l)&&u(l,s[l])}e.exports=r}).call(t,n(2))},function(e,t,n){(function(t){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}var o=n(94),i=n(95),a=n(34),s=n(7),u=n(54),l=n(42),c=n(97),p=n(67),d=n(35),f=n(98),h=n(68),m=n(49),v=n(21),y=n(5),g=n(56),_=n(3),b=n(108),E=n(8),w=1,N={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._isTopLevel=!1,this._pendingCallbacks=null},mountComponent:function(e,n,r){this._context=r,this._mountOrder=w++,this._rootNodeID=e;var o=this._processProps(this._currentElement.props),i=this._processContext(this._currentElement._context),a=p.getComponentClassForElement(this._currentElement),s=new a(o,i);"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?E(null!=s.render,"%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render` in your component or you may have accidentally tried to render an element whose type is a function that isn't a React component.",a.displayName||a.name||"Component"):null),s.props=o,s.context=i,s.refs=g,this._instance=s,l.set(s,this),"production"!==t.env.NODE_ENV&&this._warnIfContextsDiffer(this._currentElement._context,r),"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?E(!s.getInitialState||s.getInitialState.isReactClassApproved,"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",this.getName()||"a component"):null,"production"!==t.env.NODE_ENV?E(!s.getDefaultProps||s.getDefaultProps.isReactClassApproved,"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",this.getName()||"a component"):null,"production"!==t.env.NODE_ENV?E(!s.propTypes,"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",this.getName()||"a component"):null,"production"!==t.env.NODE_ENV?E(!s.contextTypes,"contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",this.getName()||"a component"):null,"production"!==t.env.NODE_ENV?E("function"!=typeof s.componentShouldUpdate,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",this.getName()||"A component"):null);var u=s.state;void 0===u&&(s.state=u=null),"production"!==t.env.NODE_ENV?_("object"==typeof u&&!Array.isArray(u),"%s.state: must be set to an object or null",this.getName()||"ReactCompositeComponent"):_("object"==typeof u&&!Array.isArray(u)),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var d,f,h=c.currentlyMountingInstance;c.currentlyMountingInstance=this;try{s.componentWillMount&&(s.componentWillMount(),this._pendingStateQueue&&(s.state=this._processPendingState(s.props,s.context))),d=this._getValidatedChildContext(r),f=this._renderValidatedComponent(d)}finally{c.currentlyMountingInstance=h}this._renderedComponent=this._instantiateReactComponent(f,this._currentElement.type);var v=m.mountComponent(this._renderedComponent,e,n,this._mergeChildContext(r,d));return s.componentDidMount&&n.getReactMountReady().enqueue(s.componentDidMount,s),v},unmountComponent:function(){var e=this._instance;if(e.componentWillUnmount){var t=c.currentlyUnmountingInstance;c.currentlyUnmountingInstance=this;try{e.componentWillUnmount()}finally{c.currentlyUnmountingInstance=t}}m.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,l.remove(e)},_setPropsInternal:function(e,t){var n=this._pendingElement||this._currentElement;this._pendingElement=s.cloneAndReplaceProps(n,y({},n.props,e)),v.enqueueUpdate(this,t)},_maskContext:function(e){var t=null;if("string"==typeof this._currentElement.type)return g;var n=this._currentElement.type.contextTypes;if(!n)return g;t={};for(var r in n)t[r]=e[r];return t},_processContext:function(e){var n=this._maskContext(e);if("production"!==t.env.NODE_ENV){var r=p.getComponentClassForElement(this._currentElement);r.contextTypes&&this._checkPropTypes(r.contextTypes,n,f.context)}return n},_getValidatedChildContext:function(e){var n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"production"!==t.env.NODE_ENV?_("object"==typeof n.constructor.childContextTypes,"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",this.getName()||"ReactCompositeComponent"):_("object"==typeof n.constructor.childContextTypes),"production"!==t.env.NODE_ENV&&this._checkPropTypes(n.constructor.childContextTypes,r,f.childContext);for(var o in r)"production"!==t.env.NODE_ENV?_(o in n.constructor.childContextTypes,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',this.getName()||"ReactCompositeComponent",o):_(o in n.constructor.childContextTypes);return r}return null},_mergeChildContext:function(e,t){return t?y({},e,t):e},_processProps:function(e){if("production"!==t.env.NODE_ENV){var n=p.getComponentClassForElement(this._currentElement);n.propTypes&&this._checkPropTypes(n.propTypes,e,f.prop)}return e},_checkPropTypes:function(e,n,o){var i=this.getName();for(var a in e)if(e.hasOwnProperty(a)){var s;try{"production"!==t.env.NODE_ENV?_("function"==typeof e[a],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",i||"React class",h[o],a):_("function"==typeof e[a]),s=e[a](n,a,i,o)}catch(u){s=u}if(s instanceof Error){var l=r(this);o===f.prop?"production"!==t.env.NODE_ENV?E(!1,"Failed Composite propType: %s%s",s.message,l):null:"production"!==t.env.NODE_ENV?E(!1,"Failed Context Types: %s%s",s.message,l):null}}},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&m.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&("production"!==t.env.NODE_ENV&&u.checkAndWarnForMutatedProps(this._currentElement),this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context))},_warnIfContextsDiffer:function(e,n){e=this._maskContext(e),n=this._maskContext(n);for(var r=Object.keys(n).sort(),o=this.getName()||"ReactCompositeComponent",i=0;i"+o+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;n!==this._stringText&&(this._stringText=n,i.BackendIDOperations.updateTextContentByID(this._rootNodeID,n))}},unmountComponent:function(){o.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=u},function(e,t,n){"use strict";function r(e){return Math.floor(100*e)/100}function o(e,t,n){e[t]=(e[t]||0)+n}var i=n(38),a=n(313),s=n(22),u=n(35),l=n(362),c={_allMeasurements:[],_mountStack:[0],_injected:!1,start:function(){c._injected||u.injection.injectMeasure(c.measure),c._allMeasurements.length=0,u.enableMeasure=!0},stop:function(){u.enableMeasure=!1},getLastMeasurements:function(){return c._allMeasurements},printExclusive:function(e){e=e||c._allMeasurements;var t=a.getExclusiveSummary(e);console.table(t.map(function(e){return{"Component class name":e.componentName,"Total inclusive time (ms)":r(e.inclusive),"Exclusive mount time (ms)":r(e.exclusive),"Exclusive render time (ms)":r(e.render),"Mount time per instance (ms)":r(e.exclusive/e.count),"Render time per instance (ms)":r(e.render/e.count),Instances:e.count}}))},printInclusive:function(e){e=e||c._allMeasurements;var t=a.getInclusiveSummary(e);console.table(t.map(function(e){return{"Owner > component":e.componentName,"Inclusive time (ms)":r(e.time),Instances:e.count}})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(e){var t=a.getInclusiveSummary(e,!0);return t.map(function(e){return{"Owner > component":e.componentName,"Wasted time (ms)":e.time,Instances:e.count}})},printWasted:function(e){e=e||c._allMeasurements,console.table(c.getMeasurementsSummaryMap(e)),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},printDOM:function(e){e=e||c._allMeasurements;var t=a.getDOMSummary(e);console.table(t.map(function(e){var t={};return t[i.ID_ATTRIBUTE_NAME]=e.id,t.type=e.type,t.args=JSON.stringify(e.args),t})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},_recordWrite:function(e,t,n,r){var o=c._allMeasurements[c._allMeasurements.length-1].writes;o[e]=o[e]||[],o[e].push({type:t,time:n,args:r})},measure:function(e,t,n){return function(){for(var r=[],i=0,a=arguments.length;a>i;i++)r.push(arguments[i]);var u,p,d;if("_renderNewRootComponent"===t||"flushBatchedUpdates"===t)return c._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0}),d=l(),p=n.apply(this,r),c._allMeasurements[c._allMeasurements.length-1].totalTime=l()-d,p;if("_mountImageIntoNode"===t||"ReactDOMIDOperations"===e){if(d=l(),p=n.apply(this,r),u=l()-d,"_mountImageIntoNode"===t){var f=s.getID(r[1]);c._recordWrite(f,t,u,r[0])}else"dangerouslyProcessChildrenUpdates"===t?r[0].forEach(function(e){var t={};null!==e.fromIndex&&(t.fromIndex=e.fromIndex),null!==e.toIndex&&(t.toIndex=e.toIndex),null!==e.textContent&&(t.textContent=e.textContent),null!==e.markupIndex&&(t.markup=r[1][e.markupIndex]),c._recordWrite(e.parentID,e.type,u,t)}):c._recordWrite(r[0],t,u,Array.prototype.slice.call(r,1));return p}if("ReactCompositeComponent"!==e||"mountComponent"!==t&&"updateComponent"!==t&&"_renderValidatedComponent"!==t)return n.apply(this,r);if("string"==typeof this._currentElement.type)return n.apply(this,r);var h="mountComponent"===t?r[0]:this._rootNodeID,m="_renderValidatedComponent"===t,v="mountComponent"===t,y=c._mountStack,g=c._allMeasurements[c._allMeasurements.length-1];if(m?o(g.counts,h,1):v&&y.push(0),d=l(),p=n.apply(this,r),u=l()-d,m)o(g.render,h,u);else if(v){var _=y.pop();y[y.length-1]+=u,o(g.exclusive,h,u-_),o(g.inclusive,h,u)}else o(g.inclusive,h,u);return g.displayNames[h]={current:this.getName(),owner:this._currentElement._owner?this._currentElement._owner.getName():""},p}}};e.exports=c},function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var o=n(309),i=n(171),a=n(173),s=n(174),u={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=s();return{focusedElem:e,selectionRange:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t=s(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(u.hasSelectionCapabilities(n)&&u.setSelection(n,o),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if("undefined"==typeof r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};e.exports=u},function(e,t,n){"use strict";var r=n(342),o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(">"," "+o.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var n=t.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=o},function(e,t,n){"use strict";var r=n(57),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";function r(e){function t(t,n,r,o,i){if(o=o||E,null==n[r]){ -var a=_[i];return t?new Error("Required "+a+" `"+r+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o){var i=t[n],a=m(i);if(a!==e){var s=_[o],u=v(i);return new Error("Invalid "+s+" `"+n+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `"+e+"`."))}return null}return r(t)}function i(){return r(b.thatReturns(null))}function a(e){function t(t,n,r,o){var i=t[n];if(!Array.isArray(i)){var a=_[o],s=m(i);return new Error("Invalid "+a+" `"+n+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u>",w=s(),N=d(),O={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:w,instanceOf:u,node:N,objectOf:c,oneOf:l,oneOfType:p,shape:f};e.exports=O},function(e,t,n){"use strict";function r(){this.listenersToPut=[]}var o=n(32),i=n(40),a=n(5);a(r.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var o=n(12),i=n(3),a=o.canUseDOM?document.createElement("div"):null,s={circle:!0,clipPath:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},u=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,"",""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c,circle:p,clipPath:p,defs:p,ellipse:p,g:p,line:p,linearGradient:p,path:p,polygon:p,polyline:p,radialGradient:p,rect:p,stop:p,text:p};e.exports=r}).call(t,n(2))},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(12),i=null;e.exports=r},function(e,t){function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&r[e.type]||"TEXTAREA"===e.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){(function(t){"use strict";function r(e){return"production"!==t.env.NODE_ENV?i(o.isValidElement(e),"onlyChild must be passed a children with exactly one child."):i(o.isValidElement(e)),e}var o=n(7),i=n(3);e.exports=r}).call(t,n(2))},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}e.exports=n},function(e,t,n){(function(t){"use strict";function r(e){return y[e]}function o(e,t){return e&&null!=e.key?a(e.key):t.toString(36)}function i(e){return(""+e).replace(g,r)}function a(e){return"$"+i(e)}function s(e,n,r,i,u){var p=typeof e;if(("undefined"===p||"boolean"===p)&&(e=null),null===e||"string"===p||"number"===p||l.isValidElement(e))return i(u,e,""===n?m+o(e,0):n,r),1;var y,g,b,E=0;if(Array.isArray(e))for(var w=0;wt;t++)u.throwIf(this.validateListening(a[t]));for(t=0;c>t;t++)d.push(a[t].listen(i(t,p),this));return o(p),n={listenable:a},n.stop=r(n,d,this),this.subscriptions=(this.subscriptions||[]).concat(n),n}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(6),s=r(a),u=n(11),l=r(u),c=n(114),p=r(c),d=n(209),f=r(d),h=function(){return{breadcrumbs:p["default"].get("data")}},m=i["default"].createClass({displayName:"BreadcrumbsContainer",mixins:[i["default"].addons.PureRenderMixin,s["default"].ListenerMixin],getInitialState:function(){return h()},componentDidMount:function(){this.listenTo(p["default"],this.updateBreadcrumbs)},updateBreadcrumbs:function(){this.setState(h())},handleLink:function(e){l["default"].goToFolder(e.id)},render:function(){var e=this.state.breadcrumbs.toJS();return i["default"].createElement(f["default"],{onSelect:this.handleLink,breadcrumbs:e})}});t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(124),l=r(u),c=n(14),p=r(c),d=n(10),f=r(d),h=n(76),m=r(h),v=n(13),y=r(v),g=function(){return{dragging:m["default"].get("active")}},_=i["default"].createClass({displayName:"DropzoneContainer",mixins:[i["default"].addons.PureRenderMixin,s["default"].ListenerMixin],propTypes:{items:i["default"].PropTypes.object.isRequired,folderID:i["default"].PropTypes.oneOfType([i["default"].PropTypes.string,i["default"].PropTypes.number]),enabled:i["default"].PropTypes.bool},getDefaultProps:function(){return{enabled:!0}},getInitialState:function(){return g()},componentDidMount:function(){this.listenTo(m["default"],this.updateFromStores)},updateFromStores:function(){this.setState(g())},addFile:function(e,t){f["default"].beginUploading();var n=void 0;if(t.size>1024*e.options.maxFilesize*1024){var r=Math.round(t.size/1024/10.24)/100,o=e.options.maxFilesize;n=(0,v.sf)((0,y["default"])("KickAssets.FILETOOBIG","File is too big. (%sMB). Max size: %sMB"),r,o)}else if(e.constructor.isValidFile(t,e.options.acceptedFiles)){if(null!=e.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles){var i=e.options.maxFiles;n=(0,v.sf)((0,y["default"])("KickAssets.TOOMANYFILES","Too many files. Upload no more than %s"),i)}}else n=(0,y["default"])("KickAssets.INVALIDFILETYPE","Invalid file type");f["default"].addFile(t,n)},handleThumbnail:function(e,t,n){var r=this.getFileByID(t.uuid);r&&f["default"].alterItem(r.toJS(),{iconURL:n})},handleProgress:function(e,t,n,r){var o=this.getFileByID(t.uuid);o&&f["default"].alterItem(o.toJS(),{progress:n})},handleTotalProgress:function(e,t,n){f["default"].setTotalProgress(t,n)},handleUpload:function(e,t,n){var r=this;t.forEach(function(t){var n=r.getFileByID(t.uuid);n&&e.removeFile(n)}),setTimeout(function(){t.forEach(function(e,t){f["default"].replaceItem(r.getFileByID(e.uuid).toJS(),n[t])})},0)},handleQueueComplete:function(){f["default"].endUploading()},getFileByID:function(e){return this.props.items.find(function(t){return e===t.get("id")})},render:function(){var e="ka-folder-items ka-dropzone ka-main";return this.state.dragging&&(e+=" dragging"),i["default"].createElement(l["default"],{url:p["default"].get("baseRoute")+"upload/"+this.props.folderID,previewTemplate:"",acceptedFiles:p["default"].get("allowedExtensions"),maxFilesize:p["default"].get("maxFilesize"),uploadMultiple:!0,onSuccessmultiple:this.handleUpload,onQueuecomplete:this.handleQueueComplete,onAddedfile:this.addFile,onThumbnail:this.handleThumbnail,onUploadprogress:this.handleProgress,onTotaluploadprogress:this.handleTotalProgress,parallelUploads:1,clickable:"#ka-add-files",thumbnailWidth:198,thumbnailHeight:132,previewsContainer:"#ka-previews",disabled:this.state.dragging,className:e},this.props.children)}});t["default"]=_,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(212),s=r(a),u=n(124),l=(r(u),n(14)),c=(r(l),n(10)),p=r(c),d=n(27),f=(r(d),i["default"].createClass({displayName:"FilePreviewContainer",propTypes:{file:i["default"].PropTypes.object.isRequired},addFile:function(e,t){p["default"].replaceDetailItem(t)},handleThumbnail:function(e,t,n){p["default"].alterDetailItem({iconURL:n})},handleProgress:function(e,t,n,r){p["default"].alterDetailItem({progress:n})},handleUpload:function(e,t,n){e.removeFile(t),p["default"].alterDetailItem({newID:n})},handleError:function(e,t,n){e.removeFile(t),p["default"].throwError(n)},render:function(){return i["default"].createElement(s["default"],{file:this.props.file})}}));t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(6),s=r(a),u=n(10),l=r(u),c=n(11),p=r(c),d=n(115),f=r(d),h=n(27),m=(r(h),n(215)),v=r(m),y=function(){return{fileData:f["default"].get("data"),transaction:f["default"].get("updated")?"SAVED":"DEFAULT"}},g=i["default"].createClass({displayName:"ItemEditFormContainer",propTypes:{routerParams:i["default"].PropTypes.object.isRequired},mixins:[s["default"].ListenerMixin,i["default"].addons.PureRenderMixin],getInitialState:function(){return y()},componentDidMount:function(){this.listenTo(f["default"],this.onFileChanged),l["default"].showItem(this.getFileFromProps())},componentWillReceiveProps:function(e){this.getFileFromProps()!==this.getFileFromProps(e)&&l["default"].showItem(e.routerParams.get("fileID"))},componentDidUpdate:function(e,t){var n=this;t.fileData&&!this.state.fileData&&p["default"].goToFolder(),"SAVING"===t.transaction&&"SAVED"===this.state.transaction&&setTimeout(function(){n.setState({transaction:"DEFAULT"})},2e3)},onFileChanged:function(){this.setState(y())},handleSubmit:function(e){this.setState({transaction:"SAVING"}),l["default"].editItem({id:e.id},e)},getFileFromProps:function(e){return e=e||this.props,e.routerParams.get("fileID")},render:function(){var e=this.state.fileData.toJS();return e.id?i["default"].createElement(v["default"],{transaction:this.state.transaction,file:e,onSubmit:this.handleSubmit}):i["default"].createElement("div",null)}});t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=(r(a),n(219)),u=r(s),l=n(11),c=r(l),p=i["default"].createClass({displayName:"ListViewHeaderContainer",mixins:[i["default"].addons.PureRenderMixin],propTypes:{routerParams:i["default"].PropTypes.object.isRequired},handleSortChange:function(e){c["default"].updateSort(e)},render:function(){return i["default"].createElement(u["default"],{onSortChange:this.handleSortChange,sort:this.props.routerParams.getIn(["folderParams","sort"])})}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(6),s=r(a),u=n(74),l=r(u),c=n(72),p=(r(c),n(201)),d=r(p),f=n(58),h=r(f),m=n(10),v=r(m),y=n(73),g=r(y),_=n(16),b=n(11),E=r(b),w=n(125),N=r(w),O=n(13),C=r(O),x=i["default"].createClass({displayName:"MovePanelContainer",mixins:[s["default"].ListenerMixin,i["default"].addons.PureRenderMixin],getInitialState:function(){return{moveItems:d["default"].get("data"),newEntry:null,folder:null}},componentDidMount:function(){this.listenTo(d["default"],this.onMoveChanged)},componentDidUpdate:function(e,t){this.state.moveItems.count()||this.close()},onMoveChanged:function(){this.setState({moveItems:d["default"].get("data")})},removeItem:function(e){v["default"].removeMoveItem(e)},handleSubmit:function(e){e.preventDefault();var t=d["default"].column("id");"string"==typeof this.state.folder?(v["default"].moveItems(this.state.folder,t),v["default"].refreshFolderItems()):v["default"].moveItems(this.state.folder.id,t)},handleFolderSelect:function(e){this.setState({folder:e})},handleNewEntry:function(e){this.setState({folder:e})},close:function(){E["default"].goToFolder(this.props.routerParams.getIn(["folderParams","folderID"]))},render:function(){var e=this,t=this.state.moveItems.toJS();return i["default"].createElement(l["default"],{title:"Move items"},i["default"].createElement("form",{className:"ka-move-form",role:"form",onSubmit:this.handleSubmit},i["default"].createElement("div",{className:"form-group"},i["default"].createElement("label",null,(0,O.sf)((0,C["default"])("KickAssets.MOVEITEMSTO","Move %s item(s) to:"),t.length)),i["default"].createElement(g["default"],{freeText:!0,currentFolder:h["default"].get("data").get("filename"),onNewEntry:this.handleNewEntry,onSelected:this.handleFolderSelect})),"string"==typeof this.state.folder&&i["default"].createElement(_.Alert,{bsStyle:"success"},(0,C["default"])("KickAssets.FOLDERNOTEXIST","This folder does not exist. It will be created.")),i["default"].createElement("ul",{className:"move-list"},t.map(function(t){return i["default"].createElement("li",{key:t.id},i["default"].createElement("span",{className:"ka-file-image"},i["default"].createElement(N["default"],t)),i["default"].createElement("span",{className:"ka-file-title"},t.title),i["default"].createElement("a",{onClick:e.removeItem.bind(null,t.id)},i["default"].createElement(_.Glyphicon,{glyph:"minus-sign"})))})),i["default"].createElement(_.Button,{block:!0,bsStyle:"primary",type:"submit"},(0,O.sf)((0,C["default"])("KickAssets.MOVEITEMS","Move %s items"),t.length))))}});t["default"]=x,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(11),l=r(u),c=n(220),p=r(c),d=n(27),f=r(d),h=i["default"].createClass({displayName:"SearchFormContainer",mixins:[i["default"].addons.PureRenderMixin,s["default"].ListenerMixin],propTypes:{routerParams:i["default"].PropTypes.object.isRequired},handleSearch:function(e){var t=f["default"].getCurrentFolderID();e?l["default"].goToSearch(t,e):l["default"].goToFolder(t)},render:function(){var e=this.props.routerParams.get("search");return i["default"].createElement(p["default"],{value:e,onUpdate:this.handleSearch})}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(6),s=r(a),u=n(74),l=r(u),c=n(72),p=r(c),d=n(128),f=(r(d),n(117)),h=r(f),m=n(44),v=r(m),y=n(52),g=(r(y),n(10)),_=r(g),b=n(127),E=r(b),w=n(13),N=r(w),O=function(){return{searchItems:h["default"].get("data"),loading:h["default"].get("loading"),selectedItems:v["default"].get("data")}},C=i["default"].createClass({displayName:"SearchPanelContainer",mixins:[s["default"].ListenerMixin,i["default"].addons.PureRenderMixin],propTypes:{routerParams:i["default"].PropTypes.object.isRequired},getInitialState:function(){return O()},componentDidMount:function(){var e=this.props.routerParams.get("search");this.listenTo(h["default"],this.onStoresChanged),this.listenTo(v["default"],this.onStoresChanged),e&&_["default"].search(e)},componentWillReceiveProps:function(e){this.getTermFromProps()!==this.getTermFromProps(e)&&_["default"].search(e.routerParams.get("search"))},onStoresChanged:function(){this.setState(O())},getTermFromProps:function(e){return e=e||this.props,e.routerParams.get("search")},render:function(){var e=this,t=this.state.searchItems,n=t.map(function(t){return i["default"].createElement(p["default"],{selected:e.state.selectedItems.contains(t),selectedCount:e.state.selectedItems.count(),key:t.id,data:t})}).toJS();return i["default"].createElement(l["default"],{title:(0,w.sf)((0,N["default"])("KickAssets.SEARCHFOR","Search for %s"),this.getTermFromProps())},function(){return e.state.loading?i["default"].createElement(E["default"],{type:"bounce"}):t.count()?i["default"].createElement("div",null,n):i["default"].createElement("div",{className:"alert alert-danger"},"No results")}())}});t["default"]=C,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(16),l=n(44),c=r(l),p=n(10),d=(r(p),n(14)),f=r(d),h=n(77),m=r(h),v=n(207),y=(r(v),n(13)),g=r(y),_=function(){return{selectedItems:c["default"].get("data"),valid:c["default"].isValid(),error:null}},b=i["default"].createClass({displayName:"SelectionButtonContainer",mixins:[s["default"].ListenerMixin],getInitialState:function(){return _()},componentDidMount:function(){this.listenTo(c["default"],this.updateSelection)},updateSelection:function(){this.setState(_())},handleSelect:function(e){e.preventDefault();var t=this.state.selectedItems.toJS(),n=f["default"].get("maxSelection"),r=f["default"].get("allowedTypes"),o=f["default"].get("allowedExtensions").split(",").map(function(e){return e.replace(/^\./,"")}),i=void 0;c["default"].isValidCount()?c["default"].isValidTypes()?c["default"].isValidExtensions()||(i=(0,y.sf)((0,g["default"])("KickAssets.INVALIDEXTENSIONSSELECTED","You have selected some files with invalid extensions. Please select only %s"),o.join(", "))):i=(0,y.sf)((0,g["default"])("KickAssets.INVALIDTYPESSELECTED","You have selected some invalid items. Please select only %s"),r.join(", ")):i=(0,y.sf)((0,g["default"])("KickAssets.TOOMANYSELECTED","You have selected too many items. Please select no more than %s."),n),i?this.setState({error:i}):window.parent.KickAssets.finish(t)},render:function(){var e=this.state.valid?this.state.selectedItems.count():"!",t=(0,m["default"])({"badged-button":!0,btn:!0,"btn-success":!0});return i["default"].createElement("div",null,i["default"].createElement(u.Button,{className:t,onClick:this.handleSelect},(!this.state.valid||e>0)&&i["default"].createElement("span",{className:"badge badge-danger"},e),(0,y.sf)((0,g["default"])("KickAssets.SELECTNUMBERITEMS","Done"),e),i["default"].createElement(u.Glyphicon,{glyph:"chevron-right"})),this.state.error&&i["default"].createElement(u.Popover,{placement:"left",positionLeft:50,positionTop:-10},this.state.error))}});t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(16),l=n(119),c=r(l),p=n(11),d=r(p),f=i["default"].createClass({displayName:"SortDropdownContainer",mixins:[s["default"].ListenerMixin,i["default"].addons.PureRenderMixin],propTypes:{routerParams:i["default"].PropTypes.object.isRequired},handleSort:function(e){d["default"].updateSort(e)},render:function(){var e=i["default"].createElement(u.Glyphicon,{glyph:"sort"}),t=i["default"].createElement(u.Glyphicon,{glyph:"ok"}),n="  ",r=this.props.routerParams.get("folderParams").get("sort"),o=Object.keys(c["default"]);return o.pop(),i["default"].createElement(u.DropdownButton,{onSelect:this.handleSort,title:e},o.map(function(e){var o=r===e?t:n;return i["default"].createElement(u.MenuItem,{key:e,eventKey:e},o," ",c["default"][e].label)}))}});t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(11),l=r(u),c=n(223),p=r(c),d=i["default"].createClass({displayName:"ViewToggleContainer",mixins:[i["default"].addons.PureRenderMixin,s["default"].ListenerMixin],propTypes:{routerParams:i["default"].PropTypes.object.isRequired},handleToggle:function(e){l["default"].updateView(e)},render:function(){return i["default"].createElement(p["default"],{onToggle:this.handleToggle,view:this.props.routerParams.get("view")})}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(52),s=r(a),u=i["default"].createClass({displayName:"KickAssets", -render:function(){return i["default"].createElement("div",null,i["default"].createElement(s["default"].RouteHandler,null))}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(52),s=r(a),u=n(222),l=r(u),c=n(210),p=r(c),d=n(113),f=r(d),h=n(10),m=r(h),v=n(11),y=r(v),g=n(15),_=r(g),b=n(44),E=r(b),w=n(14),N=r(w),O=i["default"].createClass({displayName:"Main",mixins:[s["default"].State],getInitialState:function(){return{routerParams:_["default"].Map()}},componentWillMount:function(){y["default"].initRouter(this.context.router),this.loadRouterParams()},componentDidMount:function(){m["default"].getFolders(),document.addEventListener("keyup",this.keyUpListener),document.addEventListener("keydown",this.keyDownListener)},componentWillReceiveProps:function(e){this.loadRouterParams(e)},keyDownListener:function(e){e.metaKey&&!E["default"].get("multi")&&m["default"].activateMultiSelect()},keyUpListener:function(e){!e.metaKey&&E["default"].get("multi")&&m["default"].deactivateMultiSelect()},loadRouterParams:function(e){e=e||this.props;var t=_["default"].Map({folderParams:_["default"].Map({folderID:e.params.folderID,sort:e.query.sort||N["default"].get("defaultSort")}),fileID:e.params.fileID,search:e.query.q,view:e.query.view||N["default"].get("defaultView"),path:this.context.router.getCurrentPathname(),recent:"recent"===e.params.folderID});_["default"].is(this.state.routerParams,t)||this.setState({routerParams:t})},render:function(){return this.state.routerParams.get("folderParams")?i["default"].createElement("div",{id:"kickassets"},i["default"].createElement(l["default"],{routerParams:this.state.routerParams}),!this.state.routerParams.get("recent")&&i["default"].createElement(p["default"],{routerParams:this.state.routerParams}),i["default"].createElement("div",{className:"ka-folder-items"},i["default"].createElement(f["default"],{routerParams:this.state.routerParams}))):i["default"].createElement("div",null)}});t["default"]=O,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),i=r(o),a=n(26),s=r(a),u=n(10),l=r(u),c=n(11),p=r(c),d=n(15),f=r(d),h={data:f["default"].List()},m=i["default"].createStore({listenables:[l["default"],p["default"]],mixins:[(0,s["default"])(h)],onGoToMoveItems:function(e,t){h.data=h.data.clear().concat(f["default"].fromJS(t)),this.trigger()},onMoveItems:function(){h.data=h.data.clear(),this.trigger()},onRemoveMoveItem:function(e){h.data=h.data.filter(function(t){return t.get("id")!==e}),this.trigger()}});t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){m[e]&&(m[e]._callback=function(){},m[e].abort(),m[e]=null)}function i(e){return f["default"].get("baseRoute")+e}function a(e,t){return p["default"].get(e).query(t||{}).timeout(h)}function s(e,t){return p["default"].post(e).type("form").send(t||{}).timeout(h)}function u(e,t){return p["default"].put(e).type("form").send(t||{}).timeout(h)}function l(e,t){return p["default"].del(e).type("form").send(t||{}).timeout(h)}Object.defineProperty(t,"__esModule",{value:!0});var c=n(376),p=r(c),d=n(14),f=r(d),h=1e4,m={};t["default"]={getFolderContents:function(e,t){var n=i("folder/"+e),r="GET_FOLDER";return o(r),m[r]=a(n,t)},getRecentItems:function(e){var t=i("recent"),n="GET_FOLDER";return o(n),m[n]=a(t,e)},createFolder:function(e,t){var n=i("folder"),r="CREATE_FOLDER";return o(r),t.parentID=e,m[r]=s(n,t)},updateFile:function(e,t){var n=i("file/"+e),r="UPDATE_FILE";return o(r),m[r]=u(n,t)},deleteItems:function(e){var t=f["default"].get("baseRoute"),n="DELETE_ITEMS";return o(n),m[n]=l(t,{ids:e})},getFileDetail:function(e){var t=i("file/"+e),n="FILE_DETAIL";return o(n),m[n]=a(t)},findByTerm:function(e){var t=f["default"].get("baseRoute"),n="SEARCH";return o(n),m[n]=a(t,{search:e})},findFolder:function(e){var t=i("?search="+e+"&type=folder"),n="SEARCH";return o(n),m[n]=a(t)},getFolders:function(){var e=i("folders"),t="FOLDERS";return o(t),m[t]=a(e)},moveItems:function(e,t){var n=i("move"),r="MOVE";return o(r),m[r]=u(n,{newFolder:e,ids:t.join(",")})}},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(120),i=r(o),a=function(e,t,n,r,o,i,a,s,u){return"undefined"==typeof u&&(u=0),!(n>e+i-u||e+u>n+s||r>t+o-u||t+u>r+a)};t["default"]=function(e,t,n){var r=e instanceof HTMLElement?(0,i["default"])(e):e,o=t instanceof HTMLElement?(0,i["default"])(t):t;return a(r.top,r.left,o.top,o.left,r.offsetWidth,r.offsetHeight,o.offsetWidth,o.offsetHeight,n)},e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){if("string"==typeof e&&(e=document.querySelector(e)),"string"==typeof t&&(t=document.querySelector(t)),!e||!t)return null;var n=e.getBoundingClientRect();return n.bottomr)return void(n=!1);var a=t===window?window.scrollY:t.scrollTop,u=e.getBoundingClientRect().top,l=u-o,c=r/i,p=l/c,d=void 0;o>u-p&&(p=u-o),d=a+p,t===window?t.scrollTo(0,d):t.scrollTop=d,r-=i,requestAnimationFrame(s)},i)};requestAnimationFrame(a)}};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return 1024>e?e+" bytes":10240>e?Math.round(e/1024*10)/10+" KB":1048576>e?Math.round(e/1024)+" KB":10485760>e?Math.round(e/1024/1024*10)/10+" MB":1073741824>e?Math.round(e/1024/1024)+" MB":Math.round(e/1073741824*10)/10+" GB"},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;tc&&(t=c),n+=t}),l>n)break;e.shift(),t=!0}return t&&e.unshift({title:"...",id:null}),e}},render:function(){var e=this,t=this.getTruncatedBreadcrumbs();return t?i["default"].createElement("div",null,t.map(function(n,r){var o=r==t.length-1,a=0===r?i["default"].createElement(u.Glyphicon,{glyph:"home"}):i["default"].createElement(s["default"],null,n.title);return i["default"].createElement("span",{key:r},function(){return null===n.id?a:i["default"].createElement("a",{onClick:o?null:e.props.onSelect.bind(null,n)},a)}())})):i["default"].createElement("h2",null)}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(188),l=r(u),c=n(58),p=r(c),d=n(14),f=r(d),h=n(114),m=r(h),v=n(118),y=r(v),g=n(73),_=r(g),b=n(11),E=r(b),w=n(10),N=r(w),O=n(16),C=n(123),x=r(C),D=n(121),T=r(D),P=n(13),S=r(P),M=i["default"].createClass({displayName:"BrowseBar",mixins:[i["default"].addons.PureRenderMixin,s["default"].ListenerMixin],getInitialState:function(){return{showFolderSearch:!1,canUpload:p["default"].get("data").get("canUpload")&&f["default"].get("canUpload"),canCreateFolder:p["default"].get("data").get("canCreate")&&f["default"].get("canCreateFolder"),totalProgress:null,hasBreadcrumbs:m["default"].get("data").count()>0}},componentDidMount:function(){this.listenTo(p["default"],this.updateFolderData),this.listenTo(m["default"],this.updateBreadcrumbs),this.listenTo(y["default"],this.updateUI)},componentDidUpdate:function(){100===this.state.totalProgress&&window.setTimeout(function(){N["default"].setTotalProgress(0)},1e3)},updateFolderData:function(){this.setState({canUpload:p["default"].get("data").get("canUpload")&&f["default"].get("canUpload"),canCreateFolder:p["default"].get("data").get("canCreate")&&f["default"].get("canCreateFolder")})},updateUI:function(){this.setState({totalProgress:y["default"].get("totalProgress")})},updateBreadcrumbs:function(){this.setState({hasBreadcrumbs:m["default"].get("data").count()>0})},toggleSearch:function(){var e=this;this.setState({showFolderSearch:!this.state.showFolderSearch},function(){e.state.showFolderSearch?(i["default"].findDOMNode(e.refs.search).querySelector("input").focus(),document.addEventListener("click",e.cancelSearchClick),document.addEventListener("keyup",e.cancelSearchEscape)):(document.removeEventListener("click",e.cancelSearchClick),document.removeEventListener("keyup",e.cancelSearchEscape))})},cancelSearchEscape:function(e){27===e.keyCode&&this.toggleSearch()},cancelSearchClick:function(e){var t=i["default"].findDOMNode(this.refs.search);t&&!(0,T["default"])(e.target,t)&&this.toggleSearch()},jumpToFolder:function(e){this.setState({showFolderSearch:!1},function(){E["default"].goToFolder(e.id)})},handleNew:function(e){"new-folder"===e&&N["default"].insertFolder()},render:function(){var e=this,t="  ",n=i["default"].createElement(O.Glyphicon,{glyph:"plus"});return i["default"].createElement("div",{className:"row top-bar browse-bar utility-bar"},i["default"].createElement("div",{className:"col-md-8 col-sm-8"},function(){return e.state.showFolderSearch?i["default"].createElement(_["default"],{ref:"search",className:"jump-to-folder-search",placeholder:(0,S["default"])("KickAssets.JUMPTOFOLDER","Jump to folder..."),onSelected:e.jumpToFolder}):e.state.hasBreadcrumbs?i["default"].createElement("h2",null,i["default"].createElement(l["default"],null),i["default"].createElement(O.Glyphicon,{glyph:"search",className:"jump-to-folder",onClick:e.toggleSearch})):i["default"].createElement("div",null)}()),i["default"].createElement("div",{className:"ka-tools"},i["default"].createElement(O.DropdownButton,{bsStyle:"success",noCaret:!0,onSelect:this.handleNew,title:n,pullRight:!0},this.state.canCreateFolder&&i["default"].createElement(O.MenuItem,{key:"new-folder",eventKey:"new-folder"},i["default"].createElement(O.Glyphicon,{glyph:"folder-open"}),t," ",(0,S["default"])("KickAssets.NEWFOLDER","New folder")),i["default"].createElement(O.MenuItem,{style:{display:this.state.canUpload?"block":"none"},id:"ka-add-files",key:"new-files",eventKey:"new-files"},i["default"].createElement(O.Glyphicon,{glyph:"open"}),t," ",(0,S["default"])("KickAssets.UPLOADFILES","Upload files...")))),!!this.state.totalProgress&&i["default"].createElement(x["default"],{delay:300},i["default"].createElement("div",{className:"progress"},i["default"].createElement("div",{className:"progress-bar",role:"progressbar",style:{width:this.state.totalProgress+"%"}}))))}});t["default"]=M,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(16),s=n(13),u=r(s),l=i["default"].createClass({displayName:"ErrorOverlay",propTypes:{header:i["default"].PropTypes.string},getDefaultProps:function(){return{header:null,onAccept:i["default"].PropTypes.func}},handleAccept:function(e){e.preventDefault(),this.props.onAccept&&this.props.onAccept()},render:function(){return i["default"].createElement("div",{className:"error-overlay"},this.props.header&&i["default"].createElement("h5",null,this.props.header),i["default"].createElement("span",{className:"error-message"},this.props.children),i["default"].createElement(a.Button,{onClick:this.handleAccept},(0,u["default"])("KickAssets.OK","OK")))}});t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(16),s=r(a),u=n(13),l=r(u),c=i["default"].createClass({displayName:"FilePreview",mixins:[i["default"].addons.PureRenderMixin],getInitialState:function(){return{showModal:!1}},handleImageClick:function(e){this.setState({showModal:!0})},handlePreviewHide:function(){this.setState({showModal:!1})},render:function(){var e="image"===this.props.file.type?"renderImage":"renderFile";return this[e](this.props.file)},renderImage:function(e){return i["default"].createElement("div",null,i["default"].createElement("div",{className:"ka-edit-preview image"},i["default"].createElement("img",{onClick:this.handleImageClick,src:e.previewImage})),i["default"].createElement("div",{className:"ka-edit-metadata"},e.created," • ",e.size," ",e.extension),i["default"].createElement("div",{className:"ka-edit-download"},i["default"].createElement(s["default"].Button,{block:!0,bsStyle:"primary",href:e.url},i["default"].createElement(s["default"].Glyphicon,{glyph:"download"})," ",(0,l["default"])("KickAssets.DOWNLOAD","Download")," ",e.size&&"("+e.size+")")),this.state.showModal&&i["default"].createElement(s["default"].Modal,{onRequestHide:this.handlePreviewHide,closeButton:!0},i["default"].createElement("img",{src:e.detailImage})))},renderFile:function(e){return i["default"].createElement("div",null,i["default"].createElement("div",{className:"ka-edit-preview generic"},i["default"].createElement("img",{src:e.iconURL}),i["default"].createElement("h3",null,i["default"].createElement("span",{className:"size"},e.size)," / ",i["default"].createElement("span",{className:"extension"},e.extension)," ",(0,l["default"])("KickAssets.FILE","File")),i["default"].createElement("div",{className:"ka-edit-download"},i["default"].createElement(s["default"].Button,{block:!0,bsStyle:"primary",href:e.url},i["default"].createElement(s["default"].Glyphicon,{glyph:"download"})," ",(0,l["default"])("KickAssets.DOWNLOAD","Download")," ",e.size&&"("+e.size+")"))),i["default"].createElement("div",{className:"ka-edit-metadata"},e.created))}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t1&&this.props.selected&&a["default"].createElement("span",{className:"badge badge-danger"},this.props.selectedCount),(n.canEdit||n.canDelete)&&a["default"].createElement(p.DropdownButton,{noCaret:!0,onSelect:this.handleAction,title:e},n.canEdit&&a["default"].createElement(p.MenuItem,{eventKey:"edit"},a["default"].createElement(p.Glyphicon,{glyph:"edit"}),t,(0,_["default"])("KickAssets.EDIT","Edit")),n.canEdit&&a["default"].createElement(p.MenuItem,{eventKey:"move"},a["default"].createElement(p.Glyphicon,{glyph:"share"}),t,(0,_["default"])("KickAssets.MOVETO","Move to...")),n.canDelete&&y["default"].get("canDelete")&&a["default"].createElement(p.MenuItem,{eventKey:"delete"},a["default"].createElement(p.Glyphicon,{glyph:"trash"}),t,(0,_["default"])("KickAssets.DELETE","Delete"))))},renderError:function(){return a["default"].createElement(m["default"],{header:(0,_["default"])("KickAssets.OHNO","Oh no!"),onAccept:this.props.onClearError},this.props.data.error)},renderList:function(){var e=this.props.data;return a["default"].createElement("div",o({},this.props,{className:this.getClasses(),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave}),e.error&&this.renderError(),a["default"].createElement("div",{className:"folder-item-cell "+this.getType()},a["default"].createElement(f["default"],e)),a["default"].createElement("div",{className:"folder-item-cell file-name"},this.renderFilename()),a["default"].createElement("div",{className:"folder-item-cell file-created"},this.getCreated()),a["default"].createElement("div",{className:"folder-item-cell file-kind"},this.getExtension()),a["default"].createElement("div",{className:"folder-item-cell action"},this.state.showAction&&this.renderAction()),e.progress&&this.renderProgress())},renderGrid:function(){var e=this.props.data;return a["default"].createElement("div",{className:"ka-folder-item-wrap"},a["default"].createElement("div",o({},this.props,{className:this.getClasses()}),a["default"].createElement("div",{className:"file",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},e.error&&this.renderError(),a["default"].createElement("span",{className:"corner"}),a["default"].createElement("div",{className:"file-preview "+this.getType()},a["default"].createElement(f["default"],e)),a["default"].createElement("div",{className:"file-name"},this.renderFilename(),a["default"].createElement("small",null,(0,_["default"])("KickAssets.ADDED","Added"),": ",this.getCreated())),this.state.showAction&&this.renderAction(),e.progress&&this.renderProgress())))},render:function(){return"list"===this.props.layout?this.renderList():this.renderGrid()}});t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(6),s=r(a),u=n(10),l=r(u),c=n(72),p=r(c),d=n(192),f=r(d),h=n(126),m=r(h),v=n(217),y=r(v),g=n(206),_=r(g),b=n(205),E=r(b),w=n(15),N=r(w),O=n(76),C=(r(O),n(44)),x=r(C),D=n(27),T=r(D),P=n(128),S=r(P),M=n(127),I=r(M),k=n(16),R=n(13),A=r(R),L=function(){return{unsavedItems:T["default"].get("unsavedItems"),loading:T["default"].get("loading"),selectedItems:x["default"].get("data")}},j=i["default"].createClass({displayName:"FolderItemList",propTypes:{items:i["default"].PropTypes.object,routerParams:i["default"].PropTypes.object.isRequired,hasMore:i["default"].PropTypes.bool,cursor:i["default"].PropTypes.number},mixins:[s["default"].ListenerMixin,i["default"].addons.PureRenderMixin],_mouseData:null,getInitialState:function(){var e=L();return e.scroll=0,e},componentDidMount:function(){this.listenTo(T["default"],this.updateStoreState),this.listenTo(x["default"],this.updateStoreState),this.scrollToEdited(),document.addEventListener("mousedown",this.mouseDownListener),document.addEventListener("click",this.clickListener)},componentWillUnmount:function(){document.removeEventListener("mousedown",this.mouseDownListener),document.removeEventListener("click",this.clickListener)},componentDidUpdate:function(e,t){N["default"].is(this.props.items,e.items)?this.getFileFromProps()&&!this.getFileFromProps(e)?this.scrollToEdited():!t.unsavedItems&&this.state.unsavedItems&&this.scrollToTop():this.getFileFromProps()&&this.scrollToEdited()},updateStoreState:function(){this.setState(L())},scrollToEdited:function(){var e=this.getFileFromProps();if(e){var t="#item_"+e,n=(0,E["default"])(t,this.getScroller()),r="list"===this.props.routerParams.get("view")?210:110;n===!1&&(0,_["default"])(t,this.getScroller(),100,r)}},scrollToTop:function(){var e=this.props.items.get(0);if(e){var t=e.toJS().id,n="list"===this.props.routerParams.get("view")?210:110;(0,_["default"])("#item_"+t,this.getScroller(),100,n)}},mouseDownListener:function(e){this._mouseData={x:e.pageX,y:e.pageY}},clickListener:function(e){if(e.pageX===this._mouseData.x&&e.pageY===this._mouseData.y){for(var t=e.target,n=!1,r=!1;t&&t!==document;){if(t.classList.contains("file-box")){n=!0;break}if(t===this.getScroller()){r=!0;break}t=t.parentNode}r&&!n&&l["default"].clearSelection()}},handleScroll:function(){this.setState({scroll:this.getScroller().scrollTop})},getFileFromProps:function(e){return e=e||this.props,e.routerParams.get("fileID")},getScroller:function(){return i["default"].findDOMNode(this.refs.scroller)},getFileItems:function(){return this.props.items||[]},loadMore:function(e){e.preventDefault(),l["default"].concatFolderItems(this.props.routerParams.get("folderParams").toJS(),this.props.cursor)},resolveItemToDOM:function(e){return document.getElementById("item_"+e)},handleSelction:function(e){l["default"].groupSelect(e)},render:function(){var e=this;if(!this.props.items.count()&&this.state.loading)return i["default"].createElement(I["default"],{delay:200,type:"bounce"});var t=(this.props.routerParams.get("recent"),this.props.routerParams.get("view")),n=this.getFileFromProps(),r=[],o={viewHeight:window.innerHeight-110,viewWidth:window.innerWidth-40,itemHeight:"list"===t?64:176,itemWidth:"list"===t?window.innerWidth:220,scroll:this.state.scroll,visibleIndexes:[]};return this.getFileItems().forEach(function(a,s){a.get("id")==n&&o.visibleIndexes.push(s),r.push(i["default"].createElement(p["default"],{ref:"item_"+a.get("id"),key:a.get("id"),id:"item_"+a.get("id"),data:a,layout:t,selected:e.state.selectedItems.contains(a),selectedCount:e.state.selectedItems.count(),editing:a.get("id")==n}))}),this.props.hasMore&&r.push(i["default"].createElement(k.Button,{key:"loadmore",bsStyle:"primary",onClick:this.loadMore,className:"load-more"},this.state.loading?(0,A["default"])("KickAssets.LOADING","Loading..."):(0,A["default"])("KickAssets.LOADMORE","Load more"))),i["default"].createElement("div",null,"list"===t&&i["default"].createElement(f["default"],{routerParams:this.props.routerParams}),i["default"].createElement(m["default"],{ref:"scroller",onScroll:this.handleScroll,className:"ka-selectzone "+t},i["default"].createElement(S["default"],{style:{height:"100%"},onSelection:this.handleSelction,items:r,itemResolver:this.resolveItemToDOM},i["default"].createElement(y["default"],o,r))))}});t["default"]=j,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(190),s=r(a),u=n(74),l=r(u),c=n(73),p=r(c),d=n(13),f=r(d),h=i["default"].createClass({displayName:"ItemEditForm",propTypes:{file:i["default"].PropTypes.object.isRequired,onSubmit:i["default"].PropTypes.func,transaction:i["default"].PropTypes.oneOf(["DEFAULT","SAVING","SAVED"])},getInitialState:function(){return{file:this.props.file}},componentWillReceiveProps:function(e){this.setState({file:e.file})},handleSubmit:function(e){e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(this.state.file)},createHandler:function(e){var t=this;return function(n){var r=t.state.file;r[e]=n.target.value,t.setState({file:r})}},handleFolderSelect:function(e){var t=this.state.file;t.parentID=e.id,t.folderName=e.text, -this.setState({file:t})},getButtonText:function(){switch(this.props.transaction){case"DEFAULT":return(0,f["default"])("KickAssets.SAVE","Save");case"SAVING":return(0,f["default"])("KickAssets.SAVING","Saving...");case"SAVED":return(0,f["default"])("KickAssets.SAVED","Saved!")}},render:function(){var e=this.state.file;if(!e)return i["default"].createElement("div",{className:"ka-side-panel"});var t=e.title?e.title.trim():"";t||(t=i["default"].createElement("em",null,(0,f["default"])("KickAssets.UNTITLED","Untitled")));var n="/admin/assets/EditForm/field/File/item/"+e.id+"/edit";return i["default"].createElement(l["default"],{title:t},i["default"].createElement(s["default"],{file:e}),i["default"].createElement("form",{role:"form",onSubmit:this.handleSubmit},i["default"].createElement("div",{className:"form-group"},i["default"].createElement("label",null,(0,f["default"])("KickAssets.TITLE","Title")),i["default"].createElement("input",{disabled:!e.canEdit,className:"form-control",name:"title",value:e.title,onChange:this.createHandler("title")})),i["default"].createElement("div",{className:"form-group"},i["default"].createElement("label",null,(0,f["default"])("KickAssets.FILENAME","Filename")),i["default"].createElement("input",{disabled:!e.canEdit,className:"form-control",name:"filename",value:e.filename,onChange:this.createHandler("filename")})),i["default"].createElement("div",{className:"form-group"},i["default"].createElement("label",null,(0,f["default"])("KickAssets.FOLDER","Folder")),i["default"].createElement(p["default"],{disabled:!e.canEdit,currentFolder:e.folderName,onSelected:this.handleFolderSelect})),i["default"].createElement("button",{type:"submit",disabled:"DEFAULT"!==this.props.transaction||!e.canEdit,className:"btn btn-primary pull-right"},this.getButtonText()),i["default"].createElement("a",{href:n,target:"_blank",className:"btn btn-secondary pull-right"},(0,f["default"])("KickAssets.MOREOPTIONS","More options"))))}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(1),i=r(o),a=n(77),s=r(a),u=i["default"].createClass({displayName:"LazyLoad",propTypes:{height:i["default"].PropTypes.string,scroll:i["default"].PropTypes.number,visibleByDefault:i["default"].PropTypes.bool},getInitialState:function(){return{visible:this.props.visibleByDefault}},getDefaultProps:function(){return{scroll:null,visibleByDefault:!1}},handleScroll:function(){var e=i["default"].findDOMNode(this).getBoundingClientRect(),t=null===this.props.scroll?window.pageYOffset:this.props.scroll,n=e.top+t,r=e.bottom-e.top,o=null===this.props.scroll?window.innerHeight:r;t+o>n&&n+o>t&&(this.setState({visible:!0}),this.handleVisible())},handleVisible:function(){null===this.props.scroll&&(window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleScroll))},componentDidMount:function(){null===this.props.scroll&&(window.addEventListener("scroll",this.handleScroll),window.addEventListener("resize",this.handleScroll)),this.handleScroll()},componentDidUpdate:function(){this.state.visible||this.handleScroll()},componentWillUnmount:function(){this.handleVisible()},render:function(){var e=this,t={height:this.props.height},n=(0,s["default"])({"lazy-load":!0,"lazy-load-visible":this.state.visible});return i["default"].createElement("div",{style:t,className:n},function(){return e.state.visible?e.props.children:""}())}});e.exports=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(216),s=r(a),u=i["default"].createClass({displayName:"LazyLoadList",propTypes:{viewHeight:i["default"].PropTypes.number.isRequired,viewWidth:i["default"].PropTypes.number.isRequired,itemWidth:i["default"].PropTypes.number.isRequired,itemHeight:i["default"].PropTypes.number.isRequired,visibleIndexes:i["default"].PropTypes.array,scroll:i["default"].PropTypes.number,component:i["default"].PropTypes.string},getDefaultProps:function(){return{component:"div"}},render:function(){var e=this,t=this.props,n=t.viewHeight,r=t.viewWidth,o=t.itemWidth,a=t.itemHeight,u=Math.floor(r/o),l=Math.ceil(n/a),c=u*l,p=l*a,d=this.props.children,f=[],h=[],m=!1;return d.forEach(function(t,n){if(m||(m=e.props.visibleIndexes&&e.props.visibleIndexes.indexOf(n)>-1),f.push(t),(n+1)%c===0||n+1===d.length){var r=p;if(f.lengtho;o++)t=n[o],t.apply(this,e);return this},e.prototype.removeListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.off=function(e,t){var n,r,o,i,a;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(r=this._callbacks[e],!r)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(o=i=0,a=r.length;a>i;o=++i)if(n=r[o],n===t){r.splice(o,1);break}return this},e}(),t=function(e){function t(e,n){var o,i,a;if(this.element=e,this.version=t.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(t.instances.push(this),this.element.dropzone=this,o=null!=(a=t.optionsForElement(this.element))?a:{},this.options=r({},this.defaultOptions,o,null!=n?n:{}),this.options.forceFallback||!t.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(i=this.getExistingFallback())&&i.parentNode&&i.parentNode.removeChild(i),this.options.previewsContainer!==!1&&(this.options.previewsContainer?this.previewsContainer=t.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(this.options.clickable===!0?this.clickableElements=[this.element]:this.clickableElements=t.getElements(this.options.clickable,"clickable")),this.init()}var r,o;return p(t,e),t.prototype.Emitter=n,t.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],t.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(e,t){return t()},init:function(){return s},forceFallback:!1,fallback:function(){var e,n,r,o,i,a;for(this.element.className=""+this.element.className+" dz-browser-not-supported",a=this.element.getElementsByTagName("div"),o=0,i=a.length;i>o;o++)e=a[o],/(^| )dz-message($| )/.test(e.className)&&(n=e,e.className="dz-message");return n||(n=t.createElement('
'),this.element.appendChild(n)),r=n.getElementsByTagName("span")[0],r&&(null!=r.textContent?r.textContent=this.options.dictFallbackMessage:null!=r.innerText&&(r.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e){var t,n,r;return t={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},n=e.width/e.height,t.optWidth=this.options.thumbnailWidth,t.optHeight=this.options.thumbnailHeight,null==t.optWidth&&null==t.optHeight?(t.optWidth=t.srcWidth,t.optHeight=t.srcHeight):null==t.optWidth?t.optWidth=n*t.optHeight:null==t.optHeight&&(t.optHeight=1/n*t.optWidth),r=t.optWidth/t.optHeight,e.heightr?(t.srcHeight=e.height,t.srcWidth=t.srcHeight*r):(t.srcWidth=e.width,t.srcHeight=t.srcWidth/r),t.srcX=(e.width-t.srcWidth)/2,t.srcY=(e.height-t.srcHeight)/2,t},drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:s,dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:s,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var n,r,o,i,a,s,u,l,c,p,d,f,h;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(e.previewElement=t.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement),p=e.previewElement.querySelectorAll("[data-dz-name]"),i=0,u=p.length;u>i;i++)n=p[i],n.textContent=e.name;for(d=e.previewElement.querySelectorAll("[data-dz-size]"),a=0,l=d.length;l>a;a++)n=d[a],n.innerHTML=this.filesize(e.size);for(this.options.addRemoveLinks&&(e._removeLink=t.createElement(''+this.options.dictRemoveFile+""),e.previewElement.appendChild(e._removeLink)),r=function(n){return function(r){return r.preventDefault(),r.stopPropagation(),e.status===t.UPLOADING?t.confirm(n.options.dictCancelUploadConfirmation,function(){return n.removeFile(e)}):n.options.dictRemoveFileConfirmation?t.confirm(n.options.dictRemoveFileConfirmation,function(){return n.removeFile(e)}):n.removeFile(e)}}(this),f=e.previewElement.querySelectorAll("[data-dz-remove]"),h=[],s=0,c=f.length;c>s;s++)o=f[s],h.push(o.addEventListener("click",r));return h}},removedfile:function(e){var t;return e.previewElement&&null!=(t=e.previewElement)&&t.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){var n,r,o,i;if(e.previewElement){for(e.previewElement.classList.remove("dz-file-preview"),i=e.previewElement.querySelectorAll("[data-dz-thumbnail]"),r=0,o=i.length;o>r;r++)n=i[r],n.alt=e.name,n.src=t;return setTimeout(function(t){return function(){return e.previewElement.classList.add("dz-image-preview")}}(this),1)}},error:function(e,t){var n,r,o,i,a;if(e.previewElement){for(e.previewElement.classList.add("dz-error"),"String"!=typeof t&&t.error&&(t=t.error),i=e.previewElement.querySelectorAll("[data-dz-errormessage]"),a=[],r=0,o=i.length;o>r;r++)n=i[r],a.push(n.textContent=t);return a}},errormultiple:s,processing:function(e){return e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink)?e._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:s,uploadprogress:function(e,t,n){var r,o,i,a,s;if(e.previewElement){for(a=e.previewElement.querySelectorAll("[data-dz-uploadprogress]"),s=[],o=0,i=a.length;i>o;o++)r=a[o],"PROGRESS"===r.nodeName?s.push(r.value=t):s.push(r.style.width=""+t+"%");return s}},totaluploadprogress:s,sending:s,sendingmultiple:s,success:function(e){return e.previewElement?e.previewElement.classList.add("dz-success"):void 0},successmultiple:s,canceled:function(e){return this.emit("error",e,"Upload canceled.")},canceledmultiple:s,complete:function(e){return e._removeLink&&(e._removeLink.textContent=this.options.dictRemoveFile),e.previewElement?e.previewElement.classList.add("dz-complete"):void 0},completemultiple:s,maxfilesexceeded:s,maxfilesreached:s,queuecomplete:s,addedfiles:s,previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
'},r=function(){var e,t,n,r,o,i,a;for(r=arguments[0],n=2<=arguments.length?l.call(arguments,1):[],i=0,a=n.length;a>i;i++){t=n[i];for(e in t)o=t[e],r[e]=o}return r},t.prototype.getAcceptedFiles=function(){var e,t,n,r,o;for(r=this.files,o=[],t=0,n=r.length;n>t;t++)e=r[t],e.accepted&&o.push(e);return o},t.prototype.getRejectedFiles=function(){var e,t,n,r,o;for(r=this.files,o=[],t=0,n=r.length;n>t;t++)e=r[t],e.accepted||o.push(e);return o},t.prototype.getFilesWithStatus=function(e){var t,n,r,o,i;for(o=this.files,i=[],n=0,r=o.length;r>n;n++)t=o[n],t.status===e&&i.push(t);return i},t.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(t.QUEUED)},t.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(t.UPLOADING)},t.prototype.getAddedFiles=function(){return this.getFilesWithStatus(t.ADDED)},t.prototype.getActiveFiles=function(){var e,n,r,o,i;for(o=this.files,i=[],n=0,r=o.length;r>n;n++)e=o[n],(e.status===t.UPLOADING||e.status===t.QUEUED)&&i.push(e);return i},t.prototype.init=function(){var e,n,r,o,i,a,s;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(t.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&(r=function(e){return function(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null==e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!=e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!=e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",document.querySelector(e.options.hiddenInputContainer).appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var t,n,o,i;if(n=e.hiddenFileInput.files,n.length)for(o=0,i=n.length;i>o;o++)t=n[o],e.addFile(t);return e.emit("addedfiles",n),r()})}}(this))(),this.URL=null!=(a=window.URL)?a:window.webkitURL,s=this.events,o=0,i=s.length;i>o;o++)e=s[o],this.on(e,this.options[e]);return this.on("uploadprogress",function(e){return function(){return e.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(e){return function(){return e.updateTotalUploadProgress()}}(this)),this.on("canceled",function(e){return function(t){return e.emit("complete",t)}}(this)),this.on("complete",function(e){return function(t){return 0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length?setTimeout(function(){return e.emit("queuecomplete")},0):void 0}}(this)),n=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(e){return function(t){return e.emit("dragstart",t)}}(this),dragenter:function(e){return function(t){return n(t),e.emit("dragenter",t)}}(this),dragover:function(e){return function(t){var r;try{r=t.dataTransfer.effectAllowed}catch(o){}return t.dataTransfer.dropEffect="move"===r||"linkMove"===r?"move":"copy",n(t),e.emit("dragover",t)}}(this),dragleave:function(e){return function(t){return e.emit("dragleave",t)}}(this),drop:function(e){return function(t){return n(t),e.drop(t)}}(this),dragend:function(e){return function(t){return e.emit("dragend",t)}}(this)}}],this.clickableElements.forEach(function(e){return function(n){return e.listeners.push({element:n,events:{click:function(r){return(n!==e.element||r.target===e.element||t.elementInside(r.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},t.prototype.destroy=function(){var e;return this.disable(),this.removeAllFiles(!0),(null!=(e=this.hiddenFileInput)?e.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)},t.prototype.updateTotalUploadProgress=function(){var e,t,n,r,o,i,a,s;if(r=0,n=0,e=this.getActiveFiles(),e.length){for(s=this.getActiveFiles(),i=0,a=s.length;a>i;i++)t=s[i],r+=t.upload.bytesSent,n+=t.upload.total;o=100*r/n}else o=100;return this.emit("totaluploadprogress",o,n,r)},t.prototype._getParamName=function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):""+this.options.paramName+(this.options.uploadMultiple?"["+e+"]":"")},t.prototype.getFallbackForm=function(){var e,n,r,o;return(e=this.getExistingFallback())?e:(r='
',this.options.dictFallbackText&&(r+="

"+this.options.dictFallbackText+"

"),r+='
',n=t.createElement(r),"FORM"!==this.element.tagName?(o=t.createElement('
'),o.appendChild(n)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=o?o:n)},t.prototype.getExistingFallback=function(){var e,t,n,r,o,i;for(t=function(e){var t,n,r;for(n=0,r=e.length;r>n;n++)if(t=e[n],/(^| )fallback($| )/.test(t.className))return t},i=["div","form"],r=0,o=i.length;o>r;r++)if(n=i[r],e=t(this.element.getElementsByTagName(n)))return e},t.prototype.setupEventListeners=function(){var e,t,n,r,o,i,a;for(i=this.listeners,a=[],r=0,o=i.length;o>r;r++)e=i[r],a.push(function(){var r,o;r=e.events,o=[];for(t in r)n=r[t],o.push(e.element.addEventListener(t,n,!1));return o}());return a},t.prototype.removeEventListeners=function(){var e,t,n,r,o,i,a;for(i=this.listeners,a=[],r=0,o=i.length;o>r;r++)e=i[r],a.push(function(){var r,o;r=e.events,o=[];for(t in r)n=r[t],o.push(e.element.removeEventListener(t,n,!1));return o}());return a},t.prototype.disable=function(){var e,t,n,r,o;for(this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),r=this.files,o=[],t=0,n=r.length;n>t;t++)e=r[t],o.push(this.cancelUpload(e));return o},t.prototype.enable=function(){return this.clickableElements.forEach(function(e){return e.classList.add("dz-clickable")}),this.setupEventListeners()},t.prototype.filesize=function(e){var t,n,r,o,i,a,s,u;if(r=0,o="b",e>0){for(a=["TB","GB","MB","KB","b"],n=s=0,u=a.length;u>s;n=++s)if(i=a[n],t=Math.pow(this.options.filesizeBase,4-n)/10,e>=t){r=e/Math.pow(this.options.filesizeBase,4-n),o=i;break}r=Math.round(10*r)/10}return""+r+" "+o},t.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},t.prototype.drop=function(e){var t,n;e.dataTransfer&&(this.emit("drop",e),t=e.dataTransfer.files,this.emit("addedfiles",t),t.length&&(n=e.dataTransfer.items,n&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(t)))},t.prototype.paste=function(e){var t,n;if(null!=(null!=e&&null!=(n=e.clipboardData)?n.items:void 0))return this.emit("paste",e),t=e.clipboardData.items,t.length?this._addFilesFromItems(t):void 0},t.prototype.handleFiles=function(e){var t,n,r,o;for(o=[],n=0,r=e.length;r>n;n++)t=e[n],o.push(this.addFile(t));return o},t.prototype._addFilesFromItems=function(e){var t,n,r,o,i;for(i=[],r=0,o=e.length;o>r;r++)n=e[r],null!=n.webkitGetAsEntry&&(t=n.webkitGetAsEntry())?t.isFile?i.push(this.addFile(n.getAsFile())):t.isDirectory?i.push(this._addFilesFromDirectory(t,t.name)):i.push(void 0):null!=n.getAsFile&&(null==n.kind||"file"===n.kind)?i.push(this.addFile(n.getAsFile())):i.push(void 0); +var a=_[i];return t?new Error("Required "+a+" `"+r+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o){var i=t[n],a=m(i);if(a!==e){var s=_[o],u=v(i);return new Error("Invalid "+s+" `"+n+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `"+e+"`."))}return null}return r(t)}function i(){return r(b.thatReturns(null))}function a(e){function t(t,n,r,o){var i=t[n];if(!Array.isArray(i)){var a=_[o],s=m(i);return new Error("Invalid "+a+" `"+n+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u>",w=s(),N=d(),O={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:w,instanceOf:u,node:N,objectOf:c,oneOf:l,oneOfType:p,shape:f};e.exports=O},function(e,t,n){"use strict";function r(){this.listenersToPut=[]}var o=n(32),i=n(40),a=n(5);a(r.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var o=n(12),i=n(3),a=o.canUseDOM?document.createElement("div"):null,s={circle:!0,clipPath:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},u=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,"",""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c,circle:p,clipPath:p,defs:p,ellipse:p,g:p,line:p,linearGradient:p,path:p,polygon:p,polyline:p,radialGradient:p,rect:p,stop:p,text:p};e.exports=r}).call(t,n(2))},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(12),i=null;e.exports=r},function(e,t){function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&r[e.type]||"TEXTAREA"===e.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){(function(t){"use strict";function r(e){return"production"!==t.env.NODE_ENV?i(o.isValidElement(e),"onlyChild must be passed a children with exactly one child."):i(o.isValidElement(e)),e}var o=n(7),i=n(3);e.exports=r}).call(t,n(2))},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}e.exports=n},function(e,t,n){(function(t){"use strict";function r(e){return y[e]}function o(e,t){return e&&null!=e.key?a(e.key):t.toString(36)}function i(e){return(""+e).replace(g,r)}function a(e){return"$"+i(e)}function s(e,n,r,i,u){var p=typeof e;if(("undefined"===p||"boolean"===p)&&(e=null),null===e||"string"===p||"number"===p||l.isValidElement(e))return i(u,e,""===n?m+o(e,0):n,r),1;var y,g,b,E=0;if(Array.isArray(e))for(var w=0;wt;t++)u.throwIf(this.validateListening(a[t]));for(t=0;c>t;t++)d.push(a[t].listen(i(t,p),this));return o(p),n={listenable:a},n.stop=r(n,d,this),this.subscriptions=(this.subscriptions||[]).concat(n),n}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(6),s=r(a),u=n(11),l=r(u),c=n(114),p=r(c),d=n(209),f=r(d),h=function(){return{breadcrumbs:p["default"].get("data")}},m=i["default"].createClass({displayName:"BreadcrumbsContainer",mixins:[i["default"].addons.PureRenderMixin,s["default"].ListenerMixin],getInitialState:function(){return h()},componentDidMount:function(){this.listenTo(p["default"],this.updateBreadcrumbs)},updateBreadcrumbs:function(){this.setState(h())},handleLink:function(e){l["default"].goToFolder(e.id)},render:function(){var e=this.state.breadcrumbs.toJS();return i["default"].createElement(f["default"],{onSelect:this.handleLink,breadcrumbs:e})}});t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(124),l=r(u),c=n(14),p=r(c),d=n(10),f=r(d),h=n(76),m=r(h),v=n(13),y=r(v),g=function(){return{dragging:m["default"].get("active")}},_=i["default"].createClass({displayName:"DropzoneContainer",mixins:[i["default"].addons.PureRenderMixin,s["default"].ListenerMixin],propTypes:{items:i["default"].PropTypes.object.isRequired,folderID:i["default"].PropTypes.oneOfType([i["default"].PropTypes.string,i["default"].PropTypes.number]),enabled:i["default"].PropTypes.bool},getDefaultProps:function(){return{enabled:!0}},getInitialState:function(){return g()},componentDidMount:function(){this.listenTo(m["default"],this.updateFromStores)},updateFromStores:function(){this.setState(g())},addFile:function(e,t){f["default"].beginUploading();var n=void 0;if(t.size>1024*e.options.maxFilesize*1024){var r=Math.round(t.size/1024/10.24)/100,o=e.options.maxFilesize;n=(0,v.sf)((0,y["default"])("KickAssets.FILETOOBIG","File is too big. (%sMB). Max size: %sMB"),r,o)}else if(e.constructor.isValidFile(t,e.options.acceptedFiles)){if(null!=e.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles){var i=e.options.maxFiles;n=(0,v.sf)((0,y["default"])("KickAssets.TOOMANYFILES","Too many files. Upload no more than %s"),i)}}else n=(0,y["default"])("KickAssets.INVALIDFILETYPE","Invalid file type");f["default"].addFile(t,n)},handleThumbnail:function(e,t,n){var r=this.getFileByID(t.uuid);r&&f["default"].alterItem(r.toJS(),{iconURL:n})},handleProgress:function(e,t,n,r){var o=this.getFileByID(t.uuid);o&&f["default"].alterItem(o.toJS(),{progress:n})},handleTotalProgress:function(e,t,n){f["default"].setTotalProgress(t,n)},handleUpload:function(e,t,n){var r=this;t.forEach(function(t){var n=r.getFileByID(t.uuid);n&&e.removeFile(n)}),setTimeout(function(){t.forEach(function(e,t){f["default"].replaceItem(r.getFileByID(e.uuid).toJS(),n[t])})},0)},handleQueueComplete:function(){f["default"].endUploading()},getFileByID:function(e){return this.props.items.find(function(t){return e===t.get("id")})},render:function(){var e="ka-folder-items ka-dropzone ka-main";return this.state.dragging&&(e+=" dragging"),i["default"].createElement(l["default"],{url:p["default"].get("baseRoute")+"upload/"+this.props.folderID,previewTemplate:"",acceptedFiles:p["default"].get("allowedExtensions"),maxFilesize:p["default"].get("maxFilesize"),uploadMultiple:!0,onSuccessmultiple:this.handleUpload,onQueuecomplete:this.handleQueueComplete,onAddedfile:this.addFile,onThumbnail:this.handleThumbnail,onUploadprogress:this.handleProgress,onTotaluploadprogress:this.handleTotalProgress,parallelUploads:1,clickable:"#ka-add-files",thumbnailWidth:198,thumbnailHeight:132,previewsContainer:"#ka-previews",disabled:this.state.dragging,className:e},this.props.children)}});t["default"]=_,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(212),s=r(a),u=n(124),l=(r(u),n(14)),c=(r(l),n(10)),p=r(c),d=n(27),f=(r(d),i["default"].createClass({displayName:"FilePreviewContainer",propTypes:{file:i["default"].PropTypes.object.isRequired},addFile:function(e,t){p["default"].replaceDetailItem(t)},handleThumbnail:function(e,t,n){p["default"].alterDetailItem({iconURL:n})},handleProgress:function(e,t,n,r){p["default"].alterDetailItem({progress:n})},handleUpload:function(e,t,n){e.removeFile(t),p["default"].alterDetailItem({newID:n})},handleError:function(e,t,n){e.removeFile(t),p["default"].throwError(n)},render:function(){return i["default"].createElement(s["default"],{file:this.props.file})}}));t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(6),s=r(a),u=n(10),l=r(u),c=n(11),p=r(c),d=n(115),f=r(d),h=n(27),m=(r(h),n(215)),v=r(m),y=function(){return{fileData:f["default"].get("data"),transaction:f["default"].get("updated")?"SAVED":"DEFAULT"}},g=i["default"].createClass({displayName:"ItemEditFormContainer",propTypes:{routerParams:i["default"].PropTypes.object.isRequired},mixins:[s["default"].ListenerMixin,i["default"].addons.PureRenderMixin],getInitialState:function(){return y()},componentDidMount:function(){this.listenTo(f["default"],this.onFileChanged),l["default"].showItem(this.getFileFromProps())},componentWillReceiveProps:function(e){this.getFileFromProps()!==this.getFileFromProps(e)&&l["default"].showItem(e.routerParams.get("fileID"))},componentDidUpdate:function(e,t){var n=this;t.fileData&&!this.state.fileData&&p["default"].goToFolder(),"SAVING"===t.transaction&&"SAVED"===this.state.transaction&&setTimeout(function(){n.setState({transaction:"DEFAULT"})},2e3)},onFileChanged:function(){this.setState(y())},handleSubmit:function(e){this.setState({transaction:"SAVING"}),l["default"].editItem({id:e.id},e)},getFileFromProps:function(e){return e=e||this.props,e.routerParams.get("fileID")},render:function(){var e=this.state.fileData.toJS();return e.id?i["default"].createElement(v["default"],{transaction:this.state.transaction,file:e,onSubmit:this.handleSubmit}):i["default"].createElement("div",null)}});t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=(r(a),n(219)),u=r(s),l=n(11),c=r(l),p=i["default"].createClass({displayName:"ListViewHeaderContainer",mixins:[i["default"].addons.PureRenderMixin],propTypes:{routerParams:i["default"].PropTypes.object.isRequired},handleSortChange:function(e){c["default"].updateSort(e)},render:function(){return i["default"].createElement(u["default"],{onSortChange:this.handleSortChange,sort:this.props.routerParams.getIn(["folderParams","sort"])})}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(6),s=r(a),u=n(74),l=r(u),c=n(72),p=(r(c),n(201)),d=r(p),f=n(58),h=r(f),m=n(10),v=r(m),y=n(73),g=r(y),_=n(16),b=n(11),E=r(b),w=n(125),N=r(w),O=n(13),C=r(O),x=i["default"].createClass({displayName:"MovePanelContainer",mixins:[s["default"].ListenerMixin,i["default"].addons.PureRenderMixin],getInitialState:function(){return{moveItems:d["default"].get("data"),newEntry:null,folder:null}},componentDidMount:function(){this.listenTo(d["default"],this.onMoveChanged)},componentDidUpdate:function(e,t){this.state.moveItems.count()||this.close()},onMoveChanged:function(){this.setState({moveItems:d["default"].get("data")})},removeItem:function(e){v["default"].removeMoveItem(e)},handleSubmit:function(e){e.preventDefault();var t=d["default"].column("id");"string"==typeof this.state.folder?(v["default"].moveItems(this.state.folder,t),v["default"].refreshFolderItems()):v["default"].moveItems(this.state.folder.id,t)},handleFolderSelect:function(e){this.setState({folder:e})},handleNewEntry:function(e){this.setState({folder:e})},close:function(){E["default"].goToFolder(this.props.routerParams.getIn(["folderParams","folderID"]))},render:function(){var e=this,t=this.state.moveItems.toJS();return i["default"].createElement(l["default"],{title:"Move items"},i["default"].createElement("form",{className:"ka-move-form",role:"form",onSubmit:this.handleSubmit},i["default"].createElement("div",{className:"form-group"},i["default"].createElement("label",null,(0,O.sf)((0,C["default"])("KickAssets.MOVEITEMSTO","Move %s item(s) to:"),t.length)),i["default"].createElement(g["default"],{freeText:!0,currentFolder:h["default"].get("data").get("filename"),onNewEntry:this.handleNewEntry,onSelected:this.handleFolderSelect})),"string"==typeof this.state.folder&&i["default"].createElement(_.Alert,{bsStyle:"success"},(0,C["default"])("KickAssets.FOLDERNOTEXIST","This folder does not exist. It will be created.")),i["default"].createElement("ul",{className:"move-list"},t.map(function(t){return i["default"].createElement("li",{key:t.id},i["default"].createElement("span",{className:"ka-file-image"},i["default"].createElement(N["default"],t)),i["default"].createElement("span",{className:"ka-file-title"},t.title),i["default"].createElement("a",{onClick:e.removeItem.bind(null,t.id)},i["default"].createElement(_.Glyphicon,{glyph:"minus-sign"})))})),i["default"].createElement(_.Button,{block:!0,bsStyle:"primary",type:"submit"},(0,O.sf)((0,C["default"])("KickAssets.MOVEITEMS","Move %s items"),t.length))))}});t["default"]=x,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(11),l=r(u),c=n(220),p=r(c),d=n(27),f=r(d),h=i["default"].createClass({displayName:"SearchFormContainer",mixins:[i["default"].addons.PureRenderMixin,s["default"].ListenerMixin],propTypes:{routerParams:i["default"].PropTypes.object.isRequired},handleSearch:function(e){var t=f["default"].getCurrentFolderID();e?l["default"].goToSearch(t,e):l["default"].goToFolder(t)},render:function(){var e=this.props.routerParams.get("search");return i["default"].createElement(p["default"],{value:e,onUpdate:this.handleSearch})}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(6),s=r(a),u=n(74),l=r(u),c=n(72),p=r(c),d=n(128),f=(r(d),n(117)),h=r(f),m=n(44),v=r(m),y=n(52),g=(r(y),n(10)),_=r(g),b=n(127),E=r(b),w=n(13),N=r(w),O=function(){return{searchItems:h["default"].get("data"),loading:h["default"].get("loading"),selectedItems:v["default"].get("data")}},C=i["default"].createClass({displayName:"SearchPanelContainer",mixins:[s["default"].ListenerMixin,i["default"].addons.PureRenderMixin],propTypes:{routerParams:i["default"].PropTypes.object.isRequired},getInitialState:function(){return O()},componentDidMount:function(){var e=this.props.routerParams.get("search");this.listenTo(h["default"],this.onStoresChanged),this.listenTo(v["default"],this.onStoresChanged),e&&_["default"].search(e)},componentWillReceiveProps:function(e){this.getTermFromProps()!==this.getTermFromProps(e)&&_["default"].search(e.routerParams.get("search"))},onStoresChanged:function(){this.setState(O())},getTermFromProps:function(e){return e=e||this.props,e.routerParams.get("search")},render:function(){var e=this,t=this.state.searchItems,n=t.map(function(t){return i["default"].createElement(p["default"],{selected:e.state.selectedItems.contains(t),selectedCount:e.state.selectedItems.count(),key:t.id,data:t})}).toJS();return i["default"].createElement(l["default"],{title:(0,w.sf)((0,N["default"])("KickAssets.SEARCHFOR","Search for %s"),this.getTermFromProps())},function(){return e.state.loading?i["default"].createElement(E["default"],{type:"bounce"}):t.count()?i["default"].createElement("div",null,n):i["default"].createElement("div",{className:"alert alert-danger"},"No results")}())}});t["default"]=C,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(16),l=n(44),c=r(l),p=n(10),d=(r(p),n(14)),f=r(d),h=n(77),m=r(h),v=n(207),y=(r(v),n(13)),g=r(y),_=function(){return{selectedItems:c["default"].get("data"),valid:c["default"].isValid(),error:null}},b=i["default"].createClass({displayName:"SelectionButtonContainer",mixins:[s["default"].ListenerMixin],getInitialState:function(){return _()},componentDidMount:function(){this.listenTo(c["default"],this.updateSelection)},updateSelection:function(){this.setState(_())},handleSelect:function(e){e.preventDefault();var t=this.state.selectedItems.toJS(),n=f["default"].get("maxSelection"),r=f["default"].get("allowedTypes"),o=f["default"].get("allowedExtensions").split(",").map(function(e){return e.replace(/^\./,"")}),i=void 0;0===t.length?i=(0,y.sf)((0,g["default"])("KickAssets.NOFILESELECTED","You haven't selected any file.")):c["default"].isValidCount()?c["default"].isValidTypes()?c["default"].isValidExtensions()||(i=(0,y.sf)((0,g["default"])("KickAssets.INVALIDEXTENSIONSSELECTED","You have selected some files with invalid extensions. Please select only %s"),o.join(", "))):i=(0,y.sf)((0,g["default"])("KickAssets.INVALIDTYPESSELECTED","You have selected some invalid items. Please select only %s"),r.join(", ")):i=(0,y.sf)((0,g["default"])("KickAssets.TOOMANYSELECTED","You have selected too many items. Please select no more than %s."),n),i?this.setState({error:i}):window.parent.KickAssets.finish(t)},render:function(){var e=this.state.valid?this.state.selectedItems.count():"!",t=(0,m["default"])({"badged-button":!0,btn:!0,"btn-success":!0});return i["default"].createElement("div",null,i["default"].createElement(u.Button,{className:t,onClick:this.handleSelect},(!this.state.valid||e>0)&&i["default"].createElement("span",{className:"badge badge-danger"},e),(0,y.sf)((0,g["default"])("KickAssets.SELECTNUMBERITEMS","Done"),e),i["default"].createElement(u.Glyphicon,{glyph:"chevron-right"})),this.state.error&&i["default"].createElement(u.Popover,{placement:"left",positionLeft:50,positionTop:-10},this.state.error))}});t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(16),l=n(119),c=r(l),p=n(11),d=r(p),f=i["default"].createClass({displayName:"SortDropdownContainer",mixins:[s["default"].ListenerMixin,i["default"].addons.PureRenderMixin],propTypes:{routerParams:i["default"].PropTypes.object.isRequired},handleSort:function(e){d["default"].updateSort(e)},render:function(){var e=i["default"].createElement(u.Glyphicon,{glyph:"sort"}),t=i["default"].createElement(u.Glyphicon,{glyph:"ok"}),n="  ",r=this.props.routerParams.get("folderParams").get("sort"),o=Object.keys(c["default"]);return o.pop(),i["default"].createElement(u.DropdownButton,{onSelect:this.handleSort,title:e},o.map(function(e){var o=r===e?t:n;return i["default"].createElement(u.MenuItem,{key:e,eventKey:e},o," ",c["default"][e].label)}))}});t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(11),l=r(u),c=n(223),p=r(c),d=i["default"].createClass({displayName:"ViewToggleContainer",mixins:[i["default"].addons.PureRenderMixin,s["default"].ListenerMixin],propTypes:{routerParams:i["default"].PropTypes.object.isRequired},handleToggle:function(e){l["default"].updateView(e)},render:function(){return i["default"].createElement(p["default"],{onToggle:this.handleToggle,view:this.props.routerParams.get("view")})}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{ +value:!0});var o=n(1),i=r(o),a=n(52),s=r(a),u=i["default"].createClass({displayName:"KickAssets",render:function(){return i["default"].createElement("div",null,i["default"].createElement(s["default"].RouteHandler,null))}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(52),s=r(a),u=n(222),l=r(u),c=n(210),p=r(c),d=n(113),f=r(d),h=n(10),m=r(h),v=n(11),y=r(v),g=n(15),_=r(g),b=n(44),E=r(b),w=n(14),N=r(w),O=i["default"].createClass({displayName:"Main",mixins:[s["default"].State],getInitialState:function(){return{routerParams:_["default"].Map()}},componentWillMount:function(){y["default"].initRouter(this.context.router),this.loadRouterParams()},componentDidMount:function(){m["default"].getFolders(),document.addEventListener("keyup",this.keyUpListener),document.addEventListener("keydown",this.keyDownListener)},componentWillReceiveProps:function(e){this.loadRouterParams(e)},keyDownListener:function(e){e.metaKey&&!E["default"].get("multi")&&m["default"].activateMultiSelect()},keyUpListener:function(e){!e.metaKey&&E["default"].get("multi")&&m["default"].deactivateMultiSelect()},loadRouterParams:function(e){e=e||this.props;var t=_["default"].Map({folderParams:_["default"].Map({folderID:e.params.folderID,sort:e.query.sort||N["default"].get("defaultSort")}),fileID:e.params.fileID,search:e.query.q,view:e.query.view||N["default"].get("defaultView"),path:this.context.router.getCurrentPathname(),recent:"recent"===e.params.folderID});_["default"].is(this.state.routerParams,t)||this.setState({routerParams:t})},render:function(){return this.state.routerParams.get("folderParams")?i["default"].createElement("div",{id:"kickassets"},i["default"].createElement(l["default"],{routerParams:this.state.routerParams}),!this.state.routerParams.get("recent")&&i["default"].createElement(p["default"],{routerParams:this.state.routerParams}),i["default"].createElement("div",{className:"ka-folder-items"},i["default"].createElement(f["default"],{routerParams:this.state.routerParams}))):i["default"].createElement("div",null)}});t["default"]=O,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),i=r(o),a=n(26),s=r(a),u=n(10),l=r(u),c=n(11),p=r(c),d=n(15),f=r(d),h={data:f["default"].List()},m=i["default"].createStore({listenables:[l["default"],p["default"]],mixins:[(0,s["default"])(h)],onGoToMoveItems:function(e,t){h.data=h.data.clear().concat(f["default"].fromJS(t)),this.trigger()},onMoveItems:function(){h.data=h.data.clear(),this.trigger()},onRemoveMoveItem:function(e){h.data=h.data.filter(function(t){return t.get("id")!==e}),this.trigger()}});t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){m[e]&&(m[e]._callback=function(){},m[e].abort(),m[e]=null)}function i(e){return f["default"].get("baseRoute")+e}function a(e,t){return p["default"].get(e).query(t||{}).timeout(h)}function s(e,t){return p["default"].post(e).type("form").send(t||{}).timeout(h)}function u(e,t){return p["default"].put(e).type("form").send(t||{}).timeout(h)}function l(e,t){return p["default"].del(e).type("form").send(t||{}).timeout(h)}Object.defineProperty(t,"__esModule",{value:!0});var c=n(376),p=r(c),d=n(14),f=r(d),h=1e4,m={};t["default"]={getFolderContents:function(e,t){var n=i("folder/"+e),r="GET_FOLDER";return o(r),m[r]=a(n,t)},getRecentItems:function(e){var t=i("recent"),n="GET_FOLDER";return o(n),m[n]=a(t,e)},createFolder:function(e,t){var n=i("folder"),r="CREATE_FOLDER";return o(r),t.parentID=e,m[r]=s(n,t)},updateFile:function(e,t){var n=i("file/"+e),r="UPDATE_FILE";return o(r),m[r]=u(n,t)},deleteItems:function(e){var t=f["default"].get("baseRoute"),n="DELETE_ITEMS";return o(n),m[n]=l(t,{ids:e})},getFileDetail:function(e){var t=i("file/"+e),n="FILE_DETAIL";return o(n),m[n]=a(t)},findByTerm:function(e){var t=f["default"].get("baseRoute"),n="SEARCH";return o(n),m[n]=a(t,{search:e})},findFolder:function(e){var t=i("?search="+e+"&type=folder"),n="SEARCH";return o(n),m[n]=a(t)},getFolders:function(){var e=i("folders"),t="FOLDERS";return o(t),m[t]=a(e)},moveItems:function(e,t){var n=i("move"),r="MOVE";return o(r),m[r]=u(n,{newFolder:e,ids:t.join(",")})}},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(120),i=r(o),a=function(e,t,n,r,o,i,a,s,u){return"undefined"==typeof u&&(u=0),!(n>e+i-u||e+u>n+s||r>t+o-u||t+u>r+a)};t["default"]=function(e,t,n){var r=e instanceof HTMLElement?(0,i["default"])(e):e,o=t instanceof HTMLElement?(0,i["default"])(t):t;return a(r.top,r.left,o.top,o.left,r.offsetWidth,r.offsetHeight,o.offsetWidth,o.offsetHeight,n)},e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){if("string"==typeof e&&(e=document.querySelector(e)),"string"==typeof t&&(t=document.querySelector(t)),!e||!t)return null;var n=e.getBoundingClientRect();return n.bottomr)return void(n=!1);var a=t===window?window.scrollY:t.scrollTop,u=e.getBoundingClientRect().top,l=u-o,c=r/i,p=l/c,d=void 0;o>u-p&&(p=u-o),d=a+p,t===window?t.scrollTo(0,d):t.scrollTop=d,r-=i,requestAnimationFrame(s)},i)};requestAnimationFrame(a)}};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return 1024>e?e+" bytes":10240>e?Math.round(e/1024*10)/10+" KB":1048576>e?Math.round(e/1024)+" KB":10485760>e?Math.round(e/1024/1024*10)/10+" MB":1073741824>e?Math.round(e/1024/1024)+" MB":Math.round(e/1073741824*10)/10+" GB"},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;tc&&(t=c),n+=t}),l>n)break;e.shift(),t=!0}return t&&e.unshift({title:"...",id:null}),e}},render:function(){var e=this,t=this.getTruncatedBreadcrumbs();return t?i["default"].createElement("div",null,t.map(function(n,r){var o=r==t.length-1,a=0===r?i["default"].createElement(u.Glyphicon,{glyph:"home"}):i["default"].createElement(s["default"],null,n.title);return i["default"].createElement("span",{key:r},function(){return null===n.id?a:i["default"].createElement("a",{onClick:o?null:e.props.onSelect.bind(null,n)},a)}())})):i["default"].createElement("h2",null)}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(6),s=r(a),u=n(188),l=r(u),c=n(58),p=r(c),d=n(14),f=r(d),h=n(114),m=r(h),v=n(118),y=r(v),g=n(73),_=r(g),b=n(11),E=r(b),w=n(10),N=r(w),O=n(16),C=n(123),x=r(C),D=n(121),T=r(D),P=n(13),S=r(P),M=i["default"].createClass({displayName:"BrowseBar",mixins:[i["default"].addons.PureRenderMixin,s["default"].ListenerMixin],getInitialState:function(){return{showFolderSearch:!1,canUpload:p["default"].get("data").get("canUpload")&&f["default"].get("canUpload"),canCreateFolder:p["default"].get("data").get("canCreate")&&f["default"].get("canCreateFolder"),totalProgress:null,hasBreadcrumbs:m["default"].get("data").count()>0}},componentDidMount:function(){this.listenTo(p["default"],this.updateFolderData),this.listenTo(m["default"],this.updateBreadcrumbs),this.listenTo(y["default"],this.updateUI)},componentDidUpdate:function(){100===this.state.totalProgress&&window.setTimeout(function(){N["default"].setTotalProgress(0)},1e3)},updateFolderData:function(){this.setState({canUpload:p["default"].get("data").get("canUpload")&&f["default"].get("canUpload"),canCreateFolder:p["default"].get("data").get("canCreate")&&f["default"].get("canCreateFolder")})},updateUI:function(){this.setState({totalProgress:y["default"].get("totalProgress")})},updateBreadcrumbs:function(){this.setState({hasBreadcrumbs:m["default"].get("data").count()>0})},toggleSearch:function(){var e=this;this.setState({showFolderSearch:!this.state.showFolderSearch},function(){e.state.showFolderSearch?(i["default"].findDOMNode(e.refs.search).querySelector("input").focus(),document.addEventListener("click",e.cancelSearchClick),document.addEventListener("keyup",e.cancelSearchEscape)):(document.removeEventListener("click",e.cancelSearchClick),document.removeEventListener("keyup",e.cancelSearchEscape))})},cancelSearchEscape:function(e){27===e.keyCode&&this.toggleSearch()},cancelSearchClick:function(e){var t=i["default"].findDOMNode(this.refs.search);t&&!(0,T["default"])(e.target,t)&&this.toggleSearch()},jumpToFolder:function(e){this.setState({showFolderSearch:!1},function(){E["default"].goToFolder(e.id)})},handleNew:function(e){"new-folder"===e&&N["default"].insertFolder()},render:function(){var e=this,t="  ",n=i["default"].createElement(O.Glyphicon,{glyph:"plus"});return i["default"].createElement("div",{className:"row top-bar browse-bar utility-bar"},i["default"].createElement("div",{className:"col-md-8 col-sm-8"},function(){return e.state.showFolderSearch?i["default"].createElement(_["default"],{ref:"search",className:"jump-to-folder-search",placeholder:(0,S["default"])("KickAssets.JUMPTOFOLDER","Jump to folder..."),onSelected:e.jumpToFolder}):e.state.hasBreadcrumbs?i["default"].createElement("h2",null,i["default"].createElement(l["default"],null),i["default"].createElement(O.Glyphicon,{glyph:"search",className:"jump-to-folder",onClick:e.toggleSearch})):i["default"].createElement("div",null)}()),i["default"].createElement("div",{className:"ka-tools"},i["default"].createElement(O.DropdownButton,{bsStyle:"success",noCaret:!0,onSelect:this.handleNew,title:n,pullRight:!0},this.state.canCreateFolder&&i["default"].createElement(O.MenuItem,{key:"new-folder",eventKey:"new-folder"},i["default"].createElement(O.Glyphicon,{glyph:"folder-open"}),t," ",(0,S["default"])("KickAssets.NEWFOLDER","New folder")),i["default"].createElement(O.MenuItem,{style:{display:this.state.canUpload?"block":"none"},id:"ka-add-files",key:"new-files",eventKey:"new-files"},i["default"].createElement(O.Glyphicon,{glyph:"open"}),t," ",(0,S["default"])("KickAssets.UPLOADFILES","Upload files...")))),!!this.state.totalProgress&&i["default"].createElement(x["default"],{delay:300},i["default"].createElement("div",{className:"progress"},i["default"].createElement("div",{className:"progress-bar",role:"progressbar",style:{width:this.state.totalProgress+"%"}}))))}});t["default"]=M,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(16),s=n(13),u=r(s),l=i["default"].createClass({displayName:"ErrorOverlay",propTypes:{header:i["default"].PropTypes.string},getDefaultProps:function(){return{header:null,onAccept:i["default"].PropTypes.func}},handleAccept:function(e){e.preventDefault(),this.props.onAccept&&this.props.onAccept()},render:function(){return i["default"].createElement("div",{className:"error-overlay"},this.props.header&&i["default"].createElement("h5",null,this.props.header),i["default"].createElement("span",{className:"error-message"},this.props.children),i["default"].createElement(a.Button,{onClick:this.handleAccept},(0,u["default"])("KickAssets.OK","OK")))}});t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(16),s=r(a),u=n(13),l=r(u),c=i["default"].createClass({displayName:"FilePreview",mixins:[i["default"].addons.PureRenderMixin],getInitialState:function(){return{showModal:!1}},handleImageClick:function(e){this.setState({showModal:!0})},handlePreviewHide:function(){this.setState({showModal:!1})},render:function(){var e="image"===this.props.file.type?"renderImage":"renderFile";return this[e](this.props.file)},renderImage:function(e){return i["default"].createElement("div",null,i["default"].createElement("div",{className:"ka-edit-preview image"},i["default"].createElement("img",{onClick:this.handleImageClick,src:e.previewImage})),i["default"].createElement("div",{className:"ka-edit-metadata"},e.created," • ",e.size," ",e.extension),i["default"].createElement("div",{className:"ka-edit-download"},i["default"].createElement(s["default"].Button,{block:!0,bsStyle:"primary",href:e.url},i["default"].createElement(s["default"].Glyphicon,{glyph:"download"})," ",(0,l["default"])("KickAssets.DOWNLOAD","Download")," ",e.size&&"("+e.size+")")),this.state.showModal&&i["default"].createElement(s["default"].Modal,{onRequestHide:this.handlePreviewHide,closeButton:!0},i["default"].createElement("img",{src:e.detailImage})))},renderFile:function(e){return i["default"].createElement("div",null,i["default"].createElement("div",{className:"ka-edit-preview generic"},i["default"].createElement("img",{src:e.iconURL}),i["default"].createElement("h3",null,i["default"].createElement("span",{className:"size"},e.size)," / ",i["default"].createElement("span",{className:"extension"},e.extension)," ",(0,l["default"])("KickAssets.FILE","File")),i["default"].createElement("div",{className:"ka-edit-download"},i["default"].createElement(s["default"].Button,{block:!0,bsStyle:"primary",href:e.url},i["default"].createElement(s["default"].Glyphicon,{glyph:"download"})," ",(0,l["default"])("KickAssets.DOWNLOAD","Download")," ",e.size&&"("+e.size+")"))),i["default"].createElement("div",{className:"ka-edit-metadata"},e.created))}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t1&&this.props.selected&&a["default"].createElement("span",{className:"badge badge-danger"},this.props.selectedCount),(n.canEdit||n.canDelete)&&a["default"].createElement(p.DropdownButton,{noCaret:!0,onSelect:this.handleAction,title:e},n.canEdit&&a["default"].createElement(p.MenuItem,{eventKey:"edit"},a["default"].createElement(p.Glyphicon,{glyph:"edit"}),t,(0,_["default"])("KickAssets.EDIT","Edit")),n.canEdit&&a["default"].createElement(p.MenuItem,{eventKey:"move"},a["default"].createElement(p.Glyphicon,{glyph:"share"}),t,(0,_["default"])("KickAssets.MOVETO","Move to...")),n.canDelete&&y["default"].get("canDelete")&&a["default"].createElement(p.MenuItem,{eventKey:"delete"},a["default"].createElement(p.Glyphicon,{glyph:"trash"}),t,(0,_["default"])("KickAssets.DELETE","Delete"))))},renderError:function(){return a["default"].createElement(m["default"],{header:(0,_["default"])("KickAssets.OHNO","Oh no!"),onAccept:this.props.onClearError},this.props.data.error)},renderList:function(){var e=this.props.data;return a["default"].createElement("div",o({},this.props,{className:this.getClasses(),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave}),e.error&&this.renderError(),a["default"].createElement("div",{className:"folder-item-cell "+this.getType()},a["default"].createElement(f["default"],e)),a["default"].createElement("div",{className:"folder-item-cell file-name"},this.renderFilename()),a["default"].createElement("div",{className:"folder-item-cell file-created"},this.getCreated()),a["default"].createElement("div",{className:"folder-item-cell file-kind"},this.getExtension()),a["default"].createElement("div",{className:"folder-item-cell action"},this.state.showAction&&this.renderAction()),e.progress&&this.renderProgress())},renderGrid:function(){var e=this.props.data;return a["default"].createElement("div",{className:"ka-folder-item-wrap"},a["default"].createElement("div",o({},this.props,{className:this.getClasses()}),a["default"].createElement("div",{className:"file",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},e.error&&this.renderError(),a["default"].createElement("span",{className:"corner"}),a["default"].createElement("div",{className:"file-preview "+this.getType()},a["default"].createElement(f["default"],e)),a["default"].createElement("div",{className:"file-name"},this.renderFilename(),a["default"].createElement("small",null,(0,_["default"])("KickAssets.ADDED","Added"),": ",this.getCreated())),this.state.showAction&&this.renderAction(),e.progress&&this.renderProgress())))},render:function(){return"list"===this.props.layout?this.renderList():this.renderGrid()}});t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(6),s=r(a),u=n(10),l=r(u),c=n(72),p=r(c),d=n(192),f=r(d),h=n(126),m=r(h),v=n(217),y=r(v),g=n(206),_=r(g),b=n(205),E=r(b),w=n(15),N=r(w),O=n(76),C=(r(O),n(44)),x=r(C),D=n(27),T=r(D),P=n(128),S=r(P),M=n(127),I=r(M),k=n(16),R=n(13),A=r(R),L=function(){return{unsavedItems:T["default"].get("unsavedItems"),loading:T["default"].get("loading"),selectedItems:x["default"].get("data")}},j=i["default"].createClass({displayName:"FolderItemList",propTypes:{items:i["default"].PropTypes.object,routerParams:i["default"].PropTypes.object.isRequired,hasMore:i["default"].PropTypes.bool,cursor:i["default"].PropTypes.number},mixins:[s["default"].ListenerMixin,i["default"].addons.PureRenderMixin],_mouseData:null,getInitialState:function(){var e=L();return e.scroll=0,e},componentDidMount:function(){this.listenTo(T["default"],this.updateStoreState),this.listenTo(x["default"],this.updateStoreState),this.scrollToEdited(),document.addEventListener("mousedown",this.mouseDownListener),document.addEventListener("click",this.clickListener)},componentWillUnmount:function(){document.removeEventListener("mousedown",this.mouseDownListener),document.removeEventListener("click",this.clickListener)},componentDidUpdate:function(e,t){N["default"].is(this.props.items,e.items)?this.getFileFromProps()&&!this.getFileFromProps(e)?this.scrollToEdited():!t.unsavedItems&&this.state.unsavedItems&&this.scrollToTop():this.getFileFromProps()&&this.scrollToEdited()},updateStoreState:function(){this.setState(L())},scrollToEdited:function(){var e=this.getFileFromProps();if(e){var t="#item_"+e,n=(0,E["default"])(t,this.getScroller()),r="list"===this.props.routerParams.get("view")?210:110;n===!1&&(0,_["default"])(t,this.getScroller(),100,r)}},scrollToTop:function(){var e=this.props.items.get(0);if(e){var t=e.toJS().id,n="list"===this.props.routerParams.get("view")?210:110;(0,_["default"])("#item_"+t,this.getScroller(),100,n)}},mouseDownListener:function(e){this._mouseData={x:e.pageX,y:e.pageY}},clickListener:function(e){if(e.pageX===this._mouseData.x&&e.pageY===this._mouseData.y){for(var t=e.target,n=!1,r=!1;t&&t!==document;){if(t.classList.contains("file-box")){n=!0;break}if(t===this.getScroller()){r=!0;break}t=t.parentNode}r&&!n&&l["default"].clearSelection()}},handleScroll:function(){this.setState({scroll:this.getScroller().scrollTop})},getFileFromProps:function(e){return e=e||this.props,e.routerParams.get("fileID")},getScroller:function(){return i["default"].findDOMNode(this.refs.scroller)},getFileItems:function(){return this.props.items||[]},loadMore:function(e){e.preventDefault(),l["default"].concatFolderItems(this.props.routerParams.get("folderParams").toJS(),this.props.cursor)},resolveItemToDOM:function(e){return document.getElementById("item_"+e)},handleSelction:function(e){l["default"].groupSelect(e)},render:function(){var e=this;if(!this.props.items.count()&&this.state.loading)return i["default"].createElement(I["default"],{delay:200,type:"bounce"});var t=(this.props.routerParams.get("recent"),this.props.routerParams.get("view")),n=this.getFileFromProps(),r=[],o={viewHeight:window.innerHeight-110,viewWidth:window.innerWidth-40,itemHeight:"list"===t?64:176,itemWidth:"list"===t?window.innerWidth:220,scroll:this.state.scroll,visibleIndexes:[]};return this.getFileItems().forEach(function(a,s){a.get("id")==n&&o.visibleIndexes.push(s),r.push(i["default"].createElement(p["default"],{ref:"item_"+a.get("id"),key:a.get("id"),id:"item_"+a.get("id"),data:a,layout:t,selected:e.state.selectedItems.contains(a),selectedCount:e.state.selectedItems.count(),editing:a.get("id")==n}))}),this.props.hasMore&&r.push(i["default"].createElement(k.Button,{key:"loadmore",bsStyle:"primary",onClick:this.loadMore,className:"load-more"},this.state.loading?(0,A["default"])("KickAssets.LOADING","Loading..."):(0,A["default"])("KickAssets.LOADMORE","Load more"))),i["default"].createElement("div",null,"list"===t&&i["default"].createElement(f["default"],{routerParams:this.props.routerParams}),i["default"].createElement(m["default"],{ref:"scroller",onScroll:this.handleScroll,className:"ka-selectzone "+t},i["default"].createElement(S["default"],{style:{height:"100%"},onSelection:this.handleSelction,items:r,itemResolver:this.resolveItemToDOM},i["default"].createElement(y["default"],o,r))))}});t["default"]=j,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(190),s=r(a),u=n(74),l=r(u),c=n(73),p=r(c),d=n(13),f=r(d),h=i["default"].createClass({displayName:"ItemEditForm",propTypes:{file:i["default"].PropTypes.object.isRequired,onSubmit:i["default"].PropTypes.func,transaction:i["default"].PropTypes.oneOf(["DEFAULT","SAVING","SAVED"])},getInitialState:function(){return{file:this.props.file}},componentWillReceiveProps:function(e){this.setState({file:e.file})},handleSubmit:function(e){e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(this.state.file)},createHandler:function(e){var t=this;return function(n){var r=t.state.file;r[e]=n.target.value, +t.setState({file:r})}},handleFolderSelect:function(e){var t=this.state.file;t.parentID=e.id,t.folderName=e.text,this.setState({file:t})},getButtonText:function(){switch(this.props.transaction){case"DEFAULT":return(0,f["default"])("KickAssets.SAVE","Save");case"SAVING":return(0,f["default"])("KickAssets.SAVING","Saving...");case"SAVED":return(0,f["default"])("KickAssets.SAVED","Saved!")}},render:function(){var e=this.state.file;if(!e)return i["default"].createElement("div",{className:"ka-side-panel"});var t=e.title?e.title.trim():"";t||(t=i["default"].createElement("em",null,(0,f["default"])("KickAssets.UNTITLED","Untitled")));var n="/admin/assets/EditForm/field/File/item/"+e.id+"/edit";return i["default"].createElement(l["default"],{title:t},i["default"].createElement(s["default"],{file:e}),i["default"].createElement("form",{role:"form",onSubmit:this.handleSubmit},i["default"].createElement("div",{className:"form-group"},i["default"].createElement("label",null,(0,f["default"])("KickAssets.TITLE","Title")),i["default"].createElement("input",{disabled:!e.canEdit,className:"form-control",name:"title",value:e.title,onChange:this.createHandler("title")})),i["default"].createElement("div",{className:"form-group"},i["default"].createElement("label",null,(0,f["default"])("KickAssets.FILENAME","Filename")),i["default"].createElement("input",{disabled:!e.canEdit,className:"form-control",name:"filename",value:e.filename,onChange:this.createHandler("filename")})),i["default"].createElement("div",{className:"form-group"},i["default"].createElement("label",null,(0,f["default"])("KickAssets.FOLDER","Folder")),i["default"].createElement(p["default"],{disabled:!e.canEdit,currentFolder:e.folderName,onSelected:this.handleFolderSelect})),i["default"].createElement("button",{type:"submit",disabled:"DEFAULT"!==this.props.transaction||!e.canEdit,className:"btn btn-primary pull-right"},this.getButtonText()),i["default"].createElement("a",{href:n,target:"_blank",className:"btn btn-secondary pull-right"},(0,f["default"])("KickAssets.MOREOPTIONS","More options"))))}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(1),i=r(o),a=n(77),s=r(a),u=i["default"].createClass({displayName:"LazyLoad",propTypes:{height:i["default"].PropTypes.string,scroll:i["default"].PropTypes.number,visibleByDefault:i["default"].PropTypes.bool},getInitialState:function(){return{visible:this.props.visibleByDefault}},getDefaultProps:function(){return{scroll:null,visibleByDefault:!1}},handleScroll:function(){var e=i["default"].findDOMNode(this).getBoundingClientRect(),t=null===this.props.scroll?window.pageYOffset:this.props.scroll,n=e.top+t,r=e.bottom-e.top,o=null===this.props.scroll?window.innerHeight:r;t+o>n&&n+o>t&&(this.setState({visible:!0}),this.handleVisible())},handleVisible:function(){null===this.props.scroll&&(window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleScroll))},componentDidMount:function(){null===this.props.scroll&&(window.addEventListener("scroll",this.handleScroll),window.addEventListener("resize",this.handleScroll)),this.handleScroll()},componentDidUpdate:function(){this.state.visible||this.handleScroll()},componentWillUnmount:function(){this.handleVisible()},render:function(){var e=this,t={height:this.props.height},n=(0,s["default"])({"lazy-load":!0,"lazy-load-visible":this.state.visible});return i["default"].createElement("div",{style:t,className:n},function(){return e.state.visible?e.props.children:""}())}});e.exports=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(216),s=r(a),u=i["default"].createClass({displayName:"LazyLoadList",propTypes:{viewHeight:i["default"].PropTypes.number.isRequired,viewWidth:i["default"].PropTypes.number.isRequired,itemWidth:i["default"].PropTypes.number.isRequired,itemHeight:i["default"].PropTypes.number.isRequired,visibleIndexes:i["default"].PropTypes.array,scroll:i["default"].PropTypes.number,component:i["default"].PropTypes.string},getDefaultProps:function(){return{component:"div"}},render:function(){var e=this,t=this.props,n=t.viewHeight,r=t.viewWidth,o=t.itemWidth,a=t.itemHeight,u=Math.floor(r/o),l=Math.ceil(n/a),c=u*l,p=l*a,d=this.props.children,f=[],h=[],m=!1;return d.forEach(function(t,n){if(m||(m=e.props.visibleIndexes&&e.props.visibleIndexes.indexOf(n)>-1),f.push(t),(n+1)%c===0||n+1===d.length){var r=p;if(f.lengtho;o++)t=n[o],t.apply(this,e);return this},e.prototype.removeListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.off=function(e,t){var n,r,o,i,a;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(r=this._callbacks[e],!r)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(o=i=0,a=r.length;a>i;o=++i)if(n=r[o],n===t){r.splice(o,1);break}return this},e}(),t=function(e){function t(e,n){var o,i,a;if(this.element=e,this.version=t.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(t.instances.push(this),this.element.dropzone=this,o=null!=(a=t.optionsForElement(this.element))?a:{},this.options=r({},this.defaultOptions,o,null!=n?n:{}),this.options.forceFallback||!t.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(i=this.getExistingFallback())&&i.parentNode&&i.parentNode.removeChild(i),this.options.previewsContainer!==!1&&(this.options.previewsContainer?this.previewsContainer=t.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(this.options.clickable===!0?this.clickableElements=[this.element]:this.clickableElements=t.getElements(this.options.clickable,"clickable")),this.init()}var r,o;return p(t,e),t.prototype.Emitter=n,t.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],t.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(e,t){return t()},init:function(){return s},forceFallback:!1,fallback:function(){var e,n,r,o,i,a;for(this.element.className=""+this.element.className+" dz-browser-not-supported",a=this.element.getElementsByTagName("div"),o=0,i=a.length;i>o;o++)e=a[o],/(^| )dz-message($| )/.test(e.className)&&(n=e,e.className="dz-message");return n||(n=t.createElement('
'),this.element.appendChild(n)),r=n.getElementsByTagName("span")[0],r&&(null!=r.textContent?r.textContent=this.options.dictFallbackMessage:null!=r.innerText&&(r.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e){var t,n,r;return t={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},n=e.width/e.height,t.optWidth=this.options.thumbnailWidth,t.optHeight=this.options.thumbnailHeight,null==t.optWidth&&null==t.optHeight?(t.optWidth=t.srcWidth,t.optHeight=t.srcHeight):null==t.optWidth?t.optWidth=n*t.optHeight:null==t.optHeight&&(t.optHeight=1/n*t.optWidth),r=t.optWidth/t.optHeight,e.heightr?(t.srcHeight=e.height,t.srcWidth=t.srcHeight*r):(t.srcWidth=e.width,t.srcHeight=t.srcWidth/r),t.srcX=(e.width-t.srcWidth)/2,t.srcY=(e.height-t.srcHeight)/2,t},drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:s,dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:s,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var n,r,o,i,a,s,u,l,c,p,d,f,h;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(e.previewElement=t.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement),p=e.previewElement.querySelectorAll("[data-dz-name]"),i=0,u=p.length;u>i;i++)n=p[i],n.textContent=e.name;for(d=e.previewElement.querySelectorAll("[data-dz-size]"),a=0,l=d.length;l>a;a++)n=d[a],n.innerHTML=this.filesize(e.size);for(this.options.addRemoveLinks&&(e._removeLink=t.createElement(''+this.options.dictRemoveFile+""),e.previewElement.appendChild(e._removeLink)),r=function(n){return function(r){return r.preventDefault(),r.stopPropagation(),e.status===t.UPLOADING?t.confirm(n.options.dictCancelUploadConfirmation,function(){return n.removeFile(e)}):n.options.dictRemoveFileConfirmation?t.confirm(n.options.dictRemoveFileConfirmation,function(){return n.removeFile(e)}):n.removeFile(e)}}(this),f=e.previewElement.querySelectorAll("[data-dz-remove]"),h=[],s=0,c=f.length;c>s;s++)o=f[s],h.push(o.addEventListener("click",r));return h}},removedfile:function(e){var t;return e.previewElement&&null!=(t=e.previewElement)&&t.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){var n,r,o,i;if(e.previewElement){for(e.previewElement.classList.remove("dz-file-preview"),i=e.previewElement.querySelectorAll("[data-dz-thumbnail]"),r=0,o=i.length;o>r;r++)n=i[r],n.alt=e.name,n.src=t;return setTimeout(function(t){return function(){return e.previewElement.classList.add("dz-image-preview")}}(this),1)}},error:function(e,t){var n,r,o,i,a;if(e.previewElement){for(e.previewElement.classList.add("dz-error"),"String"!=typeof t&&t.error&&(t=t.error),i=e.previewElement.querySelectorAll("[data-dz-errormessage]"),a=[],r=0,o=i.length;o>r;r++)n=i[r],a.push(n.textContent=t);return a}},errormultiple:s,processing:function(e){return e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink)?e._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:s,uploadprogress:function(e,t,n){var r,o,i,a,s;if(e.previewElement){for(a=e.previewElement.querySelectorAll("[data-dz-uploadprogress]"),s=[],o=0,i=a.length;i>o;o++)r=a[o],"PROGRESS"===r.nodeName?s.push(r.value=t):s.push(r.style.width=""+t+"%");return s}},totaluploadprogress:s,sending:s,sendingmultiple:s,success:function(e){return e.previewElement?e.previewElement.classList.add("dz-success"):void 0},successmultiple:s,canceled:function(e){return this.emit("error",e,"Upload canceled.")},canceledmultiple:s,complete:function(e){return e._removeLink&&(e._removeLink.textContent=this.options.dictRemoveFile),e.previewElement?e.previewElement.classList.add("dz-complete"):void 0},completemultiple:s,maxfilesexceeded:s,maxfilesreached:s,queuecomplete:s,addedfiles:s,previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
'},r=function(){var e,t,n,r,o,i,a;for(r=arguments[0],n=2<=arguments.length?l.call(arguments,1):[],i=0,a=n.length;a>i;i++){t=n[i];for(e in t)o=t[e],r[e]=o}return r},t.prototype.getAcceptedFiles=function(){var e,t,n,r,o;for(r=this.files,o=[],t=0,n=r.length;n>t;t++)e=r[t],e.accepted&&o.push(e);return o},t.prototype.getRejectedFiles=function(){var e,t,n,r,o;for(r=this.files,o=[],t=0,n=r.length;n>t;t++)e=r[t],e.accepted||o.push(e);return o},t.prototype.getFilesWithStatus=function(e){var t,n,r,o,i;for(o=this.files,i=[],n=0,r=o.length;r>n;n++)t=o[n],t.status===e&&i.push(t);return i},t.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(t.QUEUED)},t.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(t.UPLOADING)},t.prototype.getAddedFiles=function(){return this.getFilesWithStatus(t.ADDED)},t.prototype.getActiveFiles=function(){var e,n,r,o,i;for(o=this.files,i=[],n=0,r=o.length;r>n;n++)e=o[n],(e.status===t.UPLOADING||e.status===t.QUEUED)&&i.push(e);return i},t.prototype.init=function(){var e,n,r,o,i,a,s;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(t.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&(r=function(e){return function(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null==e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!=e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!=e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",document.querySelector(e.options.hiddenInputContainer).appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var t,n,o,i;if(n=e.hiddenFileInput.files,n.length)for(o=0,i=n.length;i>o;o++)t=n[o],e.addFile(t);return e.emit("addedfiles",n),r()})}}(this))(),this.URL=null!=(a=window.URL)?a:window.webkitURL,s=this.events,o=0,i=s.length;i>o;o++)e=s[o],this.on(e,this.options[e]);return this.on("uploadprogress",function(e){return function(){return e.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(e){return function(){return e.updateTotalUploadProgress()}}(this)),this.on("canceled",function(e){return function(t){return e.emit("complete",t)}}(this)),this.on("complete",function(e){return function(t){return 0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length?setTimeout(function(){return e.emit("queuecomplete")},0):void 0}}(this)),n=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(e){return function(t){return e.emit("dragstart",t)}}(this),dragenter:function(e){return function(t){return n(t),e.emit("dragenter",t)}}(this),dragover:function(e){return function(t){var r;try{r=t.dataTransfer.effectAllowed}catch(o){}return t.dataTransfer.dropEffect="move"===r||"linkMove"===r?"move":"copy",n(t),e.emit("dragover",t)}}(this),dragleave:function(e){return function(t){return e.emit("dragleave",t)}}(this),drop:function(e){return function(t){return n(t),e.drop(t)}}(this),dragend:function(e){return function(t){return e.emit("dragend",t)}}(this)}}],this.clickableElements.forEach(function(e){return function(n){return e.listeners.push({element:n,events:{click:function(r){return(n!==e.element||r.target===e.element||t.elementInside(r.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},t.prototype.destroy=function(){var e;return this.disable(),this.removeAllFiles(!0),(null!=(e=this.hiddenFileInput)?e.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)},t.prototype.updateTotalUploadProgress=function(){var e,t,n,r,o,i,a,s;if(r=0,n=0,e=this.getActiveFiles(),e.length){for(s=this.getActiveFiles(),i=0,a=s.length;a>i;i++)t=s[i],r+=t.upload.bytesSent,n+=t.upload.total;o=100*r/n}else o=100;return this.emit("totaluploadprogress",o,n,r)},t.prototype._getParamName=function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):""+this.options.paramName+(this.options.uploadMultiple?"["+e+"]":"")},t.prototype.getFallbackForm=function(){var e,n,r,o;return(e=this.getExistingFallback())?e:(r='
',this.options.dictFallbackText&&(r+="

"+this.options.dictFallbackText+"

"),r+='
',n=t.createElement(r),"FORM"!==this.element.tagName?(o=t.createElement('
'),o.appendChild(n)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=o?o:n)},t.prototype.getExistingFallback=function(){var e,t,n,r,o,i;for(t=function(e){var t,n,r;for(n=0,r=e.length;r>n;n++)if(t=e[n],/(^| )fallback($| )/.test(t.className))return t},i=["div","form"],r=0,o=i.length;o>r;r++)if(n=i[r],e=t(this.element.getElementsByTagName(n)))return e},t.prototype.setupEventListeners=function(){var e,t,n,r,o,i,a;for(i=this.listeners,a=[],r=0,o=i.length;o>r;r++)e=i[r],a.push(function(){var r,o;r=e.events,o=[];for(t in r)n=r[t],o.push(e.element.addEventListener(t,n,!1));return o}());return a},t.prototype.removeEventListeners=function(){var e,t,n,r,o,i,a;for(i=this.listeners,a=[],r=0,o=i.length;o>r;r++)e=i[r],a.push(function(){var r,o;r=e.events,o=[];for(t in r)n=r[t],o.push(e.element.removeEventListener(t,n,!1));return o}());return a},t.prototype.disable=function(){var e,t,n,r,o;for(this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),r=this.files,o=[],t=0,n=r.length;n>t;t++)e=r[t],o.push(this.cancelUpload(e));return o},t.prototype.enable=function(){return this.clickableElements.forEach(function(e){return e.classList.add("dz-clickable")}),this.setupEventListeners()},t.prototype.filesize=function(e){var t,n,r,o,i,a,s,u;if(r=0,o="b",e>0){for(a=["TB","GB","MB","KB","b"],n=s=0,u=a.length;u>s;n=++s)if(i=a[n],t=Math.pow(this.options.filesizeBase,4-n)/10,e>=t){r=e/Math.pow(this.options.filesizeBase,4-n),o=i;break}r=Math.round(10*r)/10}return""+r+" "+o},t.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},t.prototype.drop=function(e){var t,n;e.dataTransfer&&(this.emit("drop",e),t=e.dataTransfer.files,this.emit("addedfiles",t),t.length&&(n=e.dataTransfer.items,n&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(t)))},t.prototype.paste=function(e){var t,n;if(null!=(null!=e&&null!=(n=e.clipboardData)?n.items:void 0))return this.emit("paste",e),t=e.clipboardData.items,t.length?this._addFilesFromItems(t):void 0},t.prototype.handleFiles=function(e){var t,n,r,o;for(o=[],n=0,r=e.length;r>n;n++)t=e[n],o.push(this.addFile(t));return o},t.prototype._addFilesFromItems=function(e){var t,n,r,o,i;for(i=[],r=0,o=e.length;o>r;r++)n=e[r],null!=n.webkitGetAsEntry&&(t=n.webkitGetAsEntry())?t.isFile?i.push(this.addFile(n.getAsFile())):t.isDirectory?i.push(this._addFilesFromDirectory(t,t.name)):i.push(void 0):null!=n.getAsFile&&(null==n.kind||"file"===n.kind)?i.push(this.addFile(n.getAsFile())):i.push(void 0); return i},t.prototype._addFilesFromDirectory=function(e,t){var n,r;return n=e.createReader(),r=function(e){return function(n){var r,o,i;for(o=0,i=n.length;i>o;o++)r=n[o],r.isFile?r.file(function(n){return e.options.ignoreHiddenFiles&&"."===n.name.substring(0,1)?void 0:(n.fullPath=""+t+"/"+n.name,e.addFile(n))}):r.isDirectory&&e._addFilesFromDirectory(r,""+t+"/"+r.name)}}(this),n.readEntries(r,function(e){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(e):void 0})},t.prototype.accept=function(e,n){return e.size>1024*this.options.maxFilesize*1024?n(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):t.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(n(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,n):n(this.options.dictInvalidFileType)},t.prototype.addFile=function(e){return e.upload={progress:0,total:e.size,bytesSent:0},this.files.push(e),e.status=t.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,function(t){return function(n){return n?(e.accepted=!1,t._errorProcessing([e],n)):(e.accepted=!0,t.options.autoQueue&&t.enqueueFile(e)),t._updateMaxFilesReachedClass()}}(this))},t.prototype.enqueueFiles=function(e){var t,n,r;for(n=0,r=e.length;r>n;n++)t=e[n],this.enqueueFile(t);return null},t.prototype.enqueueFile=function(e){if(e.status!==t.ADDED||e.accepted!==!0)throw new Error("This file can't be queued because it has already been processed or was rejected.");return e.status=t.QUEUED,this.options.autoProcessQueue?setTimeout(function(e){return function(){return e.processQueue()}}(this),0):void 0},t.prototype._thumbnailQueue=[],t.prototype._processingThumbnail=!1,t.prototype._enqueueThumbnail=function(e){return this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.options.maxThumbnailFilesize*1024?(this._thumbnailQueue.push(e),setTimeout(function(e){return function(){return e._processThumbnailQueue()}}(this),0)):void 0},t.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(e){return function(){return e._processingThumbnail=!1,e._processThumbnailQueue()}}(this)))},t.prototype.removeFile=function(e){return e.status===t.UPLOADING&&this.cancelUpload(e),this.files=u(this.files,e),this.emit("removedfile",e),0===this.files.length?this.emit("reset"):void 0},t.prototype.removeAllFiles=function(e){var n,r,o,i;for(null==e&&(e=!1),i=this.files.slice(),r=0,o=i.length;o>r;r++)n=i[r],(n.status!==t.UPLOADING||e)&&this.removeFile(n);return null},t.prototype.createThumbnail=function(e,t){var n;return n=new FileReader,n.onload=function(r){return function(){return"image/svg+xml"===e.type?(r.emit("thumbnail",e,n.result),void(null!=t&&t())):r.createThumbnailFromUrl(e,n.result,t)}}(this),n.readAsDataURL(e)},t.prototype.createThumbnailFromUrl=function(e,t,n,r){var o;return o=document.createElement("img"),r&&(o.crossOrigin=r),o.onload=function(t){return function(){var r,i,s,u,l,c,p,d;return e.width=o.width,e.height=o.height,s=t.options.resize.call(t,e),null==s.trgWidth&&(s.trgWidth=s.optWidth),null==s.trgHeight&&(s.trgHeight=s.optHeight),r=document.createElement("canvas"),i=r.getContext("2d"),r.width=s.trgWidth,r.height=s.trgHeight,a(i,o,null!=(l=s.srcX)?l:0,null!=(c=s.srcY)?c:0,s.srcWidth,s.srcHeight,null!=(p=s.trgX)?p:0,null!=(d=s.trgY)?d:0,s.trgWidth,s.trgHeight),u=r.toDataURL("image/png"),t.emit("thumbnail",e,u),null!=n?n():void 0}}(this),null!=n&&(o.onerror=n),o.src=t},t.prototype.processQueue=function(){var e,t,n,r;if(t=this.options.parallelUploads,n=this.getUploadingFiles().length,e=n,!(n>=t)&&(r=this.getQueuedFiles(),r.length>0)){if(this.options.uploadMultiple)return this.processFiles(r.slice(0,t-n));for(;t>e;){if(!r.length)return;this.processFile(r.shift()),e++}}},t.prototype.processFile=function(e){return this.processFiles([e])},t.prototype.processFiles=function(e){var n,r,o;for(r=0,o=e.length;o>r;r++)n=e[r],n.processing=!0,n.status=t.UPLOADING,this.emit("processing",n);return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)},t.prototype._getFilesWithXhr=function(e){var t,n;return n=function(){var n,r,o,i;for(o=this.files,i=[],n=0,r=o.length;r>n;n++)t=o[n],t.xhr===e&&i.push(t);return i}.call(this)},t.prototype.cancelUpload=function(e){var n,r,o,i,a,s,u;if(e.status===t.UPLOADING){for(r=this._getFilesWithXhr(e.xhr),o=0,a=r.length;a>o;o++)n=r[o],n.status=t.CANCELED;for(e.xhr.abort(),i=0,s=r.length;s>i;i++)n=r[i],this.emit("canceled",n);this.options.uploadMultiple&&this.emit("canceledmultiple",r)}else((u=e.status)===t.ADDED||u===t.QUEUED)&&(e.status=t.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));return this.options.autoProcessQueue?this.processQueue():void 0},o=function(){var e,t;return t=arguments[0],e=2<=arguments.length?l.call(arguments,1):[],"function"==typeof t?t.apply(this,e):t},t.prototype.uploadFile=function(e){return this.uploadFiles([e])},t.prototype.uploadFiles=function(e){var n,i,a,s,u,l,c,p,d,f,h,m,v,y,g,_,b,E,w,N,O,C,x,D,T,P,S,M,I,k,R,A,L,j;for(w=new XMLHttpRequest,N=0,D=e.length;D>N;N++)n=e[N],n.xhr=w;m=o(this.options.method,e),b=o(this.options.url,e),w.open(m,b,!0),w.withCredentials=!!this.options.withCredentials,g=null,a=function(t){return function(){var r,o,i;for(i=[],r=0,o=e.length;o>r;r++)n=e[r],i.push(t._errorProcessing(e,g||t.options.dictResponseError.replace("{{statusCode}}",w.status),w));return i}}(this),_=function(t){return function(r){var o,i,a,s,u,l,c,p,d;if(null!=r)for(i=100*r.loaded/r.total,a=0,l=e.length;l>a;a++)n=e[a],n.upload={progress:i,total:r.total,bytesSent:r.loaded};else{for(o=!0,i=100,s=0,c=e.length;c>s;s++)n=e[s],(100!==n.upload.progress||n.upload.bytesSent!==n.upload.total)&&(o=!1),n.upload.progress=i,n.upload.bytesSent=n.upload.total;if(o)return}for(d=[],u=0,p=e.length;p>u;u++)n=e[u],d.push(t.emit("uploadprogress",n,i,n.upload.bytesSent));return d}}(this),w.onload=function(n){return function(r){var o;if(e[0].status!==t.CANCELED&&4===w.readyState){if(g=w.responseText,w.getResponseHeader("content-type")&&~w.getResponseHeader("content-type").indexOf("application/json"))try{g=JSON.parse(g)}catch(i){r=i,g="Invalid JSON response from server."}return _(),200<=(o=w.status)&&300>o?n._finished(e,g,r):a()}}}(this),w.onerror=function(n){return function(){return e[0].status!==t.CANCELED?a():void 0}}(this),y=null!=(I=w.upload)?I:w,y.onprogress=_,l={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&r(l,this.options.headers);for(s in l)u=l[s],u&&w.setRequestHeader(s,u);if(i=new FormData,this.options.params){k=this.options.params;for(h in k)E=k[h],i.append(h,E)}for(O=0,T=e.length;T>O;O++)n=e[O],this.emit("sending",n,w,i);if(this.options.uploadMultiple&&this.emit("sendingmultiple",e,w,i),"FORM"===this.element.tagName)for(R=this.element.querySelectorAll("input, textarea, select, button"),C=0,P=R.length;P>C;C++)if(p=R[C],d=p.getAttribute("name"),f=p.getAttribute("type"),"SELECT"===p.tagName&&p.hasAttribute("multiple"))for(A=p.options,x=0,S=A.length;S>x;x++)v=A[x],v.selected&&i.append(d,v.value);else(!f||"checkbox"!==(L=f.toLowerCase())&&"radio"!==L||p.checked)&&i.append(d,p.value);for(c=M=0,j=e.length-1;j>=0?j>=M:M>=j;c=j>=0?++M:--M)i.append(this._getParamName(c),e[c],e[c].name);return this.submitRequest(w,i,e)},t.prototype.submitRequest=function(e,t,n){return e.send(t)},t.prototype._finished=function(e,n,r){var o,i,a;for(i=0,a=e.length;a>i;i++)o=e[i],o.status=t.SUCCESS,this.emit("success",o,n,r),this.emit("complete",o);return this.options.uploadMultiple&&(this.emit("successmultiple",e,n,r),this.emit("completemultiple",e)),this.options.autoProcessQueue?this.processQueue():void 0},t.prototype._errorProcessing=function(e,n,r){var o,i,a;for(i=0,a=e.length;a>i;i++)o=e[i],o.status=t.ERROR,this.emit("error",o,n,r),this.emit("complete",o);return this.options.uploadMultiple&&(this.emit("errormultiple",e,n,r),this.emit("completemultiple",e)),this.options.autoProcessQueue?this.processQueue():void 0},t}(n),t.version="4.2.0",t.options={},t.optionsForElement=function(e){return e.getAttribute("id")?t.options[r(e.getAttribute("id"))]:void 0},t.instances=[],t.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},t.autoDiscover=!0,t.discover=function(){var e,n,r,o,i,a;for(document.querySelectorAll?r=document.querySelectorAll(".dropzone"):(r=[],e=function(e){var t,n,o,i;for(i=[],n=0,o=e.length;o>n;n++)t=e[n],/(^| )dropzone($| )/.test(t.className)?i.push(r.push(t)):i.push(void 0);return i},e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))),a=[],o=0,i=r.length;i>o;o++)n=r[o],t.optionsForElement(n)!==!1?a.push(new t(n)):a.push(void 0);return a},t.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],t.isBrowserSupported=function(){var e,n,r,o,i;if(e=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(i=t.blacklistedBrowsers,r=0,o=i.length;o>r;r++)n=i[r],n.test(navigator.userAgent)&&(e=!1);else e=!1;else e=!1;return e},u=function(e,t){var n,r,o,i;for(i=[],r=0,o=e.length;o>r;r++)n=e[r],n!==t&&i.push(n);return i},r=function(e){return e.replace(/[\-_](\w)/g,function(e){return e.charAt(1).toUpperCase()})},t.createElement=function(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.childNodes[0]},t.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},t.getElement=function(e,t){var n;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector or a plain HTML element.");return n},t.getElements=function(e,t){var n,r,o,i,a,s,u,l;if(e instanceof Array){o=[];try{for(i=0,s=e.length;s>i;i++)r=e[i],o.push(this.getElement(r,t))}catch(c){n=c,o=null}}else if("string"==typeof e)for(o=[],l=document.querySelectorAll(e),a=0,u=l.length;u>a;a++)r=l[a],o.push(r);else null!=e.nodeType&&(o=[e]);if(null==o||!o.length)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return o},t.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},t.isValidFile=function(e,t){var n,r,o,i,a;if(!t)return!0;for(t=t.split(","),r=e.type,n=r.replace(/\/.*$/,""),i=0,a=t.length;a>i;i++)if(o=t[i],o=o.trim(),"."===o.charAt(0)){if(-1!==e.name.toLowerCase().indexOf(o.toLowerCase(),e.name.length-o.length))return!0}else if(/\/\*$/.test(o)){if(n===o.replace(/\/.*$/,""))return!0}else if(r===o)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each(function(){return new t(this,e)})}),"undefined"!=typeof e&&null!==e?e.exports=t:window.Dropzone=t,t.ADDED="added",t.QUEUED="queued",t.ACCEPTED=t.QUEUED,t.UPLOADING="uploading",t.PROCESSING=t.UPLOADING,t.CANCELED="canceled",t.ERROR="error",t.SUCCESS="success",i=function(e){var t,n,r,o,i,a,s,u,l,c;for(s=e.naturalWidth,a=e.naturalHeight,n=document.createElement("canvas"),n.width=1,n.height=a,r=n.getContext("2d"),r.drawImage(e,0,0),o=r.getImageData(0,0,1,a).data,c=0,i=a,u=a;u>c;)t=o[4*(u-1)+3],0===t?i=u:c=u,u=i+c>>1;return l=u/a,0===l?1:l},a=function(e,t,n,r,o,a,s,u,l,c){var p;return p=i(t),e.drawImage(t,n,r,o,a,s,u,l,c/p)},o=function(e,t){var n,r,o,i,a,s,u,l,c;if(o=!1,c=!0,r=e.document,l=r.documentElement,n=r.addEventListener?"addEventListener":"attachEvent",u=r.addEventListener?"removeEventListener":"detachEvent",s=r.addEventListener?"":"on",i=function(n){return"readystatechange"!==n.type||"complete"===r.readyState?(("load"===n.type?e:r)[u](s+n.type,i,!1),!o&&(o=!0)?t.call(e,n.type||n):void 0):void 0},a=function(){var e;try{l.doScroll("left")}catch(t){return e=t,void setTimeout(a,50)}return i("poll")},"complete"!==r.readyState){if(r.createEventObject&&l.doScroll){try{c=!e.frameElement}catch(p){}c&&a()}return r[n](s+"DOMContentLoaded",i,!1),r[n](s+"readystatechange",i,!1),e[n](s+"load",i,!1)}},t._autoDiscoverFunction=function(){return t.autoDiscover?t.discover():void 0},o(window,t._autoDiscoverFunction)}).call(this)}).call(t,n(187)(e))},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){var t=0;if(o.isObject(e)){var n=new i;s(e,n),t=n.calculateBytes()}else o.isString(e)?t=e.length*a.STRING:o.isBoolean(e)?t=a.BOOLEAN:o.isNumber(e)&&(t=a.NUMBER);return t}var o=n(130),i=n(228).Stats,a=n(129),s=function(e,t){for(var n in e)e.hasOwnProperty(n)&&(o.isObject(e[n])?(t.addKey(n),s(e[n],t)):t.addKeyValue(n,e[n]));return e};e.exports=r},function(e,t,n){"use strict";function r(e){return o.isString(e)?e.length*i.STRING:o.isBoolean(e)?i.BOOLEAN:o.isNumber(e)?i.NUMBER:a}var o=n(130),i=n(129),a=0,s=function(){this.keys=[],this.values=[]};s.prototype.addKey=function(e){this.keys.push(e)},s.prototype.addKeyValue=function(e,t){this.keys.push(e),this.values.push(t)},s.prototype.print=function(){console.log("---\nkeys: ",this.keys),console.log("values: ",this.values,"\n---")},s.prototype.calculateBytes=function(){var e=this.keys.concat(this.values),t=e.map(function(e){return r(e)});return t.reduce(function(e,t){return e+t},0)},t.Stats=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{"default":e}},o=Object.assign||function(e){for(var t=1;t1||"string"==typeof this.props.children||"number"==typeof this.props.children},render:function(){var e={"pull-right":this.props.pullRight,badge:this.hasContent()};return a["default"].createElement("span",o({},this.props,{className:c["default"](this.props.className,e)}),this.props.children)}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{"default":e}},o=Object.assign||function(e){for(var t=1;tt?"prev":"next"},componentWillReceiveProps:function(e){var t=this.getActiveIndex();null!=e.activeIndex&&e.activeIndex!==t&&(clearTimeout(this.timeout),this.setState({previousActiveIndex:t,direction:null!=e.direction?e.direction:this.getDirection(t,e.activeIndex)}))},componentDidMount:function(){this.waitForNext()},componentWillUnmount:function(){clearTimeout(this.timeout)},next:function(e){e&&e.preventDefault();var t=this.getActiveIndex()+1,n=d["default"].numberOf(this.props.children);if(t>n-1){if(!this.props.wrap)return;t=0}this.handleSelect(t,"next")},prev:function(e){e&&e.preventDefault();var t=this.getActiveIndex()-1;if(0>t){if(!this.props.wrap)return;t=d["default"].numberOf(this.props.children)-1}this.handleSelect(t,"prev")},pause:function(){this.isPaused=!0,clearTimeout(this.timeout)},play:function(){this.isPaused=!1,this.waitForNext()},waitForNext:function(){!this.isPaused&&this.props.slide&&this.props.interval&&null==this.props.activeIndex&&(this.timeout=setTimeout(this.next,this.props.interval))},handleMouseOver:function(){this.props.pauseOnHover&&this.pause()},handleMouseOut:function(){this.isPaused&&this.play()},render:function(){var e={carousel:!0,slide:this.props.slide};return a["default"].createElement("div",o({},this.props,{className:u["default"](this.props.className,e),onMouseOver:this.handleMouseOver,onMouseOut:this.handleMouseOut}),this.props.indicators?this.renderIndicators():null,a["default"].createElement("div",{className:"carousel-inner",ref:"inner"},d["default"].map(this.props.children,this.renderItem)),this.props.controls?this.renderControls():null)},renderPrev:function(){return a["default"].createElement("a",{className:"left carousel-control",href:"#prev",key:0,onClick:this.prev},a["default"].createElement("span",{className:"glyphicon glyphicon-chevron-left"}))},renderNext:function(){return a["default"].createElement("a",{className:"right carousel-control",href:"#next",key:1,onClick:this.next},a["default"].createElement("span",{className:"glyphicon glyphicon-chevron-right"}))},renderControls:function(){if(!this.props.wrap){var e=this.getActiveIndex(),t=d["default"].numberOf(this.props.children);return[0!==e?this.renderPrev():null,e!==t-1?this.renderNext():null]}return[this.renderPrev(),this.renderNext()]},renderIndicator:function(e,t){var n=t===this.getActiveIndex()?"active":null;return a["default"].createElement("li",{key:t,className:n,onClick:this.handleSelect.bind(this,t,null)})},renderIndicators:function(){var e=[];return d["default"].forEach(this.props.children,function(t,n){e.push(this.renderIndicator(t,n)," ")},this),a["default"].createElement("ol",{className:"carousel-indicators"},e)},getActiveIndex:function(){return null!=this.props.activeIndex?this.props.activeIndex:this.state.activeIndex},handleItemAnimateOutEnd:function(){this.setState({previousActiveIndex:null,direction:null},function(){this.waitForNext(),this.props.onSlideEnd&&this.props.onSlideEnd()})},renderItem:function(e,t){var n=this.getActiveIndex(),r=t===n,o=null!=this.state.previousActiveIndex&&this.state.previousActiveIndex===t&&this.props.slide;return i.cloneElement(e,{active:r,ref:e.ref,key:e.key?e.key:t,index:t,animateOut:o,animateIn:r&&null!=this.state.previousActiveIndex&&this.props.slide,direction:this.state.direction,onAnimateOutEnd:o?this.handleItemAnimateOutEnd:null})},handleSelect:function(e,t){clearTimeout(this.timeout);var n=this.getActiveIndex();if(t=t||this.getDirection(n,e),this.props.onSelect&&this.props.onSelect(e,t),null==this.props.activeIndex&&e!==n){if(null!=this.state.previousActiveIndex)return;this.setState({activeIndex:e,previousActiveIndex:n,direction:t})}}});t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{"default":e}},o=Object.assign||function(e){for(var t=1;t=0&&(t["col-"+o+this.props[r]]=!0),r=n+"Push",o=n+"-push-",this.props[r]>=0&&(t["col-"+o+this.props[r]]=!0),r=n+"Pull",o=n+"-pull-",this.props[r]>=0&&(t["col-"+o+this.props[r]]=!0)},this),a["default"].createElement(e,o({},this.props,{className:u["default"](this.props.className,t)}),this.props.children)}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{"default":e}},o=n(84),i=r(o),a=n(85),s=r(a),u=n(50),l=r(u),c="https://github.com/react-bootstrap/react-bootstrap/issues/425#issuecomment-97110963",p=i["default"]({},l["default"],{getCollapsableClassSet:function(e){return s["default"]("CollapsableMixin.getCollapsableClassSet()","CollapsibleMixin.getCollapsibleClassSet()",c),l["default"].getCollapsibleClassSet.call(this,e)},getCollapsibleDOMNode:function(){return s["default"]("CollapsableMixin.getCollapsableDOMNode()","CollapsibleMixin.getCollapsibleDOMNode()",c),this.getCollapsableDOMNode()},getCollapsibleDimensionValue:function(){return s["default"]("CollapsableMixin.getCollapsableDimensionValue()","CollapsibleMixin.getCollapsibleDimensionValue()",c),this.getCollapsableDimensionValue()},componentDidMount:function(){s["default"]("CollapsableMixin","CollapsibleMixin",c)}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{"default":e}},o=n(132),i=r(o),a=i["default"];a.__deprecated__=!0,t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{"default":e}},o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=function(){function e(e,t){for(var n=0;n=0:e===t}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{"default":e}},i=n(1),a=o(i),s=n(82),u=o(s),l=n(29),c=o(l),p=n(28),d=o(p),f=n(84),h=o(f),m=a["default"].createClass({displayName:"OverlayTrigger",mixins:[u["default"]],propTypes:{trigger:a["default"].PropTypes.oneOfType([a["default"].PropTypes.oneOf(["manual","click","hover","focus"]),a["default"].PropTypes.arrayOf(a["default"].PropTypes.oneOf(["click","hover","focus"]))]),placement:a["default"].PropTypes.oneOf(["top","right","bottom","left"]),delay:a["default"].PropTypes.number,delayShow:a["default"].PropTypes.number,delayHide:a["default"].PropTypes.number,defaultOverlayShown:a["default"].PropTypes.bool,overlay:a["default"].PropTypes.node.isRequired},getDefaultProps:function(){return{placement:"right",trigger:["hover","focus"]}},getInitialState:function(){return{isOverlayShown:null==this.props.defaultOverlayShown?!1:this.props.defaultOverlayShown,overlayLeft:null,overlayTop:null}},show:function(){this.setState({isOverlayShown:!0},function(){this.updateOverlayPosition()})},hide:function(){this.setState({isOverlayShown:!1})},toggle:function(){this.state.isOverlayShown?this.hide():this.show()},renderOverlay:function(){return this.state.isOverlayShown?i.cloneElement(this.props.overlay,{onRequestHide:this.hide,placement:this.props.placement,positionLeft:this.state.overlayLeft,positionTop:this.state.overlayTop}):a["default"].createElement("span",null)},render:function(){var e=a["default"].Children.only(this.props.children);if("manual"===this.props.trigger)return e;var t={};return t.onClick=d["default"](e.props.onClick,this.props.onClick),r("click",this.props.trigger)&&(t.onClick=d["default"](this.toggle,t.onClick)),r("hover",this.props.trigger)&&(t.onMouseOver=d["default"](this.handleDelayedShow,this.props.onMouseOver),t.onMouseOut=d["default"](this.handleDelayedHide,this.props.onMouseOut)),r("focus",this.props.trigger)&&(t.onFocus=d["default"](this.handleDelayedShow,this.props.onFocus),t.onBlur=d["default"](this.handleDelayedHide,this.props.onBlur)),i.cloneElement(e,t)},componentWillUnmount:function(){clearTimeout(this._hoverDelay)},componentDidMount:function(){this.props.defaultOverlayShown&&this.updateOverlayPosition()},handleDelayedShow:function(){if(null!=this._hoverDelay)return clearTimeout(this._hoverDelay),void(this._hoverDelay=null);var e=null!=this.props.delayShow?this.props.delayShow:this.props.delay;return e?void(this._hoverDelay=setTimeout(function(){this._hoverDelay=null,this.show()}.bind(this),e)):void this.show()},handleDelayedHide:function(){if(null!=this._hoverDelay)return clearTimeout(this._hoverDelay),void(this._hoverDelay=null);var e=null!=this.props.delayHide?this.props.delayHide:this.props.delay;return e?void(this._hoverDelay=setTimeout(function(){this._hoverDelay=null,this.hide()}.bind(this),e)):void this.hide()},updateOverlayPosition:function(){if(this.isMounted()){var e=this.calcOverlayPosition();this.setState({overlayLeft:e.left,overlayTop:e.top})}},calcOverlayPosition:function(){var e=this.getPosition(),t=this.getOverlayDOMNode(),n=t.offsetHeight,r=t.offsetWidth;switch(this.props.placement){case"right":return{top:e.top+e.height/2-n/2,left:e.left+e.width};case"left":return{top:e.top+e.height/2-n/2,left:e.left-r};case"top":return{top:e.top-n,left:e.left+e.width/2-r/2};case"bottom":return{top:e.top+e.height,left:e.left+e.width/2-r/2};default:throw new Error('calcOverlayPosition(): No such placement of "'+this.props.placement+'" found.')}},getPosition:function(){var e=a["default"].findDOMNode(this),t=this.getContainerDOMNode(),n="BODY"===t.tagName?c["default"].getOffset(e):c["default"].getPosition(e,t);return h["default"]({},n,{height:e.offsetHeight,width:e.offsetWidth})}});t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{"default":e}},o=Object.assign||function(e){for(var t=1;tl;++l)if(u=r[l],!u.isDefault&&!u.isNotFound&&(i=o(u,t,n)))return i.routes.unshift(e),i;var p=e.defaultRoute;if(p&&(f=a.extractParams(p.path,t)))return new s(t,f,n,[e,p]);var d=e.notFoundRoute;if(d&&(f=a.extractParams(d.path,t)))return new s(t,f,n,[e,d]);var f=a.extractParams(e.path,t);return f?new s(t,f,n,[e]):null}var i=function(){function e(e,t){for(var n=0;ns;++s)i=o(e[s],n,r);return i}}]),e}();e.exports=s},function(e,t,n){"use strict";var r=n(30),o={contextTypes:{router:r.router.isRequired},makePath:function(e,t,n){return this.context.router.makePath(e,t,n)},makeHref:function(e,t,n){return this.context.router.makeHref(e,t,n)},transitionTo:function(e,t,n){this.context.router.transitionTo(e,t,n)},replaceWith:function(e,t,n){this.context.router.replaceWith(e,t,n)},goBack:function(){return this.context.router.goBack()}};e.exports=o},function(e,t,n){"use strict";function r(e,t){if(!t)return!0;if(e.pathname===t.pathname)return!1;var n=e.routes,r=t.routes,o=n.filter(function(e){return-1!==r.indexOf(e)});return!o.some(function(e){return e.ignoreScrollBehavior})}var o=n(31),i=n(64),a=n(275),s={statics:{recordScrollPosition:function(e){this.scrollHistory||(this.scrollHistory={}),this.scrollHistory[e]=a()},getScrollPosition:function(e){return this.scrollHistory||(this.scrollHistory={}),this.scrollHistory[e]||null}},componentWillMount:function(){o(null==this.constructor.getScrollBehavior()||i,"Cannot use scroll behavior without a DOM")},componentDidMount:function(){this._updateScroll()},componentDidUpdate:function(e,t){this._updateScroll(t)},_updateScroll:function(e){if(r(this.state,e)){var t=this.constructor.getScrollBehavior();t&&t.updateScrollPosition(this.constructor.getScrollPosition(this.state.path),this.state.action)}}};e.exports=s},function(e,t,n){"use strict";var r=n(30),o={contextTypes:{router:r.router.isRequired},getPath:function(){return this.context.router.getCurrentPath()},getPathname:function(){return this.context.router.getCurrentPathname()},getParams:function(){return this.context.router.getCurrentParams()},getQuery:function(){return this.context.router.getCurrentQuery()},getRoutes:function(){return this.context.router.getCurrentRoutes()},isActive:function(e,t,n){return this.context.router.isActive(e,t,n)}};e.exports=o},function(e,t,n){"use strict";function r(e,t){this.path=e,this.abortReason=null,this.retry=t.bind(this)}var o=n(140),i=n(141);r.prototype.abort=function(e){null==this.abortReason&&(this.abortReason=e||"ABORT")},r.prototype.redirect=function(e,t,n){this.abort(new i(e,t,n))},r.prototype.cancel=function(){this.abort(new o)},r.from=function(e,t,n,r){t.reduce(function(t,r,o){return function(i){if(i||e.abortReason)t(i);else if(r.onLeave)try{r.onLeave(e,n[o],t),r.onLeave.length<3&&t()}catch(a){t(a)}else t()}},r)()},r.to=function(e,t,n,r,o){t.reduceRight(function(t,o){return function(i){if(i||e.abortReason)t(i);else if(o.onEnter)try{o.onEnter(e,n,r,t),o.onEnter.length<4&&t()}catch(a){t(a)}else t()}},o)()},e.exports=r},function(e,t){"use strict";var n={updateScrollPosition:function(){window.scrollTo(0,0)}};e.exports=n},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var n=0;nn;++n)this.listeners[n].call(this,t)}},{key:"addChangeListener",value:function(e){this.listeners.push(e)}},{key:"removeChangeListener",value:function(e){this.listeners=this.listeners.filter(function(t){return t!==e})}},{key:"push",value:function(e){this.history.push(e),this._updateHistoryLength(),this._notifyChange(a.PUSH)}},{key:"replace",value:function(e){i(this.history.length,"You cannot replace the current path with no history"),this.history[this.history.length-1]=e,this._notifyChange(a.REPLACE)}},{key:"pop",value:function(){this.history.pop(),this._updateHistoryLength(),this._notifyChange(a.POP)}},{key:"getCurrentPath",value:function(){return this.history[this.history.length-1]}},{key:"toString",value:function(){return""}}]),e}();e.exports=u},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof t&&(n=t,t=null);var r=o({routes:e,location:t});return r.run(n),r}var o=n(146);e.exports=r},function(e,t){"use strict";function n(){/*! taken from modernizr diff --git a/javascript/src/containers/SelectionButtonContainer.js b/javascript/src/containers/SelectionButtonContainer.js index 3d3d346..b938e44 100644 --- a/javascript/src/containers/SelectionButtonContainer.js +++ b/javascript/src/containers/SelectionButtonContainer.js @@ -45,7 +45,13 @@ const SelectionButtonContainer = React.createClass({ let error; - if(!SelectedItemsStore.isValidCount()) { + if(items.length === 0) { + error = sf(_t( + 'KickAssets.NOFILESELECTED', + "You haven't selected any file.")); + } + + else if(!SelectedItemsStore.isValidCount()) { error = sf(_t( 'KickAssets.TOOMANYSELECTED', 'You have selected too many items. Please select no more than %s.' diff --git a/lang/da.js b/lang/da.js index 9e1af6b..db8fc23 100644 --- a/lang/da.js +++ b/lang/da.js @@ -48,6 +48,7 @@ else { 'KickAssets.DONE': 'Færdig', 'KickAssets.TOOMANYSELECTED': 'Du har valgt for mange filer. Vælg ikke flere end %s.', 'KickAssets.INVALIDTYPESSELECTED': 'Du har valgt nogle ugyldige filer. Vælg kun %s', - 'KickAssets.INVALIDEXTENSIONSSELECTED': 'Du har valgt nogle filer med ugyldige filtypenavne. Vælg kun %s' + 'KickAssets.INVALIDEXTENSIONSSELECTED': 'Du har valgt nogle filer med ugyldige filtypenavne. Vælg kun %s', + 'KickAssets.NOFILESELECTED': 'Du har ikke valgt nogen fil.' }); } diff --git a/lang/de.js b/lang/de.js index 8f7846f..ea63e62 100644 --- a/lang/de.js +++ b/lang/de.js @@ -48,6 +48,7 @@ else { 'KickAssets.DONE': 'Fertig', 'KickAssets.TOOMANYSELECTED': 'Die haben zu viele Objekte ausgewählt. Bitte nicht mehr %s auswählen.', 'KickAssets.INVALIDTYPESSELECTED': 'Sie haben ungültige Objekte ausgewählt. Bitte nur %s auswählen.', - 'KickAssets.INVALIDEXTENSIONSSELECTED': 'Sie haben Dateien mit ungültiger Dateienamenrweiterung ausgewählt. Bitte nur %s auswählen.' + 'KickAssets.INVALIDEXTENSIONSSELECTED': 'Sie haben Dateien mit ungültiger Dateienamenrweiterung ausgewählt. Bitte nur %s auswählen.', + 'KickAssets.NOFILESELECTED': 'Sie haben keine Datei ausgewählt.' }); }