All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.6.6.a37bd6c43e2b13149f99.js Maven / Gradle / Ivy

There is a newer version: 6.0.5
Show newest version
webpackJsonp([6],[,,,,,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(236);Object.defineProperty(t,"ChosenSelectInput",{enumerable:!0,get:function(){return r(n)["default"]}});var s=i(237);Object.defineProperty(t,"ClipboardButton",{enumerable:!0,get:function(){return r(s)["default"]}});var o=i(238);Object.defineProperty(t,"DataFilter",{enumerable:!0,get:function(){return r(o)["default"]}});var a=i(146);Object.defineProperty(t,"DataTable",{enumerable:!0,get:function(){return r(a)["default"]}});var l=i(240);Object.defineProperty(t,"DatePicker",{enumerable:!0,get:function(){return r(l)["default"]}});var u=i(241);Object.defineProperty(t,"DocumentTitle",{enumerable:!0,get:function(){return r(u)["default"]}});var c=i(128);Object.defineProperty(t,"EntityList",{enumerable:!0,get:function(){return r(c)["default"]}});var d=i(204);Object.defineProperty(t,"EntityListItem",{enumerable:!0,get:function(){return r(d)["default"]}});var p=i(242);Object.defineProperty(t,"GridsterContainer",{enumerable:!0,get:function(){return r(p)["default"]}});var h=i(243);Object.defineProperty(t,"GridsterWidget",{enumerable:!0,get:function(){return r(h)["default"]}});var f=i(245);Object.defineProperty(t,"IfPermitted",{enumerable:!0,get:function(){return r(f)["default"]}});var g=i(244);Object.defineProperty(t,"ISODurationInput",{enumerable:!0,get:function(){return r(g)["default"]}});var _=i(247);Object.defineProperty(t,"LinkToNode",{enumerable:!0,get:function(){return r(_)["default"]}});var y=i(248);Object.defineProperty(t,"LoadingIndicator",{enumerable:!0,get:function(){return r(y)["default"]}});var m=i(246);Object.defineProperty(t,"KeyValueTable",{enumerable:!0,get:function(){return r(m)["default"]}});var v=i(147);Object.defineProperty(t,"MultiSelect",{enumerable:!0,get:function(){return r(v)["default"]}});var b=i(249);Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return r(b)["default"]}});var w=i(250);Object.defineProperty(t,"PageErrorOverview",{enumerable:!0,get:function(){return r(w)["default"]}});var x=i(39);Object.defineProperty(t,"PageHeader",{enumerable:!0,get:function(){return r(x)["default"]}});var T=i(251);Object.defineProperty(t,"PaginatedList",{enumerable:!0,get:function(){return r(T)["default"]}});var D=i(252);Object.defineProperty(t,"Pluralize",{enumerable:!0,get:function(){return r(D)["default"]}});var C=i(253);Object.defineProperty(t,"SearchForm",{enumerable:!0,get:function(){return r(C)["default"]}});var S=i(101);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return r(S)["default"]}});var P=i(254);Object.defineProperty(t,"SelectableList",{enumerable:!0,get:function(){return r(P)["default"]}});var O=i(205);Object.defineProperty(t,"SortableList",{enumerable:!0,get:function(){return r(O)["default"]}});var E=i(148);Object.defineProperty(t,"SortableListItem",{enumerable:!0,get:function(){return r(E)["default"]}});var M=i(28);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return r(M)["default"]}});var k=i(206);Object.defineProperty(t,"TableList",{enumerable:!0,get:function(){return r(k)["default"]}});var I=i(255);Object.defineProperty(t,"Timestamp",{enumerable:!0,get:function(){return r(I)["default"]}});var N=i(256);Object.defineProperty(t,"TimezoneSelect",{enumerable:!0,get:function(){return r(N)["default"]}});var z=i(149);Object.defineProperty(t,"TypeAheadDataFilter",{enumerable:!0,get:function(){return r(z)["default"]}});var A=i(257);Object.defineProperty(t,"TypeAheadFieldInput",{enumerable:!0,get:function(){return r(A)["default"]}});var j=i(258);Object.defineProperty(t,"TypeAheadInput",{enumerable:!0,get:function(){return r(j)["default"]}})},,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=s["default"].createClass({displayName:"Spinner",propTypes:{text:s["default"].PropTypes.string},getDefaultProps:function(){return{text:"Loading..."}},getInitialState:function(){return{}},render:function(){return s["default"].createElement("span",null,s["default"].createElement("i",{className:"fa fa-spin fa-spinner"})," ",this.props.text)}});t["default"]=o,e.exports=t["default"]},,,,,,,,,,,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(2),a=i(61),l=r(a),u=s["default"].createClass({displayName:"PageHeader",propTypes:{title:n.PropTypes.oneOfType([n.PropTypes.node,n.PropTypes.string]).isRequired,children:n.PropTypes.oneOfType([n.PropTypes.array,n.PropTypes.node]),experimental:n.PropTypes.bool,subpage:n.PropTypes.bool},getDefaultProps:function(){return{experimental:!1,subpage:!1}},render:function(){var e=void 0!==this.props.children&&void 0!==this.props.children.length?this.props.children:[this.props.children],t=void 0;this.props.experimental&&(t=s["default"].createElement("span",{style:{cursor:"help",marginLeft:5,fontSize:14,lineHeight:"20px",verticalAlign:"text-top"}},s["default"].createElement(o.OverlayTrigger,{placement:"bottom",overlay:s["default"].createElement(o.Tooltip,{id:"experimental"},"This feature of Graylog is new and should be considered experimental.")},s["default"].createElement(o.Label,{bsStyle:"primary"},"Experimental"))));var i=this.props.subpage?"content-head":"content content-head";return s["default"].createElement("div",null,s["default"].createElement(o.Row,{className:i},s["default"].createElement(o.Col,{sm:12},e[2]&&s["default"].createElement("div",{className:"actions-lg visible-lg visible-md"},s["default"].createElement("div",{className:"actions-container"},e[2])),s["default"].createElement("h1",null,this.props.title," ",s["default"].createElement("small",null,t)),e[0]&&s["default"].createElement("p",{className:"description"},e[0]),e[1]&&s["default"].createElement(l["default"],null,e[1])),e[2]&&s["default"].createElement(o.Col,{sm:12,lgHidden:!0,mdHidden:!0,className:"actions-sm"},e[2])))}});t["default"]=u,e.exports=t["default"]},,,,,,,,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={clone:function(e){return JSON.parse(JSON.stringify(e))},isEmpty:function(e){var t=Object.keys(e);return t&&0===t.length}};t["default"]=i,e.exports=t["default"]},,function(e,t){var i=Array.isArray;e.exports=i},function(e,t,i){function r(e){if(!s(e)||p.call(e)!=o)return!1;var t=n(e);if(null===t)return!0;var i=c.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&u.call(i)==d}var n=i(418),s=i(74),o="[object Object]",a=Function.prototype,l=Object.prototype,u=a.toString,c=l.hasOwnProperty,d=u.call(Object),p=l.toString;e.exports=r},,,,,,,,,function(e,t,i){function r(e,t){return o(s(e,t,n),e+"")}var n=i(188),s=i(443),o=i(446);e.exports=r},,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=s["default"].createClass({displayName:"SupportLink",propTypes:{small:s["default"].PropTypes.bool,children:s["default"].PropTypes.node.isRequired},render:function(){var e=this.props.small?"fa-stack":"fa-stack fa-lg";return s["default"].createElement("table",{className:"description-tooltips",style:{marginBottom:"10px"}},s["default"].createElement("tbody",null,s["default"].createElement("tr",null,s["default"].createElement("td",{style:{width:"40px"}},s["default"].createElement("span",{className:e},s["default"].createElement("i",{className:"fa fa-circle fa-stack-2x"}),s["default"].createElement("i",{className:"fa fa-lightbulb-o fa-stack-1x fa-inverse"}))),s["default"].createElement("td",null,s["default"].createElement("strong",null,this.props.children)))))}});t["default"]=o,e.exports=t["default"]},,,,,,,,,,,function(e,t,i){var r=i(185),n="object"==typeof self&&self&&self.Object===Object&&self,s=r||n||Function("return this")();e.exports=s},function(e,t){function i(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=i},function(e,t){function i(e){return null!=e&&"object"==typeof e}e.exports=i},function(e,t,i){e.exports=i(12)(6)},,,,,,,,,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.publishSource,r=void 0===i||i,n=t.clientOffset,s=void 0===n?null:n,o=t.getSourceClientOffset;p["default"](f["default"](e),"Expected sourceIds to be an array.");var a=this.getMonitor(),l=this.getRegistry();p["default"](!a.isDragging(),"Cannot call beginDrag while dragging.");for(var u=0;u=0;u--)if(a.canDragSource(e[u])){c=e[u];break}if(null!==c){var d=null;s&&(p["default"]("function"==typeof o,"When clientOffset is provided, getSourceClientOffset must be a function."),d=o(c));var h=l.getSource(c),g=h.beginDrag(a,c);p["default"](_["default"](g),"Item must be an object."),l.pinSource(c);var m=l.getSourceType(c);return{type:y,itemType:m,item:g,sourceId:c,clientOffset:s,sourceClientOffset:d,isSourcePublic:r}}}function s(e){var t=this.getMonitor();if(t.isDragging())return{type:m}}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.clientOffset,r=void 0===i?null:i;p["default"](f["default"](e),"Expected targetIds to be an array."),e=e.slice(0);var n=this.getMonitor(),s=this.getRegistry();p["default"](n.isDragging(),"Cannot call hover while not dragging."),p["default"](!n.didDrop(),"Cannot call hover after drop.");for(var o=0;o=0;o--){var a=e[o],d=s.getTargetType(a);c["default"](d,u)||e.splice(o,1)}for(var o=0;o50&&$("#scroll-to-search-hint").fadeIn("fast").delay(1500).fadeOut("fast")},substringMatcher:function(e,t,i){return function(r,n){var s=[];e.forEach(function(e){if(s.length-1}var n=i(403);e.exports=r},function(e,t){function i(e,t,i){for(var r=-1,n=e?e.length:0;++r0?Math.floor(r):Math.ceil(r),s=r-n,o=i+1===v.length,a=!i,u(t,function(t){t.type===e&&(y(t,{value:r,wholeValue:n,decimalValue:s,isLeast:o,isMost:a}),a&&null==x.forceLength&&t.length>1&&(x.forceLength=!0))}),T.subtract(n,e)}),x.trim&&(t=("left"===x.trim?g:_)(t,function(e){return!(e.isLeast||null!=e.type&&e.wholeValue)})),b=!1,"right"===x.trim&&t.reverse(),t=c(t,function(e){var t,i;if(!e.type)return e.token;if(t=e.isLeast&&x.precision<0?(Math.floor(e.wholeValue*Math.pow(10,x.precision))*Math.pow(10,-x.precision)).toString():e.wholeValue.toString(),t=t.replace(/^\-/,""),e.length>1&&(b||e.isMost||x.forceLength)&&(t=n(t,e.length)),e.isLeast&&x.precision>0)switch(i=e.decimalValue.toString().replace(/^\-/,"").split(/\.|e\-/),i.length){case 1:t+="."+n(i[0],x.precision,!0).slice(0,x.precision);break;case 2:t+="."+n(i[1],x.precision,!0).slice(0,x.precision);break;case 3:t+="."+n(r(+i[2]-1)+(i[0]||"0")+i[1],x.precision,!0).slice(0,x.precision);break;default:throw"Moment Duration Format: unable to parse token decimal value."}return e.isMost&&e.value<0&&(t="-"+t),b=!0,t}),"right"===x.trim&&t.reverse(),t.join("")):d(t,"token").join("")},m.duration.fn.format.defaults={escape:/\[(.+?)\]/,years:/[Yy]+/,months:/M+/,weeks:/[Ww]+/,days:/[Dd]+/,hours:/[Hh]+/,minutes:/m+/,seconds:/s+/,milliseconds:/S+/,general:/.+?/,types:"escape years months weeks days hours minutes seconds milliseconds general",trim:"left",precision:0,forceLength:null,template:function(){var e=this.types,t=this.duration,i=a(e,function(e){return t._data[e]});switch(i){case"seconds":return"h:mm:ss";case"minutes":return"d[d] h:mm";case"hours":return"d[d] h[h]";case"days":return"M[m] d[d]";case"weeks":return"y[y] w[w]";case"months":return"y[y] M[m]";case"years":return"y[y]";default:return"y[y] M[m] d[d] h:mm:ss"}}}}(this)},function(e,t){"use strict";t.__esModule=!0;var i="__NATIVE_FILE__";t.FILE=i;var r="__NATIVE_URL__";t.URL=r;var n="__NATIVE_TEXT__";t.TEXT=n},function(e,t){"use strict";function i(e,t){if(e===t)return!0;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(var n=Object.prototype.hasOwnProperty,s=0;s=this.maxSize&&(this.list.remove(r),delete this.hash[r.key],this.size--),(i=this.hash[e])?(i.val=t,this.list.moveToFront(i)):(i=new n(e,t),this.list.add(i),this.hash[e]=i,this.size++)},get:function(e){var t=this.hash[e];if(t)return this.list.moveToFront(t),t.val},reset:function(){this.size=0,this.hash={},this.list=new r}}),t.mixin(r.prototype,{add:function(e){this.head&&(e.next=this.head,this.head.prev=e),this.head=e,this.tail=this.tail||e},remove:function(e){e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev},moveToFront:function(e){this.remove(e),this.add(e)}}),i}(),s=function(){"use strict";function i(e,i){this.prefix=["__",e,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix)),this.ls=i||a,!this.ls&&this._noop()}function r(){return(new Date).getTime()}function n(e){return JSON.stringify(t.isUndefined(e)?null:e)}function s(t){return e.parseJSON(t)}function o(e){var t,i,r=[],n=a.length;for(t=0;ti)}}),i}(),o=function(){"use strict";function i(e){e=e||{},this.cancelled=!1,this.lastReq=null,this._send=e.transport,this._get=e.limiter?e.limiter(this._get):this._get,this._cache=e.cache===!1?new n(0):a}var r=0,s={},o=6,a=new n(10);return i.setMaxPendingRequests=function(e){o=e},i.resetCache=function(){a.reset()},t.mixin(i.prototype,{_fingerprint:function(t){return t=t||{},t.url+t.type+e.param(t.data||{})},_get:function(e,t){function i(e){t(null,e),c._cache.set(l,e)}function n(){t(!0)}function a(){r--,delete s[l],c.onDeckRequestArgs&&(c._get.apply(c,c.onDeckRequestArgs),c.onDeckRequestArgs=null)}var l,u,c=this;l=this._fingerprint(e),this.cancelled||l!==this.lastReq||((u=s[l])?u.done(i).fail(n):rt[r]?r++:(n.push(e[i]),i++,r++);return n}var a="c",l="i";return t.mixin(i.prototype,{bootstrap:function(e){this.datums=e.datums,this.trie=e.trie},add:function(e){var i=this;e=t.isArray(e)?e:[e],t.each(e,function(e){var s,o;i.datums[s=i.identify(e)]=e,o=r(i.datumTokenizer(e)),t.each(o,function(e){var t,r,o;for(t=i.trie,r=e.split("");o=r.shift();)t=t[a][o]||(t[a][o]=n()),t[l].push(s)})})},get:function(e){var i=this;return t.map(e,function(e){return i.datums[e]})},search:function(e){var i,n,u=this;return i=r(this.queryTokenizer(e)),t.each(i,function(e){var t,i,r,s;if(n&&0===n.length)return!1;for(t=u.trie,i=e.split("");t&&(r=i.shift());)t=t[a][r];return t&&0===i.length?(s=t[l].slice(0),void(n=n?o(n,s):s)):(n=[],!1)}),n?t.map(s(n),function(e){return u.datums[e]}):[]},all:function(){var e=[];for(var t in this.datums)e.push(this.datums[t]);return e},reset:function(){this.datums={},this.trie=n()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),i}(),l=function(){"use strict";function e(e){this.url=e.url,this.ttl=e.ttl,this.cache=e.cache,this.prepare=e.prepare,this.transform=e.transform,this.transport=e.transport,this.thumbprint=e.thumbprint,this.storage=new s(e.cacheKey)}var i;return i={data:"data",protocol:"protocol",thumbprint:"thumbprint"},t.mixin(e.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(e){this.cache&&(this.storage.set(i.data,e,this.ttl),this.storage.set(i.protocol,location.protocol,this.ttl),this.storage.set(i.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var e,t={};return this.cache?(t.data=this.storage.get(i.data),t.protocol=this.storage.get(i.protocol),t.thumbprint=this.storage.get(i.thumbprint),e=t.thumbprint!==this.thumbprint||t.protocol!==location.protocol,t.data&&!e?t.data:null):null},fromNetwork:function(e){function t(){e(!0)}function i(t){e(null,n.transform(t))}var r,n=this;e&&(r=this.prepare(this._settings()),this.transport(r).fail(t).done(i))},clear:function(){return this.storage.clear(),this}}),e}(),u=function(){"use strict";function e(e){this.url=e.url,this.prepare=e.prepare,this.transform=e.transform,this.transport=new o({cache:e.cache,limiter:e.limiter,transport:e.transport})}return t.mixin(e.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(e,t){function i(e,i){t(e?[]:n.transform(i))}var r,n=this;if(t)return e=e||"",r=this.prepare(e,this._settings()),this.transport.get(r,i)},cancelLastRequest:function(){this.transport.cancel()}}),e}(),c=function(){"use strict";function r(r){var n;return r?(n={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:t.identity,transform:t.identity,transport:null},r=t.isString(r)?{url:r}:r,r=t.mixin(n,r),!r.url&&e.error("prefetch requires url to be set"),r.transform=r.filter||r.transform,r.cacheKey=r.cacheKey||r.url,r.thumbprint=i+r.thumbprint,r.transport=r.transport?a(r.transport):e.ajax,r):null}function n(i){var r;if(i)return r={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:t.identity,transport:null},i=t.isString(i)?{url:i}:i,i=t.mixin(r,i),!i.url&&e.error("remote requires url to be set"),i.transform=i.filter||i.transform,i.prepare=s(i),i.limiter=o(i),i.transport=i.transport?a(i.transport):e.ajax,delete i.replace,delete i.wildcard,delete i.rateLimitBy,delete i.rateLimitWait,i}function s(e){function t(e,t){return t.url=s(t.url,e),t}function i(e,t){return t.url=t.url.replace(o,encodeURIComponent(e)),t}function r(e,t){return t}var n,s,o;return n=e.prepare,s=e.replace,o=e.wildcard,n?n:n=s?t:e.wildcard?i:r}function o(e){function i(e){return function(i){return t.debounce(i,e)}}function r(e){return function(i){return t.throttle(i,e)}}var n,s,o;return n=e.limiter,s=e.rateLimitBy,o=e.rateLimitWait,n||(n=/^throttle$/i.test(s)?r(o):i(o)),n}function a(i){return function(r){function n(e){t.defer(function(){o.resolve(e)})}function s(e){t.defer(function(){o.reject(e)})}var o=e.Deferred();return i(r,n,s),o}}return function(i){var s,o;return s={initialize:!0,identify:t.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null},i=t.mixin(s,i||{}),!i.datumTokenizer&&e.error("datumTokenizer is required"),!i.queryTokenizer&&e.error("queryTokenizer is required"),o=i.sorter,i.sorter=o?function(e){return e.sort(o)}:t.identity,i.local=t.isFunction(i.local)?i.local():i.local,i.prefetch=r(i.prefetch),i.remote=n(i.remote),i}}(),d=function(){"use strict";function i(e){e=c(e),this.sorter=e.sorter,this.identify=e.identify,this.sufficient=e.sufficient,this.local=e.local,this.remote=e.remote?new u(e.remote):null,this.prefetch=e.prefetch?new l(e.prefetch):null,this.index=new a({identify:this.identify,datumTokenizer:e.datumTokenizer,queryTokenizer:e.queryTokenizer}),e.initialize!==!1&&this.initialize()}var n;return n=window&&window.Bloodhound,i.noConflict=function(){return window&&(window.Bloodhound=n),i},i.tokenizers=r,t.mixin(i.prototype,{__ttAdapter:function(){function e(e,t,r){return i.search(e,t,r)}function t(e,t){return i.search(e,t)}var i=this;return this.remote?e:t},_loadPrefetch:function(){function t(e,t){return e?i.reject():(n.add(t),n.prefetch.store(n.index.serialize()),void i.resolve())}var i,r,n=this;return i=e.Deferred(),this.prefetch?(r=this.prefetch.fromCache())?(this.index.bootstrap(r),i.resolve()):this.prefetch.fromNetwork(t):i.resolve(),i.promise()},_initialize:function(){function e(){t.add(t.local)}var t=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(e),this.initPromise},initialize:function(e){return!this.initPromise||e?this._initialize():this.initPromise},add:function(e){return this.index.add(e),this},get:function(e){return e=t.isArray(e)?e:[].slice.call(arguments),this.index.get(e)},search:function(e,i,r){function n(e){var i=[];t.each(e,function(e){!t.some(s,function(t){return o.identify(e)===o.identify(t)})&&i.push(e)}),r&&r(i)}var s,o=this;return s=this.sorter(this.index.search(e)),i(this.remote?s.slice():s),this.remote&&s.length',menu:'
'}}function r(e){var i={};return t.each(e,function(e,t){i[t]="."+e}),i}function n(){var e={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(e.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),e}var s={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return e}(),r=function(){"use strict";function i(t){t&&t.el||e.error("EventBus initialized without el"),this.$el=e(t.el)}var r,n;return r="typeahead:",n={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},t.mixin(i.prototype,{_trigger:function(t,i){var n;return n=e.Event(r+t),(i=i||[]).unshift(n),this.$el.trigger.apply(this.$el,i),n},before:function(e){var t,i;return t=[].slice.call(arguments,1),i=this._trigger("before"+e,t),i.isDefaultPrevented()},trigger:function(e){var t;this._trigger(e,[].slice.call(arguments,1)),(t=n[e])&&this._trigger(t,[].slice.call(arguments,1))}}),i}(),n=function(){"use strict";function e(e,t,i,r){var n;if(!i)return this;for(t=t.split(u),i=r?l(i,r):i,this._callbacks=this._callbacks||{};n=t.shift();)this._callbacks[n]=this._callbacks[n]||{sync:[],async:[]},this._callbacks[n][e].push(i);return this}function t(t,i,r){return e.call(this,"async",t,i,r)}function i(t,i,r){return e.call(this,"sync",t,i,r)}function r(e){var t;if(!this._callbacks)return this;for(e=e.split(u);t=e.shift();)delete this._callbacks[t];return this}function n(e){var t,i,r,n,s;if(!this._callbacks)return this;for(e=e.split(u),r=[].slice.call(arguments,1);(t=e.shift())&&(i=this._callbacks[t]);)n=o(i.sync,this,[t].concat(r)),s=o(i.async,this,[t].concat(r)),n()&&c(s);return this}function o(e,t,i){function r(){for(var r,n=0,s=e.length;!r&&n
').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function s(e,t){return i.normalizeQuery(e)===i.normalizeQuery(t)}function o(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}var a;return a={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},i.normalizeQuery=function(e){return t.toStr(e).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},t.mixin(i.prototype,n,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query,this.trigger("focused")},_onKeydown:function(e){var t=a[e.which||e.keyCode];this._managePreventDefault(t,e),t&&this._shouldTrigger(t,e)&&this.trigger(t+"Keyed",e)},_onInput:function(){this._setQuery(this.getInputValue()),this.clearHintIfInvalid(),this._checkLanguageDirection()},_managePreventDefault:function(e,t){var i;switch(e){case"up":case"down":i=!o(t);break;default:i=!1}i&&t.preventDefault()},_shouldTrigger:function(e,t){var i;switch(e){case"tab":i=!o(t);break;default:i=!0}return i},_checkLanguageDirection:function(){var e=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==e&&(this.dir=e,this.$hint.attr("dir",e),this.trigger("langDirChanged",e))},_setQuery:function(e,t){var i,r;i=s(e,this.query),r=!!i&&this.query.length!==e.length,this.query=e,t||i?!t&&r&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},bind:function(){var e,i,r,n,s=this;return e=t.bind(this._onBlur,this),i=t.bind(this._onFocus,this),r=t.bind(this._onKeydown,this),n=t.bind(this._onInput,this),this.$input.on("blur.tt",e).on("focus.tt",i).on("keydown.tt",r),!t.isMsie()||t.isMsie()>9?this.$input.on("input.tt",n):this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(e){a[e.which||e.keyCode]||t.defer(t.bind(s._onInput,s,e))}),this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(e,t){this.setInputValue(e),this._setQuery(e,t)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(e){this.$input.val(e),this.clearHintIfInvalid(),this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(e){this.$hint.val(e)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var e,t,i,r;e=this.getInputValue(),t=this.getHint(),i=e!==t&&0===t.indexOf(e),r=""!==e&&i&&!this.hasOverflow(),!r&&this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var e=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=e},isCursorAtEnd:function(){var e,i,r;return e=this.$input.val().length,i=this.$input[0].selectionStart,t.isNumber(i)?i===e:!document.selection||(r=document.selection.createRange(),r.moveStart("character",-e),e===r.text.length)},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$overflowHelper.remove(),this.$hint=this.$input=this.$overflowHelper=e("
")}}),i}(),l=function(){"use strict";function i(i,n){i=i||{},i.templates=i.templates||{},i.templates.notFound=i.templates.notFound||i.templates.empty,i.source||e.error("missing source"),i.node||e.error("missing node"),i.name&&!a(i.name)&&e.error("invalid dataset name: "+i.name),n.mixin(this),this.highlight=!!i.highlight,this.name=i.name||u(),this.limit=i.limit||5,this.displayFn=r(i.display||i.displayKey),this.templates=s(i.templates,this.displayFn),this.source=i.source.__ttAdapter?i.source.__ttAdapter():i.source,this.async=t.isUndefined(i.async)?this.source.length>2:!!i.async,this._resetLastSuggestion(),this.$el=e(i.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}function r(e){function i(t){return t[e]}return e=e||t.stringify,t.isFunction(e)?e:i}function s(i,r){function n(t){return e("
").text(r(t))}return{notFound:i.notFound&&t.templatify(i.notFound),pending:i.pending&&t.templatify(i.pending),header:i.header&&t.templatify(i.header),footer:i.footer&&t.templatify(i.footer),suggestion:i.suggestion||n}}function a(e){return/^[_a-zA-Z0-9-]+$/.test(e)}var l,u;return l={val:"tt-selectable-display",obj:"tt-selectable-object"},u=t.getIdGenerator(),i.extractData=function(t){var i=e(t);return i.data(l.obj)?{val:i.data(l.val)||"",obj:i.data(l.obj)||null}:null},t.mixin(i.prototype,n,{_overwrite:function(e,t){t=t||[],t.length?this._renderSuggestions(e,t):this.async&&this.templates.pending?this._renderPending(e):!this.async&&this.templates.notFound?this._renderNotFound(e):this._empty(),this.trigger("rendered",this.name,t,!1)},_append:function(e,t){t=t||[],t.length&&this.$lastSuggestion.length?this._appendSuggestions(e,t):t.length?this._renderSuggestions(e,t):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(e),this.trigger("rendered",this.name,t,!0)},_renderSuggestions:function(e,t){var i;i=this._getSuggestionsFragment(e,t),this.$lastSuggestion=i.children().last(),this.$el.html(i).prepend(this._getHeader(e,t)).append(this._getFooter(e,t))},_appendSuggestions:function(e,t){var i,r;i=this._getSuggestionsFragment(e,t),r=i.children().last(),this.$lastSuggestion.after(i),this.$lastSuggestion=r},_renderPending:function(e){var t=this.templates.pending;this._resetLastSuggestion(),t&&this.$el.html(t({query:e,dataset:this.name}))},_renderNotFound:function(e){var t=this.templates.notFound;this._resetLastSuggestion(),t&&this.$el.html(t({query:e,dataset:this.name}))},_empty:function(){this.$el.empty(),this._resetLastSuggestion()},_getSuggestionsFragment:function(i,r){var n,s=this;return n=document.createDocumentFragment(),t.each(r,function(t){var r,o;o=s._injectQuery(i,t),r=e(s.templates.suggestion(o)).data(l.obj,t).data(l.val,s.displayFn(t)).addClass(s.classes.suggestion+" "+s.classes.selectable),n.appendChild(r[0])}),this.highlight&&o({className:this.classes.highlight,node:n,pattern:i}),e(n)},_getFooter:function(e,t){return this.templates.footer?this.templates.footer({query:e,suggestions:t,dataset:this.name}):null},_getHeader:function(e,t){return this.templates.header?this.templates.header({query:e,suggestions:t,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=e()},_injectQuery:function(e,i){return t.isObject(i)?t.mixin({_query:e},i):i},update:function(t){function i(e){o||(o=!0,e=(e||[]).slice(0,n.limit),a=e.length,n._overwrite(t,e),a")}}),i}(),u=function(){"use strict";function i(i,r){function n(t){var i=s.$node.find(t.node).first();return t.node=i.length?i:e("
").appendTo(s.$node),new l(t,r)}var s=this;i=i||{},i.node||e.error("node is required"),r.mixin(this),this.$node=e(i.node),this.query=null,this.datasets=t.map(i.datasets,n)}return t.mixin(i.prototype,n,{_onSelectableClick:function(t){this.trigger("selectableClicked",e(t.currentTarget))},_onRendered:function(e,t,i,r){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetRendered",t,i,r)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){function e(e){return e.isEmpty()}return t.every(this.datasets,e)},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var e=this.getActiveSelectable();e&&e.removeClass(this.classes.cursor)},_ensureVisible:function(e){var t,i,r,n;t=e.position().top,i=t+e.outerHeight(!0),r=this.$node.scrollTop(),n=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10),t<0?this.$node.scrollTop(r+t):n"),t.each(this.datasets,i)}}),i}(),c=function(){"use strict";function e(){u.apply(this,[].slice.call(arguments,0))}var i=u.prototype;return t.mixin(e.prototype,u.prototype,{open:function(){return!this._allDatasetsEmpty()&&this._show(),i.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),i.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),i._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),i._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function(e){return this.$node.css("ltr"===e?this.css.ltr:this.css.rtl),i.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),e}(),d=function(){"use strict";function i(i,n){var s,o,a,l,u,c,d,p,h,f,g;i=i||{},i.input||e.error("missing input"),i.menu||e.error("missing menu"),i.eventBus||e.error("missing event bus"),n.mixin(this),this.eventBus=i.eventBus,this.minLength=t.isNumber(i.minLength)?i.minLength:1,this.input=i.input,this.menu=i.menu,this.enabled=!0,this.active=!1,this.input.hasFocus()&&this.activate(),this.dir=this.input.getLangDir(),this._hacks(),this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this),s=r(this,"activate","open","_onFocused"),o=r(this,"deactivate","_onBlurred"),a=r(this,"isActive","isOpen","_onEnterKeyed"),l=r(this,"isActive","isOpen","_onTabKeyed"),u=r(this,"isActive","_onEscKeyed"),c=r(this,"isActive","open","_onUpKeyed"),d=r(this,"isActive","open","_onDownKeyed"),p=r(this,"isActive","isOpen","_onLeftKeyed"),h=r(this,"isActive","isOpen","_onRightKeyed"),f=r(this,"_openIfActive","_onQueryChanged"),g=r(this,"_openIfActive","_onWhitespaceChanged"),this.input.bind().onSync("focused",s,this).onSync("blurred",o,this).onSync("enterKeyed",a,this).onSync("tabKeyed",l,this).onSync("escKeyed",u,this).onSync("upKeyed",c,this).onSync("downKeyed",d,this).onSync("leftKeyed",p,this).onSync("rightKeyed",h,this).onSync("queryChanged",f,this).onSync("whitespaceChanged",g,this).onSync("langDirChanged",this._onLangDirChanged,this)}function r(e){var i=[].slice.call(arguments,1);return function(){var r=[].slice.call(arguments);t.each(i,function(t){return e[t].apply(e,r)})}}return t.mixin(i.prototype,{_hacks:function(){var i,r;i=this.input.$input||e("
"),r=this.menu.$node||e("
"),i.on("blur.tt",function(e){var n,s,o;n=document.activeElement,s=r.is(n),o=r.has(n).length>0,t.isMsie()&&(s||o)&&(e.preventDefault(),e.stopImmediatePropagation(),t.defer(function(){ i.focus()}))}),r.on("mousedown.tt",function(e){e.preventDefault()})},_onSelectableClicked:function(e,t){this.select(t)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(e,t,i,r){this._updateHint(),this.eventBus.trigger("render",i,r,t)},_onAsyncRequested:function(e,t,i){this.eventBus.trigger("asyncrequest",i,t)},_onAsyncCanceled:function(e,t,i){this.eventBus.trigger("asynccancel",i,t)},_onAsyncReceived:function(e,t,i){this.eventBus.trigger("asyncreceive",i,t)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(e,t){var i;(i=this.menu.getActiveSelectable())&&this.select(i)&&t.preventDefault()},_onTabKeyed:function(e,t){var i;(i=this.menu.getActiveSelectable())?this.select(i)&&t.preventDefault():(i=this.menu.getTopSelectable())&&this.autocomplete(i)&&t.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){"rtl"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onRightKeyed:function(){"ltr"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onQueryChanged:function(e,t){this._minLengthMet(t)?this.menu.update(t):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(e,t){this.dir!==t&&(this.dir=t,this.menu.setLanguageDirection(t))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(e){return e=t.isString(e)?e:this.input.getQuery()||"",e.length>=this.minLength},_updateHint:function(){var e,i,r,n,s,o,l;e=this.menu.getTopSelectable(),i=this.menu.getSelectableData(e),r=this.input.getInputValue(),!i||t.isBlankString(r)||this.input.hasOverflow()?this.input.clearHint():(n=a.normalizeQuery(r),s=t.escapeRegExChars(n),o=new RegExp("^(?:"+s+")(.+$)","i"),l=o.exec(i.val),l&&this.input.setHint(r+l[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return!!this.isActive()||!(!this.isEnabled()||this.eventBus.before("active"))&&(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return!this.isActive()||!this.eventBus.before("idle")&&(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0)},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(e){this.input.setQuery(t.toStr(e))},getVal:function(){return this.input.getQuery()},select:function(e){var t=this.menu.getSelectableData(e);return!(!t||this.eventBus.before("select",t.obj)||(this.input.setQuery(t.val,!0),this.eventBus.trigger("select",t.obj),this.close(),0))},autocomplete:function(e){var t,i,r;return t=this.input.getQuery(),i=this.menu.getSelectableData(e),r=i&&t!==i.val,!(!r||this.eventBus.before("autocomplete",i.obj)||(this.input.setQuery(i.val),this.eventBus.trigger("autocomplete",i.obj),0))},moveCursor:function(e){var t,i,r,n,s;return t=this.input.getQuery(),i=this.menu.selectableRelativeToCursor(e),r=this.menu.getSelectableData(i),n=r?r.obj:null,s=this._minLengthMet()&&this.menu.update(t),!s&&!this.eventBus.before("cursorchange",n)&&(this.menu.setCursor(i),r?this.input.setInputValue(r.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",n),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),i}();!function(){"use strict";function n(t,i){t.each(function(){var t,r=e(this);(t=r.data(g.typeahead))&&i(t,r)})}function s(e,t){return e.clone().addClass(t.classes.hint).removeData().css(t.css.hint).css(l(e)).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1})}function o(e,t){e.data(g.attrs,{dir:e.attr("dir"),autocomplete:e.attr("autocomplete"),spellcheck:e.attr("spellcheck"),style:e.attr("style")}),e.addClass(t.classes.input).attr({autocomplete:"off",spellcheck:!1});try{!e.attr("dir")&&e.attr("dir","auto")}catch(i){}return e}function l(e){return{backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}}function p(e){var i,r;i=e.data(g.www),r=e.parent().filter(i.selectors.wrapper),t.each(e.data(g.attrs),function(i,r){t.isUndefined(i)?e.removeAttr(r):e.attr(r,i)}),e.removeData(g.typeahead).removeData(g.www).removeData(g.attr).removeClass(i.classes.input),r.length&&(e.detach().insertAfter(r),r.remove())}function h(i){var r,n;return r=t.isJQuery(i)||t.isElement(i),n=r?e(i).first():[],n.length?n:null}var f,g,_;f=e.fn.typeahead,g={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},_={initialize:function(n,l){function p(){var i,p,_,y,m,v,b,w,x,T,D;t.each(l,function(e){e.highlight=!!n.highlight}),i=e(this),p=e(f.html.wrapper),_=h(n.hint),y=h(n.menu),m=n.hint!==!1&&!_,v=n.menu!==!1&&!y,m&&(_=s(i,f)),v&&(y=e(f.html.menu).css(f.css.menu)),_&&_.val(""),i=o(i,f),(m||v)&&(p.css(f.css.wrapper),i.css(m?f.css.input:f.css.inputWithNoHint),i.wrap(p).parent().prepend(m?_:null).append(v?y:null)),D=v?c:u,b=new r({el:i}),w=new a({hint:_,input:i},f),x=new D({node:y,datasets:l},f),T=new d({input:w,menu:x,eventBus:b,minLength:n.minLength},f),i.data(g.www,f),i.data(g.typeahead,T)}var f;return l=t.isArray(l)?l:[].slice.call(arguments,1),n=n||{},f=i(n.classNames),this.each(p)},isEnabled:function(){var e;return n(this.first(),function(t){e=t.isEnabled()}),e},enable:function(){return n(this,function(e){e.enable()}),this},disable:function(){return n(this,function(e){e.disable()}),this},isActive:function(){var e;return n(this.first(),function(t){e=t.isActive()}),e},activate:function(){return n(this,function(e){e.activate()}),this},deactivate:function(){return n(this,function(e){e.deactivate()}),this},isOpen:function(){var e;return n(this.first(),function(t){e=t.isOpen()}),e},open:function(){return n(this,function(e){e.open()}),this},close:function(){return n(this,function(e){e.close()}),this},select:function(t){var i=!1,r=e(t);return n(this.first(),function(e){i=e.select(r)}),i},autocomplete:function(t){var i=!1,r=e(t);return n(this.first(),function(e){i=e.autocomplete(r)}),i},moveCursor:function(e){var t=!1;return n(this.first(),function(i){t=i.moveCursor(e)}),t},val:function(e){var t;return arguments.length?(n(this,function(t){t.setVal(e)}),this):(n(this.first(),function(e){t=e.getVal()}),t)},destroy:function(){return n(this,function(e,t){p(t),e.destroy()}),this}},e.fn.typeahead=function(e){return _[e]?_[e].apply(this,[].slice.call(arguments,1)):_.initialize.apply(this,arguments)},e.fn.typeahead.noConflict=function(){return e.fn.typeahead=f,this}}()})}).call(t,i(510).setImmediate)},function(e,t,i){e.exports=i(12)(283)},,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(239),a=r(o),l=i(5),u=s["default"].createClass({displayName:"DataTable",propTypes:{children:s["default"].PropTypes.node,className:s["default"].PropTypes.string,rowClassName:s["default"].PropTypes.string,displayKey:s["default"].PropTypes.string,dataRowFormatter:s["default"].PropTypes.func.isRequired,filterBy:s["default"].PropTypes.string,filterLabel:s["default"].PropTypes.string.isRequired,filterKeys:s["default"].PropTypes.array.isRequired,filterSuggestions:s["default"].PropTypes.array,headerCellFormatter:s["default"].PropTypes.func.isRequired,headers:s["default"].PropTypes.array.isRequired,id:s["default"].PropTypes.string,noDataText:s["default"].PropTypes.oneOfType([s["default"].PropTypes.string,s["default"].PropTypes.node]),rows:s["default"].PropTypes.array.isRequired,sortByKey:s["default"].PropTypes.string},getDefaultProps:function(){return{filterSuggestions:[],displayKey:"value",noDataText:"No data available.",rowClassName:""}},getInitialState:function(){return{headers:this.props.headers,rows:this.props.rows,filteredRows:this.props.rows}},componentWillReceiveProps:function(e){this.setState({headers:e.headers,rows:e.rows,filteredRows:e.rows})},getFormattedHeaders:function(){var e=this,t=0,i=this.state.headers.map(function(i){var r=s["default"].createElement(a["default"],{key:"header-"+t,element:i,index:t,formatter:e.props.headerCellFormatter});return t++,r});return s["default"].createElement("tr",null,i)},getFormattedDataRows:function(){var e=this,t=0,i=this.state.filteredRows;this.props.sortByKey&&(i=i.sort(function(t,i){return t[e.props.sortByKey].localeCompare(i[e.props.sortByKey])}));var r=i.map(function(i){var r=s["default"].createElement(a["default"],{key:"row-"+t,element:i,index:t,formatter:e.props.dataRowFormatter});return t++,r});return r},filterDataRows:function(e){this.setState({filteredRows:e})},render:function(){var e=void 0;0!==this.props.filterKeys.length&&(e=s["default"].createElement("div",{className:"row"},s["default"].createElement("div",{className:"col-md-8"},s["default"].createElement(l.TypeAheadDataFilter,{label:this.props.filterLabel,data:this.state.rows,displayKey:this.props.displayKey,filterBy:this.props.filterBy,filterSuggestions:this.props.filterSuggestions,searchInKeys:this.props.filterKeys,onDataFiltered:this.filterDataRows})),s["default"].createElement("div",{className:"col-md-4"},this.props.children)));var t=void 0;return t=0===this.state.rows.length?s["default"].createElement("p",null,this.props.noDataText):0===this.state.filteredRows.length?s["default"].createElement("p",null,"Filter does not match any data."):s["default"].createElement("table",{className:"table "+this.props.className},s["default"].createElement("thead",null,this.getFormattedHeaders()),s["default"].createElement("tbody",null,this.getFormattedDataRows())),s["default"].createElement("div",null,e,s["default"].createElement("div",{className:"row "+this.props.rowClassName},s["default"].createElement("div",{className:"col-md-12"},s["default"].createElement("div",{id:this.props.id,className:"data-table table-responsive"},t))))}});t["default"]=u,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;tn&&l>o||(e.moveItem(r,n),t.getItem().index=n)}}},y=a["default"].createClass({displayName:"SortableListItem",propTypes:{connectDragSource:a["default"].PropTypes.func.isRequired,connectDropTarget:a["default"].PropTypes.func.isRequired,content:a["default"].PropTypes.any.isRequired,disableDragging:a["default"].PropTypes.bool,index:a["default"].PropTypes.number.isRequired,isDragging:a["default"].PropTypes.bool.isRequired,isOver:a["default"].PropTypes.bool.isRequired,id:a["default"].PropTypes.any.isRequired,moveItem:a["default"].PropTypes.func.isRequired},getDefaultProps:function(){return{disableDragging:!1}},render:function(){var e=this.props,t=e.content,i=e.isDragging,r=e.isOver,n=e.connectDragSource,s=e.connectDropTarget,o=[h["default"].listGroupItem];i&&o.push("dragging"),r&&o.push("over");var l=a["default"].createElement("span",{className:h["default"].itemHandle},a["default"].createElement("i",{className:"fa fa-sort"})),u=a["default"].createElement("div",{className:"sortable-list-item"},a["default"].createElement(c.ListGroupItem,{className:o.join(" ")},a["default"].createElement("div",null,this.props.disableDragging?null:l,t)));return this.props.disableDragging?u:n(s(u))}});t["default"]=(0,d.DropTarget)(f.ITEM,_,s)((0,d.DragSource)(f.ITEM,g,n)(y)),e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=i(1),o=r(s),a=i(2),l=i(23),u=r(l),c=i(5),d=o["default"].createClass({displayName:"TypeAheadDataFilter",propTypes:{data:o["default"].PropTypes.array,displayKey:o["default"].PropTypes.string,filterBy:o["default"].PropTypes.string,filterData:o["default"].PropTypes.func,filterSuggestionAccessor:o["default"].PropTypes.string,filterSuggestions:o["default"].PropTypes.array,label:o["default"].PropTypes.string,onDataFiltered:o["default"].PropTypes.func,searchInKeys:o["default"].PropTypes.array},getInitialState:function(){return{filterText:"",filters:u["default"].OrderedSet(),filterByKey:this.props.filterBy+"s"}},_onSearchTextChanged:function(e){e.preventDefault(),this.setState({filterText:this.refs.typeAheadInput.getValue()},this.filterData)},_onFilterAdded:function(e,t){this.setState({filters:this.state.filters.add(t[this.props.displayKey]),filterText:""},this.filterData),this.refs.typeAheadInput.clear()},_onFilterRemoved:function(e){e.preventDefault(),this.setState({filters:this.state.filters["delete"](e.target.getAttribute("data-target"))},this.filterData)},_matchFilters:function(e){var t=this;return this.state.filters.every(function(i){var r=e[t.state.filterByKey];return r=t.props.filterSuggestionAccessor?r.map(function(e){return e[t.props.filterSuggestionAccessor].toLocaleLowerCase()}):r.map(function(e){return e.toLocaleLowerCase()}),r.indexOf(i.toLocaleLowerCase())!==-1},this)},_matchStringSearch:function(e){var t=this;return this.props.searchInKeys.some(function(i){var r=e[i],s=t.state.filterText;if(null===r)return!1;var o=function(e,t){return"undefined"!=typeof e&&e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase())!==-1};return"object"===("undefined"==typeof r?"undefined":n(r))?r.some(function(e){return o(e,s)}):o(r,s)},this)},_resetFilters:function(){this.refs.typeAheadInput.clear(),this.setState({filterText:"",filters:u["default"].OrderedSet()},this.filterData)},filterData:function(){var e=this;if("function"==typeof this.props.filterData)return this.props.filterData(this.props.data);var t=this.props.data.filter(function(t){return e._matchFilters(t)&&e._matchStringSearch(t)},this);this.props.onDataFiltered(t)},render:function(){var e=this,t=this.state.filters.map(function(t){return o["default"].createElement("li",{key:"li-"+t},o["default"].createElement("span",{className:"pill label label-default"},e.props.filterBy,": ",t,o["default"].createElement("a",{className:"tag-remove","data-target":t,onClick:e._onFilterRemoved})))}),i=void 0;return i=this.props.filterSuggestionAccessor?this.props.filterSuggestions.map(function(t){return t[e.props.filterSuggestionAccessor].toLocaleLowerCase()}):this.props.filterSuggestions.map(function(e){return e.toLocaleLowerCase()}),i.filter(function(t){return!e.state.filters.includes(t)}),o["default"].createElement("div",{className:"filter"},o["default"].createElement("form",{className:"form-inline",onSubmit:this._onSearchTextChanged,style:{display:"inline"}},o["default"].createElement(c.TypeAheadInput,{ref:"typeAheadInput",onSuggestionSelected:this._onFilterAdded,suggestionText:"Filter by "+this.props.filterBy+": ",suggestions:i,label:this.props.label,displayKey:this.props.displayKey}),o["default"].createElement(a.ButtonInput,{type:"submit",value:"Filter",style:{marginLeft:5}}),o["default"].createElement(a.ButtonInput,{type:"button",value:"Reset",style:{marginLeft:5},onClick:this._resetFilters,disabled:0===this.state.filters.count()&&""===this.state.filterText})),o["default"].createElement("ul",{className:"pill-list"},t))}});t["default"]=d,e.exports=t["default"]},,,,,,,,,,,,,,,,,,,,function(e,t,i){function r(e,t){if(!e||1!==e.nodeType)return!1;if(a)return a.call(e,t);for(var i=n.all(t,e.parentNode),r=0;r0)}t.__esModule=!0,t["default"]=n,t.areDirty=s;var o=i(460),a=r(o),l=i(453),u=r(l),c=i(84),d=i(85),p=[],h=[]},function(e,t,i){"use strict";function r(e,t){return e===t||e&&t&&e.x===t.x&&e.y===t.y}function n(e,t){switch(void 0===e&&(e=u),t.type){case l.BEGIN_DRAG:return{initialSourceClientOffset:t.sourceClientOffset,initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case l.HOVER:return r(e.clientOffset,t.clientOffset)?e:a({},e,{clientOffset:t.clientOffset});case l.END_DRAG:case l.DROP:return u;default:return e}}function s(e){var t=e.clientOffset,i=e.initialClientOffset,r=e.initialSourceClientOffset;return t&&i&&r?{x:t.x+r.x-i.x,y:t.y+r.y-i.y}:null}function o(e){var t=e.clientOffset,i=e.initialClientOffset;return t&&i?{x:t.x-i.x,y:t.y-i.y}:null}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=c&&(p=u,h=!1,t=new n(t));e:for(;++d=c){var _=t?null:l(e);if(_)return u(_);h=!1,d=a,g=new n}else g=t?[]:f;e:for(;++r-1&&e%1==0&&e-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=i},function(e,t){function i(){}e.exports=i},function(e,t,i){var r=i(182),n=i(59),s=i(91),o=n(function(e,t){return s(e)?r(e,t):[]});e.exports=o},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var n=i(457),s=r(n),o=s["default"](function(){return/firefox/i.test(navigator.userAgent)});t.isFirefox=o;var a=s["default"](function(){return Boolean(window.safari)});t.isSafari=a},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){return t===e||null!==t&&null!==e&&o["default"](t,e)}t.__esModule=!0,t["default"]=n;var s=i(125),o=r(s);e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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)}function o(e){var t=e.DecoratedComponent,i=e.createHandler,r=e.createMonitor,o=e.createConnector,p=e.registerHandler,f=e.containerDisplayName,_=e.getType,y=e.collect,v=e.options,b=v.arePropsEqual,w=void 0===b?g["default"]:b,x=t.displayName||t.name||"Component";return function(e){function g(t,s){n(this,g),e.call(this,t,s),this.handleChange=this.handleChange.bind(this),this.handleChildRef=this.handleChildRef.bind(this),m["default"]("object"==typeof this.context.dragDropManager,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://gaearon.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",x,x),this.manager=this.context.dragDropManager,this.handlerMonitor=r(this.manager),this.handlerConnector=o(this.manager.getBackend()),this.handler=i(this.handlerMonitor),this.disposable=new d.SerialDisposable,this.receiveProps(t),this.state=this.getCurrentState(),this.dispose()}return s(g,e),g.prototype.getHandlerId=function(){return this.handlerId},g.prototype.getDecoratedComponentInstance=function(){return this.decoratedComponentInstance},g.prototype.shouldComponentUpdate=function(e,t){return!w(e,this.props)||!h["default"](t,this.state)},l(g,null,[{key:"DecoratedComponent",value:t,enumerable:!0},{key:"displayName",value:f+"("+x+")",enumerable:!0},{key:"contextTypes",value:{dragDropManager:u.PropTypes.object.isRequired},enumerable:!0}]),g.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0,this.disposable=new d.SerialDisposable,this.currentType=null,this.receiveProps(this.props),this.handleChange()},g.prototype.componentWillReceiveProps=function(e){w(e,this.props)||(this.receiveProps(e),this.handleChange())},g.prototype.componentWillUnmount=function(){this.dispose(),this.isCurrentlyMounted=!1},g.prototype.receiveProps=function(e){this.handler.receiveProps(e),this.receiveType(_(e))},g.prototype.receiveType=function(e){if(e!==this.currentType){this.currentType=e;var t=p(e,this.handler,this.manager),i=t.handlerId,r=t.unregister;this.handlerId=i,this.handlerMonitor.receiveHandlerId(i),this.handlerConnector.receiveHandlerId(i);var n=this.manager.getMonitor(),s=n.subscribeToStateChange(this.handleChange,{handlerIds:[i]});this.disposable.setDisposable(new d.CompositeDisposable(new d.Disposable(s),new d.Disposable(r)))}},g.prototype.handleChange=function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();h["default"](e,this.state)||this.setState(e)}},g.prototype.dispose=function(){this.disposable.dispose(),this.handlerConnector.receiveHandlerId(null)},g.prototype.handleChildRef=function(e){this.decoratedComponentInstance=e,this.handler.receiveComponent(e)},g.prototype.getCurrentState=function(){var e=y(this.handlerConnector.hooks,this.handlerMonitor);return e},g.prototype.render=function(){return c["default"].createElement(t,a({},this.props,this.state,{ref:this.handleChildRef}))},g}(u.Component)}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t, or turn it into a ")+"drag source or a drop target itself.")}}function s(e){ return function(){var t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],i=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(!u.isValidElement(t)){var r=t;return void e(r,i)}var s=t;n(s);var o=i?function(t){return e(t,i)}:e;return l["default"](s,o)}}function o(e){var t={};return Object.keys(e).forEach(function(i){var r=e[i],n=s(r);t[i]=function(){return n}}),t}t.__esModule=!0,t["default"]=o;var a=i(484),l=r(a),u=i(1);e.exports=t["default"]},,,,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(2),a=s["default"].createClass({displayName:"EntityListItem",propTypes:{title:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.node]),titleSuffix:n.PropTypes.any,description:n.PropTypes.any,actions:n.PropTypes.oneOfType([n.PropTypes.array,n.PropTypes.node]),createdFromContentPack:n.PropTypes.bool,contentRow:n.PropTypes.node},getDefaultProps:function(){return{createdFromContentPack:!1}},render:function(){var e=void 0;return this.props.titleSuffix&&(e=s["default"].createElement("small",null,this.props.titleSuffix)),s["default"].createElement("li",{className:"entity-list-item"},s["default"].createElement(o.Row,{className:"row-sm"},s["default"].createElement(o.Col,{md:6},s["default"].createElement("h2",null,this.props.title," ",e),s["default"].createElement("div",{className:"item-description"},this.props.createdFromContentPack&&s["default"].createElement("span",null,s["default"].createElement("i",{className:"fa fa-cube",title:"Created from content pack"})," "),s["default"].createElement("span",null,this.props.description))),s["default"].createElement(o.Col,{md:6},s["default"].createElement("div",{className:"item-actions text-right"},this.props.actions))),s["default"].createElement(o.Row,{className:"row-sm"},this.props.contentRow))}});t["default"]=a,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(2),a=i(197),l=i(470),u=r(l),c=i(148),d=r(c),p=s["default"].createClass({displayName:"SortableList",propTypes:{disableDragging:s["default"].PropTypes.bool,items:n.PropTypes.arrayOf(n.PropTypes.object).isRequired,onMoveItem:n.PropTypes.func},getDefaultProps:function(){return{disableDragging:!1}},getInitialState:function(){return{items:this.props.items}},componentWillReceiveProps:function(e){this.setState({items:e.items})},_moveItem:function(e,t){var i=this.state.items,r=i[e];i[e]=i[t],i[t]=r,this.setState({items:i}),"function"==typeof this.props.onMoveItem&&this.props.onMoveItem(i)},render:function(){var e=this,t=this.state.items.map(function(t,i){return s["default"].createElement(d["default"],{key:"sortable-list-item-"+t.id,disableDragging:e.props.disableDragging,index:i,id:t.id,content:t.title,moveItem:e._moveItem})});return s["default"].createElement(o.ListGroup,{className:this.props.disableDragging?"sortable-list":"sortable-list sortable-list-cursor"},t)}});t["default"]=(0,a.DragDropContext)(u["default"])(p),e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(23),a=r(o),l=i(2),u=i(149),c=r(u),d=s["default"].createClass({displayName:"TableList",propTypes:{idKey:s["default"].PropTypes.string,titleKey:s["default"].PropTypes.string,descriptionKey:s["default"].PropTypes.string,filterKeys:s["default"].PropTypes.arrayOf(s["default"].PropTypes.string),filterLabel:s["default"].PropTypes.string,items:s["default"].PropTypes.instanceOf(a["default"].List),headerActionsFactory:s["default"].PropTypes.func,itemActionsFactory:s["default"].PropTypes.func},getInitialState:function(){return{filteredItems:a["default"].List(this.props.items),allSelected:!1,selected:a["default"].Set()}},getDefaultProps:function(){return{idKey:"id",titleKey:"title",descriptionKey:"description",headerActionsFactory:function(){},itemActionsFactory:function(){}}},render:function(){var e=this,t=this.state.filteredItems.map(function(t){return e._formatItem(t)}).toJS(),i=void 0;return 0!==this.props.filterKeys.length&&(i=s["default"].createElement("div",{className:"row"},s["default"].createElement("div",{className:"col-md-4"},s["default"].createElement(c["default"],{label:this.props.filterLabel,data:this.props.items,displayKey:"value",filterSuggestions:[],searchInKeys:this.props.filterKeys,onDataFiltered:this._filterItems})))),0===this.state.filteredItems.count()?s["default"].createElement("div",null,i,s["default"].createElement("div",null,"No items match your filter criteria")):s["default"].createElement("div",null,i,s["default"].createElement(l.ListGroup,null,this._headerItem(),t))},_filterItems:function(e){this.setState({filteredItems:a["default"].List(e),allSelected:!1})},_headerItem:function(){var e=void 0;this.state.selected.count()>1&&(e=this.props.headerActionsFactory(this.state.selected));var t=s["default"].createElement("div",null,e,s["default"].createElement(l.Input,{type:"checkbox",label:"Select all",checked:this.state.allSelected,onChange:this._toggleSelectAll,groupClassName:"form-group-inline"}));return s["default"].createElement(l.ListGroupItem,{className:"list-group-header",header:t})},_toggleSelectAll:function(e){var t=this,i=e.target.checked?a["default"].Set(this.state.filteredItems.map(function(e){return e[t.props.idKey]})):a["default"].Set();this.setState({selected:i,allSelected:!this.state.allSelected})},_formatItem:function(e){var t=s["default"].createElement("div",null,s["default"].createElement("div",{className:"pull-right",style:{marginTop:10,marginBottom:10}},this.props.itemActionsFactory(e)),s["default"].createElement(l.Input,{type:"checkbox",label:e[this.props.titleKey],checked:this.state.selected.includes(e[this.props.idKey]),onChange:this._onItemSelect(e[this.props.idKey]),groupClassName:"form-group-inline"}));return s["default"].createElement(l.ListGroupItem,{key:"item-"+e[this.props.idKey],header:t},s["default"].createElement("span",{style:{marginLeft:20}},e[this.props.descriptionKey]))},_onItemSelect:function(e){var t=this;return function(i){var r=i.target.checked?t.state.selected.add(e):t.state.selected["delete"](e);t.setState({selected:r})}}});t["default"]=d,e.exports=t["default"]},,,,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(24),s=r(n);i(123);var o={isValidDuration:function(e,t){return t(s["default"].duration(e).asMilliseconds(),e)},durationStyle:function(e,t,i){var r=i;return r||(r="error"),this.isValidDuration(e,t)?null:r},formatDuration:function(e,t,i){var r=i;return r||(r="error"),this.isValidDuration(e,t)?s["default"].duration(e).format():r},humanizeDuration:function(e,t,i){var r=i;return r||(r="error"),this.isValidDuration(e,t)?s["default"].duration(e).humanize():r}};t["default"]=o,e.exports=t["default"]},,,,,,,,,,,,,,,function(e,t,i){var r,n=0,s=i(370);"string"==typeof s&&(s=[[e.id,s,""]]),t.use=t.ref=function(){return n++||(t.locals=s.locals,r=i(20)(s,{})),t},t.unuse=t.unref=function(){--n||(r(),r=null)}},,,,,function(e,t,i){"use strict";function r(){if(l.length)throw l.shift()}function n(e){var t;t=a.length?a.pop():new s,t.task=e,o(t)}function s(){this.task=null}var o=i(231),a=[],l=[],u=o.makeRequestCallFromTimer(r);e.exports=n,s.prototype.call=function(){try{this.task.call()}catch(e){n.onerror?n.onerror(e):(l.push(e),u())}finally{this.task=null,a[a.length]=this}}},function(e,t){(function(t){"use strict";function i(e){a.length||(o(),l=!0),a[a.length]=e}function r(){for(;uc){for(var t=0,i=a.length-u;t1?s["default"].createElement("span",null,this.props.children):this.props.children:null}});t["default"]=h,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(2),a=i(47),l=r(a),u=s["default"].createClass({displayName:"KeyValueTable",propTypes:{pairs:n.PropTypes.object.isRequired,headers:n.PropTypes.array,editable:n.PropTypes.bool,onChange:n.PropTypes.func,className:n.PropTypes.string,containerClassName:n.PropTypes.string,actionsSize:n.PropTypes.oneOf(["large","medium","small","xsmall"])},getInitialState:function(){return{newKey:"",newValue:""}},getDefaultProps:function(){return{headers:["Name","Value","Actions"],editable:!1,actionsSize:"xsmall",className:"",containerClassName:""}},_onPairsChange:function(e){this.props.onChange&&this.props.onChange(e)},_bindValue:function(e){var t={};t[e.target.name]=e.target.value,this.setState(t)},_addRow:function(){var e=l["default"].clone(this.props.pairs);e[this.state.newKey]=this.state.newValue,this._onPairsChange(e),this.setState({newKey:"",newValue:""})},_deleteRow:function(e){var t=this;return function(){if(window.confirm("Are you sure you want to delete property '"+e+"'?")){var i=l["default"].clone(t.props.pairs);delete i[e],t._onPairsChange(i)}}},_formattedHeaders:function(e){var t=this;return s["default"].createElement("tr",null,e.map(function(i,r){var n={};if(r===e.length-1){if(!t.props.editable)return null;n.width=75}return s["default"].createElement("th",{key:i,style:n},i)}))},_formattedRows:function(e){var t=this;return Object.keys(e).sort().map(function(i){var r=void 0;if(t.props.editable){var n=[];n.push(s["default"].createElement(o.Button,{key:"delete-"+i,bsStyle:"danger",bsSize:t.props.actionsSize,onClick:t._deleteRow(i)},"Delete")),r=s["default"].createElement("td",null,n)}return s["default"].createElement("tr",{key:i},s["default"].createElement("td",null,i),s["default"].createElement("td",null,e[i]),r)})},_newRow:function(){if(!this.props.editable)return null;var e=!this.state.newKey||!this.state.newValue;return s["default"].createElement("tr",null,s["default"].createElement("td",null,s["default"].createElement(o.Input,{type:"text",name:"newKey",id:"newKey",bsSize:"small",placeholder:this.props.headers[0],value:this.state.newKey,onChange:this._bindValue})),s["default"].createElement("td",null,s["default"].createElement(o.Input,{type:"text",name:"newValue",id:"newValue",bsSize:"small",placeholder:this.props.headers[1],value:this.state.newValue,onChange:this._bindValue})),s["default"].createElement("td",null,s["default"].createElement(o.Button,{bsStyle:"success",bsSize:"small",onClick:this._addRow,disabled:e},"Add")))},render:function(){return s["default"].createElement("div",null,s["default"].createElement("div",{className:"table-responsive "+this.props.containerClassName},s["default"].createElement("table",{className:"table table-striped "+this.props.className},s["default"].createElement("thead",null,this._formattedHeaders(this.props.headers)),s["default"].createElement("tbody",null,this._formattedRows(this.props.pairs),this._newRow()))))}});t["default"]=u,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(4),a=r(o),l=i(144),u=i(3),c=r(u),d=i(11),p=r(d),h=i(5),f=c["default"].getStore("Nodes"),g=s["default"].createClass({displayName:"LinkToNode",propTypes:{nodeId:s["default"].PropTypes.string.isRequired},mixins:[a["default"].connect(f)],render:function(){if(!this.state.nodes)return s["default"].createElement(h.Spinner,null);var e=this.state.nodes[this.props.nodeId];if(e){var t=e.is_master?"fa fa-star master-node":"fa fa-code-fork",i=e.is_master?"This is the master node in the cluster":"";return s["default"].createElement(l.Link,{to:p["default"].SYSTEM.NODES.SHOW(this.props.nodeId)},s["default"].createElement("i",{className:t,title:i})," ",e.short_node_id," / ",e.hostname)}return s["default"].createElement("i",null,"Unknown Node")}});t["default"]=g,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(5),a=i(499),l=r(a),u=s["default"].createClass({displayName:"LoadingIndicator",propTypes:{text:s["default"].PropTypes.string},getDefaultProps:function(){return{text:"Loading..."}},render:function(){return s["default"].createElement("div",{className:l["default"].loadingIndicator},s["default"].createElement(o.Spinner,{text:this.props.text}))}});t["default"]=u,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(2),a=s["default"].createClass({displayName:"Page",propTypes:{href:n.PropTypes.string,page:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.number]).isRequired,onPageChanged:n.PropTypes.func.isRequired,isDisabled:n.PropTypes.bool,isActive:n.PropTypes.bool},render:function(){var e=this,t="";return this.props.isActive&&(t="active"),s["default"].createElement(o.PageItem,{href:this.props.href,className:t,disabled:this.props.isDisabled,onSelect:function(){return e.props.onPageChanged(e.props.page)}},this.props.page)}});t["default"]=a,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(2),a=i(225),l=r(a),u=s["default"].createClass({displayName:"PageErrorOverview",propTypes:{errors:s["default"].PropTypes.array.isRequired},componentDidMount:function(){l["default"].use()},componentWillUnmount:function(){l["default"].unuse()},_formatErrors:function(e){var t=e?e.map(function(e){return s["default"].createElement("li",null,e.toString())}):[];return s["default"].createElement("ul",null,t,s["default"].createElement("li",null,"Check your Graylog logs for more information."))},render:function(){return s["default"].createElement(o.Row,{className:"jumbotron-container"},s["default"].createElement(o.Col,{mdOffset:2,md:8},s["default"].createElement(o.Jumbotron,null,s["default"].createElement("h1",null,"Error getting data"),s["default"].createElement("p",null,"We had trouble fetching some data required to build this page, so here is a picture instead."),this._formatErrors(this.props.errors))))}});t["default"]=u,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(2),a=s["default"].createClass({displayName:"PaginatedList",propTypes:{children:s["default"].PropTypes.node.isRequired,onChange:s["default"].PropTypes.func.isRequired,pageSize:s["default"].PropTypes.number,pageSizes:s["default"].PropTypes.arrayOf(s["default"].PropTypes.number),totalItems:s["default"].PropTypes.number.isRequired,showPageSizeSelect:s["default"].PropTypes.bool},getDefaultProps:function(){var e=[10,50,100];return{pageSizes:e,pageSize:e[0],showPageSizeSelect:!0}},getInitialState:function(){return{currentPage:1,pageSize:this.props.pageSize}},_onChangePageSize:function(e){e.preventDefault();var t=Number(e.target.value);this.setState({pageSize:t}),this.props.onChange(this.state.currentPage,t)},_onChangePage:function(e,t){e.preventDefault();var i=Number(t.eventKey);this.setState({currentPage:i}),this.props.onChange(i,this.state.pageSize)},_pageSizeSelect:function(){return this.props.showPageSizeSelect?s["default"].createElement("div",{className:"form-inline page-size",style:{"float":"right"}},s["default"].createElement(o.Input,{type:"select",bsSize:"small",label:"Show:",value:this.state.pageSize,onChange:this._onChangePageSize},this.props.pageSizes.map(function(e){return s["default"].createElement("option",{key:"option-"+e,value:e},e)}))):null},render:function(){var e=Math.ceil(this.props.totalItems/this.state.pageSize);return 0===e?s["default"].createElement("span",null,this.props.children):s["default"].createElement("span",null,this._pageSizeSelect(),this.props.children,s["default"].createElement("div",{className:"text-center"},s["default"].createElement(o.Pagination,{bsSize:"small",items:e,maxButtons:10,activePage:this.state.currentPage,onSelect:this._onChangePage,prev:!0,next:!0,first:!0,last:!0})))}});t["default"]=a,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(51),a=r(o),l=s["default"].createClass({displayName:"Pluralize",propTypes:{singular:n.PropTypes.string.isRequired,plural:n.PropTypes.string.isRequired,value:n.PropTypes.oneOfType([n.PropTypes.number,n.PropTypes.string]).isRequired},render:function(){return s["default"].createElement("span",null,a["default"].pluralize(this.props.value,this.props.singular,this.props.plural))}});t["default"]=l,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(2),a=i(5),l=s["default"].createClass({displayName:"SearchForm",propTypes:{onSearch:s["default"].PropTypes.func.isRequired,onReset:s["default"].PropTypes.func,label:s["default"].PropTypes.string,placeholder:s["default"].PropTypes.string,wrapperClass:s["default"].PropTypes.string,queryWidth:s["default"].PropTypes.any,topMargin:s["default"].PropTypes.number,buttonLeftMargin:s["default"].PropTypes.number,searchBsStyle:s["default"].PropTypes.string,searchButtonLabel:s["default"].PropTypes.string,resetButtonLabel:s["default"].PropTypes.string,loadingLabel:s["default"].PropTypes.string,useLoadingState:s["default"].PropTypes.bool,children:s["default"].PropTypes.oneOfType([s["default"].PropTypes.arrayOf(s["default"].PropTypes.element),s["default"].PropTypes.element])},getDefaultProps:function(){return{placeholder:"Enter search query...",wrapperClass:"search",queryWidth:"auto",topMargin:15,buttonLeftMargin:5,searchBsStyle:"default",searchButtonLabel:"Search",resetButtonLabel:"Reset",loadingLabel:"Loading..."}},getInitialState:function(){return{isLoading:!1}},componentWillReceiveProps:function(){this._resetLoadingState()},_setLoadingState:function(){this.props.useLoadingState&&this.setState({isLoading:!0})},_resetLoadingState:function(){this.props.useLoadingState&&this.setState({isLoading:!1})},_onSearch:function(e){e.preventDefault(),this._setLoadingState(),this.props.onSearch(this.refs.query.value,this._resetLoadingState)},_onReset:function(){this._resetLoadingState(),this.refs.query.value="",this.props.onReset()},render:function(){return s["default"].createElement("div",{className:this.props.wrapperClass,style:{marginTop:this.props.topMargin}},s["default"].createElement("form",{className:"form-inline",onSubmit:this._onSearch},s["default"].createElement("div",{className:"form-group"},this.props.label&&s["default"].createElement("label",{className:"control-label"},this.props.label),s["default"].createElement("input",{ref:"query",placeholder:this.props.placeholder,type:"text",style:{width:this.props.queryWidth},label:"Search",className:"query form-control",autoComplete:"off",spellCheck:"false"})),s["default"].createElement("div",{className:"form-group",style:{marginLeft:this.props.buttonLeftMargin}},s["default"].createElement(o.Button,{bsStyle:this.props.searchBsStyle,type:"submit",disabled:this.state.isLoading, className:"submit-button"},this.state.isLoading?s["default"].createElement(a.Spinner,{text:this.props.loadingLabel}):this.props.searchButtonLabel)),this.props.onReset&&s["default"].createElement("div",{className:"form-group",style:{marginLeft:this.props.buttonLeftMargin}},s["default"].createElement(o.Button,{type:"reset",className:"reset-button",onClick:this._onReset},this.props.resetButtonLabel)),this.props.children))}});t["default"]=l,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(2),a=i(5),l=s["default"].createClass({displayName:"SelectableList",propTypes:{options:n.PropTypes.any,selectedOptionsType:n.PropTypes.oneOf(["string","object"]),selectedOptions:n.PropTypes.arrayOf([n.PropTypes.string,n.PropTypes.object]),displayKey:n.PropTypes.string,idKey:n.PropTypes.string,onChange:n.PropTypes.func,autoFocus:n.PropTypes.bool},getDefaultProps:function(){return{selectedOptionsType:"string",displayKey:"label",idKey:"value"}},componentWillReceiveProps:function(e){this.props.selectedOptions!==e.selectedOptions&&this.refs.select.clearValue()},_getOptionId:function(e){return"string"==typeof e?e:e[this.props.idKey]},_getOptionDisplayValue:function(e){return"string"==typeof e?e:e[this.props.displayKey]},_onAddOption:function(e){var t=this;if(""!==e){var i=this.props.selectedOptions.slice();"string"===this.props.selectedOptionsType?i.push(e):i.push(this.props.options.filter(function(i){return t._getOptionId(i)===e})[0]),"function"==typeof this.props.onChange&&this.props.onChange(i)}},_onRemoveOption:function(e){var t=this;return function(){var i=t.props.selectedOptions.filter(function(t,i){return i!==e});"function"==typeof t.props.onChange&&t.props.onChange(i)}},render:function(){var e=this,t=this.props.selectedOptions.map(function(t,i){return s["default"].createElement(o.ListGroupItem,{key:e._getOptionId(t)+"-"+i},s["default"].createElement("div",{className:"pull-right"},s["default"].createElement(o.Button,{bsStyle:"primary",bsSize:"xsmall",onClick:e._onRemoveOption(i)},"Remove")),e._getOptionDisplayValue(t))});return s["default"].createElement("div",null,s["default"].createElement(a.Select,{ref:"select",autofocus:this.props.autoFocus,options:this.props.options,onValueChange:this._onAddOption}),t.length>0&&s["default"].createElement(o.ListGroup,{style:{marginTop:10}},t))}});t["default"]=l,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(35),a=r(o),l=s["default"].createClass({displayName:"Timestamp",propTypes:{dateTime:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.object]).isRequired,format:n.PropTypes.string,relative:n.PropTypes.bool,tz:n.PropTypes.string},getDefaultProps:function(){return{format:a["default"].Formats.TIMESTAMP}},_formatDateTime:function(){var e=new a["default"](this.props.dateTime);if(this.props.relative)return e.toRelativeString();switch(this.props.tz){case null:case void 0:return e.toString(this.props.format);case"browser":return e.toBrowserLocalTime().toString(this.props.format);default:return e.toTimeZone(this.props.tz).toString(this.props.format)}},render:function(){return s["default"].createElement("time",{key:"time-"+this.props.dateTime,dateTime:this.props.dateTime,title:this.props.dateTime},this._formatDateTime())}});t["default"]=l,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t1?r[0]:e._UNCLASSIFIED_AREA,s=r.length>1?r[1]:r[0];t[n]||(t[n]=[]),t[n].push(s)}),[].concat.apply([],Object.keys(t).sort().map(function(i){return[{label:i,disabled:!0,value:i}].concat(c["default"].unique(t[i]).sort().map(function(t){var r=i===e._UNCLASSIFIED_AREA?t:i+"/"+t;return{value:r,label:t.replace("_"," ")}}))}))},_renderOption:function(e){return e.disabled?o["default"].createElement("span",{key:e.value,title:e.value},e.label):o["default"].createElement("span",{key:e.value,title:e.value},"  ",e.label)},render:function(){var e=this._formatTimezones();return o["default"].createElement(p["default"],n({ref:"timezone"},this.props,{placeholder:"Pick a time zone",options:e,optionRenderer:this._renderOption}))}});t["default"]=h,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t"+e.suggestionText+" "+t[e.displayKey]+"
":"
"+t.value+"
"}}}),"function"==typeof e.onTypeaheadLoaded&&(e.onTypeaheadLoaded(),t.typeahead("close")),(0,d["default"])(this.fieldFormGroup).on("typeahead:select typeahead:autocomplete",function(t,i){e.onSuggestionSelected&&e.onSuggestionSelected(t,i)})},render:function(){return s["default"].createElement(l.Input,{type:"text",ref:"fieldInput",wrapperClassName:"typeahead-wrapper",label:this.props.label,onKeyPress:this.props.onKeyPress})}}));t["default"]=h,e.exports=t["default"]},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){var r,n,s;!function(o,a){n=[e,i(494)],r=a,s="function"==typeof r?r.apply(t,n):r,!(void 0!==s&&(e.exports=s))}(this,function(e,t){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=i(t),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o=function(){function e(e,t){for(var i=0;i.Select-control{background-color:#f6f6f6}.Select.is-disabled .Select-arrow-zone{cursor:default;pointer-events:none}.Select-control{background-color:#fff;border-color:#d9d9d9 #ccc #b3b3b3;border-radius:4px;border:1px solid #ccc;color:#333;cursor:default;display:table;height:36px;outline:none;overflow:hidden;position:relative;width:100%}.Select-control:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}.is-searchable.is-open>.Select-control{cursor:text}.is-open>.Select-control{border-bottom-right-radius:0;border-bottom-left-radius:0;background:#fff;border-color:#b3b3b3 #ccc #d9d9d9}.is-open>.Select-control>.Select-arrow{border-color:transparent transparent #999;border-width:0 5px 5px}.is-searchable.is-focused:not(.is-open)>.Select-control{cursor:text}.is-focused:not(.is-open)>.Select-control{border-color:#08c #0099e6 #0099e6;box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 0 5px -1px rgba(0,136,204,.5)}.Select-placeholder{bottom:0;color:#aaa;left:0;line-height:34px;padding-left:10px;padding-right:10px;position:absolute;right:0;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-value>.Select-control>.Select-placeholder{color:#333}.Select-value{color:#aaa;left:0;padding:8px 52px 8px 10px;position:absolute;right:-15px;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-value>.Select-control>.Select-value{color:#333}.Select-input{height:34px;padding-left:10px;padding-right:10px;vertical-align:middle}.Select-input>input{background:none transparent;border:0 none;box-shadow:none;cursor:default;display:inline-block;font-family:inherit;font-size:inherit;height:34px;margin:0;outline:none;padding:0;-webkit-appearance:none}.is-focused .Select-input>input{cursor:text}.Select-control:not(.is-searchable)>.Select-input{outline:none}.Select-loading-zone{cursor:pointer;display:table-cell;text-align:center}.Select-loading,.Select-loading-zone{position:relative;vertical-align:middle;width:16px}.Select-loading{-webkit-animation:Select-animation-spin .4s infinite linear;animation:Select-animation-spin .4s infinite linear;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid #ccc;border-right-color:#333;display:inline-block}.Select-clear-zone{-webkit-animation:Select-animation-fadeIn .2s;animation:Select-animation-fadeIn .2s;color:#999;cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:17px}.Select-clear-zone:hover{color:#d0021b}.Select-clear{display:inline-block;font-size:18px;line-height:1}.Select--multi .Select-clear-zone{width:17px}.Select-arrow-zone{cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:25px;padding-right:5px}.Select-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px;display:inline-block;height:0;width:0}.is-open .Select-arrow,.Select-arrow-zone:hover>.Select-arrow{border-top-color:#666}@-webkit-keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}.Select-menu-outer{border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:#fff;border:1px solid #ccc;border-top-color:#e6e6e6;box-shadow:0 1px 0 rgba(0,0,0,.06);box-sizing:border-box;margin-top:-1px;max-height:200px;position:absolute;top:100%;width:100%;z-index:1000;-webkit-overflow-scrolling:touch}.Select-menu{max-height:198px;overflow-y:auto}.Select-option{box-sizing:border-box;color:#666;cursor:pointer;display:block;padding:8px 10px}.Select-option:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.Select-option.is-focused{background-color:#f2f9fc;color:#333}.Select-option.is-disabled{color:#ccc;cursor:not-allowed}.Select-noresults,.Select-search-prompt,.Select-searching{box-sizing:border-box;color:#999;cursor:default;display:block;padding:8px 10px}.Select--multi .Select-input{vertical-align:middle;margin-left:10px;padding:0}.Select--multi.has-value .Select-input,.Select-item{margin-left:5px}.Select-item{background-color:#f2f9fc;border-radius:2px;border:1px solid #c9e6f2;color:#08c;display:inline-block;font-size:.9em;margin-top:5px;vertical-align:top}.Select-item-icon,.Select-item-label{display:inline-block;vertical-align:middle}.Select-item-label{border-bottom-right-radius:2px;border-top-right-radius:2px;cursor:default;padding:2px 5px}.Select-item-label .Select-item-label__a{color:#08c;cursor:pointer}.Select-item-icon{cursor:pointer;border-bottom-left-radius:2px;border-top-left-radius:2px;border-right:1px solid #c9e6f2;padding:1px 5px 3px}.Select-item-icon:focus,.Select-item-icon:hover{background-color:#ddeff7;color:#0077b3}.Select-item-icon:active{background-color:#c9e6f2}.Select--multi.is-disabled .Select-item{background-color:#f2f2f2;border:1px solid #d9d9d9;color:#888}.Select--multi.is-disabled .Select-item-icon{cursor:not-allowed;border-right:1px solid #d9d9d9}.Select--multi.is-disabled .Select-item-icon:active,.Select--multi.is-disabled .Select-item-icon:focus,.Select--multi.is-disabled .Select-item-icon:hover{background-color:#f2f2f2}@keyframes Select-animation-spin{to{transform:rotate(1turn)}}@-webkit-keyframes Select-animation-spin{to{-webkit-transform:rotate(1turn)}}",""])},function(e,t,i){t=e.exports=i(19)(),t.push([e.id,"._3UCIyTaK6eZ7SAxXLfUXVD{background-color:#fff;box-shadow:2px 2px 10px #aaa;position:fixed;bottom:0;right:0;z-index:2000;padding:5px 10px;border-top:1px solid #ccc;border-left:1px solid #ccc;border-top-left-radius:4px}",""]),t.locals={loadingIndicator:"_3UCIyTaK6eZ7SAxXLfUXVD"}},function(e,t,i){t=e.exports=i(19)(),t.push([e.id,"._3PGZKhgo-1VUrTUVR_MCSq{display:inline-block;width:100%}.YzG4xa0irqvZaI-RLWJSj{float:left;margin-right:10px}",""]),t.locals={listGroupItem:"_3PGZKhgo-1VUrTUVR_MCSq",itemHandle:"YzG4xa0irqvZaI-RLWJSj"}},,,function(e,t,i){t=e.exports=i(19)(),t.push([e.id,"body{background:url("+i(388)+") no-repeat 50% fixed;background-size:cover}.jumbotron-container{height:82vh}.jumbotron{background-color:hsla(0,0%,100%,.8);text-align:center}.jumbotron h1{font-size:52px;margin-bottom:15px}",""])},function(e,t,i){function r(e,t,i,r,s){var o=n.apply(this,arguments);return e.addEventListener(i,o,s),{destroy:function(){e.removeEventListener(i,o,s)}}}function n(e,t,i,r){return function(i){i.delegateTarget=s(i.target,t,!0),i.delegateTarget&&r.call(e,i)}}var s=i(336);e.exports=r},function(e,t,i){"use strict";var r=function(e){return e&&e.__esModule?e:{"default":e}},n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};t.__esModule=!0;var s=i(115),o=r(s),a=function(){function e(){for(var t=arguments.length,i=Array(t),r=0;r0;e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1)},e.prototype.getMonitor=function(){return this.monitor},e.prototype.getBackend=function(){return this.backend},e.prototype.getRegistry=function(){return this.registry},e.prototype.getActions=function(){function e(e){return function(){var r=e.apply(t,arguments);"undefined"!=typeof r&&i(r)}}var t=this,i=this.store.dispatch;return Object.keys(d).filter(function(e){return"function"==typeof d[e]}).reduce(function(t,i){return t[i]=e(d[i]),t},{})},e}());t["default"]=g,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var s=i(31),o=r(s),a=i(177),l=r(a),u=i(49),c=r(u),d=i(174),p=r(d),h=i(176),f=i(175),g=function(){function e(t){n(this,e),this.store=t,this.registry=new p["default"](t)}return e.prototype.subscribeToStateChange=function(e){var t=this,i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=i.handlerIds;o["default"]("function"==typeof e,"listener must be a function."),o["default"]("undefined"==typeof r||c["default"](r),"handlerIds, when specified, must be an array of strings.");var n=this.store.getState().stateId,s=function(){var i=t.store.getState(),s=i.stateId;try{var o=s===n||s===n+1&&!f.areDirty(i.dirtyHandlerIds,r);o||e()}finally{n=s}};return this.store.subscribe(s)},e.prototype.subscribeToOffsetChange=function(e){var t=this;o["default"]("function"==typeof e,"listener must be a function.");var i=this.store.getState().dragOffset,r=function(){var r=t.store.getState().dragOffset;r!==i&&(i=r,e())};return this.store.subscribe(r)},e.prototype.canDragSource=function(e){var t=this.registry.getSource(e);return o["default"](t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)},e.prototype.canDropOnTarget=function(e){var t=this.registry.getTarget(e);if(o["default"](t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1; var i=this.registry.getTargetType(e),r=this.getItemType();return l["default"](i,r)&&t.canDrop(this,e)},e.prototype.isDragging=function(){return Boolean(this.getItemType())},e.prototype.isDraggingSource=function(e){var t=this.registry.getSource(e,!0);if(o["default"](t,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var i=this.registry.getSourceType(e),r=this.getItemType();return i===r&&t.isDragging(this,e)},e.prototype.isOverTarget=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.shallow,r=void 0!==i&&i;if(!this.isDragging())return!1;var n=this.registry.getTargetType(e),s=this.getItemType();if(!l["default"](n,s))return!1;var o=this.getTargetIds();if(!o.length)return!1;var a=o.indexOf(e);return r?a===o.length-1:a>-1},e.prototype.getItemType=function(){return this.store.getState().dragOperation.itemType},e.prototype.getItem=function(){return this.store.getState().dragOperation.item},e.prototype.getSourceId=function(){return this.store.getState().dragOperation.sourceId},e.prototype.getTargetIds=function(){return this.store.getState().dragOperation.targetIds},e.prototype.getDropResult=function(){return this.store.getState().dragOperation.dropResult},e.prototype.didDrop=function(){return this.store.getState().dragOperation.didDrop},e.prototype.isSourcePublic=function(){return this.store.getState().dragOperation.isSourcePublic},e.prototype.getInitialClientOffset=function(){return this.store.getState().dragOffset.initialClientOffset},e.prototype.getInitialSourceClientOffset=function(){return this.store.getState().dragOffset.initialSourceClientOffset},e.prototype.getClientOffset=function(){return this.store.getState().dragOffset.clientOffset},e.prototype.getSourceClientOffset=function(){return h.getSourceClientOffset(this.store.getState().dragOffset)},e.prototype.getDifferenceFromInitialOffset=function(){return h.getDifferenceFromInitialOffset(this.store.getState().dragOffset)},e}();t["default"]=g,e.exports=t["default"]},function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(){i(this,e)}return e.prototype.canDrag=function(){return!0},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}();t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(){i(this,e)}return e.prototype.canDrop=function(){return!0},e.prototype.hover=function(){},e.prototype.drop=function(){},e}();t["default"]=r,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){return new l(e)}t.__esModule=!0,t["default"]=s;var o=i(192),a=r(o),l=function(){function e(t){n(this,e),this.actions=t.getActions()}return e.prototype.setup=function(){this.didCallSetup=!0},e.prototype.teardown=function(){this.didCallTeardown=!0},e.prototype.connectDragSource=function(){return a["default"]},e.prototype.connectDragPreview=function(){return a["default"]},e.prototype.connectDropTarget=function(){return a["default"]},e.prototype.simulateBeginDrag=function(e,t){this.actions.beginDrag(e,t)},e.prototype.simulatePublishDragSource=function(){this.actions.publishDragSource()},e.prototype.simulateHover=function(e,t){this.actions.hover(e,t)},e.prototype.simulateDrop=function(){this.actions.drop()},e.prototype.simulateEndDrag=function(){this.actions.endDrag()},e}();e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e["default"]:e}t.__esModule=!0;var n=i(376);t.DragDropManager=r(n);var s=i(378);t.DragSource=r(s);var o=i(379);t.DropTarget=r(o);var a=i(380);t.createTestBackend=r(a)},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){switch(void 0===e&&(e=c),t.type){case o.BEGIN_DRAG:return s({},e,{itemType:t.itemType,item:t.item,sourceId:t.sourceId,isSourcePublic:t.isSourcePublic,dropResult:null,didDrop:!1});case o.PUBLISH_DRAG_SOURCE:return s({},e,{isSourcePublic:!0});case o.HOVER:return s({},e,{targetIds:t.targetIds});case a.REMOVE_TARGET:return e.targetIds.indexOf(t.targetId)===-1?e:s({},e,{targetIds:u["default"](e.targetIds,t.targetId)});case o.DROP:return s({},e,{dropResult:t.dropResult,didDrop:!0,targetIds:[]});case o.END_DRAG:return s({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t0&&i(c)?t>1?r(c,t-1,i,o,a):n(a,c):o||(a[a.length]=c)}return a}var n=i(180),s=i(425);e.exports=r},function(e,t,i){function r(e,t,i){return t===t?o(e,t,i):n(e,s,i)}var n=i(401),s=i(406),o=i(448);e.exports=r},function(e,t,i){function r(e,t,i){for(var r=i?o:s,d=e[0].length,p=e.length,h=p,f=Array(p),g=1/0,_=[];h--;){var y=e[h];h&&t&&(y=a(y,l(t))),g=c(y.length,g),f[h]=!i&&(t||d>=120&&y.length>=120)?new n(h&&y):void 0}y=e[0];var m=-1,v=f[0];e:for(;++m1?i[n-1]:void 0,a=n>2?i[2]:void 0;for(o=e.length>3&&"function"==typeof o?(n--,o):void 0,a&&s(i[0],i[1],a)&&(o=n<3?void 0:o,n=1),t=Object(t);++r-1}var n=i(86);e.exports=r},function(e,t,i){function r(e,t){var i=this.__data__,r=n(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this}var n=i(86);e.exports=r},function(e,t,i){function r(){this.size=0,this.__data__={hash:new n,map:new(o||s),string:new n}}var n=i(392),s=i(393),o=i(394);e.exports=r},function(e,t,i){function r(e){var t=n(this,e)["delete"](e);return this.size-=t?1:0,t}var n=i(87);e.exports=r},function(e,t,i){function r(e){return n(this,e).get(e)}var n=i(87);e.exports=r},function(e,t,i){function r(e){return n(this,e).has(e)}var n=i(87);e.exports=r},function(e,t,i){function r(e,t){var i=n(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this}var n=i(87);e.exports=r},function(e,t){function i(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}e.exports=i},function(e,t,i){(function(e){var r=i(185),n="object"==typeof t&&t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===n,a=o&&r.process,l=function(){try{return a&&a.binding("util")}catch(e){}}();e.exports=l}).call(t,i(99)(e))},function(e,t){function i(e,t){return function(i){return e(t(i))}}e.exports=i},function(e,t,i){function r(e,t,i){return t=s(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=s(r.length-t,0),l=Array(a);++o0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var r=500,n=16,s=Date.now;e.exports=i},function(e,t){function i(e,t,i){for(var r=i-1,n=e.length;++rd;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\\&\\<\\>\\"\\\'\\`]/.test(a)?(b={"<":"<",">":">",\'"\':""","\'":"'","`":"`"},c=/&(?!\\w+;)|[\\<\\>\\"\\\'\\`]/g,a.replace(c,function(a){return b[a]||"&"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1},AbstractChosen.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?""+a.group_label+""+a.html:a.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c)));return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match?this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):"":""},AbstractChosen.prototype.result_add_group=function(a){var b,c;return a.search_match||a.group_match?a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):"":""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,"\\\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+""+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+""+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\\[|\\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(){var a=this;return setTimeout(function(){return a.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(){var c,d;c=a(this),d=c.data("chosen"),"destroy"===b&&d instanceof Chosen?d.destroy():d instanceof Chosen||c.data("chosen",new Chosen(this,b))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\\w]/g,"_")+"_chosen"),this.container=a("
",c),this.is_multiple?this.container.html(\'
    \'):this.container.html(\'\'+this.default_text+\'
      \'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for=\'"+this.form_field.id+"\']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("
    • ",{"class":"search-choice"}).html(""+this.choice_label(b)+""),b.disabled?c.addClass("search-choice-disabled"):(d=a("",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(\'\'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return a("
      ").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a(\'
    • \'+this.results_none_found+\' ""
    • \'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("
      ",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}).call(this);'; },function(e,t){e.exports='/*! gridster.js - v0.5.6 - 2014-09-25 - * http://gridster.net/ - Copyright (c) 2014 ducksboard; Licensed MIT */ (function(t,i){"function"==typeof define&&define.amd?define("gridster-coords",["jquery"],i):t.GridsterCoords=i(t.$||t.jQuery)})(this,function(t){function i(i){return i[0]&&t.isPlainObject(i[0])?this.data=i[0]:this.el=i,this.isCoords=!0,this.coords={},this.init(),this}var e=i.prototype;return e.init=function(){this.set(),this.original_coords=this.get()},e.set=function(t,i){var e=this.el;if(e&&!t&&(this.data=e.offset(),this.data.width=e.width(),this.data.height=e.height()),e&&t&&!i){var s=e.offset();this.data.top=s.top,this.data.left=s.left}var r=this.data;return r.left===void 0&&(r.left=r.x1),r.top===void 0&&(r.top=r.y1),this.coords.x1=r.left,this.coords.y1=r.top,this.coords.x2=r.left+r.width,this.coords.y2=r.top+r.height,this.coords.cx=r.left+r.width/2,this.coords.cy=r.top+r.height/2,this.coords.width=r.width,this.coords.height=r.height,this.coords.el=e||!1,this},e.update=function(i){if(!i&&!this.el)return this;if(i){var e=t.extend({},this.data,i);return this.data=e,this.set(!0,!0)}return this.set(!0),this},e.get=function(){return this.coords},e.destroy=function(){this.el.removeData("coords"),delete this.el},t.fn.coords=function(){if(this.data("coords"))return this.data("coords");var t=new i(this,arguments[0]);return this.data("coords",t),t},i}),function(t,i){"function"==typeof define&&define.amd?define("gridster-collision",["jquery","gridster-coords"],i):t.GridsterCollision=i(t.$||t.jQuery,t.GridsterCoords)}(this,function(t){function i(i,s,r){this.options=t.extend(e,r),this.$element=i,this.last_colliders=[],this.last_colliders_coords=[],this.set_colliders(s),this.init()}var e={colliders_context:document.body,overlapping_region:"C"};i.defaults=e;var s=i.prototype;return s.init=function(){this.find_collisions()},s.overlaps=function(t,i){var e=!1,s=!1;return(i.x1>=t.x1&&i.x1<=t.x2||i.x2>=t.x1&&i.x2<=t.x2||t.x1>=i.x1&&t.x2<=i.x2)&&(e=!0),(i.y1>=t.y1&&i.y1<=t.y2||i.y2>=t.y1&&i.y2<=t.y2||t.y1>=i.y1&&t.y2<=i.y2)&&(s=!0),e&&s},s.detect_overlapping_region=function(t,i){var e="",s="";return t.y1>i.cy&&t.y1i.y1&&t.y2i.cx&&t.x1i.x1&&t.x2o;o++)-1===t.inArray(r[o],i)&&e.call(this,r[o]);for(var n=0,h=i.length;h>n;n++)-1===t.inArray(i[n],r)&&s.call(this,i[n])},s.find_collisions=function(i){for(var e=this,s=this.options.overlapping_region,r=[],o=[],a=this.colliders||this.$colliders,n=a.length,h=e.$element.coords().update(i||!1).get();n--;){var _=e.$colliders?t(a[n]):a[n],d=_.isCoords?_:_.coords(),l=d.get(),c=e.overlaps(h,l);if(c){var p=e.detect_overlapping_region(h,l);if(p===s||"all"===s){var g=e.calculate_overlapped_area_coords(h,l),u=e.calculate_overlapped_area(g),f={area:u,area_coords:g,region:p,coords:l,player_coords:h,el:_};e.options.on_overlap&&e.options.on_overlap.call(this,f),r.push(d),o.push(f)}}}return(e.options.on_overlap_stop||e.options.on_overlap_start)&&this.manage_colliders_start_stop(r,e.options.on_overlap_start,e.options.on_overlap_stop),this.last_colliders_coords=r,o},s.get_closest_colliders=function(t){var i=this.find_collisions(t);return i.sort(function(t,i){return"C"===t.region&&"C"===i.region?t.coords.y1this.player_max_left?o=this.player_max_left:this.player_min_left>o&&(o=this.player_min_left)),{position:{left:o,top:a},pointer:{left:e.left,top:e.top,diff_left:s+(t(window).scrollLeft()-this.win_offset_x),diff_top:r+(t(window).scrollTop()-this.win_offset_y)}}},_.get_drag_data=function(t){var i=this.get_offset(t);return i.$player=this.$player,i.$helper=this.helper?this.$helper:this.$player,i},_.set_limits=function(t){return t||(t=this.$container.width()),this.player_max_left=t-this.player_width+-this.options.offset_left,this.options.container_width=t,this},_.scroll_in=function(i,e){var o,n=r[i],h=50,_=30,d="x"===i,l=d?this.window_width:this.window_height,c=d?t(document).width():t(document).height(),p=d?this.$player.width():this.$player.height(),g=s["scroll"+a(n)](),u=g,f=u+l,w=f-h,m=u+h,y=u+e.pointer[n],v=c-l+p;return y>=w&&(o=g+_,v>o&&(s["scroll"+a(n)](o),this["scroll_offset_"+i]+=_)),m>=y&&(o=g-_,o>0&&(s["scroll"+a(n)](o),this["scroll_offset_"+i]-=_)),this},_.manage_scroll=function(t){this.scroll_in("x",t),this.scroll_in("y",t)},_.calculate_dimensions=function(){this.window_height=s.height(),this.window_width=s.width()},_.drag_handler=function(i){if(i.target.nodeName,!this.disabled&&(1===i.which||o)&&!this.ignore_drag(i)){var e=this,s=!0;return this.$player=t(i.currentTarget),this.el_init_pos=this.get_actual_pos(this.$player),this.mouse_init_pos=this.get_mouse_pos(i),this.offsetY=this.mouse_init_pos.top-this.el_init_pos.top,this.$document.on(this.pointer_events.move,function(t){var i=e.get_mouse_pos(t),r=Math.abs(i.left-e.mouse_init_pos.left),o=Math.abs(i.top-e.mouse_init_pos.top);return r>e.options.distance||o>e.options.distance?s?(s=!1,e.on_dragstart.call(e,t),!1):(e.is_dragging===!0&&e.on_dragmove.call(e,t),!1):!1}),o?void 0:!1}},_.on_dragstart=function(i){if(i.preventDefault(),this.is_dragging)return this;this.drag_start=this.is_dragging=!0;var e=this.$container.offset();return this.baseX=Math.round(e.left),this.baseY=Math.round(e.top),this.initial_container_width=this.options.container_width||this.$container.width(),"clone"===this.options.helper?(this.$helper=this.$player.clone().appendTo(this.$container).addClass("helper"),this.helper=!0):this.helper=!1,this.win_offset_y=t(window).scrollTop(),this.win_offset_x=t(window).scrollLeft(),this.scroll_offset_y=0,this.scroll_offset_x=0,this.el_init_offset=this.$player.offset(),this.player_width=this.$player.width(),this.player_height=this.$player.height(),this.set_limits(this.options.container_width),this.options.start&&this.options.start.call(this.$player,i,this.get_drag_data(i)),!1},_.on_dragmove=function(t){var i=this.get_drag_data(t);this.options.autoscroll&&this.manage_scroll(i),this.options.move_element&&(this.helper?this.$helper:this.$player).css({position:"absolute",left:i.position.left,top:i.position.top});var e=this.last_position||i.position;return i.prev_position=e,this.options.drag&&this.options.drag.call(this.$player,t,i),this.last_position=i.position,!1},_.on_dragstop=function(t){var i=this.get_drag_data(t);return this.drag_start=!1,this.options.stop&&this.options.stop.call(this.$player,t,i),this.helper&&this.options.remove_helper&&this.$helper.remove(),!1},_.on_select_start=function(t){return this.disabled||this.ignore_drag(t)?void 0:!1},_.enable=function(){this.disabled=!1},_.disable=function(){this.disabled=!0},_.destroy=function(){this.disable(),this.$container.off(this.ns),this.$document.off(this.ns),t(window).off(this.ns),t.removeData(this.$container,"drag")},_.ignore_drag=function(i){return this.options.handle?!t(i.target).is(this.options.handle):t.isFunction(this.options.ignore_dragging)?this.options.ignore_dragging(i):t(i.target).is(this.options.ignore_dragging.join(", "))},t.fn.drag=function(t){return new i(this,t)},i}),function(t,i){"function"==typeof define&&define.amd?define(["jquery","gridster-draggable","gridster-collision"],i):t.Gridster=i(t.$||t.jQuery,t.GridsterDraggable,t.GridsterCollision)}(this,function(t,i){function e(i,e){this.options=t.extend(!0,{},s,e),this.$el=t(i),this.$wrapper=this.$el.parent(),this.$widgets=this.$el.children(this.options.widget_selector).addClass("gs-w"),this.widgets=[],this.$changed=t([]),this.wrapper_width=this.$wrapper.width(),this.min_widget_width=2*this.options.widget_margins[0]+this.options.widget_base_dimensions[0],this.min_widget_height=2*this.options.widget_margins[1]+this.options.widget_base_dimensions[1],this.generated_stylesheets=[],this.$style_tags=t([]),this.options.auto_init&&this.init()}var s={namespace:"",widget_selector:"li",widget_margins:[10,10],widget_base_dimensions:[400,225],extra_rows:0,extra_cols:0,min_cols:1,max_cols:1/0,min_rows:15,max_size_x:!1,autogrow_cols:!1,autogenerate_stylesheet:!0,avoid_overlapped_widgets:!0,auto_init:!0,serialize_params:function(t,i){return{col:i.col,row:i.row,size_x:i.size_x,size_y:i.size_y}},collision:{},draggable:{items:".gs-w",distance:4,ignore_dragging:i.defaults.ignore_dragging.slice(0)},resize:{enabled:!1,axes:["both"],handle_append_to:"",handle_class:"gs-resize-handle",max_size:[1/0,1/0],min_size:[1,1]}};e.defaults=s,e.generated_stylesheets=[],e.sort_by_row_asc=function(i){return i=i.sort(function(i,e){return i.row||(i=t(i).coords().grid,e=t(e).coords().grid),i.row>e.row?1:-1})},e.sort_by_row_and_col_asc=function(t){return t=t.sort(function(t,i){return t.row>i.row||t.row===i.row&&t.col>i.col?1:-1})},e.sort_by_col_asc=function(t){return t=t.sort(function(t,i){return t.col>i.col?1:-1})},e.sort_by_row_desc=function(t){return t=t.sort(function(t,i){return t.row+t.size_yn&&this.add_faux_rows(Math.max(e-n,0));var d=o+i-1;d>this.cols&&this.add_faux_cols(d-this.cols);var l={col:_,row:r.row,size_x:i,size_y:e};return this.mutate_widget_in_gridmap(t,r,l),this.set_dom_grid_height(),this.set_dom_grid_width(),s&&s.call(this,l.size_x,l.size_y),t},r.mutate_widget_in_gridmap=function(i,e,s){e.size_x;var r=e.size_y,o=this.get_cells_occupied(e),a=this.get_cells_occupied(s),n=[];t.each(o.cols,function(i,e){-1===t.inArray(e,a.cols)&&n.push(e)});var h=[];t.each(a.cols,function(i,e){-1===t.inArray(e,o.cols)&&h.push(e)});var _=[];t.each(o.rows,function(i,e){-1===t.inArray(e,a.rows)&&_.push(e)});var d=[];if(t.each(a.rows,function(i,e){-1===t.inArray(e,o.rows)&&d.push(e)}),this.remove_from_gridmap(e),h.length){var l=[s.col,s.row,s.size_x,Math.min(r,s.size_y),i];this.empty_cells.apply(this,l)}if(d.length){var c=[s.col,s.row,s.size_x,s.size_y,i];this.empty_cells.apply(this,c)}if(e.col=s.col,e.row=s.row,e.size_x=s.size_x,e.size_y=s.size_y,this.add_to_gridmap(s,i),i.removeClass("player-revert"),i.data("coords").update({width:s.size_x*this.options.widget_base_dimensions[0]+2*(s.size_x-1)*this.options.widget_margins[0],height:s.size_y*this.options.widget_base_dimensions[1]+2*(s.size_y-1)*this.options.widget_margins[1]}),i.attr({"data-col":s.col,"data-row":s.row,"data-sizex":s.size_x,"data-sizey":s.size_y}),n.length){var p=[n[0],s.row,n.length,Math.min(r,s.size_y),i];this.remove_empty_cells.apply(this,p)}if(_.length){var g=[s.col,s.row,s.size_x,s.size_y,i];this.remove_empty_cells.apply(this,g)}return this.move_widget_up(i),this},r.empty_cells=function(i,e,s,r,o){var a=this.widgets_below({col:i,row:e-r,size_x:s,size_y:r});return a.not(o).each(t.proxy(function(i,s){var o=t(s).coords().grid;if(e+r-1>=o.row){var a=e+r-o.row;this.move_widget_down(t(s),a)}},this)),this.set_dom_grid_height(),this},r.remove_empty_cells=function(i,e,s,r,o){var a=this.widgets_below({col:i,row:e,size_x:s,size_y:r});return a.not(o).each(t.proxy(function(i,e){this.move_widget_up(t(e),r)},this)),this.set_dom_grid_height(),this},r.next_position=function(t,i){t||(t=1),i||(i=1);for(var s,r=this.gridmap,o=r.length,a=[],n=1;o>n;n++){s=r[n].length;for(var h=1;s>=h;h++){var _=this.can_move_to({size_x:t,size_y:i},n,h);_&&a.push({col:n,row:h,size_y:i,size_x:t})}}return a.length?e.sort_by_row_and_col_asc(a)[0]:!1},r.remove_widget=function(i,e,s){var r=i instanceof t?i:t(i),o=r.coords().grid;t.isFunction(e)&&(s=e,e=!1),this.cells_occupied_by_placeholder={},this.$widgets=this.$widgets.not(r);var a=this.widgets_below(r);return this.remove_from_gridmap(o),r.fadeOut(t.proxy(function(){r.remove(),e||a.each(t.proxy(function(i,e){this.move_widget_up(t(e),o.size_y)},this)),this.set_dom_grid_height(),s&&s.call(this,i)},this)),this},r.remove_all_widgets=function(i){return this.$widgets.each(t.proxy(function(t,e){this.remove_widget(e,!0,i)},this)),this},r.serialize=function(i){return i||(i=this.$widgets),i.map(t.proxy(function(i,e){var s=t(e);return this.options.serialize_params(s,s.coords().grid)},this)).get()},r.serialize_changed=function(){return this.serialize(this.$changed)},r.dom_to_coords=function(t){return{col:parseInt(t.attr("data-col"),10),row:parseInt(t.attr("data-row"),10),size_x:parseInt(t.attr("data-sizex"),10)||1,size_y:parseInt(t.attr("data-sizey"),10)||1,max_size_x:parseInt(t.attr("data-max-sizex"),10)||!1,max_size_y:parseInt(t.attr("data-max-sizey"),10)||!1,min_size_x:parseInt(t.attr("data-min-sizex"),10)||!1,min_size_y:parseInt(t.attr("data-min-sizey"),10)||!1,el:t}},r.register_widget=function(i){var e=i instanceof jQuery,s=e?this.dom_to_coords(i):i,r=!1;e||(i=s.el);var o=this.can_go_widget_up(s);return o&&(s.row=o,i.attr("data-row",o),this.$el.trigger("gridster:positionchanged",[s]),r=!0),this.options.avoid_overlapped_widgets&&!this.can_move_to({size_x:s.size_x,size_y:s.size_y},s.col,s.row)&&(t.extend(s,this.next_position(s.size_x,s.size_y)),i.attr({"data-col":s.col,"data-row":s.row,"data-sizex":s.size_x,"data-sizey":s.size_y}),r=!0),i.data("coords",i.coords()),i.data("coords").grid=s,this.add_to_gridmap(s,i),this.options.resize.enabled&&this.add_resize_handle(i),r},r.update_widget_position=function(t,i){return this.for_each_cell_occupied(t,function(t,e){return this.gridmap[t]?(this.gridmap[t][e]=i,void 0):this}),this},r.remove_from_gridmap=function(t){return this.update_widget_position(t,!1)},r.add_to_gridmap=function(i,e){if(this.update_widget_position(i,e||i.el),i.el){var s=this.widgets_below(i.el);s.each(t.proxy(function(i,e){this.move_widget_up(t(e))},this))}},r.draggable=function(){var i=this,e=t.extend(!0,{},this.options.draggable,{offset_left:this.options.widget_margins[0],offset_top:this.options.widget_margins[1],container_width:this.cols*this.min_widget_width,limit:!0,start:function(e,s){i.$widgets.filter(".player-revert").removeClass("player-revert"),i.$player=t(this),i.$helper=t(s.$helper),i.helper=!i.$helper.is(i.$player),i.on_start_drag.call(i,e,s),i.$el.trigger("gridster:dragstart")},stop:function(t,e){i.on_stop_drag.call(i,t,e),i.$el.trigger("gridster:dragstop")},drag:throttle(function(t,e){i.on_drag.call(i,t,e),i.$el.trigger("gridster:drag")},60)});return this.drag_api=this.$el.drag(e),this},r.resizable=function(){return this.resize_api=this.$el.drag({items:"."+this.options.resize.handle_class,offset_left:this.options.widget_margins[0],container_width:this.container_width,move_element:!1,resize:!0,limit:this.options.autogrow_cols?!1:!0,start:t.proxy(this.on_start_resize,this),stop:t.proxy(function(i,e){delay(t.proxy(function(){this.on_stop_resize(i,e)},this),120)},this),drag:throttle(t.proxy(this.on_resize,this),60)}),this},r.setup_resize=function(){this.resize_handle_class=this.options.resize.handle_class;var i=this.options.resize.axes,e=\'\';return this.resize_handle_tpl=t.map(i,function(t){return e.replace("{type}",t)}).join(""),t.isArray(this.options.draggable.ignore_dragging)&&this.options.draggable.ignore_dragging.push("."+this.resize_handle_class),this},r.on_start_drag=function(i,e){this.$helper.add(this.$player).add(this.$wrapper).addClass("dragging"),this.highest_col=this.get_highest_occupied_cell().col,this.$player.addClass("player"),this.player_grid_data=this.$player.coords().grid,this.placeholder_grid_data=t.extend({},this.player_grid_data),this.set_dom_grid_height(this.$el.height()+this.player_grid_data.size_y*this.min_widget_height),this.set_dom_grid_width(this.cols);var s=this.player_grid_data.size_x,r=this.cols-this.highest_col;this.options.autogrow_cols&&s>=r&&this.add_faux_cols(Math.min(s-r,1));var o=this.faux_grid,a=this.$player.data("coords").coords;this.cells_occupied_by_player=this.get_cells_occupied(this.player_grid_data),this.cells_occupied_by_placeholder=this.get_cells_occupied(this.placeholder_grid_data),this.last_cols=[],this.last_rows=[],this.collision_api=this.$helper.collision(o,this.options.collision),this.$preview_holder=t("<"+this.$player.get(0).tagName+" />",{"class":"preview-holder","data-row":this.$player.attr("data-row"),"data-col":this.$player.attr("data-col"),css:{width:a.width,height:a.height}}).appendTo(this.$el),this.options.draggable.start&&this.options.draggable.start.call(this,i,e)},r.on_drag=function(t,i){if(null===this.$player)return!1;var e={left:i.position.left+this.baseX,top:i.position.top+this.baseY};if(this.options.autogrow_cols){var s=this.placeholder_grid_data.col+this.placeholder_grid_data.size_x-1;s>=this.cols-1&&this.options.max_cols>=this.cols+1&&(this.add_faux_cols(1),this.set_dom_grid_width(this.cols+1),this.drag_api.set_limits(this.container_width)),this.collision_api.set_colliders(this.faux_grid)}this.colliders_data=this.collision_api.get_closest_colliders(e),this.on_overlapped_column_change(this.on_start_overlapping_column,this.on_stop_overlapping_column),this.on_overlapped_row_change(this.on_start_overlapping_row,this.on_stop_overlapping_row),this.helper&&this.$player&&this.$player.css({left:i.position.left,top:i.position.top}),this.options.draggable.drag&&this.options.draggable.drag.call(this,t,i)},r.on_stop_drag=function(t,i){this.$helper.add(this.$player).add(this.$wrapper).removeClass("dragging"),i.position.left=i.position.left+this.baseX,i.position.top=i.position.top+this.baseY,this.colliders_data=this.collision_api.get_closest_colliders(i.position),this.on_overlapped_column_change(this.on_start_overlapping_column,this.on_stop_overlapping_column),this.on_overlapped_row_change(this.on_start_overlapping_row,this.on_stop_overlapping_row),this.$player.addClass("player-revert").removeClass("player").attr({"data-col":this.placeholder_grid_data.col,"data-row":this.placeholder_grid_data.row}).css({left:"",top:""}),this.$changed=this.$changed.add(this.$player),this.cells_occupied_by_player=this.get_cells_occupied(this.placeholder_grid_data),this.set_cells_player_occupies(this.placeholder_grid_data.col,this.placeholder_grid_data.row),this.$player.coords().grid.row=this.placeholder_grid_data.row,this.$player.coords().grid.col=this.placeholder_grid_data.col,this.options.draggable.stop&&this.options.draggable.stop.call(this,t,i),this.$preview_holder.remove(),this.$player=null,this.$helper=null,this.placeholder_grid_data={},this.player_grid_data={},this.cells_occupied_by_placeholder={},this.cells_occupied_by_player={},this.set_dom_grid_height(),this.set_dom_grid_width(),this.options.autogrow_cols&&this.drag_api.set_limits(this.cols*this.min_widget_width)},r.on_start_resize=function(i,e){this.$resized_widget=e.$player.closest(".gs-w"),this.resize_coords=this.$resized_widget.coords(),this.resize_wgd=this.resize_coords.grid,this.resize_initial_width=this.resize_coords.coords.width,this.resize_initial_height=this.resize_coords.coords.height,this.resize_initial_sizex=this.resize_coords.grid.size_x,this.resize_initial_sizey=this.resize_coords.grid.size_y,this.resize_initial_col=this.resize_coords.grid.col,this.resize_last_sizex=this.resize_initial_sizex,this.resize_last_sizey=this.resize_initial_sizey,this.resize_max_size_x=Math.min(this.resize_wgd.max_size_x||this.options.resize.max_size[0],this.options.max_cols-this.resize_initial_col+1),this.resize_max_size_y=this.resize_wgd.max_size_y||this.options.resize.max_size[1],this.resize_min_size_x=this.resize_wgd.min_size_x||this.options.resize.min_size[0]||1,this.resize_min_size_y=this.resize_wgd.min_size_y||this.options.resize.min_size[1]||1,this.resize_initial_last_col=this.get_highest_occupied_cell().col,this.set_dom_grid_width(this.cols),this.resize_dir={right:e.$player.is("."+this.resize_handle_class+"-x"),bottom:e.$player.is("."+this.resize_handle_class+"-y")},this.$resized_widget.css({"min-width":this.options.widget_base_dimensions[0],"min-height":this.options.widget_base_dimensions[1]});var s=this.$resized_widget.get(0).tagName;this.$resize_preview_holder=t("<"+s+" />",{"class":"preview-holder resize-preview-holder","data-row":this.$resized_widget.attr("data-row"),"data-col":this.$resized_widget.attr("data-col"),css:{width:this.resize_initial_width,height:this.resize_initial_height}}).appendTo(this.$el),this.$resized_widget.addClass("resizing"),this.options.resize.start&&this.options.resize.start.call(this,i,e,this.$resized_widget),this.$el.trigger("gridster:resizestart")},r.on_stop_resize=function(i,e){this.$resized_widget.removeClass("resizing").css({width:"",height:""}),delay(t.proxy(function(){this.$resize_preview_holder.remove().css({"min-width":"","min-height":""}),this.options.resize.stop&&this.options.resize.stop.call(this,i,e,this.$resized_widget),this.$el.trigger("gridster:resizestop")},this),300),this.set_dom_grid_width(),this.options.autogrow_cols&&this.drag_api.set_limits(this.cols*this.min_widget_width)},r.on_resize=function(t,i){var e,s=i.pointer.diff_left,r=i.pointer.diff_top,o=this.options.widget_base_dimensions[0],a=this.options.widget_base_dimensions[1],n=this.options.widget_margins[0],h=this.options.widget_margins[1],_=this.resize_max_size_x,d=this.resize_min_size_x,l=this.resize_max_size_y,c=this.resize_min_size_y,p=this.options.autogrow_cols,g=1/0,u=1/0,f=Math.ceil(s/(o+2*n)-.2),w=Math.ceil(r/(a+2*h)-.2),m=Math.max(1,this.resize_initial_sizex+f),y=Math.max(1,this.resize_initial_sizey+w),v=this.container_width/this.min_widget_width-this.resize_initial_col+1,z=v*this.min_widget_width-2*n;if(m=Math.max(Math.min(m,_),d),m=Math.min(v,m),e=_*o+2*(m-1)*n,g=Math.min(e,z),min_width=d*o+2*(m-1)*n,y=Math.max(Math.min(y,l),c),u=l*a+2*(y-1)*h,min_height=c*a+2*(y-1)*h,this.resize_dir.right?y=this.resize_initial_sizey:this.resize_dir.bottom&&(m=this.resize_initial_sizex),p){var x=this.resize_initial_col+m-1;p&&x>=this.resize_initial_last_col&&(this.set_dom_grid_width(Math.max(x+1,this.cols)),x>this.cols&&this.add_faux_cols(x-this.cols))}var $={};!this.resize_dir.bottom&&($.width=Math.max(Math.min(this.resize_initial_width+s,g),min_width)),!this.resize_dir.right&&($.height=Math.max(Math.min(this.resize_initial_height+r,u),min_height)),this.$resized_widget.css($),(m!==this.resize_last_sizex||y!==this.resize_last_sizey)&&(this.resize_widget(this.$resized_widget,m,y),this.set_dom_grid_width(this.cols),this.$resize_preview_holder.css({width:"",height:""}).attr({"data-row":this.$resized_widget.attr("data-row"),"data-sizex":m,"data-sizey":y})),this.options.resize.resize&&this.options.resize.resize.call(this,t,i,this.$resized_widget),this.$el.trigger("gridster:resize"),this.resize_last_sizex=m,this.resize_last_sizey=y},r.on_overlapped_column_change=function(i,e){if(!this.colliders_data.length)return this;var s,r=this.get_targeted_columns(this.colliders_data[0].el.data.col),o=this.last_cols.length,a=r.length;for(s=0;a>s;s++)-1===t.inArray(r[s],this.last_cols)&&(i||t.noop).call(this,r[s]);for(s=0;o>s;s++)-1===t.inArray(this.last_cols[s],r)&&(e||t.noop).call(this,this.last_cols[s]);return this.last_cols=r,this},r.on_overlapped_row_change=function(i,e){if(!this.colliders_data.length)return this;var s,r=this.get_targeted_rows(this.colliders_data[0].el.data.row),o=this.last_rows.length,a=r.length;for(s=0;a>s;s++)-1===t.inArray(r[s],this.last_rows)&&(i||t.noop).call(this,r[s]);for(s=0;o>s;s++)-1===t.inArray(this.last_rows[s],r)&&(e||t.noop).call(this,this.last_rows[s]);this.last_rows=r},r.set_player=function(t,i,e){var s=this;e||this.empty_cells_player_occupies();var r=e?{col:t}:s.colliders_data[0].el.data,o=r.col,a=i||r.row;this.player_grid_data={col:o,row:a,size_y:this.player_grid_data.size_y,size_x:this.player_grid_data.size_x},this.cells_occupied_by_player=this.get_cells_occupied(this.player_grid_data);var n=this.get_widgets_overlapped(this.player_grid_data),h=this.widgets_constraints(n);if(this.manage_movements(h.can_go_up,o,a),this.manage_movements(h.can_not_go_up,o,a),!n.length){var _=this.can_go_player_up(this.player_grid_data);_!==!1&&(a=_),this.set_placeholder(o,a)}return{col:o,row:a}},r.widgets_constraints=function(i){var s,r=t([]),o=[],a=[];return i.each(t.proxy(function(i,e){var s=t(e),n=s.coords().grid;this.can_go_widget_up(n)?(r=r.add(s),o.push(n)):a.push(n)},this)),s=i.not(r),{can_go_up:e.sort_by_row_asc(o),can_not_go_up:e.sort_by_row_desc(a)}},r.manage_movements=function(i,e,s){return t.each(i,t.proxy(function(t,i){var r=i,o=r.el,a=this.can_go_widget_up(r);if(a)this.move_widget_to(o,a),this.set_placeholder(e,a+r.size_y);else{var n=this.can_go_player_up(this.player_grid_data);if(!n){var h=s+this.player_grid_data.size_y-r.row;this.move_widget_down(o,h),this.set_placeholder(e,s)}}},this)),this},r.is_player=function(t,i){if(i&&!this.gridmap[t])return!1;var e=i?this.gridmap[t][i]:t;return e&&(e.is(this.$player)||e.is(this.$helper))},r.is_player_in=function(i,e){var s=this.cells_occupied_by_player||{};return t.inArray(i,s.cols)>=0&&t.inArray(e,s.rows)>=0},r.is_placeholder_in=function(i,e){var s=this.cells_occupied_by_placeholder||{};return this.is_placeholder_in_col(i)&&t.inArray(e,s.rows)>=0},r.is_placeholder_in_col=function(i){var e=this.cells_occupied_by_placeholder||[];return t.inArray(i,e.cols)>=0},r.is_empty=function(t,i){return this.gridmap[t]!==void 0?this.gridmap[t][i]!==void 0&&this.gridmap[t][i]===!1?!0:!1:!0},r.is_occupied=function(t,i){return this.gridmap[t]?this.gridmap[t][i]?!0:!1:!1},r.is_widget=function(t,i){var e=this.gridmap[t];return e?(e=e[i],e?e:!1):!1},r.is_widget_under_player=function(t,i){return this.is_widget(t,i)?this.is_player_in(t,i):!1},r.get_widgets_under_player=function(i){i||(i=this.cells_occupied_by_player||{cols:[],rows:[]});var e=t([]);return t.each(i.cols,t.proxy(function(s,r){t.each(i.rows,t.proxy(function(t,i){this.is_widget(r,i)&&(e=e.add(this.gridmap[r][i]))},this))},this)),e},r.set_placeholder=function(i,e){var s=t.extend({},this.placeholder_grid_data),r=this.widgets_below({col:s.col,row:s.row,size_y:s.size_y,size_x:s.size_x}),o=i+s.size_x-1;o>this.cols&&(i-=o-i);var a=e>this.placeholder_grid_data.row,n=this.placeholder_grid_data.col!==i;this.placeholder_grid_data.col=i,this.placeholder_grid_data.row=e,this.cells_occupied_by_placeholder=this.get_cells_occupied(this.placeholder_grid_data),this.$preview_holder.attr({"data-row":e,"data-col":i}),(a||n)&&r.each(t.proxy(function(e,r){this.move_widget_up(t(r),this.placeholder_grid_data.col-i+s.size_y)},this));var h=this.get_widgets_under_player(this.cells_occupied_by_placeholder);h.length&&h.each(t.proxy(function(i,r){var o=t(r);this.move_widget_down(o,e+s.size_y-o.data("coords").grid.row)},this))},r.can_go_player_up=function(t){var i=t.row+t.size_y-1,e=!0,s=[],r=1e4,o=this.get_widgets_under_player();return this.for_each_column_occupied(t,function(t){var a=this.gridmap[t],n=i+1;for(s[t]=[];--n>0&&(this.is_empty(t,n)||this.is_player(t,n)||this.is_widget(t,n)&&a[n].is(o));)s[t].push(n),r=r>n?n:r;return 0===s[t].length?(e=!1,!0):(s[t].sort(function(t,i){return t-i\n}),void 0)}),e?this.get_valid_rows(t,s,r):!1},r.can_go_widget_up=function(t){var i=t.row+t.size_y-1,e=!0,s=[],r=1e4;return this.for_each_column_occupied(t,function(o){var a=this.gridmap[o];s[o]=[];for(var n=i+1;--n>0&&(!this.is_widget(o,n)||this.is_player_in(o,n)||a[n].is(t.el));)this.is_player(o,n)||this.is_placeholder_in(o,n)||this.is_player_in(o,n)||s[o].push(n),r>n&&(r=n);return 0===s[o].length?(e=!1,!0):(s[o].sort(function(t,i){return t-i}),void 0)}),e?this.get_valid_rows(t,s,r):!1},r.get_valid_rows=function(i,e,s){for(var r=i.row,o=i.row+i.size_y-1,a=i.size_y,n=s-1,h=[];o>=++n;){var _=!0;if(t.each(e,function(i,e){t.isArray(e)&&-1===t.inArray(n,e)&&(_=!1)}),_===!0&&(h.push(n),h.length===a))break}var d=!1;return 1===a?h[0]!==r&&(d=h[0]||!1):h[0]!==r&&(d=this.get_consecutive_numbers_index(h,a)),d},r.get_consecutive_numbers_index=function(t,i){for(var e=t.length,s=[],r=!0,o=-1,a=0;e>a;a++){if(r||t[a]===o+1){if(s.push(a),s.length===i)break;r=!1}else s=[],r=!0;o=t[a]}return s.length>=i?t[s[0]]:!1},r.get_widgets_overlapped=function(){var i=t([]),e=[],s=this.cells_occupied_by_player.rows.slice(0);return s.reverse(),t.each(this.cells_occupied_by_player.cols,t.proxy(function(r,o){t.each(s,t.proxy(function(s,r){if(!this.gridmap[o])return!0;var a=this.gridmap[o][r];this.is_occupied(o,r)&&!this.is_player(a)&&-1===t.inArray(a,e)&&(i=i.add(a),e.push(a))},this))},this)),i},r.on_start_overlapping_column=function(t){this.set_player(t,!1)},r.on_start_overlapping_row=function(t){this.set_player(!1,t)},r.on_stop_overlapping_column=function(t){this.set_player(t,!1);var i=this;this.for_each_widget_below(t,this.cells_occupied_by_player.rows[0],function(){i.move_widget_up(this,i.player_grid_data.size_y)})},r.on_stop_overlapping_row=function(t){this.set_player(!1,t);for(var i=this,e=this.cells_occupied_by_player.cols,s=0,r=e.length;r>s;s++)this.for_each_widget_below(e[s],t,function(){i.move_widget_up(this,i.player_grid_data.size_y)})},r.move_widget_to=function(i,e){var s=this,r=i.coords().grid;e-r.row;var o=this.widgets_below(i),a=this.can_move_to(r,r.col,e,i);return a===!1?!1:(this.remove_from_gridmap(r),r.row=e,this.add_to_gridmap(r),i.attr("data-row",e),this.$changed=this.$changed.add(i),o.each(function(i,e){var r=t(e),o=r.coords().grid,a=s.can_go_widget_up(o);a&&a!==o.row&&s.move_widget_to(r,a)}),this)},r.move_widget_up=function(i,e){var s=i.coords().grid,r=s.row,o=[];return e||(e=1),this.can_go_up(i)?(this.for_each_column_occupied(s,function(s){if(-1===t.inArray(i,o)){var a=i.coords().grid,n=r-e;if(n=this.can_go_up_to_row(a,s,n),!n)return!0;var h=this.widgets_below(i);this.remove_from_gridmap(a),a.row=n,this.add_to_gridmap(a),i.attr("data-row",a.row),this.$changed=this.$changed.add(i),o.push(i),h.each(t.proxy(function(i,s){this.move_widget_up(t(s),e)},this))}}),void 0):!1},r.move_widget_down=function(i,e){var s,r,o,a;if(0>=e)return!1;if(s=i.coords().grid,r=s.row,o=[],a=e,!i)return!1;if(-1===t.inArray(i,o)){var n=i.coords().grid,h=r+e,_=this.widgets_below(i);this.remove_from_gridmap(n),_.each(t.proxy(function(i,e){var s=t(e),r=s.coords().grid,o=this.displacement_diff(r,n,a);o>0&&this.move_widget_down(s,o)},this)),n.row=h,this.update_widget_position(n,i),i.attr("data-row",n.row),this.$changed=this.$changed.add(i),o.push(i)}},r.can_go_up_to_row=function(i,e,s){var r,o=this.gridmap,a=!0,n=[],h=i.row;if(this.for_each_column_occupied(i,function(t){for(o[t],n[t]=[],r=h;r--&&this.is_empty(t,r)&&!this.is_placeholder_in(t,r);)n[t].push(r);return n[t].length?void 0:(a=!1,!0)}),!a)return!1;for(r=s,r=1;h>r;r++){for(var _=!0,d=0,l=n.length;l>d;d++)n[d]&&-1===t.inArray(r,n[d])&&(_=!1);if(_===!0){a=r;break}}return a},r.displacement_diff=function(t,i,e){var s=t.row,r=[],o=i.row+i.size_y;this.for_each_column_occupied(t,function(t){for(var i=0,e=o;s>e;e++)this.is_empty(t,e)&&(i+=1);r.push(i)});var a=Math.max.apply(Math,r);return e-=a,e>0?e:0},r.widgets_below=function(i){var s=t.isPlainObject(i)?i:i.coords().grid,r=this;this.gridmap;var o=s.row+s.size_y-1,a=t([]);return this.for_each_column_occupied(s,function(i){r.for_each_widget_below(i,o,function(){return r.is_player(this)||-1!==t.inArray(this,a)?void 0:(a=a.add(this),!0)})}),e.sort_by_row_asc(a)},r.set_cells_player_occupies=function(t,i){return this.remove_from_gridmap(this.placeholder_grid_data),this.placeholder_grid_data.col=t,this.placeholder_grid_data.row=i,this.add_to_gridmap(this.placeholder_grid_data,this.$player),this},r.empty_cells_player_occupies=function(){return this.remove_from_gridmap(this.placeholder_grid_data),this},r.can_go_up=function(t){var i=t.coords().grid,e=i.row,s=e-1;this.gridmap;var r=!0;return 1===e?!1:(this.for_each_column_occupied(i,function(t){return this.is_widget(t,s),this.is_occupied(t,s)||this.is_player(t,s)||this.is_placeholder_in(t,s)||this.is_player_in(t,s)?(r=!1,!0):void 0}),r)},r.can_move_to=function(t,i,e,s){this.gridmap;var r=t.el,o={size_y:t.size_y,size_x:t.size_x,col:i,row:e},a=!0,n=i+t.size_x-1;return n>this.cols?!1:s&&e+t.size_y-1>s?!1:(this.for_each_cell_occupied(o,function(i,e){var s=this.is_widget(i,e);!s||t.el&&!s.is(r)||(a=!1)}),a)},r.get_targeted_columns=function(t){for(var i=(t||this.player_grid_data.col)+(this.player_grid_data.size_x-1),e=[],s=t;i>=s;s++)e.push(s);return e},r.get_targeted_rows=function(t){for(var i=(t||this.player_grid_data.row)+(this.player_grid_data.size_y-1),e=[],s=t;i>=s;s++)e.push(s);return e},r.get_cells_occupied=function(i){var e,s={cols:[],rows:[]};for(arguments[1]instanceof t&&(i=arguments[1].coords().grid),e=0;i.size_x>e;e++){var r=i.col+e;s.cols.push(r)}for(e=0;i.size_y>e;e++){var o=i.row+e;s.rows.push(o)}return s},r.for_each_cell_occupied=function(t,i){return this.for_each_column_occupied(t,function(e){this.for_each_row_occupied(t,function(t){i.call(this,e,t)})}),this},r.for_each_column_occupied=function(t,i){for(var e=0;t.size_x>e;e++){var s=t.col+e;i.call(this,s,t)}},r.for_each_row_occupied=function(t,i){for(var e=0;t.size_y>e;e++){var s=t.row+e;i.call(this,s,t)}},r._traversing_widgets=function(i,e,s,r,o){var a=this.gridmap;if(a[s]){var n,h,_=i+"/"+e;if(arguments[2]instanceof t){var d=arguments[2].coords().grid;s=d.col,r=d.row,o=arguments[3]}var l=[],c=r,p={"for_each/above":function(){for(;c--&&!(c>0&&this.is_widget(s,c)&&-1===t.inArray(a[s][c],l)&&(n=o.call(a[s][c],s,c),l.push(a[s][c]),n)););},"for_each/below":function(){for(c=r+1,h=a[s].length;h>c&&(!this.is_widget(s,c)||-1!==t.inArray(a[s][c],l)||(n=o.call(a[s][c],s,c),l.push(a[s][c]),!n));c++);}};p[_]&&p[_].call(this)}},r.for_each_widget_above=function(t,i,e){return this._traversing_widgets("for_each","above",t,i,e),this},r.for_each_widget_below=function(t,i,e){return this._traversing_widgets("for_each","below",t,i,e),this},r.get_highest_occupied_cell=function(){for(var t,i=this.gridmap,e=i[1].length,s=[],r=[],o=i.length-1;o>=1;o--)for(t=e-1;t>=1;t--)if(this.is_widget(o,t)){s.push(t),r.push(o);break}return{col:Math.max.apply(Math,r),row:Math.max.apply(Math,s)}},r.get_widgets_from=function(i,e){this.gridmap;var s=t();return i&&(s=s.add(this.$widgets.filter(function(){var e=t(this).attr("data-col");return e===i||e>i}))),e&&(s=s.add(this.$widgets.filter(function(){var i=t(this).attr("data-row");return i===e||i>e}))),s},r.set_dom_grid_height=function(t){if(t===void 0){var i=this.get_highest_occupied_cell().row;t=i*this.min_widget_height}return this.container_height=t,this.$el.css("height",this.container_height),this},r.set_dom_grid_width=function(t){t===void 0&&(t=this.get_highest_occupied_cell().col);var i=this.options.autogrow_cols?this.options.max_cols:this.cols;return t=Math.min(i,Math.max(t,this.options.min_cols)),this.container_width=t*this.min_widget_width,this.$el.css("width",this.container_width),this},r.generate_stylesheet=function(i){var s,r="",o=this.options.max_size_x||this.cols;i||(i={}),i.cols||(i.cols=this.cols),i.rows||(i.rows=this.rows),i.namespace||(i.namespace=this.options.namespace),i.widget_base_dimensions||(i.widget_base_dimensions=this.options.widget_base_dimensions),i.widget_margins||(i.widget_margins=this.options.widget_margins),i.min_widget_width=2*i.widget_margins[0]+i.widget_base_dimensions[0],i.min_widget_height=2*i.widget_margins[1]+i.widget_base_dimensions[1];var a=t.param(i);if(t.inArray(a,e.generated_stylesheets)>=0)return!1;for(this.generated_stylesheets.push(a),e.generated_stylesheets.push(a),s=i.cols;s>=0;s--)r+=i.namespace+\' [data-col="\'+(s+1)+\'"] { left:\'+(s*i.widget_base_dimensions[0]+s*i.widget_margins[0]+(s+1)*i.widget_margins[0])+"px; }\\n";for(s=i.rows;s>=0;s--)r+=i.namespace+\' [data-row="\'+(s+1)+\'"] { top:\'+(s*i.widget_base_dimensions[1]+s*i.widget_margins[1]+(s+1)*i.widget_margins[1])+"px; }\\n";for(var n=1;i.rows>=n;n++)r+=i.namespace+\' [data-sizey="\'+n+\'"] { height:\'+(n*i.widget_base_dimensions[1]+(n-1)*2*i.widget_margins[1])+"px; }\\n";for(var h=1;o>=h;h++)r+=i.namespace+\' [data-sizex="\'+h+\'"] { width:\'+(h*i.widget_base_dimensions[0]+(h-1)*2*i.widget_margins[0])+"px; }\\n";return this.remove_style_tags(),this.add_style_tag(r)},r.add_style_tag=function(t){var i=document,e=i.createElement("style");return i.getElementsByTagName("head")[0].appendChild(e),e.setAttribute("type","text/css"),e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t)),this.$style_tags=this.$style_tags.add(e),this},r.remove_style_tags=function(){var i=e.generated_stylesheets,s=this.generated_stylesheets;this.$style_tags.remove(),e.generated_stylesheets=t.map(i,function(i){return-1===t.inArray(i,s)?i:void 0})},r.generate_faux_grid=function(t,i){this.faux_grid=[],this.gridmap=[];var e,s;for(e=i;e>0;e--)for(this.gridmap[e]=[],s=t;s>0;s--)this.add_faux_cell(s,e);return this},r.add_faux_cell=function(i,e){var s=t({left:this.baseX+(e-1)*this.min_widget_width,top:this.baseY+(i-1)*this.min_widget_height,width:this.min_widget_width,height:this.min_widget_height,col:e,row:i,original_col:e,original_row:i}).coords();return t.isArray(this.gridmap[e])||(this.gridmap[e]=[]),this.gridmap[e][i]=!1,this.faux_grid.push(s),this},r.add_faux_rows=function(t){for(var i=this.rows,e=i+(t||1),s=e;s>i;s--)for(var r=this.cols;r>=1;r--)this.add_faux_cell(s,r);return this.rows=e,this.options.autogenerate_stylesheet&&this.generate_stylesheet(),this},r.add_faux_cols=function(t){var i=this.cols,e=i+(t||1);e=Math.min(e,this.options.max_cols);for(var s=i+1;e>=s;s++)for(var r=this.rows;r>=1;r--)this.add_faux_cell(r,s);return this.cols=e,this.options.autogenerate_stylesheet&&this.generate_stylesheet(),this},r.recalculate_faux_grid=function(){var i=this.$wrapper.width();return this.baseX=(t(window).width()-i)/2,this.baseY=this.$wrapper.offset().top,t.each(this.faux_grid,t.proxy(function(t,i){this.faux_grid[t]=i.update({left:this.baseX+(i.data.col-1)*this.min_widget_width,top:this.baseY+(i.data.row-1)*this.min_widget_height})},this)),this},r.get_widgets_from_DOM=function(){var i=this.$widgets.map(t.proxy(function(i,e){var s=t(e);return this.dom_to_coords(s)},this));i=e.sort_by_row_and_col_asc(i);var s=t(i).map(t.proxy(function(t,i){return this.register_widget(i)||null},this));return s.length&&this.$el.trigger("gridster:positionschanged"),this},r.generate_grid_and_stylesheet=function(){var i=this.$wrapper.width(),e=this.options.max_cols,s=Math.floor(i/this.min_widget_width)+this.options.extra_cols,r=this.$widgets.map(function(){return t(this).attr("data-col")}).get();r.length||(r=[0]);var o=Math.max.apply(Math,r);this.cols=Math.max(o,s,this.options.min_cols),1/0!==e&&e>=o&&this.cols>e&&(this.cols=e);var a=this.options.extra_rows;return this.$widgets.each(function(i,e){a+=+t(e).attr("data-sizey")}),this.rows=Math.max(a,this.options.min_rows),this.baseX=(t(window).width()-i)/2,this.baseY=this.$wrapper.offset().top,this.options.autogenerate_stylesheet&&this.generate_stylesheet(),this.generate_faux_grid(this.rows,this.cols)},r.destroy=function(i){return this.$el.removeData("gridster"),t(window).unbind(".gridster"),this.drag_api&&this.drag_api.destroy(),this.remove_style_tags(),i&&this.$el.remove(),this},t.fn.gridster=function(i){return this.each(function(){t(this).data("gridster")||t(this).data("gridster",new e(this,i))})},e});'; },function(e,t,i){!function(t,r){e.exports=r(i(1))}(this,function(e){return function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var r=i(10),n=i(3),s=i(4),o=i(7),a=i(6),l=i(2);e.exports=r["default"]||r,e.exports.DateUtils=n["default"]||n,e.exports.LocaleUtils=s["default"]||s,e.exports.WeekdayPropTypes=o.WeekdayPropTypes,e.exports.NavbarPropTypes=a.NavbarPropTypes,e.exports.PropTypes=l},function(t,i){t.exports=e},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(1);t["default"]={localeUtils:r.PropTypes.shape({formatMonthTitle:r.PropTypes.func,formatWeekdayShort:r.PropTypes.func,formatWeekdayLong:r.PropTypes.func,getFirstDayOfWeek:r.PropTypes.func})}},function(e,t){"use strict";function i(e){return new Date(e.getTime())}function r(e,t){var r=i(e);return r.setMonth(e.getMonth()+t),r}function n(e,t){return!(!e||!t)&&e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function s(e){var t=new Date;return t.setHours(0,0,0,0),e=t}function a(e,t,r){var n=i(e),s=i(t),o=i(r);return n.setHours(0,0,0,0),s.setHours(0,0,0,0),o.setHours(0,0,0,0),s1&&void 0!==arguments[1]?arguments[1]:{from:null,to:null},i=t.from,r=t.to;return i?i&&r&&n(i,r)&&n(e,i)?(i=null,r=null):r&&e1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce(function(i,r){var n=t[r];return n(e)&&i.push(r),i},[])}function u(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}function c(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,f.getFirstDayOfWeek)(),i=arguments[2],r=o(e),n=[],s=[],a=[],l=1;l<=r;l+=1)n.push(new Date(e.getFullYear(),e.getMonth(),l,12));n.forEach(function(e){s.length>0&&e.getDay()===t&&(a.push(s),s=[]),s.push(e),n.indexOf(e)===n.length-1&&a.push(s)});for(var u=a[0],c=7-u.length;c>0;c-=1){var d=(0,h.clone)(u[0]);d.setDate(u[0].getDate()-1),u.unshift(d)}for(var p=a[a.length-1],g=p.length;g<7;g+=1){var _=(0,h.clone)(p[p.length-1]);_.setDate(p[p.length-1].getDate()+1),p.push(_)}if(i&&a.length<6)for(var y=void 0,m=a.length;m<6;m+=1){y=a[a.length-1];for(var v=y[y.length-1],b=[],w=0;w<7;w+=1){var x=(0,h.clone)(v);x.setDate(v.getDate()+w+1),b.push(x)}a.push(b)}return a}function d(e){var t=(0,h.clone)(e);return t.setDate(1),t.setHours(12,0,0,0),t}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i}function o(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t0)}},{key:"allowYearChange",value:function(){return this.props.canChangeMonth}},{key:"showMonth",value:function(e,t){var i=this;this.allowMonth(e)&&this.setState({currentMonth:S.startOfMonth(e)},function(){t&&t(),i.props.onMonthChange&&i.props.onMonthChange(i.state.currentMonth)})}},{key:"showNextMonth",value:function(e){if(this.allowNextMonth()){var t=this.props.pagedNavigation?this.props.numberOfMonths:1,i=O.addMonths(this.state.currentMonth,t);this.showMonth(i,e)}}},{key:"showPreviousMonth",value:function(e){if(this.allowPreviousMonth()){var t=this.props.pagedNavigation?this.props.numberOfMonths:1,i=O.addMonths(this.state.currentMonth,-t);this.showMonth(i,e)}}},{key:"showNextYear",value:function(){if(this.allowYearChange()){var e=O.addMonths(this.state.currentMonth,12);this.showMonth(e)}}},{key:"showPreviousYear",value:function(){if(this.allowYearChange()){var e=O.addMonths(this.state.currentMonth,-12);this.showMonth(e)}}},{key:"focusFirstDayOfMonth",value:function(){this.getDayNodes()[0].focus()}},{key:"focusLastDayOfMonth",value:function(){var e=this.getDayNodes();e[e.length-1].focus()}},{key:"focusPreviousDay",value:function(e){var t=this,i=this.getDayNodes(),r=[].concat(o(i)).indexOf(e);0===r?this.showPreviousMonth(function(){return t.focusLastDayOfMonth()}):i[r-1].focus()}},{key:"focusNextDay",value:function(e){var t=this,i=this.getDayNodes(),r=[].concat(o(i)).indexOf(e);r===i.length-1?this.showNextMonth(function(){return t.focusFirstDayOfMonth()}):i[r+1].focus()}},{key:"focusNextWeek",value:function(e){var t=this,i=this.getDayNodes(),r=[].concat(o(i)).indexOf(e),n=r>i.length-8;n?this.showNextMonth(function(){var e=i.length-r,n=7-e;t.getDayNodes()[n].focus()}):i[r+7].focus()}},{key:"focusPreviousWeek",value:function(e){var t=this,i=this.getDayNodes(),r=[].concat(o(i)).indexOf(e),n=r<=6;n?this.showPreviousMonth(function(){var e=t.getDayNodes(),i=e.length-7,n=i+r;e[n].focus()}):i[r-7].focus()}},{key:"handleKeyDown",value:function(e){switch(e.persist(),e.keyCode){case I["default"].LEFT:this.showPreviousMonth();break;case I["default"].RIGHT:this.showNextMonth();break;case I["default"].UP:this.showPreviousYear();break;case I["default"].DOWN:this.showNextYear()}this.props.onKeyDown&&this.props.onKeyDown(e)}},{key:"handleDayKeyDown",value:function(e,t,i){switch(e.persist(),e.keyCode){case I["default"].LEFT:S.cancelEvent(e),this.focusPreviousDay(e.target);break;case I["default"].RIGHT:S.cancelEvent(e),this.focusNextDay(e.target);break;case I["default"].UP:S.cancelEvent(e),this.focusPreviousWeek(e.target);break;case I["default"].DOWN:S.cancelEvent(e),this.focusNextWeek(e.target);break;case I["default"].ENTER:case I["default"].SPACE:S.cancelEvent(e),this.props.onDayClick&&this.handleDayClick(e,t,i)}this.props.onDayKeyDown&&this.props.onDayKeyDown(e,t,i)}},{key:"handleDayClick",value:function(e,t,i){e.persist(),i.outside&&this.handleOutsideDayClick(t),this.props.onDayClick(e,t,i)}},{key:"handleOutsideDayClick",value:function(e){var t=this.state.currentMonth,i=this.props.numberOfMonths,r=S.getMonthsDiff(t,e);r>0&&r>=i?this.showNextMonth():r<0&&this.showPreviousMonth()}},{key:"renderNavbar",value:function(){var e=this.props,t=e.locale,i=e.localeUtils,r=e.canChangeMonth,n=e.navbarComponent,o=e.navbarElement,a=s(e,["locale","localeUtils","canChangeMonth","navbarComponent","navbarElement"]);if(!r)return null;var l={className:"DayPicker-NavBar",nextMonth:this.getNextNavigableMonth(),previousMonth:this.getPreviousNavigableMonth(),showPreviousButton:this.allowPreviousMonth(),showNextButton:this.allowNextMonth(),onNextClick:this.showNextMonth,onPreviousClick:this.showPreviousMonth,dir:a.dir,locale:t,localeUtils:i};return o?h["default"].cloneElement(o,l):h["default"].createElement(n,l)}},{key:"renderDayInMonth",value:function(e,t){var i=[];O.isSameDay(e,new Date)&&i.push("today"),e.getMonth()!==t.getMonth()&&i.push("outside"),i=[].concat(o(i),o(S.getModifiersForDay(e,S.getModifiersFromProps(this.props))));var r=e.getMonth()!==t.getMonth(),n=null;this.props.onDayClick&&!r&&(n=-1,1===e.getDate()&&(n=this.props.tabIndex));var s=""+e.getFullYear()+e.getMonth()+e.getDate();return h["default"].createElement(x["default"],{key:""+(r?"outside-":"")+s,day:e,modifiers:i,empty:r&&!this.props.enableOutsideDays&&!this.props.fixedWeeks,tabIndex:n,ariaLabel:this.props.localeUtils.formatDay(e,this.props.locale),ariaDisabled:r||i.indexOf("disabled")>-1,ariaSelected:i.indexOf("selected")>-1,onMouseEnter:this.props.onDayMouseEnter,onMouseLeave:this.props.onDayMouseLeave,onKeyDown:this.handleDayKeyDown,onTouchStart:this.props.onDayTouchStart,onTouchEnd:this.props.onDayTouchEnd,onFocus:this.props.onDayFocus,onClick:this.props.onDayClick?this.handleDayClick:void 0},this.props.renderDay(e))}},{key:"renderMonths",value:function(){for(var e=[],t=this.props.localeUtils.getFirstDayOfWeek(this.props.locale),i=0;i1&&e.fromMonth){var r=S.getMonthsDiff(e.fromMonth,i);i=O.addMonths(e.fromMonth,Math.floor(r/e.numberOfMonths)*e.numberOfMonths)}return{currentMonth:i}},this.dayPicker=null};t["default"]=A},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e){var t=e.month,i=e.locale,r=e.localeUtils,n=e.captionElement,s=e.onCaptionClick,a=e.children,l=e.firstDayOfWeek,u=e.className,p=e.wrapperClassName,h=e.weekClassName,f=e.weekdayComponent,g=e.weekdayElement,_=e.fixedWeeks,y={date:t,localeUtils:r,locale:i,onClick:s?function(e){return s(e,t)}:void 0},m=(0,d.getWeekArray)(t,l,_);return o["default"].createElement("div",{className:u},o["default"].cloneElement(n,y),o["default"].createElement(c["default"],{locale:i,localeUtils:r,weekdayComponent:f,weekdayElement:g}),o["default"].createElement("div",{className:p,role:"grid"},m.map(function(e,i){return o["default"].createElement("div",{key:i,className:h,role:"gridcell"},e.map(function(e){return a(e,t)}))})))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n;var s=i(1),o=r(s),a=i(2),l=r(a),u=i(12),c=r(u),d=i(5);n.propTypes={month:s.PropTypes.instanceOf(Date).isRequired,captionElement:s.PropTypes.node.isRequired,firstDayOfWeek:s.PropTypes.number.isRequired,locale:s.PropTypes.string.isRequired,localeUtils:l["default"].localeUtils.isRequired,onCaptionClick:s.PropTypes.func,children:s.PropTypes.func.isRequired,className:s.PropTypes.string,wrapperClassName:s.PropTypes.string,weekClassName:s.PropTypes.string,weekdayComponent:s.PropTypes.func,weekdayElement:s.PropTypes.element,fixedWeeks:s.PropTypes.bool}},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e){for(var t=e.locale,i=e.localeUtils,r=e.weekdayComponent,n=e.weekdayElement,s=[],a=0;a<7;a+=1){var l={key:a,className:"DayPicker-Weekday",weekday:a,localeUtils:i,locale:t},u=n?o["default"].cloneElement(n,l):o["default"].createElement(r,l);s.push(u)}return o["default"].createElement("div",{className:"DayPicker-Weekdays",role:"rowgroup"},o["default"].createElement("div",{className:"DayPicker-WeekdaysRow",role:"columnheader"},s))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n;var s=i(1),o=r(s),a=i(2),l=r(a);n.propTypes={locale:s.PropTypes.string.isRequired,localeUtils:l["default"].localeUtils.isRequired,weekdayComponent:s.PropTypes.func,weekdayElement:s.PropTypes.element}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={LEFT:37,UP:38,RIGHT:39,DOWN:40,ENTER:13,SPACE:32}},function(e,t){"use strict";function i(e,t){var i=!1;return function(){for(var r=arguments.length,n=Array(r),s=0;s0},e.prototype.leave=function(e){var t=this.entered.length;return this.entered=l["default"](this.entered.filter(function(e){return document.documentElement.contains(e)}),e),t>0&&0===this.entered.length},e.prototype.reset=function(){this.entered=[]},e}();t["default"]=u,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{"default":e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=i(452),a=n(o),l=i(471),u=n(l),c=i(464),d=n(c),p=i(194),h=i(468),f=i(467),g=i(124),_=r(g),y=function(){function e(t){s(this,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},this.enterLeaveCounter=new d["default"],this.getSourceClientOffset=this.getSourceClientOffset.bind(this),this.handleTopDragStart=this.handleTopDragStart.bind(this),this.handleTopDragStartCapture=this.handleTopDragStartCapture.bind(this),this.handleTopDragEndCapture=this.handleTopDragEndCapture.bind(this),this.handleTopDragEnter=this.handleTopDragEnter.bind(this),this.handleTopDragEnterCapture=this.handleTopDragEnterCapture.bind(this),this.handleTopDragLeaveCapture=this.handleTopDragLeaveCapture.bind(this),this.handleTopDragOver=this.handleTopDragOver.bind(this),this.handleTopDragOverCapture=this.handleTopDragOverCapture.bind(this),this.handleTopDrop=this.handleTopDrop.bind(this),this.handleTopDropCapture=this.handleTopDropCapture.bind(this),this.handleSelectStart=this.handleSelectStart.bind(this),this.endDragIfSourceWasRemovedFromDOM=this.endDragIfSourceWasRemovedFromDOM.bind(this),this.endDragNativeItem=this.endDragNativeItem.bind(this)}return e.prototype.setup=function(){if("undefined"!=typeof window){if(this.constructor.isSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.constructor.isSetUp=!0,this.addEventListeners(window)}},e.prototype.teardown=function(){"undefined"!=typeof window&&(this.constructor.isSetUp=!1,this.removeEventListeners(window),this.clearCurrentDragSourceNode())},e.prototype.addEventListeners=function(e){e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.removeEventListeners=function(e){e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.connectDragPreview=function(e,t,i){var r=this;return this.sourcePreviewNodeOptions[e]=i,this.sourcePreviewNodes[e]=t,function(){delete r.sourcePreviewNodes[e],delete r.sourcePreviewNodeOptions[e]}},e.prototype.connectDragSource=function(e,t,i){var r=this;this.sourceNodes[e]=t,this.sourceNodeOptions[e]=i;var n=function(t){return r.handleDragStart(t,e)},s=function(t){return r.handleSelectStart(t,e)};return t.setAttribute("draggable",!0),t.addEventListener("dragstart",n),t.addEventListener("selectstart",s),function(){delete r.sourceNodes[e],delete r.sourceNodeOptions[e],t.removeEventListener("dragstart",n),t.removeEventListener("selectstart",s),t.setAttribute("draggable",!1)}},e.prototype.connectDropTarget=function(e,t){var i=this,r=function(t){return i.handleDragEnter(t,e)},n=function(t){return i.handleDragOver(t,e)},s=function(t){return i.handleDrop(t,e)};return t.addEventListener("dragenter",r),t.addEventListener("dragover",n),t.addEventListener("drop",s),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",n),t.removeEventListener("drop",s)}},e.prototype.getCurrentSourceNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions[e];return a["default"](t||{},{dropEffect:"move"})},e.prototype.getCurrentDropEffect=function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect},e.prototype.getCurrentSourcePreviewNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions[e];return a["default"](t||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})},e.prototype.getSourceClientOffset=function(e){return h.getNodeClientOffset(this.sourceNodes[e])},e.prototype.isDraggingNativeItem=function(){var e=this.monitor.getItemType();return Object.keys(_).some(function(t){return _[t]===e})},e.prototype.beginDragNativeItem=function(e){this.clearCurrentDragSourceNode();var t=f.createNativeDragSource(e);this.currentNativeSource=new t,this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle]),p.isFirefox()&&window.addEventListener("mousemove",this.endDragNativeItem,!0)},e.prototype.endDragNativeItem=function(){this.isDraggingNativeItem()&&(p.isFirefox()&&window.removeEventListener("mousemove",this.endDragNativeItem,!0),this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},e.prototype.endDragIfSourceWasRemovedFromDOM=function(){var e=this.currentDragSourceNode;document.body.contains(e)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.setCurrentDragSourceNode=function(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.currentDragSourceNodeOffset=h.getNodeClientOffset(e),this.currentDragSourceNodeOffsetChanged=!1,window.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},e.prototype.clearCurrentDragSourceNode=function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0),!0)},e.prototype.checkIfCurrentDragSourceRectChanged=function(){var e=this.currentDragSourceNode;return!!e&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!u["default"](h.getNodeClientOffset(e),this.currentDragSourceNodeOffset),this.currentDragSourceNodeOffsetChanged))},e.prototype.handleTopDragStartCapture=function(){this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},e.prototype.handleDragStart=function(e,t){this.dragStartSourceIds.unshift(t)},e.prototype.handleTopDragStart=function(e){var t=this,i=this.dragStartSourceIds;this.dragStartSourceIds=null;var r=h.getEventClientOffset(e);this.actions.beginDrag(i,{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});var n=e.dataTransfer,s=f.matchNativeItemType(n);if(this.monitor.isDragging()){if("function"==typeof n.setDragImage){var o=this.monitor.getSourceId(),a=this.sourceNodes[o],l=this.sourcePreviewNodes[o]||a,u=this.getCurrentSourcePreviewNodeOptions(),c=u.anchorX,d=u.anchorY,p={anchorX:c,anchorY:d},g=h.getDragPreviewOffset(a,l,r,p);n.setDragImage(l,g.x,g.y)}try{n.setData("application/json",{})}catch(_){}this.setCurrentDragSourceNode(e.target);var y=this.getCurrentSourcePreviewNodeOptions(),m=y.captureDraggingState;m?this.actions.publishDragSource():setTimeout(function(){return t.actions.publishDragSource()})}else if(s)this.beginDragNativeItem(s);else{if(!(n.types||e.target.hasAttribute&&e.target.hasAttribute("draggable")))return;e.preventDefault()}},e.prototype.handleTopDragEndCapture=function(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.handleTopDragEnterCapture=function(e){this.dragEnterTargetIds=[];var t=this.enterLeaveCounter.enter(e.target);if(t&&!this.monitor.isDragging()){var i=e.dataTransfer,r=f.matchNativeItemType(i);r&&this.beginDragNativeItem(r)}},e.prototype.handleDragEnter=function(e,t){this.dragEnterTargetIds.unshift(t)},e.prototype.handleTopDragEnter=function(e){var t=this,i=this.dragEnterTargetIds;if(this.dragEnterTargetIds=[],this.monitor.isDragging()){p.isFirefox()||this.actions.hover(i,{clientOffset:h.getEventClientOffset(e)});var r=i.some(function(e){return t.monitor.canDropOnTarget(e)});r&&(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect())}},e.prototype.handleTopDragOverCapture=function(){this.dragOverTargetIds=[]; },e.prototype.handleDragOver=function(e,t){this.dragOverTargetIds.unshift(t)},e.prototype.handleTopDragOver=function(e){var t=this,i=this.dragOverTargetIds;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer.dropEffect="none");this.actions.hover(i,{clientOffset:h.getEventClientOffset(e)});var r=i.some(function(e){return t.monitor.canDropOnTarget(e)});r?(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect()):this.isDraggingNativeItem()?(e.preventDefault(),e.dataTransfer.dropEffect="none"):this.checkIfCurrentDragSourceRectChanged()&&(e.preventDefault(),e.dataTransfer.dropEffect="move")},e.prototype.handleTopDragLeaveCapture=function(e){this.isDraggingNativeItem()&&e.preventDefault();var t=this.enterLeaveCounter.leave(e.target);t&&this.isDraggingNativeItem()&&this.endDragNativeItem()},e.prototype.handleTopDropCapture=function(e){this.dropTargetIds=[],e.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer),this.enterLeaveCounter.reset()},e.prototype.handleDrop=function(e,t){this.dropTargetIds.unshift(t)},e.prototype.handleTopDrop=function(e){var t=this.dropTargetIds;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:h.getEventClientOffset(e)}),this.actions.drop(),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()},e.prototype.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},e}();t["default"]=y,e.exports=t["default"]},function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(t,r){i(this,e);for(var n=t.length,s=[],o=0;oe))return i[u];l=u-1}}o=Math.max(0,l);var d=e-t[o],p=d*d;return i[o]+r[o]*d+n[o]*p+s[o]*d*p},e}();t["default"]=r,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t,i){var r=t.reduce(function(t,i){return t||e.getData(i)},null);return null!=r?r:i}function a(e){var t=p[e],i=t.exposeProperty,r=t.matchesTypes,o=t.getData;return function(){function e(){n(this,e),this.item=Object.defineProperties({},s({},i,{get:function(){return console.warn("Browser doesn't allow reading \""+i+'" until the drop event.'),null},configurable:!0,enumerable:!0}))}return e.prototype.mutateItemByReadingDataTransfer=function(e){delete this.item[i],this.item[i]=o(e,r)},e.prototype.canDrag=function(){return!0},e.prototype.beginDrag=function(){return this.item},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}()}function l(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(p).filter(function(e){var i=p[e].matchesTypes;return i.some(function(e){return t.indexOf(e)>-1})})[0]||null}t.__esModule=!0;var u;t.createNativeDragSource=a,t.matchNativeItemType=l;var c=i(124),d=r(c),p=(u={},s(u,d.FILE,{exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files)}}),s(u,d.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return o(e,t,"").split("\n")}}),s(u,d.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){return o(e,t,"")}}),u)},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e){var t=e.nodeType===c?e:e.parentElement;if(!t)return null;var i=t.getBoundingClientRect(),r=i.top,n=i.left;return{x:n,y:r}}function s(e){return{x:e.clientX,y:e.clientY}}function o(e,t,i,r){var s="IMG"===t.nodeName&&(a.isFirefox()||!document.documentElement.contains(t)),o=s?e:t,l=n(o),c={x:i.x-l.x,y:i.y-l.y},d=e.offsetWidth,p=e.offsetHeight,h=r.anchorX,f=r.anchorY,g=s?t.width:d,_=s?t.height:p;a.isSafari()&&s?(_/=window.devicePixelRatio,g/=window.devicePixelRatio):a.isFirefox()&&!s&&(_*=window.devicePixelRatio,g*=window.devicePixelRatio);var y=new u["default"]([0,.5,1],[c.x,c.x/d*g,c.x+g-d]),m=new u["default"]([0,.5,1],[c.y,c.y/p*_,c.y+_-p]),v=y.interpolate(h),b=m.interpolate(f);return a.isSafari()&&s&&(b+=(window.devicePixelRatio-1)*_),{x:v,y:b}}t.__esModule=!0,t.getNodeClientOffset=n,t.getEventClientOffset=s,t.getDragPreviewOffset=o;var a=i(194),l=i(466),u=r(l),c=1},function(e,t){"use strict";function i(){return r||(r=new Image,r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),r}t.__esModule=!0,t["default"]=i;var r=void 0;e.exports=t["default"]},function(e,t,i){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{"default":e}}function s(e){return new a["default"](e)}t.__esModule=!0,t["default"]=s;var o=i(465),a=n(o),l=i(469),u=n(l),c=i(124),d=r(c);t.NativeTypes=d,t.getEmptyImage=u["default"]},function(e,t){"use strict";function i(e,t){if(e===t)return!0;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(var n=Object.prototype.hasOwnProperty,s=0;s-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',u.join(", "),t),a["default"]("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])}),c.forEach(function(t){a["default"]("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])});var t=function(){function t(e){n(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrag=function(){return!e.canDrag||e.canDrag(this.props,this.monitor)},t.prototype.isDragging=function(t,i){return e.isDragging?e.isDragging(this.props,this.monitor):i===t.getSourceId()},t.prototype.beginDrag=function(){var t=e.beginDrag(this.props,this.monitor,this.component);return t},t.prototype.endDrag=function(){e.endDrag&&e.endDrag(this.props,this.monitor,this.component)},t}();return function(e){return new t(e)}}t.__esModule=!0,t["default"]=s;var o=i(31),a=r(o),l=i(50),u=(r(l),["canDrag","beginDrag","canDrag","isDragging","endDrag"]),c=["beginDrag"];e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){return new c(e)}t.__esModule=!0,t["default"]=s;var o=i(31),a=r(o),l=!1,u=!1,c=function(){function e(t){n(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.sourceId=e},e.prototype.canDrag=function(){a["default"](!l,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");try{return l=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{l=!1}},e.prototype.isDragging=function(){a["default"](!u,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");try{return u=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{u=!1}},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem()},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e){function t(){a&&(a(),a=null),r&&n&&(a=e.connectDropTarget(r,n,s))}function i(e){e!==r&&(r=e,t())}var r=void 0,n=void 0,s=void 0,a=void 0,u=o["default"]({dropTarget:function(e,i){e===n&&l["default"](i,s)||(n=e,s=i,t())}});return{receiveHandlerId:i,hooks:u}}t.__esModule=!0,t["default"]=n;var s=i(200),o=r(s),a=i(195),l=r(a);e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){Object.keys(e).forEach(function(t){a["default"](u.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',u.join(", "),t),a["default"]("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html",t,t,e[t])});var t=function(){function t(e){n(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveMonitor=function(e){this.monitor=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrop=function(){return!e.canDrop||e.canDrop(this.props,this.monitor)},t.prototype.hover=function(){e.hover&&e.hover(this.props,this.monitor,this.component)},t.prototype.drop=function(){if(e.drop){var t=e.drop(this.props,this.monitor,this.component);return t}},t}();return function(e){return new t(e)}}t.__esModule=!0,t["default"]=s;var o=i(31),a=r(o),l=i(50),u=(r(l),["canDrop","hover","drop"]);e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){return new u(e)}t.__esModule=!0,t["default"]=s;var o=i(31),a=r(o),l=!1,u=function(){function e(t){n(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.targetId=e},e.prototype.canDrop=function(){a["default"](!l,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drop-target-monitor.html");try{return l=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{l=!1}},e.prototype.isOver=function(e){return this.internalMonitor.isOverTarget(this.targetId,e)},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem()},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();e.exports=t["default"]},function(e,t){"use strict";function i(e,t,i){function r(){n.removeSource(s)}var n=i.getRegistry(),s=n.addSource(e,t);return{handlerId:s,unregister:r}}t.__esModule=!0,t["default"]=i,e.exports=t["default"]},function(e,t){"use strict";function i(e,t,i){function r(){n.removeTarget(s)}var n=i.getRegistry(),s=n.addTarget(e,t);return{handlerId:s,unregister:r}}t.__esModule=!0,t["default"]=i,e.exports=t["default"]},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){var i=e.ref;return o["default"]("string"!=typeof i,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
      . Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),i?a.cloneElement(e,{ref:function(e){t(e),i&&i(e)}}):a.cloneElement(e,{ref:t})}t.__esModule=!0,t["default"]=n;var s=i(31),o=r(s),a=i(1);e.exports=t["default"]},function(e,t,i){"use strict";var r=Object.assign||function(e){for(var t=1;tn.bottom||r.top-1)return!1;if(this.props.filterOption)return this.props.filterOption.call(this,e,i);var t=String(e[this.props.valueKey]),n=String(e[this.props.labelKey]);return this.props.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase(),i=i.toLowerCase()),i&&"start"!==this.props.matchPos?"label"!==this.props.matchProp&&t.indexOf(i)>=0||"value"!==this.props.matchProp&&n.indexOf(i)>=0:"label"!==this.props.matchProp&&t.substr(0,i.length)===i||"value"!==this.props.matchProp&&n.substr(0,i.length)===i};return(e||[]).filter(n,this)},selectFocusedOption:function(){return this.props.allowCreate&&!this.state.focusedOption?this.selectValue(this.state.inputValue):this.state.focusedOption?this.selectValue(this.state.focusedOption):void 0},focusOption:function(e){this.setState({focusedOption:e})},focusNextOption:function(){this.focusAdjacentOption("next")},focusPreviousOption:function(){this.focusAdjacentOption("previous")},focusAdjacentOption:function(e){this._focusedOptionReveal=!0;var t=this.state.filteredOptions.filter(function(e){return!e.disabled});if(!this.state.isOpen)return void this.setState({isOpen:!0,inputValue:"",focusedOption:this.state.focusedOption||t["next"===e?0:t.length-1]},this._bindCloseMenuIfClickedOutside);if(t.length){for(var i=-1,r=0;r-1&&i0?t[i-1]:t[t.length-1]),this.setState({focusedOption:n})}},unfocusOption:function(e){this.state.focusedOption===e&&this.setState({focusedOption:null})},buildMenu:function(){var e=this,t=this.state.focusedOption?this.state.focusedOption[this.props.valueKey]:null,i=this.props.optionRenderer;i||(i=function(t){return t[e.props.labelKey]}),this.state.filteredOptions.length>0&&(t=null==t?this.state.filteredOptions[0]:t);var r=this.state.filteredOptions;if(this.props.allowCreate&&this.state.inputValue.trim()){var s=this.state.inputValue;r=r.slice();var o=this.props.newOptionCreator?this.props.newOptionCreator(s):{value:s,label:s,create:!0};r.unshift(o)}var l=Object.keys(r).map(function(e){var s=r[e],o=this.state.value===s[this.props.valueKey],l=t===s[this.props.valueKey],u=a({"Select-option":!0,"is-selected":o,"is-focused":l,"is-disabled":s.disabled}),c=l?"focused":null,d=this.focusOption.bind(this,s),p=this.unfocusOption.bind(this,s),h=this.selectValue.bind(this,s),f=n.createElement(this.props.optionComponent,{key:"option-"+s[this.props.valueKey],className:u,renderFunc:i,mouseEnter:d,mouseLeave:p,mouseDown:h,click:h,addLabelText:this.props.addLabelText,option:s,ref:c});return f},this);if(l.length)return l;var u,c;return this.isLoading()?(c="Select-searching",u=this.props.searchingText):this.state.inputValue||!this.props.asyncOptions?(c="Select-noresults",u=this.props.noResultsText):(c="Select-search-prompt",u=this.props.searchPromptText),n.createElement("div",{className:c},u)},handleOptionLabelClick:function(e,t){this.props.onOptionLabelClick&&this.props.onOptionLabelClick(e,t)},isLoading:function(){return this.props.isLoading||this.state.isLoading},render:function(){var e=a("Select",this.props.className,{"Select--multi":this.props.multi,"is-searchable":this.props.searchable,"is-open":this.state.isOpen,"is-focused":this.state.isFocused,"is-loading":this.isLoading(),"is-disabled":this.props.disabled,"has-value":this.state.value}),t=[];if(this.props.multi&&this.state.values.forEach(function(e){var i=this.handleOptionLabelClick.bind(this,e),r=this.removeValue.bind(this,e),s=n.createElement(this.props.valueComponent,{key:e.value,option:e,renderer:this.props.valueRenderer,optionLabelClick:!!this.props.onOptionLabelClick,onOptionLabelClick:i,onRemove:r,disabled:this.props.disabled});t.push(s)},this),!(this.state.inputValue||this.props.multi&&t.length)){var i=this.state.values[0]||null;if(this.props.valueRenderer&&this.state.values.length)t.push(n.createElement(l,{key:0,option:i,renderer:this.props.valueRenderer,disabled:this.props.disabled}));else{var s=n.createElement(this.props.singleValueComponent,{key:"placeholder",value:i,placeholder:this.state.placeholder});t.push(s)}}var u,c,d=this.isLoading()?n.createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},n.createElement("span",{className:"Select-loading"})):null,p=this.props.clearable&&this.state.value&&!this.props.disabled&&!this.isLoading()?n.createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchEnd:this.clearValue,onClick:this.clearValue},n.createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}})):null,h=n.createElement("span",{className:"Select-arrow-zone",onMouseDown:this.handleMouseDownOnArrow},n.createElement("span",{className:"Select-arrow",onMouseDown:this.handleMouseDownOnArrow}));this.state.isOpen&&(c={ref:"menu",className:"Select-menu",onMouseDown:this.handleMouseDownOnMenu},u=n.createElement("div",{ref:"selectMenuContainer",className:"Select-menu-outer"},n.createElement("div",c,this.buildMenu())));var f,g={ref:"input",className:"Select-input "+(this.props.inputProps.className||""),tabIndex:this.props.tabIndex||0,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur};for(var _ in this.props.inputProps)this.props.inputProps.hasOwnProperty(_)&&"className"!==_&&(g[_]=this.props.inputProps[_]);return this.props.disabled?this.props.multi&&this.state.values.length||(f=n.createElement("div",{className:"Select-input"}," ")):f=this.props.searchable?n.createElement(o,r({value:this.state.inputValue,onChange:this.handleInputChange,minWidth:"5"},g)):n.createElement("div",g," "),n.createElement("div",{ref:"wrapper",className:e},n.createElement("input",{type:"hidden",ref:"value",name:this.props.name,value:this.state.value,disabled:this.props.disabled}),n.createElement("div",{className:"Select-control",ref:"control",onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleMouseDown},t,f,d,p,h),u)}});e.exports=p},function(e,t,i){"use strict";var r=i(1),n=i(75),s=r.createClass({displayName:"SingleValue",propTypes:{placeholder:r.PropTypes.string,value:r.PropTypes.object},render:function(){var e=n("Select-placeholder",this.props.value&&this.props.value.className);return r.createElement("div",{className:e,style:this.props.value&&this.props.value.style,title:this.props.value&&this.props.value.title},this.props.placeholder)}});e.exports=s},function(e,t,i){"use strict";var r=i(1),n=i(75),s=r.createClass({displayName:"Value",propTypes:{disabled:r.PropTypes.bool,onOptionLabelClick:r.PropTypes.func,onRemove:r.PropTypes.func,option:r.PropTypes.object.isRequired,optionLabelClick:r.PropTypes.bool,renderer:r.PropTypes.func},blockEvent:function(e){e.stopPropagation()},handleOnRemove:function(e){this.props.disabled||this.props.onRemove(e)},render:function(){var e=this.props.option.label;return this.props.renderer&&(e=this.props.renderer(this.props.option)),this.props.onRemove||this.props.optionLabelClick?(this.props.optionLabelClick&&(e=r.createElement("a",{className:n("Select-item-label__a",this.props.option.className),onMouseDown:this.blockEvent,onTouchEnd:this.props.onOptionLabelClick,onClick:this.props.onOptionLabelClick,style:this.props.option.style,title:this.props.option.title},e)),r.createElement("div",{className:n("Select-item",this.props.option.className),style:this.props.option.style,title:this.props.option.title},r.createElement("span",{className:"Select-item-icon",onMouseDown:this.blockEvent,onClick:this.handleOnRemove,onTouchEnd:this.handleOnRemove},"×"),r.createElement("span",{className:"Select-item-label"},e))):r.createElement("div",{className:n("Select-value",this.props.option.className),style:this.props.option.style,title:this.props.option.title},e)}});e.exports=s},function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t,i){function r(){y===_&&(y=_.slice())}function s(){return g}function a(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return r(),y.push(e),function(){if(t){t=!1,r();var i=y.indexOf(e);y.splice(i,1)}}}function c(e){if(!(0,o["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(m)throw new Error("Reducers may not dispatch actions.");try{m=!0,g=f(g,e)}finally{m=!1}for(var t=_=y,i=0;i