@adaguc/react-webmapjs-layermanager
Version:
React component which can manage the layers displayed in an react-webmapjs component.
37 lines • 316 kB
JavaScript
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("@adaguc/react-webmapjs"),require("react-redux"),require("redux"));else if("function"==typeof define&&define.amd)define(["react","react-webmapjs","react-redux","redux"],t);else{var n="object"==typeof exports?t(require("react"),require("@adaguc/react-webmapjs"),require("react-redux"),require("redux")):t(e.react,e["react-webmapjs"],e["react-redux"],e.redux);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,function(e,t,n,r){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=27)}([function(e,t,n){e.exports=n(16)()},function(t,n){t.exports=e},function(e,t,n){var r;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var i=a.apply(null,r);i&&e.push(i)}else if("object"===o)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,n){e.exports=t},function(e,t,n){"use strict";(function(e){var n,r,a,o="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},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s="undefined"!=typeof Symbol?Symbol("immer-nothing"):(a=!0,(r="immer-nothing")in(n={})?Object.defineProperty(n,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[r]=a,n),u="undefined"!=typeof Symbol?Symbol("immer-draftable"):"__$immer_draftable",c="undefined"!=typeof Symbol?Symbol("immer-state"):"__$immer_state";function d(e){return!!e&&!!e[c]}function p(e){if(!e||"object"!==(void 0===e?"undefined":o(e)))return!1;if(Array.isArray(e))return!0;var t=Object.getPrototypeOf(e);return!t||t===Object.prototype||(!!e[u]||!!e.constructor[u])}var f=Object.assign||function(e,t){for(var n in t)y(t,n)&&(e[n]=t[n]);return e},h="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function m(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Array.isArray(e))return e.slice();var n=Object.create(Object.getPrototypeOf(e));return h(e).forEach(function(r){if(r!==c){var a=Object.getOwnPropertyDescriptor(e,r);if(a.get){if(!t)throw new Error("Immer drafts cannot have computed properties");a.value=a.get.call(e)}a.enumerable?n[r]=a.value:Object.defineProperty(n,r,{value:a.value,writable:!0,configurable:!0})}}),n}function g(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t(n,e[n],e);else h(e).forEach(function(n){return t(n,e[n],e)})}function v(e,t){return Object.getOwnPropertyDescriptor(e,t).enumerable}function y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function b(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}var E={},T=[],x=function(){return T[T.length-1]};function w(e,t){var n=Array.isArray(e),r=_(e);g(r,function(t){!function(e,t,n){var r=E[t];r?r.enumerable=n:E[t]=r={configurable:!0,enumerable:n,get:function(){return function(e,t){C(e);var n=O(e)[t];if(!e.finalizing&&n===e.base[t]&&p(n))return N(e),e.copy[t]=w(n,e);return n}(this[c],t)},set:function(e){!function(e,t,n){if(C(e),e.assigned[t]=!0,!e.modified){if(b(O(e)[t],n))return;S(e),N(e)}e.copy[t]=n}(this[c],t,e)}};Object.defineProperty(e,t,r)}(r,t,n||v(e,t))});var a,o,i,l={scope:t?t.scope:x(),modified:!1,finalizing:!1,finalized:!1,assigned:{},parent:t,base:e,draft:r,copy:null,revoke:k,revoked:!1};return a=r,o=c,i=l,Object.defineProperty(a,o,{value:i,enumerable:!1,writable:!0}),l.scope.push(l),r}function k(){this.revoked=!0}function O(e){return e.copy||e.base}function S(e){e.modified||(e.modified=!0,e.parent&&S(e.parent))}function N(e){e.copy||(e.copy=_(e.base))}function _(e){var t=e&&e[c];if(t){t.finalizing=!0;var n=m(t.draft,!0);return t.finalizing=!1,n}return m(e)}function C(e){if(!0===e.revoked)throw new Error("Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+JSON.stringify(O(e)))}function M(e){for(var t=e.base,n=e.draft,r=Object.keys(n),a=r.length-1;a>=0;a--)if(void 0===t[r[a]]&&!y(t,r[a]))return!0;return r.length!==Object.keys(t).length}function P(e){var t=e.draft;if(t.length!==e.base.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var R=Object.freeze({scopes:T,currentScope:x,willFinalize:function(e,t,n){var r=x();r.forEach(function(e){return e.finalizing=!0}),void 0!==e&&e!==t||(n&&function e(t){if(t&&"object"===(void 0===t?"undefined":o(t))){var n=t[c];if(n){var r=n.base,a=n.draft,i=n.assigned;if(Array.isArray(t)){if(P(n)){if(S(n),i.length=!0,a.length<r.length)for(var l=a.length;l<r.length;l++)i[l]=!1;else for(var s=r.length;s<a.length;s++)i[s]=!0;for(var u=0;u<a.length;u++)void 0===i[u]&&e(a[u])}}else Object.keys(a).forEach(function(t){void 0!==r[t]||y(r,t)?i[t]||e(a[t]):(i[t]=!0,S(n))}),Object.keys(r).forEach(function(e){void 0!==a[e]||y(a,e)||(i[e]=!1,S(n))})}}}(t),function(e){for(var t=e.length-1;t>=0;t--){var n=e[t];!1===n.modified&&(Array.isArray(n.base)?P(n)&&S(n):M(n)&&S(n))}}(r))},createDraft:w}),j=[],D=function(){return j[j.length-1]};function I(e,t){var n={scope:t?t.scope:D(),modified:!1,finalized:!1,assigned:{},parent:t,base:e,draft:null,drafts:{},copy:null,revoke:null},r=Array.isArray(e)?Proxy.revocable([n],L):Proxy.revocable(n,A),a=r.revoke,o=r.proxy;return n.draft=o,n.revoke=a,n.scope.push(n),o}var A={get:function(e,t){if(t===c)return e;var n=e.drafts;if(!e.modified&&y(n,t))return n[t];var r=z(e)[t];if(e.finalized||!p(r))return r;if(e.modified){if(r!==e.base[t])return r;n=e.copy}return n[t]=I(r,e)},has:function(e,t){return t in z(e)},ownKeys:function(e){return Reflect.ownKeys(z(e))},set:function(e,t,n){if(!e.modified){var r=n?b(e.base[t],n)||n===e.drafts[t]:b(e.base[t],n)&&t in e.base;if(r)return!0;F(e)}return e.assigned[t]=!0,e.copy[t]=n,!0},deleteProperty:function(e,t){(void 0!==e.base[t]||t in e.base)&&(e.assigned[t]=!1,F(e));e.copy&&delete e.copy[t];return!0},getOwnPropertyDescriptor:function(e,t){var n=z(e),r=Reflect.getOwnPropertyDescriptor(n,t);r&&(r.writable=!0,r.configurable=!Array.isArray(n)||"length"!==t);return r},defineProperty:function(){throw new Error("Object.defineProperty() cannot be used on an Immer draft")},getPrototypeOf:function(e){return Object.getPrototypeOf(e.base)},setPrototypeOf:function(){throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft")}},L={};function z(e){return e.copy||e.base}function F(e){e.modified||(e.modified=!0,e.copy=f(m(e.base),e.drafts),e.drafts=null,e.parent&&F(e.parent))}g(A,function(e,t){L[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),L.deleteProperty=function(e,t){if(isNaN(parseInt(t)))throw new Error("Immer only supports deleting array indices");return A.deleteProperty.call(this,e[0],t)},L.set=function(e,t,n){if("length"!==t&&isNaN(parseInt(t)))throw new Error("Immer only supports setting array indices and the 'length' property");return A.set.call(this,e[0],t,n)};var W=Object.freeze({scopes:j,currentScope:D,willFinalize:function(){},createDraft:I});function U(e,t,n,r){Array.isArray(e.base)?function(e,t,n,r){for(var a=e.base,o=e.copy,i=e.assigned,l=Math.min(a.length,o.length),s=0;s<l;s++)if(i[s]&&a[s]!==o[s]){var u=t.concat(s);n.push({op:"replace",path:u,value:o[s]}),r.push({op:"replace",path:u,value:a[s]})}if(l<o.length){for(var c=l;c<o.length;c++)n.push({op:"add",path:t.concat(c),value:o[c]});r.push({op:"replace",path:t.concat("length"),value:a.length})}else if(l<a.length){n.push({op:"replace",path:t.concat("length"),value:o.length});for(var d=l;d<a.length;d++)r.push({op:"add",path:t.concat(d),value:a[d]})}}(e,t,n,r):function(e,t,n,r){var a=e.base,o=e.copy;g(e.assigned,function(e,i){var l=a[e],s=o[e],u=i?e in a?"replace":"add":"remove";if(l!==s||"replace"!==u){var c=t.concat(e);n.push("remove"===u?{op:u,path:c}:{op:u,path:c,value:s}),r.push("add"===u?{op:"remove",path:c}:"remove"===u?{op:"add",path:c,value:l}:{op:"replace",path:c,value:l})}})}(e,t,n,r)}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n],a=r.path;if(0===a.length&&"replace"===r.op)e=r.value;else{for(var i=e,l=0;l<a.length-1;l++)if(!(i=i[a[l]])||"object"!==(void 0===i?"undefined":o(i)))throw new Error("Cannot apply patch, path doesn't resolve: "+a.join("/"));var s=a[a.length-1];switch(r.op){case"replace":case"add":i[s]=r.value;break;case"remove":if(Array.isArray(i)){if(s!==i.length-1)throw new Error("Only the last index of an array can be removed, index: "+s+", length: "+i.length);i.length-=1}else delete i[s];break;default:throw new Error("Unsupported patch operation: "+r.op)}}}return e}var H={useProxies:"undefined"!=typeof Proxy&&"undefined"!=typeof Reflect,autoFreeze:void 0===e&&"verifyMinified"===function(){}.name,onAssign:null,onDelete:null,onCopy:null},Y=new(function(){function e(t){i(this,e),f(this,H,t),this.setUseProxies(this.useProxies),this.produce=this.produce.bind(this)}return l(e,[{key:"produce",value:function(e,t,n){var r=this;if("function"==typeof e&&"function"!=typeof t){var a=t;return t=e,function(){for(var e=arguments.length,n=Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;return r.produce(i,function(e){var r;return(r=t).call.apply(r,[e,e].concat(n))})}}if("function"!=typeof t)throw new Error("if first argument is not a function, the second argument to produce should be a function");if(void 0!==n&&"function"!=typeof n)throw new Error("the third argument of a producer should not be set or a function");var o=void 0;if(p(e)){this.scopes.push([]);var i=this.createDraft(e);try{o=t.call(i,i),this.willFinalize(o,i,!!n);var l=n&&[],u=n&&[];if(void 0===o||o===i)o=this.finalize(i,[],l,u);else{if(i[c].modified)throw new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.");p(o)&&(o=this.finalize(o)),n&&(l.push({op:"replace",path:[],value:o}),u.push({op:"replace",path:[],value:e}))}}finally{this.currentScope().forEach(function(e){return e.revoke()}),this.scopes.pop()}n&&n(l,u)}else if(void 0===(o=t(e)))return e;return o===s?void 0:o}},{key:"setAutoFreeze",value:function(e){this.autoFreeze=e}},{key:"setUseProxies",value:function(e){this.useProxies=e,f(this,e?W:R)}},{key:"applyPatches",value:function(e,t){return d(e)?B(e,t):this.produce(e,function(e){return B(e,t)})}},{key:"finalize",value:function(e,t,n,r){var a=this,o=e[c];if(!o)return Object.isFrozen(e)?e:this.finalizeTree(e);if(o.scope!==this.currentScope())return e;if(!o.modified)return o.base;if(!o.finalized){if(o.finalized=!0,this.finalizeTree(o.draft,t,n,r),this.onDelete)if(this.useProxies){var i=o.assigned;for(var l in i)i[l]||this.onDelete(o,l)}else{var s=o.base,u=o.copy;g(s,function(e){y(u,e)||a.onDelete(o,e)})}this.onCopy&&this.onCopy(o),this.autoFreeze&&1===this.scopes.length&&Object.freeze(o.copy),n&&U(o,t,n,r)}return o.copy}},{key:"finalizeTree",value:function(e,t,n,r){var a=this,o=e[c];o&&(this.useProxies||(o.finalizing=!0,o.copy=m(o.draft,!0),o.finalizing=!1),e=o.copy);var i=this.onAssign;return g(e,function l(s,u,c){if(u===c)throw Error("Immer forbids circular references");var f=!!o&&c===e;if(d(u)){if(u=n&&f&&!o.assigned[s]?a.finalize(u,t.concat(s),n,r):a.finalize(u),Array.isArray(c)||v(c,s)?c[s]=u:Object.defineProperty(c,s,{value:u}),f&&u===o.base[s])return}else{if(f&&b(u,o.base[s]))return;p(u)&&!Object.isFrozen(u)&&g(u,l)}f&&i&&i(o,s,u)}),e}}]),e}()),V=Y.produce;Y.setAutoFreeze.bind(Y),Y.setUseProxies.bind(Y),Y.applyPatches.bind(Y);t.a=V}).call(this,n(15))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IconStack=t.Icon=t.default=void 0,n(18);var r=o(n(19)),a=o(n(20));function o(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,t.Icon=r.default,t.IconStack=a.default},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(21)},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t,n){!function(e,t,n,r){"use strict";function a(e,t){return e(t={exports:{}},t.exports),t.exports}n=n&&n.hasOwnProperty("default")?n.default:n;var o=a(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}e.exports=t}),i=function(e){if(Array.isArray(e))return e},l=function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n},s=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=function(e,t){return i(e)||l(e,t)||s()},c=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},d=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){c(e,t,n[t])})}return e},p=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h=function(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e},m=a(function(e){function t(e){return(t="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})(e)}function n(r){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=n=function(e){return t(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},n(r)}e.exports=n}),g=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},v=function(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?g(e):t},y=a(function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}),b=a(function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t}),E=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)},T=function(e,t,n,r,a,o,i,l){if(void 0===t)throw new Error("invariant requires an error message argument");if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,l],c=0;(s=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}},x=function(){function e(){p(this,e),c(this,"refs",{})}return h(e,[{key:"add",value:function(e,t){this.refs[e]||(this.refs[e]=[]),this.refs[e].push(t)}},{key:"remove",value:function(e,t){var n=this.getIndex(e,t);-1!==n&&this.refs[e].splice(n,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var e=this;return this.refs[this.active.collection].find(function(t){var n=t.node;return n.sortableInfo.index==e.active.index})}},{key:"getIndex",value:function(e,t){return this.refs[e].indexOf(t)}},{key:"getOrderedRefs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(w)}}]),e}();function w(e,t){var n=e.node.sortableInfo.index,r=t.node.sortableInfo.index;return n-r}var k=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}},O=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)},S=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")},N=function(e){return k(e)||O(e)||S()};function _(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.keys(e).reduce(function(t,r){return-1===n.indexOf(r)&&(t[r]=e[r]),t},{})}var C={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},M=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];switch(t){case"ms":return"ms";default:return t&&t.length?t[0].toUpperCase()+t.substr(1):""}}();function P(e,t){Object.keys(t).forEach(function(n){e.style[n]=t[n]})}function R(e,t){e.style["".concat(M,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function j(e,t){e.style["".concat(M,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function D(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function I(e,t,n){return Math.max(e,Math.min(n,t))}function A(e){return"px"===e.substr(-2)?parseFloat(e):0}function L(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function z(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function F(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function W(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var r={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?r:W(e.parentNode,t,r)}}function U(e){var t=e.lockOffset,n=e.width,r=e.height,a=t,o=t,i="px";if("string"==typeof t){var l=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);T(null!==l,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),a=parseFloat(t),o=parseFloat(t),i=l[1]}return T(isFinite(a)&&isFinite(o),"lockOffset value should be a finite. Given %s",t),"%"===i&&(a=a*n/100,o=o*r/100),{x:a,y:o}}function B(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find(function(e){return n.test(t[e])})}(e)?e:B(e.parentNode):null}var H={TAB:9,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40},Y={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function V(e){var n,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return a=n=function(n){function a(){return p(this,a),v(this,y(a).apply(this,arguments))}return E(a,n),h(a,[{key:"componentDidMount",value:function(){var e=r.findDOMNode(this);e.sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return T(i.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var n=i.withRef?"wrappedInstance":null;return t.createElement(e,o({ref:n},this.props))}}]),a}(t.Component),c(n,"displayName",L("sortableHandle",e)),a}function G(e){return null!=e.sortableHandle}var q=function(){function e(t,n){p(this,e),this.container=t,this.onScrollCallback=n}return h(e,[{key:"clear",value:function(){clearInterval(this.interval),this.interval=null}},{key:"update",value:function(e){var t=this,n=e.translate,r=e.minTranslate,a=e.maxTranslate,o=e.width,i=e.height,l={x:0,y:0},s={x:1,y:1},u={x:10,y:10},c=this.container,d=c.scrollTop,p=c.scrollLeft,f=c.scrollHeight,h=c.scrollWidth,m=c.clientHeight,g=c.clientWidth,v=0===d,y=f-d-m==0,b=0===p,E=h-p-g==0;n.y>=a.y-i/2&&!y?(l.y=1,s.y=u.y*Math.abs((a.y-i/2-n.y)/i)):n.x>=a.x-o/2&&!E?(l.x=1,s.x=u.x*Math.abs((a.x-o/2-n.x)/o)):n.y<=r.y+i/2&&!v?(l.y=-1,s.y=u.y*Math.abs((n.y-i/2-r.y)/i)):n.x<=r.x+o/2&&!b&&(l.x=-1,s.x=u.x*Math.abs((n.x-o/2-r.x)/o)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===l.x&&0===l.y||(this.interval=setInterval(function(){t.isAutoScrolling=!0;var e={left:s.x*l.x,top:s.y*l.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)},5))}}]),e}(),K={axis:n.oneOf(["x","y","xy"]),contentWindow:n.any,disableAutoscroll:n.bool,distance:n.number,getContainer:n.func,getHelperDimensions:n.func,helperClass:n.string,helperContainer:n.oneOfType([n.func,"undefined"==typeof HTMLElement?n.any:n.instanceOf(HTMLElement)]),hideSortableGhost:n.bool,keyboardSortingTransitionDuration:n.number,lockAxis:n.string,lockOffset:n.oneOfType([n.number,n.string,n.arrayOf(n.oneOfType([n.number,n.string]))]),lockToContainerEdges:n.bool,onSortEnd:n.func,onSortMove:n.func,onSortOver:n.func,onSortStart:n.func,pressDelay:n.number,pressThreshold:n.number,shouldCancelStart:n.func,transitionDuration:n.number,updateBeforeSortStart:n.func,useDragHandle:n.bool,useWindowAsScrollContainer:n.bool},J={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,shouldCancelStart:function(e){return-1!==[Y.Input,Y.Textarea,Y.Select,Y.Option,Y.Button].indexOf(e.target.tagName)||!!D(e.target,function(e){return"true"===e.contentEditable})},transitionDuration:300,useWindowAsScrollContainer:!1},Q=Object.keys(K);function X(e){var a,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return i=a=function(n){function a(e){var t;return p(this,a),t=v(this,y(a).call(this,e)),c(g(g(t)),"handleStart",function(e){var n=t.props,r=n.distance,a=n.shouldCancelStart;if(2!==e.button&&!a(e)){t.touched=!0,t.position=F(e);var o=D(e.target,function(e){return null!=e.sortableInfo});if(o&&o.sortableInfo&&t.nodeIsChild(o)&&!t.state.sorting){var i=t.props.useDragHandle,l=o.sortableInfo,s=l.index,u=l.collection,c=l.disabled;if(c)return;if(i&&!D(e.target,G))return;t.manager.active={collection:u,index:s},function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}(e)||e.target.tagName!==Y.Anchor||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout(function(){return t.handlePress(e)},t.props.pressDelay))}}}),c(g(g(t)),"nodeIsChild",function(e){return e.sortableInfo.manager===t.manager}),c(g(g(t)),"handleMove",function(e){var n=t.props,r=n.distance,a=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var o=F(e),i={x:t.position.x-o.x,y:t.position.y-o.y},l=Math.abs(i.x)+Math.abs(i.y);t.delta=i,r||a&&!(l>=a)?r&&l>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}}),c(g(g(t)),"handleEnd",function(){t.touched=!1,t.cancel()}),c(g(g(t)),"cancel",function(){var e=t.props.distance,n=t.state.sorting;n||(e||clearTimeout(t.pressTimer),t.manager.active=null)}),c(g(g(t)),"handlePress",function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n,r,a,u,g,v,y=f.sortableInfo.index,b=(n=f,{bottom:A((r=window.getComputedStyle(n)).marginBottom),left:A(r.marginLeft),right:A(r.marginRight),top:A(r.marginTop)}),E=t.scrollContainer.getBoundingClientRect(),T=i({collection:h,index:y,node:f});if(t.node=f,t.margin=b,t.width=T.width,t.height=T.height,t.marginOffset={x:t.margin.left+t.margin.right,y:Math.max(t.margin.top,t.margin.bottom)},t.boundingClientRect=f.getBoundingClientRect(),t.containerBoundingRect=E,t.index=y,t.newIndex=y,t.axis={x:o.indexOf("x")>=0,y:o.indexOf("y")>=0},t.offsetEdge=W(f,t.container),t.initialOffset=F(m?d({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild((u="input, textarea, select, canvas, [contenteditable]",g=(a=f).querySelectorAll(u),v=a.cloneNode(!0),N(v.querySelectorAll(u)).forEach(function(e,t){"file"!==e.type&&(e.value=g[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),e.tagName===Y.Canvas&&g[t].width>0&&g[t].height>0&&e.getContext("2d").drawImage(g[t],0,0)}),v)),P(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-b.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-b.top,"px"),width:"".concat(t.width,"px")}),m&&t.helper.focus(),s&&(t.sortableGhost=f,P(f,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},m){var x=p?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,w=x.top,k=x.left,O=x.width,S=x.height,_=w+S,M=k+O;t.axis.x&&(t.minTranslate.x=k-t.boundingClientRect.left,t.maxTranslate.x=M-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=w-t.boundingClientRect.top,t.maxTranslate.y=_-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(p?0:E.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(p?t.contentWindow.innerWidth:E.left+E.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(p?0:E.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(p?t.contentWindow.innerHeight:E.top+E.height)-t.boundingClientRect.top-t.height/2);l&&l.split(" ").forEach(function(e){return t.helper.classList.add(e)}),t.listenerNode=e.touches?f:t.contentWindow,m?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(C.move.forEach(function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)}),C.end.forEach(function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)})),t.setState({sorting:!0,sortingIndex:y}),c&&c({node:f,index:y,collection:h,isKeySorting:m},e),m&&t.keyMove(0)},a=t.props,o=a.axis,i=a.getHelperDimensions,l=a.helperClass,s=a.hideSortableGhost,u=a.updateBeforeSortStart,c=a.onSortStart,p=a.useWindowAsScrollContainer,f=n.node,h=n.collection,m=t.manager.isKeySorting,g=function(){if("function"==typeof u){t._awaitingUpdateBeforeSortStart=!0;var n=function(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}(function(){var t=f.sortableInfo.index;return Promise.resolve(u({collection:h,index:t,node:f,isKeySorting:m},e)).then(function(){})},function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n});if(n&&n.then)return n.then(function(){})}}();return g&&g.then?g.then(r):r()}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}),c(g(g(t)),"handleSortMove",function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)}),c(g(g(t)),"handleSortEnd",function(e){var n=t.props,r=n.hideSortableGhost,a=n.onSortEnd,o=t.manager,i=o.active.collection,l=o.isKeySorting,s=t.manager.refs[i];t.listenerNode&&(l?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(C.move.forEach(function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)}),C.end.forEach(function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)}))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&P(t.sortableGhost,{opacity:"",visibility:""});for(var u=0,c=s.length;u<c;u++){var d=s[u],p=d.node;d.edgeOffset=null,d.boundingClientRect=null,R(p,null),j(p,null),d.translate=null}t.autoScroller.clear(),t.manager.active=null,t.manager.isKeySorting=!1,t.setState({sorting:!1,sortingIndex:null}),"function"==typeof a&&a({collection:i,newIndex:t.newIndex,oldIndex:t.index,isKeySorting:l},e),t.touched=!1}),c(g(g(t)),"autoscroll",function(){var e=t.props.disableAutoscroll,n=t.manager.isKeySorting;if(!e){if(n){var r=d({},t.translate),a=0,o=0;return t.axis.x&&(r.x=Math.min(t.maxTranslate.x,Math.max(t.minTranslate.x,t.translate.x)),a=t.translate.x-r.x),t.axis.y&&(r.y=Math.min(t.maxTranslate.y,Math.max(t.minTranslate.y,t.translate.y)),o=t.translate.y-r.y),t.translate=r,R(t.helper,t.translate),t.scrollContainer.scrollLeft+=a,void(t.scrollContainer.scrollTop+=o)}t.autoScroller.update({height:t.height,maxTranslate:t.maxTranslate,minTranslate:t.minTranslate,translate:t.translate,width:t.width})}}),c(g(g(t)),"onAutoScroll",function(e){t.translate.x+=e.left,t.translate.y+=e.top,t.animateNodes()}),c(g(g(t)),"handleKeyDown",function(e){var n=e.keyCode,r=t.props.shouldCancelStart;if((!t.manager.active||t.manager.isKeySorting)&&(t.manager.active||n===H.SPACE&&!r(e)&&t.isValidSortingTarget(e)))switch(e.stopPropagation(),e.preventDefault(),n){case H.SPACE:t.manager.active?t.keyDrop(e):t.keyLift(e);break;case H.DOWN:case H.RIGHT:t.keyMove(1);break;case H.UP:case H.LEFT:t.keyMove(-1);break;case H.ESC:t.newIndex=t.manager.active.index,t.keyDrop(e)}}),c(g(g(t)),"keyLift",function(e){var n=e.target,r=D(n,function(e){return null!=e.sortableInfo}),a=r.sortableInfo,o=a.index,i=a.collection;t.initialFocusedNode=n,t.manager.isKeySorting=!0,t.manager.active={index:o,collection:i},t.handlePress(e)}),c(g(g(t)),"keyMove",function(e){var n=t.manager.getOrderedRefs(),r=n[n.length-1].node.sortableInfo.index,a=t.newIndex+e,o=t.newIndex;if(!(a<0||a>r)){t.prevIndex=o,t.newIndex=a;var i=function(e,t,n){return e<n&&e>t?e-1:e>n&&e<t?e+1:e}(t.newIndex,t.prevIndex,t.index),l=n.find(function(e){var t=e.node;return t.sortableInfo.index===i}),s=l.node,u=t.containerScrollDelta,c=l.boundingClientRect||z(s,u),d=l.translate||{x:0,y:0},p={top:c.top+d.y-u.top,left:c.left+d.x-u.left},f=o<a,h={x:f&&t.axis.x?s.offsetWidth-t.width:0,y:f&&t.axis.y?s.offsetHeight-t.height:0};t.handleSortMove({pageX:p.left+h.x,pageY:p.top+h.y,ignoreTransition:0===e})}}),c(g(g(t)),"keyDrop",function(e){t.handleSortEnd(e),t.initialFocusedNode&&t.initialFocusedNode.focus()}),c(g(g(t)),"handleKeyEnd",function(e){t.manager.active&&t.keyDrop(e)}),c(g(g(t)),"isValidSortingTarget",function(e){var n=t.props.useDragHandle,r=e.target,a=D(r,function(e){return null!=e.sortableInfo});return a&&a.sortableInfo&&!a.sortableInfo.disabled&&(n?G(r):r.sortableInfo)}),function(e){T(!(e.distance&&e.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}(e),t.state={},t.manager=new x,t.events={end:t.handleEnd,move:t.handleMove,start:t.handleStart},t}return E(a,n),h(a,[{key:"getChildContext",value:function(){return{manager:this.manager}}},{key:"componentDidMount",value:function(){var e=this,t=this.props.useWindowAsScrollContainer,n=this.getContainer();Promise.resolve(n).then(function(n){e.container=n,e.document=e.container.ownerDocument||document;var r=e.props.contentWindow||e.document.defaultView||window;e.contentWindow="function"==typeof r?r():r,e.scrollContainer=t?e.document.scrollingElement||e.document.documentElement:B(e.container)||e.container,e.autoScroller=new q(e.scrollContainer,e.onAutoScroll),Object.keys(e.events).forEach(function(t){return C[t].forEach(function(n){return e.container.addEventListener(n,e.events[t],!1)})}),e.container.addEventListener("keydown",e.handleKeyDown)})}},{key:"componentWillUnmount",value:function(){var e=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.container&&(Object.keys(this.events).forEach(function(t){return C[t].forEach(function(n){return e.container.removeEventListener(n,e.events[t])})}),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(e){var t=this.props,n=t.lockAxis,r=t.lockOffset,a=t.lockToContainerEdges,o=t.transitionDuration,i=t.keyboardSortingTransitionDuration,l=void 0===i?o:i,s=this.manager.isKeySorting,c=e.ignoreTransition,d=F(e),p={x:d.x-this.initialOffset.x,y:d.y-this.initialOffset.y};if(p.y-=window.pageYOffset-this.initialWindowScroll.top,p.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=p,a){var f=function(e){var t=e.height,n=e.width,r=e.lockOffset,a=Array.isArray(r)?r:[r,r];T(2===a.length,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",r);var o=u(a,2),i=o[0],l=o[1];return[U({height:t,lockOffset:i,width:n}),U({height:t,lockOffset:l,width:n})]}({height:this.height,lockOffset:r,width:this.width}),h=u(f,2),m=h[0],g=h[1],v={x:this.width/2-m.x,y:this.height/2-m.y},y={x:this.width/2-g.x,y:this.height/2-g.y};p.x=I(this.minTranslate.x+v.x,this.maxTranslate.x-y.x,p.x),p.y=I(this.minTranslate.y+v.y,this.maxTranslate.y-y.y,p.y)}"x"===n?p.y=0:"y"===n&&(p.x=0),s&&l&&!c&&j(this.helper,l),R(this.helper,p)}},{key:"animateNodes",value:function(){var e=this.props,t=e.transitionDuration,n=e.hideSortableGhost,r=e.onSortOver,a=this.containerScrollDelta,o=this.windowScrollDelta,i=this.manager.getOrderedRefs(),l={left:this.offsetEdge.left+this.translate.x+a.left,top:this.offsetEdge.top+this.translate.y+a.top},s=this.manager.isKeySorting,u=this.newIndex;this.newIndex=null;for(var c=0,d=i.length;c<d;c++){var p=i[c].node,f=p.sortableInfo.index,h=p.offsetWidth,m=p.offsetHeight,g={height:this.height>m?m/2:this.height/2,width:this.width>h?h/2:this.width/2},v=s&&f>this.index&&f<=u,y=s&&f<this.index&&f>=u,b={x:0,y:0},E=i[c].edgeOffset;E||(E=W(p,this.container),i[c].edgeOffset=E,s&&(i[c].boundingClientRect=z(p,a)));var T=c<i.length-1&&i[c+1],x=c>0&&i[c-1];T&&!T.edgeOffset&&(T.edgeOffset=W(T.node,this.container),s&&(T.boundingClientRect=z(T.node,a))),f!==this.index?(t&&j(p,t),this.axis.x?this.axis.y?y||f<this.index&&(l.left+o.left-g.width<=E.left&&l.top+o.top<=E.top+g.height||l.top+o.top+g.height<=E.top)?(b.x=this.width+this.marginOffset.x,E.left+b.x>this.containerBoundingRect.width-g.width&&T&&(b.x=T.edgeOffset.left-E.left,b.y=T.edgeOffset.top-E.top),null===this.newIndex&&(this.newIndex=f)):(v||f>this.index&&(l.left+o.left+g.width>=E.left&&l.top+o.top+g.height>=E.top||l.top+o.top+g.height>=E.top+m))&&(b.x=-(this.width+this.marginOffset.x),E.left+b.x<this.containerBoundingRect.left+g.width&&x&&(b.x=x.edgeOffset.left-E.left,b.y=x.edgeOffset.top-E.top),this.newIndex=f):v||f>this.index&&l.left+o.left+g.width>=E.left?(b.x=-(this.width+this.marginOffset.x),this.newIndex=f):(y||f<this.index&&l.left+o.left<=E.left+g.width)&&(b.x=this.width+this.marginOffset.x,null==this.newIndex&&(this.newIndex=f)):this.axis.y&&(v||f>this.index&&l.top+o.top+g.height>=E.top?(b.y=-(this.height+this.marginOffset.y),this.newIndex=f):(y||f<this.index&&l.top+o.top<=E.top+g.height)&&(b.y=this.height+this.marginOffset.y,null==this.newIndex&&(this.newIndex=f))),R(p,b),i[c].translate=b):n&&(this.sortableGhost=p,P(p,{opacity:0,visibility:"hidden"}))}null==this.newIndex&&(this.newIndex=this.index),s&&(this.newIndex=u);var w=s?this.prevIndex:u;r&&this.newIndex!==w&&r({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:w,isKeySorting:s})}},{key:"getWrappedInstance",value:function(){return T(l.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call"),this.refs.wrappedInstance}},{key:"getContainer",value:function(){var e=this.props.getContainer;return"function"!=typeof e?r.findDOMNode(this):e(l.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var n=l.withRef?"wrappedInstance":null;return t.createElement(e,o({ref:n},_(this.props,Q)))}},{key:"helperContainer",get:function(){var e=this.props.helperContainer;return"function"==typeof e?e():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){var e=this.props.useWindowAsScrollContainer;return e?{left:0,top:0}:{left:this.scrollContainer.scrollLeft-this.initialScroll.left,top:this.scrollContainer.scrollTop-this.initialScroll.top}}},{key:"windowScrollDelta",get:function(){return{left:this.contentWindow.pageXOffset-this.initialWindowScroll.left,top:this.contentWindow.pageYOffset-this.initialWindowScroll.top}}}]),a}(t.Component),c(a,"displayName",L("sortableList",e)),c(a,"defaultProps",J),c(a,"propTypes",K),c(a,"childContextTypes",{manager:n.object.isRequired}),i}var $={index:n.number.isRequired,collection:n.oneOfType([n.number,n.string]),disabled:n.bool},Z=Object.keys($);function ee(e){var a,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return i=a=function(n){function a(){return p(this,a),v(this,y(a).apply(this,arguments))}return E(a,n),h(a,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,a=e.index,o=r.findDOMNode(this);o.sortableInfo={collection:t,disabled:n,index:a,manager:this.context.manager},this.node=o,this.ref={node:o},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return T(l.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var n=l.withRef?"wrappedInstance":null;return t.createElement(e,o({ref:n},_(this.props,Z)))}}]),a}(t.Component),c(a,"displayName",L("sortableElement",e)),c(a,"contextTypes",{manager:n.object.isRequired}),c(a,"propTypes",$),c(a,"defaultProps",{collection:0}),i}e.SortableContainer=X,e.sortableContainer=X,e.SortableElement=ee,e.sortableElement=ee,e.SortableHandle=V,e.sortableHandle=V,e.arrayMove=function(e,t,n){return"undefined"!=typeof console&&console.warn("Deprecation warning: arrayMove will no longer be exported by 'react-sortable-hoc' in the next major release. Please install the `array-move` package locally instead. https://www.npmjs.com/package/array-move"),(e=e.slice()).splice(n<0?e.length+n:n,0,e.splice(t,1)[0]),e},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(1),n(0),n(6))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";(function(e){for(
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.15.0
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
var n="undefined"!=typeof window&&"undefined"!=typeof document,r=["Edge","Trident","Firefox"],a=0,o=0;o<r.length;o+=1)if(n&&navigator.userAgent.indexOf(r[o])>=0){a=1;break}var i=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},a))}};function l(e){return e&&"[object Function]"==={}.toString.call(e)}function s(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function u(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function c(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=s(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/(auto|scroll|overlay)/.test(n+a+r)?e:c(u(e))}var d=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?d:10===e?p:d||p}function h(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===s(n,"position")?h(n):n:e?e.ownerDocument.documentElement:document.documentElement}function m(e){return null!==e.parentNode?m(e.parentNode):e}function g(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,a=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(a,0);var i,l,s=o.commonAncestorContainer;if(e!==s&&t!==s||r.contains(a))return"BODY"===(l=(i=s).nodeName)||"HTML"!==l&&h(i.firstElementChild)!==i?h(s):s;var u=m(e);return u.host?g(u.host,t):g(e,m(t).host)}function v(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var r=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||r)[t]}return e[t]}function y(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function b(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function E(e){var t=e.body,n=e.documentElement,r=f(10)&&getComputedStyle(n);return{height:b("Height",t,n,r),width:b("Width",t,n,r)}}var T=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},x=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function O(e){return k({},e,{right:e.left+e.width,bottom:e.top+e.height})}function S(e){var t={};try{if(f(10)){t=e.getBoundingClientRect();var n=v(e,"top"),r=v(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var a={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?E(e.ownerDocument):{},i=o.width||e.clientWidth||a.right-a.left,l=o.height||e.clientHeight||a.bottom-a.top,u=e.offsetWidth-i,c=e.offsetHeight-l;if(u||c){var d=s(e);u-=y(d,"x"),c-=y(d,"y"),a.width-=u,a.height-=c}return O(a)}function N(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=f(10),a="HTML"===t.nodeName,o=S(e),i=S(t),l=c(e),u=s(t),d=parseFloat(u.borderTopWidth,10),p=parseFloat(u.borderLeftWidth,10);n&&a&&(i.top=Math.max(i.top,0),i.left=Math.max(i.left,0));var h=O({top:o.top-i.top-d,left:o.left-i.left-p,width:o.width,height:o.height});if(h.marginTop=0,h.marginLeft=0,!r&&a){var m=parseFloat(u.marginTop,10),g=parseFloat(u.marginLeft,10);h.top-=d-m,h.bottom-=d-m,h.left-=p-g,h.right-=p-g,h.marginTop=m,h.marginLeft=g}return(r&&!n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(h=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=v(t,"top"),a=v(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=a*o,e.right+=a*o,e}(h,t)),h}function _(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===s(t,"transform");)t=t.parentElement;return t||document.documentElement}function C(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},i=a?_(e):g(e,t);if("viewport"===r)o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=N(e,n),a=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),i=t?0:v(n),l=t?0:v(n,"left");return O({top:i-r.top+r.marginTop,left:l-r.left+r.marginLeft,width:a,height:o})}(i,a);else{var l=void 0;"scrollParent"===r?"BODY"===(l=c(u(t))).nodeName&&(l=e.ownerDocument.documentElement):l="window"===r?e.ownerDocument.documentElement:r;var d=N(l,i,a);if("HTML"!==l.nodeName||function e(t){var n=t.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===s(t,"position"))return!0;var r=u(t);return!!r&&e(r)}(i))o=d;else{var p=E(e.ownerDocument),f=p.height,h=p.width;o.top+=d.top-d.marginTop,o.bottom=f+d.top,o.left+=d.left-d.marginLeft,o.right=h+d.left}}var m="number"==typeof(n=n||0);return o.left+=m?n:n.left||0,o.top+=m?n:n.top||0,o.right-=m?n:n.right||0,o.bottom-=m?n:n.bottom||0,o}function M(e,t,n,r,a){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var i=C(n,r,o,a),l={top:{width:i.width,height:t.top-i.top},right:{width:i.right-t.right,height:i.height},bottom:{width:i.width,height:i.bottom-t.bottom},left:{width:t.left-i.left,height:i.height}},s=Object.keys(l).map(function(e){return k({key:e},l[e],{area:(t=l[e],t.width*t.height)});var t}).sort(function(e,t){return t.area-e.area}),u=s.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),c=u.length>0?u[0].key:s[0].key,d=e.split("-")[1];return c+(d?"-"+d:"")}function P(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return N(n,r?_(t):g(t,n),r)}function R(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function j(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function D(e,t,n){n=n.split("-")[0];var r=R(e),a={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),i=o?"top":"left",l=o?"left":"top",s=o?"height":"width",u=o?"width":"height";return a[i]=t[i]+t[s]/2-r[s]/2,a[l]=n===l?t[l]-r[u]:t[j(l)],a}function I(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function A(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=I(e,function(e){return e[t]===n});return e.indexOf(r)}(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&l(n)&&(t.offsets.popper=O(t.offsets.popper),t.offsets.reference=O(t.offset