|
1
|
|
-!function(){var e={6216:function(e,r,t){t(8175),e.exports=t(3093).Date.now},6337:function(e,r,t){t(4211),t(3093).Number.isInteger},8207:function(e,r,t){t(2464),e.exports=t(3093).Object.assign},5380:function(e,r,t){t(7660);var n=t(3093).Object;e.exports=function(e,r){return n.create(e,r)}},5297:function(e,r,t){t(5338),e.exports=t(3093).Object.keys},1900:function(e,r,t){t(9269),e.exports=t(3093).Object.setPrototypeOf},2837:function(e,r,t){t(3625),e.exports=t(3093).Object.values},8679:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},9226:function(e,r,t){var n=t(4425);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},3206:function(e,r,t){var n=t(6303),o=t(5321),i=t(139);e.exports=function(e){return function(r,t,a){var u,c=n(r),l=o(c.length),s=i(a,l);if(e&&t!=t){for(;l>s;)if((u=c[s++])!=u)return!0}else for(;l>s;s++)if((e||s in c)&&c[s]===t)return e||s||0;return!e&&-1}}},7489:function(e){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},3093:function(e){var r=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=r)},1133:function(e,r,t){var n=t(8679);e.exports=function(e,r,t){if(n(e),void 0===r)return e;switch(t){case 1:return function(t){return e.call(r,t)};case 2:return function(t,n){return e.call(r,t,n)};case 3:return function(t,n,o){return e.call(r,t,n,o)}}return function(){return e.apply(r,arguments)}}},9359:function(e){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},7305:function(e,r,t){e.exports=!t(4930)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},3299:function(e,r,t){var n=t(4425),o=t(3220).document,i=n(o)&&n(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},5834:function(e){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},4518:function(e,r,t){var n=t(3220),o=t(3093),i=t(1133),a=t(4379),u=t(3920),c="prototype",l=function(e,r,t){var s,d,p,f=e&l.F,g=e&l.G,m=e&l.S,v=e&l.P,b=e&l.B,h=e&l.W,y=g?o:o[r]||(o[r]={}),x=y[c],w=g?n:m?n[r]:(n[r]||{})[c];for(s in g&&(t=r),t)(d=!f&&w&&void 0!==w[s])&&u(y,s)||(p=d?w[s]:t[s],y[s]=g&&"function"!=typeof w[s]?t[s]:b&&d?i(p,n):h&&w[s]==p?function(e){var r=function(r,t,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,t)}return new e(r,t,n)}return e.apply(this,arguments)};return r[c]=e[c],r}(p):v&&"function"==typeof p?i(Function.call,p):p,v&&((y.virtual||(y.virtual={}))[s]=p,e&l.R&&x&&!x[s]&&a(x,s,p)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},4930:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},3220:function(e){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},3920:function(e){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},4379:function(e,r,t){var n=t(6007),o=t(5831);e.exports=t(7305)?function(e,r,t){return n.f(e,r,o(1,t))}:function(e,r,t){return e[r]=t,e}},588:function(e,r,t){var n=t(3220).document;e.exports=n&&n.documentElement},7209:function(e,r,t){e.exports=!t(7305)&&!t(4930)((function(){return 7!=Object.defineProperty(t(3299)("div"),"a",{get:function(){return 7}}).a}))},5474:function(e,r,t){var n=t(7489);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},8015:function(e,r,t){var n=t(4425),o=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&o(e)===e}},4425:function(e){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},4436:function(e){e.exports=!0},7382:function(e,r,t){"use strict";var n=t(7305),o=t(1304),i=t(8382),a=t(5066),u=t(4922),c=t(5474),l=Object.assign;e.exports=!l||t(4930)((function(){var e={},r={},t=Symbol(),n="abcdefghijklmnopqrst";return e[t]=7,n.split("").forEach((function(e){r[e]=e})),7!=l({},e)[t]||Object.keys(l({},r)).join("")!=n}))?function(e,r){for(var t=u(e),l=arguments.length,s=1,d=i.f,p=a.f;l>s;)for(var f,g=c(arguments[s++]),m=d?o(g).concat(d(g)):o(g),v=m.length,b=0;v>b;)f=m[b++],n&&!p.call(g,f)||(t[f]=g[f]);return t}:l},9270:function(e,r,t){var n=t(9226),o=t(6287),i=t(5834),a=t(2596)("IE_PROTO"),u=function(){},c="prototype",l=function(){var e,r=t(3299)("iframe"),n=i.length;for(r.style.display="none",t(588).appendChild(r),r.src="javascript:",(e=r.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;n--;)delete l[c][i[n]];return l()};e.exports=Object.create||function(e,r){var t;return null!==e?(u[c]=n(e),t=new u,u[c]=null,t[a]=e):t=l(),void 0===r?t:o(t,r)}},6007:function(e,r,t){var n=t(9226),o=t(7209),i=t(2548),a=Object.defineProperty;r.f=t(7305)?Object.defineProperty:function(e,r,t){if(n(e),r=i(r,!0),n(t),o)try{return a(e,r,t)}catch(e){}if("get"in t||"set"in t)throw TypeError("Accessors not supported!");return"value"in t&&(e[r]=t.value),e}},6287:function(e,r,t){var n=t(6007),o=t(9226),i=t(1304);e.exports=t(7305)?Object.defineProperties:function(e,r){o(e);for(var t,a=i(r),u=a.length,c=0;u>c;)n.f(e,t=a[c++],r[t]);return e}},826:function(e,r,t){var n=t(5066),o=t(5831),i=t(6303),a=t(2548),u=t(3920),c=t(7209),l=Object.getOwnPropertyDescriptor;r.f=t(7305)?l:function(e,r){if(e=i(e),r=a(r,!0),c)try{return l(e,r)}catch(e){}if(u(e,r))return o(!n.f.call(e,r),e[r])}},8382:function(e,r){r.f=Object.getOwnPropertySymbols},6567:function(e,r,t){var n=t(3920),o=t(6303),i=t(3206)(!1),a=t(2596)("IE_PROTO");e.exports=function(e,r){var t,u=o(e),c=0,l=[];for(t in u)t!=a&&n(u,t)&&l.push(t);for(;r.length>c;)n(u,t=r[c++])&&(~i(l,t)||l.push(t));return l}},1304:function(e,r,t){var n=t(6567),o=t(5834);e.exports=Object.keys||function(e){return n(e,o)}},5066:function(e,r){r.f={}.propertyIsEnumerable},874:function(e,r,t){var n=t(4518),o=t(3093),i=t(4930);e.exports=function(e,r){var t=(o.Object||{})[e]||Object[e],a={};a[e]=r(t),n(n.S+n.F*i((function(){t(1)})),"Object",a)}},572:function(e,r,t){var n=t(7305),o=t(1304),i=t(6303),a=t(5066).f;e.exports=function(e){return function(r){for(var t,u=i(r),c=o(u),l=c.length,s=0,d=[];l>s;)t=c[s++],n&&!a.call(u,t)||d.push(e?[t,u[t]]:u[t]);return d}}},5831:function(e){e.exports=function(e,r){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:r}}},6573:function(e,r,t){var n=t(4425),o=t(9226),i=function(e,r){if(o(e),!n(r)&&null!==r)throw TypeError(r+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,r,n){try{(n=t(1133)(Function.call,t(826).f(Object.prototype,"__proto__").set,2))(e,[]),r=!(e instanceof Array)}catch(e){r=!0}return function(e,t){return i(e,t),r?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:i}},2596:function(e,r,t){var n=t(5628)("keys"),o=t(6918);e.exports=function(e){return n[e]||(n[e]=o(e))}},5628:function(e,r,t){var n=t(3093),o=t(3220),i="__core-js_shared__",a=o[i]||(o[i]={});(e.exports=function(e,r){return a[e]||(a[e]=void 0!==r?r:{})})("versions",[]).push({version:n.version,mode:t(4436)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},139:function(e,r,t){var n=t(2579),o=Math.max,i=Math.min;e.exports=function(e,r){return(e=n(e))<0?o(e+r,0):i(e,r)}},2579:function(e){var r=Math.ceil,t=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?t:r)(e)}},6303:function(e,r,t){var n=t(5474),o=t(9359);e.exports=function(e){return n(o(e))}},5321:function(e,r,t){var n=t(2579),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},4922:function(e,r,t){var n=t(9359);e.exports=function(e){return Object(n(e))}},2548:function(e,r,t){var n=t(4425);e.exports=function(e,r){if(!n(e))return e;var t,o;if(r&&"function"==typeof(t=e.toString)&&!n(o=t.call(e)))return o;if("function"==typeof(t=e.valueOf)&&!n(o=t.call(e)))return o;if(!r&&"function"==typeof(t=e.toString)&&!n(o=t.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},6918:function(e){var r=0,t=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+t).toString(36))}},8175:function(e,r,t){var n=t(4518);n(n.S,"Date",{now:function(){return(new Date).getTime()}})},4211:function(e,r,t){var n=t(4518);n(n.S,"Number",{isInteger:t(8015)})},2464:function(e,r,t){var n=t(4518);n(n.S+n.F,"Object",{assign:t(7382)})},7660:function(e,r,t){var n=t(4518);n(n.S,"Object",{create:t(9270)})},5338:function(e,r,t){var n=t(4922),o=t(1304);t(874)("keys",(function(){return function(e){return o(n(e))}}))},9269:function(e,r,t){var n=t(4518);n(n.S,"Object",{setPrototypeOf:t(6573).set})},3625:function(e,r,t){var n=t(4518),o=t(572)(!1);n(n.S,"Object",{values:function(e){return o(e)}})},2545:function(e,r,t){"use strict";var n=t(1296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function c(e){return n.isMemo(e)?a:u[e.$$typeof]||o}u[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[n.Memo]=a;var l=Object.defineProperty,s=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,g=Object.prototype;e.exports=function e(r,t,n){if("string"!==typeof t){if(g){var o=f(t);o&&o!==g&&e(r,o,n)}var a=s(t);d&&(a=a.concat(d(t)));for(var u=c(r),m=c(t),v=0;v<a.length;++v){var b=a[v];if(!i[b]&&(!n||!n[b])&&(!m||!m[b])&&(!u||!u[b])){var h=p(t,b);try{l(r,b,h)}catch(e){}}}}return r}},6103:function(e,r){"use strict";var t="function"===typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,o=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,u=t?Symbol.for("react.profiler"):60114,c=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,g=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.block"):60121,h=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var r=e.$$typeof;switch(r){case n:switch(e=e.type){case s:case d:case i:case u:case a:case f:return e;default:switch(e=e&&e.$$typeof){case l:case p:case v:case m:case c:return e;default:return r}}case o:return r}}}function D(e){return w(e)===d}r.AsyncMode=s,r.ConcurrentMode=d,r.ContextConsumer=l,r.ContextProvider=c,r.Element=n,r.ForwardRef=p,r.Fragment=i,r.Lazy=v,r.Memo=m,r.Portal=o,r.Profiler=u,r.StrictMode=a,r.Suspense=f,r.isAsyncMode=function(e){return D(e)||w(e)===s},r.isConcurrentMode=D,r.isContextConsumer=function(e){return w(e)===l},r.isContextProvider=function(e){return w(e)===c},r.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n},r.isForwardRef=function(e){return w(e)===p},r.isFragment=function(e){return w(e)===i},r.isLazy=function(e){return w(e)===v},r.isMemo=function(e){return w(e)===m},r.isPortal=function(e){return w(e)===o},r.isProfiler=function(e){return w(e)===u},r.isStrictMode=function(e){return w(e)===a},r.isSuspense=function(e){return w(e)===f},r.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===u||e===a||e===f||e===g||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p||e.$$typeof===h||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b)},r.typeOf=w},1296:function(e,r,t){"use strict";e.exports=t(6103)},9921:function(e,r){"use strict";var t=60103,n=60106,o=60107,i=60108,a=60114,u=60109,c=60110,l=60112,s=60113,d=60120,p=60115,f=60116,g=60121,m=60122,v=60117,b=60129,h=60131;if("function"===typeof Symbol&&Symbol.for){var y=Symbol.for;t=y("react.element"),n=y("react.portal"),o=y("react.fragment"),i=y("react.strict_mode"),a=y("react.profiler"),u=y("react.provider"),c=y("react.context"),l=y("react.forward_ref"),s=y("react.suspense"),d=y("react.suspense_list"),p=y("react.memo"),f=y("react.lazy"),g=y("react.block"),m=y("react.server.block"),v=y("react.fundamental"),b=y("react.debug_trace_mode"),h=y("react.legacy_hidden")}function x(e){if("object"===typeof e&&null!==e){var r=e.$$typeof;switch(r){case t:switch(e=e.type){case o:case a:case i:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case l:case f:case p:case u:return e;default:return r}}case n:return r}}}r.isContextConsumer=function(e){return x(e)===c}},9864:function(e,r,t){"use strict";e.exports=t(9921)},5251:function(e,r,t){"use strict";var n=t(9196),o=60103;if(60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,r,t){var n,i={},l=null,s=null;for(n in void 0!==t&&(l=""+t),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(s=r.ref),r)u.call(r,n)&&!c.hasOwnProperty(n)&&(i[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===i[n]&&(i[n]=r[n]);return{$$typeof:o,type:e,key:l,ref:s,props:i,_owner:a.current}}r.jsx=l,r.jsxs=l},5893:function(e,r,t){"use strict";e.exports=t(5251)},9196:function(e){"use strict";e.exports=window.React},6130:function(e,r,t){e.exports=t(6216)},5733:function(e,r,t){t(6337)},8428:function(e,r,t){e.exports=t(8207)},6243:function(e,r,t){e.exports=t(5297)},8433:function(e,r,t){e.exports=t(2837)}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return e[n](i,i.exports,t),i.exports}t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},t.d=function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},function(){"use strict";var e=window.wp.element,r=t(8207);function n(){return n=r?r.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},n.apply(this,arguments)}var o=t(9196),i=t.n(o);function a(e,r){var t=(0,o.useState)((function(){return{inputs:r,result:e()}}))[0],n=(0,o.useRef)(!0),i=(0,o.useRef)(t),a=n.current||Boolean(r&&i.current.inputs&&function(e,r){if(e.length!==r.length)return!1;for(var t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}(r,i.current.inputs))?i.current:{inputs:r,result:e()};return(0,o.useEffect)((function(){n.current=!1,i.current=a}),[a]),a.result}var u=a,c=function(e,r){return a((function(){return e}),r)},l=t(5380),s=t(1900);function d(e,r){return d=s?s.bind():function(e,r){return e.__proto__=r,e},d(e,r)}function p(e,r){e.prototype=l(r.prototype),e.prototype.constructor=e,d(e,r)}var f=!0,g="Invariant failed";function m(e,r){if(!e){if(f)throw new Error(g);var t="function"===typeof r?r():r;throw new Error(t?g+": "+t:g)}}function v(e){return v="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},v(e)}function b(e){var r=function(e,r){if("object"!==v(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===v(r)?r:String(r)}function h(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function y(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?h(Object(t),!0).forEach((function(r){var n,o,i;n=e,o=r,i=t[r],(o=b(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function x(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var w="function"===typeof Symbol&&Symbol.observable||"@@observable",D=function(){return Math.random().toString(36).substring(7).split("").join(".")},I={INIT:"@@redux/INIT"+D(),REPLACE:"@@redux/REPLACE"+D(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+D()}};function E(e){if("object"!==typeof e||null===e)return!1;for(var r=e;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function S(e,r,t){var n;if("function"===typeof r&&"function"===typeof t||"function"===typeof t&&"function"===typeof arguments[3])throw new Error(x(0));if("function"===typeof r&&"undefined"===typeof t&&(t=r,r=void 0),"undefined"!==typeof t){if("function"!==typeof t)throw new Error(x(1));return t(S)(e,r)}if("function"!==typeof e)throw new Error(x(2));var o=e,i=r,a=[],u=a,c=!1;function l(){u===a&&(u=a.slice())}function s(){if(c)throw new Error(x(3));return i}function d(e){if("function"!==typeof e)throw new Error(x(4));if(c)throw new Error(x(5));var r=!0;return l(),u.push(e),function(){if(r){if(c)throw new Error(x(6));r=!1,l();var t=u.indexOf(e);u.splice(t,1),a=null}}}function p(e){if(!E(e))throw new Error(x(7));if("undefined"===typeof e.type)throw new Error(x(8));if(c)throw new Error(x(9));try{c=!0,i=o(i,e)}finally{c=!1}for(var r=a=u,t=0;t<r.length;t++){(0,r[t])()}return e}return p({type:I.INIT}),(n={dispatch:p,subscribe:d,getState:s,replaceReducer:function(e){if("function"!==typeof e)throw new Error(x(10));o=e,p({type:I.REPLACE})}})[w]=function(){var e,r=d;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(x(11));function t(){e.next&&e.next(s())}return t(),{unsubscribe:r(t)}}})[w]=function(){return this},e},n}function C(e,r){return function(){return r(e.apply(this,arguments))}}function O(e,r){if("function"===typeof e)return C(e,r);if("object"!==typeof e||null===e)throw new Error(x(16));var t={};for(var n in e){var o=e[n];"function"===typeof o&&(t[n]=C(o,r))}return t}function P(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return 0===r.length?function(e){return e}:1===r.length?r[0]:r.reduce((function(e,r){return function(){return e(r.apply(void 0,arguments))}}))}var N=i().createContext(null);var R=function(e){e()},B=function(){return R};var L={notify:function(){},get:function(){return[]}};function A(e,r){var t,n=L;function o(){a.onStateChange&&a.onStateChange()}function i(){t||(t=r?r.addNestedSub(o):e.subscribe(o),n=function(){var e=B(),r=null,t=null;return{clear:function(){r=null,t=null},notify:function(){e((function(){for(var e=r;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],t=r;t;)e.push(t),t=t.next;return e},subscribe:function(e){var n=!0,o=t={callback:e,next:null,prev:t};return o.prev?o.prev.next=o:r=o,function(){n&&null!==r&&(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:r=o.next)}}}}())}var a={addNestedSub:function(e){return i(),n.subscribe(e)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(t)},trySubscribe:i,tryUnsubscribe:function(){t&&(t(),t=void 0,n.clear(),n=L)},getListeners:function(){return n}};return a}var T="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?o.useLayoutEffect:o.useEffect;var _=function(e){var r=e.store,t=e.context,n=e.children,a=(0,o.useMemo)((function(){var e=A(r);return e.onStateChange=e.notifyNestedSubs,{store:r,subscription:e}}),[r]),u=(0,o.useMemo)((function(){return r.getState()}),[r]);T((function(){var e=a.subscription;return e.trySubscribe(),u!==r.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[a,u]);var c=t||N;return i().createElement(c.Provider,{value:a},n)};function M(){return M=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},M.apply(this,arguments)}function j(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}var F=t(2545),G=t.n(F),W=t(9864),k=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],U=["reactReduxForwardedRef"],H=[],V=[null,null];function z(e,r){var t=e[1];return[r.payload,t+1]}function $(e,r,t){T((function(){return e.apply(void 0,r)}),t)}function q(e,r,t,n,o,i,a){e.current=n,r.current=o,t.current=!1,i.current&&(i.current=null,a())}function Y(e,r,t,n,o,i,a,u,c,l){if(e){var s=!1,d=null,p=function(){if(!s){var e,t,p=r.getState();try{e=n(p,o.current)}catch(e){t=e,d=e}t||(d=null),e===i.current?a.current||c():(i.current=e,u.current=e,a.current=!0,l({type:"STORE_UPDATED",payload:{error:t}}))}};t.onStateChange=p,t.trySubscribe(),p();return function(){if(s=!0,t.tryUnsubscribe(),t.onStateChange=null,d)throw d}}}var K=function(){return[null,0]};function J(e,r){void 0===r&&(r={});var t=r,n=t.getDisplayName,a=void 0===n?function(e){return"ConnectAdvanced("+e+")"}:n,u=t.methodName,c=void 0===u?"connectAdvanced":u,l=t.renderCountProp,s=void 0===l?void 0:l,d=t.shouldHandleStateChanges,p=void 0===d||d,f=t.storeKey,g=void 0===f?"store":f,m=(t.withRef,t.forwardRef),v=void 0!==m&&m,b=t.context,h=void 0===b?N:b,y=j(t,k),x=h;return function(r){var t=r.displayName||r.name||"Component",n=a(t),u=M({},y,{getDisplayName:a,methodName:c,renderCountProp:s,shouldHandleStateChanges:p,storeKey:g,displayName:n,wrappedComponentName:t,WrappedComponent:r}),l=y.pure;var d=l?o.useMemo:function(e){return e()};function f(t){var n=(0,o.useMemo)((function(){var e=t.reactReduxForwardedRef,r=j(t,U);return[t.context,e,r]}),[t]),a=n[0],c=n[1],l=n[2],s=(0,o.useMemo)((function(){return a&&a.Consumer&&(0,W.isContextConsumer)(i().createElement(a.Consumer,null))?a:x}),[a,x]),f=(0,o.useContext)(s),g=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch);Boolean(f)&&Boolean(f.store);var m=g?t.store:f.store,v=(0,o.useMemo)((function(){return function(r){return e(r.dispatch,u)}(m)}),[m]),b=(0,o.useMemo)((function(){if(!p)return V;var e=A(m,g?null:f.subscription),r=e.notifyNestedSubs.bind(e);return[e,r]}),[m,g,f]),h=b[0],y=b[1],w=(0,o.useMemo)((function(){return g?f:M({},f,{subscription:h})}),[g,f,h]),D=(0,o.useReducer)(z,H,K),I=D[0][0],E=D[1];if(I&&I.error)throw I.error;var S=(0,o.useRef)(),C=(0,o.useRef)(l),O=(0,o.useRef)(),P=(0,o.useRef)(!1),N=d((function(){return O.current&&l===C.current?O.current:v(m.getState(),l)}),[m,I,l]);$(q,[C,S,P,l,N,O,y]),$(Y,[p,m,h,v,C,S,P,O,y,E],[m,h,v]);var R=(0,o.useMemo)((function(){return i().createElement(r,M({},N,{ref:c}))}),[c,r,N]);return(0,o.useMemo)((function(){return p?i().createElement(s.Provider,{value:w},R):R}),[s,R,w])}var m=l?i().memo(f):f;if(m.WrappedComponent=r,m.displayName=f.displayName=n,v){var b=i().forwardRef((function(e,r){return i().createElement(m,M({},e,{reactReduxForwardedRef:r}))}));return b.displayName=n,b.WrappedComponent=r,G()(b,r)}return G()(m,r)}}function X(e,r){return e===r?0!==e||0!==r||1/e===1/r:e!==e&&r!==r}function Q(e,r){if(X(e,r))return!0;if("object"!==typeof e||null===e||"object"!==typeof r||null===r)return!1;var t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(var o=0;o<t.length;o++)if(!Object.prototype.hasOwnProperty.call(r,t[o])||!X(e[t[o]],r[t[o]]))return!1;return!0}function Z(e){return function(r,t){var n=e(r,t);function o(){return n}return o.dependsOnOwnProps=!1,o}}function ee(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function re(e,r){return function(r,t){t.displayName;var n=function(e,r){return n.dependsOnOwnProps?n.mapToProps(e,r):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(r,t){n.mapToProps=e,n.dependsOnOwnProps=ee(e);var o=n(r,t);return"function"===typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=ee(o),o=n(r,t)),o},n}}var te=[function(e){return"function"===typeof e?re(e):void 0},function(e){return e?void 0:Z((function(e){return{dispatch:e}}))},function(e){return e&&"object"===typeof e?Z((function(r){return function(e,r){var t={},n=function(n){var o=e[n];"function"===typeof o&&(t[n]=function(){return r(o.apply(void 0,arguments))})};for(var o in e)n(o);return t}(e,r)})):void 0}];var ne=[function(e){return"function"===typeof e?re(e):void 0},function(e){return e?void 0:Z((function(){return{}}))}];function oe(e,r,t){return M({},t,e,r)}var ie=[function(e){return"function"===typeof e?function(e){return function(r,t){t.displayName;var n,o=t.pure,i=t.areMergedPropsEqual,a=!1;return function(r,t,u){var c=e(r,t,u);return a?o&&i(c,n)||(n=c):(a=!0,n=c),n}}}(e):void 0},function(e){return e?void 0:function(){return oe}}],ae=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function ue(e,r,t,n){return function(o,i){return t(e(o,i),r(n,i),i)}}function ce(e,r,t,n,o){var i,a,u,c,l,s=o.areStatesEqual,d=o.areOwnPropsEqual,p=o.areStatePropsEqual,f=!1;function g(o,f){var g=!d(f,a),m=!s(o,i);return i=o,a=f,g&&m?(u=e(i,a),r.dependsOnOwnProps&&(c=r(n,a)),l=t(u,c,a)):g?(e.dependsOnOwnProps&&(u=e(i,a)),r.dependsOnOwnProps&&(c=r(n,a)),l=t(u,c,a)):m?function(){var r=e(i,a),n=!p(r,u);return u=r,n&&(l=t(u,c,a)),l}():l}return function(o,s){return f?g(o,s):(u=e(i=o,a=s),c=r(n,a),l=t(u,c,a),f=!0,l)}}function le(e,r){var t=r.initMapStateToProps,n=r.initMapDispatchToProps,o=r.initMergeProps,i=j(r,ae),a=t(e,i),u=n(e,i),c=o(e,i);return(i.pure?ce:ue)(a,u,c,e,i)}var se=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function de(e,r,t){for(var n=r.length-1;n>=0;n--){var o=r[n](e);if(o)return o}return function(r,n){throw new Error("Invalid value of type "+typeof e+" for "+t+" argument when connecting component "+n.wrappedComponentName+".")}}function pe(e,r){return e===r}function fe(e){var r=void 0===e?{}:e,t=r.connectHOC,n=void 0===t?J:t,o=r.mapStateToPropsFactories,i=void 0===o?ne:o,a=r.mapDispatchToPropsFactories,u=void 0===a?te:a,c=r.mergePropsFactories,l=void 0===c?ie:c,s=r.selectorFactory,d=void 0===s?le:s;return function(e,r,t,o){void 0===o&&(o={});var a=o,c=a.pure,s=void 0===c||c,p=a.areStatesEqual,f=void 0===p?pe:p,g=a.areOwnPropsEqual,m=void 0===g?Q:g,v=a.areStatePropsEqual,b=void 0===v?Q:v,h=a.areMergedPropsEqual,y=void 0===h?Q:h,x=j(a,se),w=de(e,i,"mapStateToProps"),D=de(r,u,"mapDispatchToProps"),I=de(t,l,"mergeProps");return n(d,M({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:w,initMapDispatchToProps:D,initMergeProps:I,pure:s,areStatesEqual:f,areOwnPropsEqual:m,areStatePropsEqual:b,areMergedPropsEqual:y},x))}}var ge=fe();var me,ve=window.ReactDOM;me=ve.unstable_batchedUpdates,R=me;var be=function(e){var r=e.top,t=e.right,n=e.bottom,o=e.left;return{top:r,right:t,bottom:n,left:o,width:t-o,height:n-r,x:o,y:r,center:{x:(t+o)/2,y:(n+r)/2}}},he=function(e,r){return{top:e.top-r.top,left:e.left-r.left,bottom:e.bottom+r.bottom,right:e.right+r.right}},ye=function(e,r){return{top:e.top+r.top,left:e.left+r.left,bottom:e.bottom-r.bottom,right:e.right-r.right}},xe={top:0,right:0,bottom:0,left:0},we=function(e){var r=e.borderBox,t=e.margin,n=void 0===t?xe:t,o=e.border,i=void 0===o?xe:o,a=e.padding,u=void 0===a?xe:a,c=be(he(r,n)),l=be(ye(r,i)),s=be(ye(l,u));return{marginBox:c,borderBox:be(r),paddingBox:l,contentBox:s,margin:n,border:i,padding:u}},De=function(e){var r=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var t=Number(r);return isNaN(t)&&m(!1),t},Ie=function(e,r){var t,n,o=e.borderBox,i=e.border,a=e.margin,u=e.padding,c=(n=r,{top:(t=o).top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x});return we({borderBox:c,border:i,margin:a,padding:u})},Ee=function(e,r){return void 0===r&&(r={x:window.pageXOffset,y:window.pageYOffset}),Ie(e,r)},Se=function(e,r){var t={top:De(r.marginTop),right:De(r.marginRight),bottom:De(r.marginBottom),left:De(r.marginLeft)},n={top:De(r.paddingTop),right:De(r.paddingRight),bottom:De(r.paddingBottom),left:De(r.paddingLeft)},o={top:De(r.borderTopWidth),right:De(r.borderRightWidth),bottom:De(r.borderBottomWidth),left:De(r.borderLeftWidth)};return we({borderBox:e,margin:t,padding:n,border:o})},Ce=function(e){var r=e.getBoundingClientRect(),t=window.getComputedStyle(e);return Se(r,t)},Oe=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function Pe(e,r){if(e.length!==r.length)return!1;for(var t=0;t<e.length;t++)if(n=e[t],o=r[t],!(n===o||Oe(n)&&Oe(o)))return!1;var n,o;return!0}var Ne=function(e,r){var t;void 0===r&&(r=Pe);var n,o=[],i=!1;return function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return i&&t===this&&r(a,o)||(n=e.apply(this,a),i=!0,t=this,o=a),n}},Re=t(8433),Be=t.n(Re),Le=t(6243),Ae=t.n(Le),Te=t(6130),_e=t.n(Te),Me=function(e){var r=[],t=null,n=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];r=o,t||(t=requestAnimationFrame((function(){t=null,e.apply(void 0,r)})))};return n.cancel=function(){t&&(cancelAnimationFrame(t),t=null)},n},je=t(8428),Fe=t.n(je);t(5733);function Ge(e){return-1!==e.message.indexOf("Invariant failed")}var We=function(e){function r(){for(var r,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(r=e.call.apply(e,[this].concat(n))||this).onError=void 0,r.setOnError=function(e){r.onError=e},r.onFatalError=function(e){r.onError&&r.onError(),Ge(e)&&r.setState({})},r}p(r,e);var t=r.prototype;return t.componentDidMount=function(){window.addEventListener("error",this.onFatalError)},t.componentWillUnmount=function(){window.removeEventListener("error",this.onFatalError)},t.componentDidCatch=function(e){if(this.onFatalError(e),!Ge(e))throw e},t.render=function(){return this.props.children(this.setOnError)},r}(i().Component),ke={x:0,y:0},Ue=function(e,r){return{x:e.x+r.x,y:e.y+r.y}},He=function(e,r){return{x:e.x-r.x,y:e.y-r.y}},Ve=function(e,r){return e.x===r.x&&e.y===r.y},ze=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},$e=function(e,r,t){var n;return void 0===t&&(t=0),(n={})[e]=r,n["x"===e?"y":"x"]=t,n},qe=function(e,r){return Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2))},Ye=function(e,r){return Math.min.apply(Math,r.map((function(r){return qe(e,r)})))},Ke=function(e){return function(r){return{x:e(r.x),y:e(r.y)}}},Je=function(e,r){return{top:e.top+r.y,left:e.left+r.x,bottom:e.bottom+r.y,right:e.right+r.x}},Xe=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},Qe=function(e,r){return r&&r.shouldClipSubject?function(e,r){var t=be({top:Math.max(r.top,e.top),right:Math.min(r.right,e.right),bottom:Math.min(r.bottom,e.bottom),left:Math.max(r.left,e.left)});return t.width<=0||t.height<=0?null:t}(r.pageMarginBox,e):be(e)},Ze=function(e){var r=e.page,t=e.withPlaceholder,o=e.axis,i=e.frame,a=function(e,r){return r?Je(e,r.scroll.diff.displacement):e}(r.marginBox,i),u=function(e,r,t){var o;return t&&t.increasedBy?n({},e,((o={})[r.end]=e[r.end]+t.increasedBy[r.line],o)):e}(a,o,t);return{page:r,withPlaceholder:t,active:Qe(u,i)}},er=function(e,r){e.frame||m(!1);var t=e.frame,o=He(r,t.scroll.initial),i=ze(o),a=n({},t,{scroll:{initial:t.scroll.initial,current:r,diff:{value:o,displacement:i},max:t.scroll.max}});return n({},e,{frame:a,subject:Ze({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:a})})},rr=function(e){var r=e.merge,t=e.destination;return t?t.droppableId:r?r.combine.droppableId:null};function tr(e){return Be()(e)}function nr(e,r){if(e.findIndex)return e.findIndex(r);for(var t=0;t<e.length;t++)if(r(e[t]))return t;return-1}function or(e,r){if(e.find)return e.find(r);var t=nr(e,r);return-1!==t?e[t]:void 0}var ir=Ne((function(e){return e.reduce((function(e,r){return e[r.descriptor.id]=r,e}),{})})),ar=Ne((function(e){return e.reduce((function(e,r){return e[r.descriptor.id]=r,e}),{})})),ur=Ne((function(e){return tr(e)})),cr=Ne((function(e){return tr(e)})),lr=function(e,r){return function(t){return e<=t&&t<=r}},sr=function(e){var r=lr(e.top,e.bottom),t=lr(e.left,e.right);return function(e){return r(e.y)&&r(e.y)&&t(e.x)&&t(e.x)}},dr=Ne((function(e,r){var t=cr(r).filter((function(r){return e===r.descriptor.droppableId})).sort((function(e,r){return e.descriptor.index-r.descriptor.index}));return t})),pr={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},fr={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},gr=function(e,r){return e===pr?"down"===r.vertical:"right"===r.horizontal},mr=function(e,r){return Boolean(r.wasDisplaced[e])},vr=function(e){var r=e.displaced,t=e.onLift,n=e.combineWith,o=e.displacedBy,i=Boolean(r[n]);return mr(n,t)?i?ke:ze(o.point):i?o.point:ke},br=function(e,r,t){return t?e!==t.combine.draggableId?r:t.whenEntered:r},hr=function(e){var r=e.pageBorderBoxCenterWithDroppableScrollChange,t=e.previousImpact,o=e.destination,i=e.insideDestinationWithoutDraggable,a=e.userDirection,u=e.onLift;if(!o.isCombineEnabled)return null;var c=o.axis,l=t.movement.map,s=t.movement.displacedBy,d=t.merge,p=or(i,(function(e){var t=e.descriptor.id,n=vr({displaced:l,onLift:u,combineWith:t,displacedBy:s});return function(e){var r=e.id,t=e.currentCenter,n=e.axis,o=e.borderBox,i=e.displaceBy,a=e.currentUserDirection,u=e.oldMerge,c=o[n.start]+i[n.line],l=o[n.end]+i[n.line],s=.666*o[n.size],d=br(r,a,u),p=gr(n,d),f=t[n.line];return p?lr(c,c+s)(f):lr(l-s,l)(f)}({id:t,currentCenter:r,axis:c,borderBox:e.page.borderBox,displaceBy:n,currentUserDirection:a,oldMerge:d})}));return p?n({},t,{destination:null,merge:{whenEntered:br(p.descriptor.id,a,d),combine:{draggableId:p.descriptor.id,droppableId:o.descriptor.id}}}):null},yr=function(e){var r=lr(e.top,e.bottom),t=lr(e.left,e.right);return function(n){if(r(n.top)&&r(n.bottom)&&t(n.left)&&t(n.right))return!0;var o=r(n.top)||r(n.bottom),i=t(n.left)||t(n.right);if(o&&i)return!0;var a=n.top<e.top&&n.bottom>e.bottom,u=n.left<e.left&&n.right>e.right;return!(!a||!u)||(a&&i||u&&o)}},xr=function(e){var r=lr(e.top,e.bottom),t=lr(e.left,e.right);return function(e){return r(e.top)&&r(e.bottom)&&t(e.left)&&t(e.right)}},wr=function(e){var r=e.target,t=e.destination,n=e.viewport,o=e.withDroppableDisplacement,i=e.isVisibleThroughFrameFn,a=o?function(e,r){var t=r.frame?r.frame.scroll.diff.displacement:ke;return Je(e,t)}(r,t):r;return function(e,r,t){return!!r.subject.active&&t(r.subject.active)(e)}(a,t,i)&&function(e,r,t){return t(r)(e)}(a,n,i)},Dr=function(e){return wr(n({},e,{isVisibleThroughFrameFn:yr}))},Ir=function(e){return wr(n({},e,{isVisibleThroughFrameFn:xr}))},Er=function(e){var r=e.draggable,t=e.destination,n=e.previousImpact,o=e.viewport,i=e.onLift,a=e.forceShouldAnimate,u=r.descriptor.id,c=n.movement.map,l=function(e,r){var t=e.page.marginBox;if(!mr(e.descriptor.id,r))return t;var n={top:r.displacedBy.point.y,right:0,bottom:0,left:r.displacedBy.point.x};return be(he(t,n))}(r,i),s=Dr({target:l,destination:t,viewport:o,withDroppableDisplacement:!0}),d=function(e,r,t){return"boolean"===typeof e?e:!!r&&(!t||t.shouldAnimate)}(a,s,c[u]);return{draggableId:u,isVisible:s,shouldAnimate:d}},Sr=Ne((function(e){return e.reduce((function(e,r){return e[r.draggableId]=r,e}),{})})),Cr=Ne((function(e,r){var t=r[e.line];return{value:t,point:$e(e.line,t)}})),Or={displaced:[],map:{},displacedBy:{point:ke,value:0}},Pr={movement:Or,destination:null,merge:null},Nr=Ne((function(e,r){return r.filter((function(r){return r.descriptor.id!==e.descriptor.id}))})),Rr=function(e){var r=e.pageBorderBoxCenter,t=e.draggable,n=e.draggables,o=e.droppables,i=e.previousImpact,a=e.viewport,u=e.userDirection,c=e.onLift,l=function(e){var r=e.target,t=e.droppables,n=or(ur(t),(function(e){if(!e.isEnabled)return!1;var t=e.subject.active;return!!t&&sr(t)(r)}));return n?n.descriptor.id:null}({target:r,droppables:o});if(!l)return Pr;var s=o[l],d=dr(s.descriptor.id,n),p=Nr(t,d),f=function(e,r){var t=e.frame;return t?Ue(r,t.scroll.diff.value):r}(s,r),g=hr({pageBorderBoxCenterWithDroppableScrollChange:f,previousImpact:i,destination:s,insideDestinationWithoutDraggable:p,userDirection:u,onLift:c});return g||function(e){var r=e.pageBorderBoxCenterWithDroppableScrollChange,t=e.draggable,n=e.destination,o=e.insideDestinationWithoutDraggable,i=e.previousImpact,a=e.viewport,u=e.userDirection,c=e.onLift,l=n.axis,s=gr(n.axis,u),d=Cr(n.axis,t.displaceBy),p=r[l.line],f=d.value,g=o.filter((function(e){var r=e.page.borderBox,t=r[l.start],n=r[l.end],o=mr(e.descriptor.id,c);return s?o?p<t:p<t+f:o?p<=n-f:p<=n})).map((function(e){return Er({draggable:e,destination:n,previousImpact:i,viewport:a.frame,onLift:c})})),m=o.length-g.length;return{movement:{displacedBy:d,displaced:g,map:Sr(g)},destination:{droppableId:n.descriptor.id,index:m},merge:null}}({pageBorderBoxCenterWithDroppableScrollChange:f,destination:s,draggable:t,insideDestinationWithoutDraggable:p,previousImpact:i,viewport:a,userDirection:u,onLift:c})},Br=function(e){var r,t=e.draggable,n=e.home,o=e.draggables,i=e.viewport,a=Cr(n.axis,t.displaceBy),u=dr(n.descriptor.id,o).slice(t.descriptor.index+1),c={displacedBy:a,wasDisplaced:u.reduce((function(e,r){return e[r.descriptor.id]=!0,e}),{})},l=u.map((function(e){return Er({draggable:e,destination:n,previousImpact:Pr,viewport:i.frame,forceShouldAnimate:!1,onLift:c})}));return{impact:{movement:{displaced:l,map:Sr(l),displacedBy:a},destination:(r=t.descriptor,{index:r.index,droppableId:r.droppableId}),merge:null},onLift:c}},Lr=function(e){var r=e.draggable,t=e.offset,o=e.initialWindowScroll,i=Ie(r.client,t),a=Ee(i,o);return n({},r,{placeholder:n({},r.placeholder,{client:i}),client:i,page:a})},Ar=function(e){var r=e.updatedDroppables,t=e.criticalId,o=e.existing,i=e.additions,a=e.removals,u=e.viewport,c=function(e){var r=e.existing,t=e.droppables,o=e.additions,i=e.removals,a=e.viewport,u={};return ur(t).forEach((function(e){var t=e.axis,c=dr(e.descriptor.id,r),l={},s=function(e,r){var t=l[e];l[e]=t?{indexChange:t.indexChange+r.indexChange,offset:Ue(t.offset,r.offset)}:r},d=ar(i.map((function(e){var t=r[e];return t||m(!1),t})).filter((function(r){return r.descriptor.droppableId===e.descriptor.id}))),p=c.filter((function(e,r){if(!Boolean(d[e.descriptor.id]))return!0;var n=ze($e(t.line,e.displaceBy[t.line]));return c.slice(r).forEach((function(e){d[e.descriptor.id]||s(e.descriptor.id,{indexChange:-1,offset:n})})),!1})),f=o.filter((function(r){return r.descriptor.droppableId===e.descriptor.id})),g=p.slice(0);f.forEach((function(e){g.splice(e.descriptor.index,0,e)}));var v=ar(f);g.forEach((function(e,r){if(Boolean(v[e.descriptor.id])){var n=$e(t.line,e.client.marginBox[t.size]);g.slice(r).forEach((function(e){v[e.descriptor.id]||s(e.descriptor.id,{indexChange:1,offset:n})}))}})),g.forEach((function(e){if(!v[e.descriptor.id]){var r=l[e.descriptor.id];if(r){var t=Lr({draggable:e,offset:r.offset,initialWindowScroll:a.scroll.initial}),o=e.descriptor.index+r.indexChange,i=n({},t,{descriptor:n({},e.descriptor,{index:o})});u[t.descriptor.id]=i}}}))})),n({},r,u)}({droppables:r,existing:o,additions:i,removals:a,viewport:u}),l=c[t],s=r[l.descriptor.droppableId],d=function(e){var r=e.additions,t=e.updatedDroppables,n=e.viewport,o=n.scroll.diff.value;return r.map((function(e){var r=e.descriptor.droppableId,i=t[r].frame;i||m(!1);var a=i.scroll.diff.value,u=Ue(o,a);return Lr({draggable:e,offset:u,initialWindowScroll:n.scroll.initial})}))}({additions:i,updatedDroppables:r,viewport:u}),p=function(e){var r=e.additions,t=e.dragging,n=e.home,o=e.viewport,i=Cr(n.axis,t.displaceBy);return r.map((function(e){return e.descriptor.droppableId!==n.descriptor.id||e.descriptor.index<t.descriptor.index?e:Lr({draggable:e,offset:i.point,initialWindowScroll:o.scroll.initial})}))}({additions:d,dragging:l,home:s,viewport:u}),f=n({},c,ar(p));return a.forEach((function(e){delete f[e]})),f},Tr=function(e){var r=e.scrollHeight,t=e.scrollWidth,n=e.height,o=e.width,i=He({x:t,y:r},{x:o,y:n});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},_r=function(e){var r=e.descriptor,t=e.isEnabled,n=e.isCombineEnabled,o=e.isFixedOnPage,i=e.direction,a=e.client,u=e.page,c=e.closest,l=function(){if(!c)return null;var e=c.scrollSize,r=c.client,t=Tr({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:r.paddingBox.height,width:r.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:r,scrollSize:e,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:t,diff:{value:ke,displacement:ke}}}}(),s="vertical"===i?pr:fr;return{descriptor:r,isCombineEnabled:n,isFixedOnPage:o,axis:s,isEnabled:t,client:a,page:u,frame:l,subject:Ze({page:u,withPlaceholder:null,axis:s,frame:l})}},Mr=function(e,r){return e.descriptor.droppableId===r.descriptor.id},jr=function(e,r){return n({},e,{scroll:n({},e.scroll,{max:r})})},Fr=function(e,r,t){var o=e.frame;Mr(r,e)&&m(!1),e.subject.withPlaceholder&&m(!1);var i=Cr(e.axis,r.displaceBy).point,a=function(e,r,t){var n=e.axis,o=e.subject.page.contentBox[n.size],i=dr(e.descriptor.id,t).reduce((function(e,r){return e+r.client.marginBox[n.size]}),0)+r[n.line]-o;return i<=0?null:$e(n.line,i)}(e,i,t),u={placeholderSize:i,increasedBy:a,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!o)return n({},e,{subject:Ze({page:e.subject.page,withPlaceholder:u,axis:e.axis,frame:e.frame})});var c=a?Ue(o.scroll.max,a):o.scroll.max,l=jr(o,c);return n({},e,{subject:Ze({page:e.subject.page,withPlaceholder:u,axis:e.axis,frame:l}),frame:l})},Gr=function(e){var r=e.subject.withPlaceholder;r||m(!1);var t=e.frame;if(!t)return n({},e,{subject:Ze({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null})});var o=r.oldFrameMaxScroll;o||m(!1);var i=jr(t,o);return n({},e,{subject:Ze({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null}),frame:i})},Wr=function(e){var r=e.frame;return r||m(!1),r},kr=function(e,r){var t;return n({},e,((t={})[r.descriptor.id]=r,t))},Ur=function(e){var r=e.draggable,t=e.draggables,n=e.droppables,o=e.previousImpact,i=e.impact,a=function(e){var r=e.previousImpact,t=e.impact,n=e.droppables,o=rr(r),i=rr(t);if(!o)return n;if(o===i)return n;var a=n[o];if(!a.subject.withPlaceholder)return n;var u=Gr(a);return kr(n,u)}({previousImpact:o,impact:i,droppables:n}),u=rr(i);if(!u)return a;var c=n[u];if(Mr(r,c))return a;if(c.subject.withPlaceholder)return a;var l=Fr(c,r,t);return kr(a,l)},Hr=function(e){var r,t,o=e.state,i=e.published,a=function(e){var r=e.modified,t=e.existing,o=e.viewport;if(!r.length)return t;var i=r.map((function(e){var r=t[e.descriptor.id];r||m(!1);var n,i,a=Boolean(r.subject.withPlaceholder)?Gr(r):r,u=a.client,c=e.client,l=Wr(a),s=Wr(e),d=we({borderBox:(a.axis,n=u.borderBox,i=c.borderBox,{top:n.top,left:n.left,right:n.left+i.width,bottom:n.top+i.height}),margin:u.margin,border:u.border,padding:u.padding}),p={client:l.frameClient,page:Ee(l.frameClient,o.scroll.initial),shouldClipSubject:l.shouldClipSubject,scrollSize:s.scrollSize,scroll:l.scroll.initial},f=_r({descriptor:e.descriptor,isEnabled:e.isEnabled,isCombineEnabled:e.isCombineEnabled,isFixedOnPage:e.isFixedOnPage,direction:e.axis.direction,client:d,page:Ee(d,o.scroll.initial),closest:p});return er(f,s.scroll.current)}));return n({},t,ir(i))}({modified:i.modified,existing:o.dimensions.droppables,viewport:o.viewport}),u=Ar({updatedDroppables:a,criticalId:o.critical.draggable.id,existing:o.dimensions.draggables,additions:i.additions,removals:i.removals,viewport:o.viewport}),c={draggable:u[o.critical.draggable.id].descriptor,droppable:a[o.critical.droppable.id].descriptor},l=o.dimensions.draggables[c.draggable.id],s=u[c.draggable.id],d={draggables:u,droppables:Ur({draggable:s,draggables:u,droppables:a,previousImpact:o.impact,impact:o.impact})},p=function(e){var r=e.initial,t=e.current,n=e.oldClientBorderBoxCenter,o=e.newClientBorderBoxCenter,i=e.viewport,a=He(o,n),u=function(){var e={selection:Ue(r.client.selection,a),borderBoxCenter:o,offset:ke};return{client:e,page:{selection:Ue(e.selection,i.scroll.initial),borderBoxCenter:Ue(e.selection,i.scroll.initial)}}}(),c=function(){var e=ze(a),r=Ue(t.client.offset,e),n={selection:Ue(u.client.selection,r),borderBoxCenter:Ue(u.client.borderBoxCenter,r),offset:r},o={selection:Ue(n.selection,i.scroll.current),borderBoxCenter:Ue(n.borderBoxCenter,i.scroll.current)};return Ve(t.client.borderBoxCenter,n.borderBoxCenter)||m(!1),{client:n,page:o}}();return{current:c,initial:u}}({initial:o.initial,current:o.current,oldClientBorderBoxCenter:l.client.borderBox.center,newClientBorderBoxCenter:s.client.borderBox.center,viewport:o.viewport}),f=p.initial,g=p.current,v=Br({draggable:s,home:d.droppables[c.droppable.id],draggables:d.draggables,viewport:o.viewport}),b=v.impact,h=v.onLift,y=function(e){var r=e.movement.displaced;if(!r.length)return e;var t=r.map((function(e){return e.isVisible&&e.shouldAnimate?n({},e,{shouldAnimate:!1}):e}));return n({},e,{movement:n({},e.movement,{displaced:t,map:Sr(t)})})}(Rr({pageBorderBoxCenter:g.page.borderBoxCenter,draggable:s,draggables:d.draggables,droppables:d.droppables,previousImpact:b,viewport:o.viewport,userDirection:o.userDirection,onLift:h}));Boolean("SNAP"===o.movementMode&&!rr(y))&&m(!1);var x=n({phase:"DRAGGING"},o,((r={}).phase="DRAGGING",r.critical=c,r.current=g,r.initial=f,r.impact=y,r.dimensions=d,r.onLift=h,r.onLiftImpact=b,r.forceShouldAnimate=!1,r));return"COLLECTING"===o.phase?x:n({phase:"DROP_PENDING"},x,((t={}).phase="DROP_PENDING",t.reason=o.reason,t.isWaiting=!1,t))},Vr={vertical:"down",horizontal:"right"},zr={vertical:"up",horizontal:"left"},$r=function(e){var r=e.isMovingForward,t=e.isInHomeList,n=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,u=e.previousImpact,c=e.onLift,l=u.destination?function(e){var r=e.isMovingForward,t=e.isInHomeList,n=e.draggable,o=e.insideDestination,i=e.location,a=o.slice(),u=i.index;!t&&a.splice(i.index,0,n);var c=r?u+1:u-1;return c<0||c>a.length-1?null:{proposedIndex:c,modifyDisplacement:!0}}({isMovingForward:r,isInHomeList:t,draggable:n,location:u.destination,insideDestination:a}):u.merge?function(e){var r=e.isMovingForward,t=e.destination,n=e.previousImpact,o=e.draggables,i=e.merge,a=e.onLift;if(!t.isCombineEnabled)return null;var u=n.movement,c=i.combine.draggableId,l=o[c].descriptor.index;return mr(c,a)?u.map[c]?r?{proposedIndex:l,modifyDisplacement:!0}:{proposedIndex:l-1,modifyDisplacement:!1}:r?{proposedIndex:l,modifyDisplacement:!1}:{proposedIndex:l-1,modifyDisplacement:!0}:Boolean(u.map[c])?r?{proposedIndex:l+1,modifyDisplacement:!0}:{proposedIndex:l,modifyDisplacement:!1}:r?{proposedIndex:l+1,modifyDisplacement:!1}:{proposedIndex:l,modifyDisplacement:!0}}({isMovingForward:r,destination:i,previousImpact:u,draggables:o,merge:u.merge,onLift:c}):null;if(null==l)return null;var s=l.proposedIndex,d=l.modifyDisplacement,p=Cr(i.axis,n.displaceBy),f=function(){var e=u.movement.displaced;return d?r?function(e){return e.slice(1)}(e):function(e,r){return[{draggableId:e.descriptor.id,isVisible:!0,shouldAnimate:!0}].concat(r)}(Nr(n,a)[s],e):e}();return{movement:{displacedBy:p,displaced:f,map:Sr(f)},destination:{droppableId:i.descriptor.id,index:s},merge:null}},qr=function(e,r){return r.margin[e.start]+r.borderBox[e.size]/2},Yr=function(e,r,t){return r[e.crossAxisStart]+t.margin[e.crossAxisStart]+t.borderBox[e.crossAxisSize]/2},Kr=function(e){var r=e.axis,t=e.moveRelativeTo,n=e.isMoving;return $e(r.line,t.marginBox[r.end]+qr(r,n),Yr(r,t.marginBox,n))},Jr=function(e){var r=e.axis,t=e.moveRelativeTo,n=e.isMoving;return $e(r.line,t.marginBox[r.start]-function(e,r){return r.margin[e.end]+r.borderBox[e.size]/2}(r,n),Yr(r,t.marginBox,n))},Xr=function(e){var r=e.movement,t=e.draggable,n=e.draggables,o=e.droppable,i=e.onLift,a=dr(o.descriptor.id,n),u=t.page,c=o.axis;if(!a.length)return function(e){var r=e.axis,t=e.moveInto,n=e.isMoving;return $e(r.line,t.contentBox[r.start]+qr(r,n),Yr(r,t.contentBox,n))}({axis:c,moveInto:o.page,isMoving:u});var l=r.displaced,s=r.displacedBy;if(l.length){var d=n[l[0].draggableId];if(mr(d.descriptor.id,i))return Jr({axis:c,moveRelativeTo:d.page,isMoving:u});var p=Ie(d.page,s.point);return Jr({axis:c,moveRelativeTo:p,isMoving:u})}var f=a[a.length-1];if(f.descriptor.id===t.descriptor.id)return u.borderBox.center;if(mr(f.descriptor.id,i)){var g=Ie(f.page,ze(i.displacedBy.point));return Kr({axis:c,moveRelativeTo:g,isMoving:u})}return Kr({axis:c,moveRelativeTo:f.page,isMoving:u})},Qr=function(e,r){var t=e.frame;return t?Ue(r,t.scroll.diff.displacement):r},Zr=function(e){var r=e.impact,t=e.draggable,n=e.droppable,o=e.draggables,i=e.onLift,a=r.merge,u=r.destination,c=t.page.borderBox.center;return n?u?Xr({movement:r.movement,draggable:t,draggables:o,droppable:n,onLift:i}):a?function(e){var r=e.combine,t=e.onLift,n=e.movement,o=e.draggables,i=r.draggableId,a=o[i].page.borderBox.center,u=vr({displaced:n.map,onLift:t,combineWith:i,displacedBy:n.displacedBy});return Ue(a,u)}({movement:r.movement,combine:a.combine,draggables:o,onLift:i}):c:c},et=function(e){var r=Zr(e),t=e.droppable;return t?Qr(t,r):r},rt=function(e,r){var t=He(r,e.scroll.initial),n=ze(t);return{frame:be({top:r.y,bottom:r.y+e.frame.height,left:r.x,right:r.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:r,diff:{value:t,displacement:n}}}},tt=function(e,r){return n({},e,{movement:n({},e.movement,{displaced:r,map:Sr(r)})})},nt=function(e){var r=e.pageBorderBoxCenter,t=e.draggable,n=function(e,r){return Ue(e.scroll.diff.displacement,r)}(e.viewport,r),o=He(n,t.page.borderBox.center);return Ue(t.client.borderBox.center,o)},ot=function(e){var r=e.draggable,t=e.destination,o=e.newPageBorderBoxCenter,i=e.viewport,a=e.withDroppableDisplacement,u=e.onlyOnMainAxis,c=void 0!==u&&u,l=He(o,r.page.borderBox.center),s={target:Je(r.page.borderBox,l),destination:t,withDroppableDisplacement:a,viewport:i};return c?function(e){return wr(n({},e,{isVisibleThroughFrameFn:(r=e.destination.axis,function(e){var t=lr(e.top,e.bottom),n=lr(e.left,e.right);return function(e){return r===pr?t(e.top)&&t(e.bottom):n(e.left)&&n(e.right)}})}));var r}(s):Ir(s)},it=function(e){var r=e.isMovingForward,t=e.draggable,n=e.destination,o=e.draggables,i=e.previousImpact,a=e.viewport,u=e.previousPageBorderBoxCenter,c=e.previousClientSelection,l=e.onLift;if(!n.isEnabled)return null;var s=dr(n.descriptor.id,o),d=Mr(t,n),p=function(e){var r=e.isMovingForward,t=e.isInHomeList,n=e.draggable,o=e.destination,i=e.insideDestination,a=e.previousImpact;if(!o.isCombineEnabled)return null;if(a.merge)return null;var u=a.destination;u||m(!1);var c=u.index,l=function(){var e=i.slice();return t&&e.splice(n.descriptor.index,1),e.splice(u.index,0,n),e}(),s=r?c+1:c-1;if(s<0)return null;if(s>l.length-1)return null;var d=l[s];d===n&&m(!1);var p={whenEntered:r?Vr:zr,combine:{draggableId:d.descriptor.id,droppableId:o.descriptor.id}};return{movement:a.movement,destination:null,merge:p}}({isInHomeList:d,isMovingForward:r,draggable:t,destination:n,insideDestination:s,previousImpact:i})||$r({isMovingForward:r,isInHomeList:d,draggable:t,draggables:o,destination:n,insideDestination:s,previousImpact:i,onLift:l});if(!p)return null;var f=et({impact:p,draggable:t,droppable:n,draggables:o,onLift:l});if(ot({draggable:t,destination:n,newPageBorderBoxCenter:f,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:nt({pageBorderBoxCenter:f,draggable:t,viewport:a}),impact:p,scrollJumpRequest:null};var g=He(f,u),v=function(e){var r=e.impact,t=e.viewport,n=e.destination,o=e.draggables,i=e.maxScrollChange,a=e.onLift,u=r.movement.displaced,c=rt(t,Ue(t.scroll.current,i)),l=n.frame?er(n,Ue(n.frame.scroll.current,i)):n,s=u.map((function(e){if(e.isVisible)return e;var i=o[e.draggableId],u=Er({draggable:i,destination:n,previousImpact:r,viewport:c.frame,onLift:a,forceShouldAnimate:!1});if(u.isVisible)return u;var s=Er({draggable:i,destination:l,previousImpact:r,viewport:t.frame,onLift:a,forceShouldAnimate:!1});return s.isVisible?s:e}));return tt(r,s)}({impact:p,viewport:a,destination:n,draggables:o,maxScrollChange:g,onLift:l});return{clientSelection:c,impact:v,scrollJumpRequest:g}},at=function(e){var r=e.subject.active;return r||m(!1),r},ut=function(e,r){var t=e.page.borderBox.center;return mr(e.descriptor.id,r)?He(t,r.displacedBy.point):t},ct=function(e,r){var t=e.page.borderBox;return mr(e.descriptor.id,r)?Je(t,ze(r.displacedBy.point)):t},lt=function(e){var r=e.isMovingForward,t=e.previousPageBorderBoxCenter,n=e.draggable,o=e.isOver,i=e.draggables,a=e.droppables,u=e.previousImpact,c=e.viewport,l=e.onLift,s=function(e){var r=e.isMovingForward,t=e.pageBorderBoxCenter,n=e.source,o=e.droppables,i=e.viewport,a=n.subject.active;if(!a)return null;var u=n.axis,c=lr(a[u.start],a[u.end]),l=ur(o).filter((function(e){return e!==n})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return yr(i.frame)(at(e))})).filter((function(e){var t=at(e);return r?a[u.crossAxisEnd]<t[u.crossAxisEnd]:t[u.crossAxisStart]<a[u.crossAxisStart]})).filter((function(e){var r=at(e),t=lr(r[u.start],r[u.end]);return c(r[u.start])||c(r[u.end])||t(a[u.start])||t(a[u.end])})).sort((function(e,t){var n=at(e)[u.crossAxisStart],o=at(t)[u.crossAxisStart];return r?n-o:o-n})).filter((function(e,r,t){return at(e)[u.crossAxisStart]===at(t[0])[u.crossAxisStart]}));if(!l.length)return null;if(1===l.length)return l[0];var s=l.filter((function(e){return lr(at(e)[u.start],at(e)[u.end])(t[u.line])}));return 1===s.length?s[0]:s.length>1?s.sort((function(e,r){return at(e)[u.start]-at(r)[u.start]}))[0]:l.sort((function(e,r){var n=Ye(t,Xe(at(e))),o=Ye(t,Xe(at(r)));return n!==o?n-o:at(e)[u.start]-at(r)[u.start]}))[0]}({isMovingForward:r,pageBorderBoxCenter:t,source:o,droppables:a,viewport:c});if(!s)return null;var d=dr(s.descriptor.id,i),p=function(e){var r=e.pageBorderBoxCenter,t=e.viewport,n=e.destination,o=e.insideDestination,i=e.onLift,a=o.filter((function(e){return Ir({target:ct(e,i),destination:n,viewport:t.frame,withDroppableDisplacement:!0})})).sort((function(e,t){var o=qe(r,Qr(n,ut(e,i))),a=qe(r,Qr(n,ut(t,i)));return o<a?-1:a<o?1:e.descriptor.index-t.descriptor.index}));return a[0]||null}({pageBorderBoxCenter:t,viewport:c,destination:s,insideDestination:d,onLift:l}),f=function(e){var r=e.previousPageBorderBoxCenter,t=e.moveRelativeTo,n=e.insideDestination,o=e.draggable,i=e.draggables,a=e.destination,u=e.previousImpact,c=e.viewport,l=e.onLift;if(!t){if(n.length)return null;var s={movement:Or,destination:{droppableId:a.descriptor.id,index:0},merge:null},d=et({impact:s,draggable:o,droppable:a,draggables:i,onLift:l}),p=Mr(o,a)?a:Fr(a,o,i);return ot({draggable:o,destination:p,newPageBorderBoxCenter:d,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?s:null}var f=Boolean(r[a.axis.line]<t.page.borderBox.center[a.axis.line]),g=n.indexOf(t);-1===g&&m(!1);var v=t.descriptor.id===o.descriptor.id||f?g:g+1,b=Nr(o,n).slice(v).map((function(e){return Er({draggable:e,destination:a,viewport:c.frame,previousImpact:u,onLift:l})}));return{movement:{displacedBy:Cr(a.axis,o.displaceBy),displaced:b,map:Sr(b)},destination:{droppableId:a.descriptor.id,index:v},merge:null}}({previousPageBorderBoxCenter:t,destination:s,draggable:n,draggables:i,moveRelativeTo:p,insideDestination:d,previousImpact:u,viewport:c,onLift:l});if(!f)return null;var g=et({impact:f,draggable:n,droppable:s,draggables:i,onLift:l});return{clientSelection:nt({pageBorderBoxCenter:g,draggable:n,viewport:c}),impact:f,scrollJumpRequest:null}},st=function(e){var r=e.state,t=e.type,n=function(e,r){var t=rr(e);return t?r[t]:null}(r.impact,r.dimensions.droppables),o=Boolean(n),i=r.dimensions.droppables[r.critical.droppable.id],a=n||i,u=a.axis.direction,c="vertical"===u&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===u&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(c&&!o)return null;var l="MOVE_DOWN"===t||"MOVE_RIGHT"===t,s=r.dimensions.draggables[r.critical.draggable.id],d=r.current.page.borderBoxCenter,p=r.dimensions,f=p.draggables,g=p.droppables;return c?it({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:s,destination:a,draggables:f,viewport:r.viewport,previousClientSelection:r.current.client.selection,previousImpact:r.impact,onLift:r.onLift}):lt({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:s,isOver:a,draggables:f,droppables:g,previousImpact:r.impact,viewport:r.viewport,onLift:r.onLift})};function dt(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}var pt=function(e,r){return 0===r?e:r>0?"down":"up"},ft=function(e,r){return 0===r?e:r>0?"right":"left"},gt=function(e){var r=e.state,t=e.clientSelection,o=e.dimensions,i=e.viewport,a=e.impact,u=e.scrollJumpRequest,c=i||r.viewport,l=c.scroll.current,s=o||r.dimensions,d=t||r.current.client.selection,p=He(d,r.initial.client.selection),f={offset:p,selection:d,borderBoxCenter:Ue(r.initial.client.borderBoxCenter,p)},g={selection:Ue(f.selection,l),borderBoxCenter:Ue(f.borderBoxCenter,l)},m={client:f,page:g},v=function(e,r,t){var n=He(t,r);return{horizontal:ft(e.horizontal,n.x),vertical:pt(e.vertical,n.y)}}(r.userDirection,r.current.page.borderBoxCenter,m.page.borderBoxCenter);if("COLLECTING"===r.phase)return n({phase:"COLLECTING"},r,{dimensions:s,viewport:c,current:m,userDirection:v});var b=s.draggables[r.critical.draggable.id],h=a||Rr({pageBorderBoxCenter:g.borderBoxCenter,draggable:b,draggables:s.draggables,droppables:s.droppables,previousImpact:r.impact,viewport:c,userDirection:v,onLift:r.onLift}),y=Ur({draggable:b,impact:h,previousImpact:r.impact,draggables:s.draggables,droppables:s.droppables});return n({},r,{current:m,userDirection:v,dimensions:{draggables:s.draggables,droppables:y},impact:h,viewport:c,scrollJumpRequest:u||null,forceShouldAnimate:!u&&null})},mt=function(e){var r=e.impact,t=e.viewport,n=e.destination,o=e.draggables,i=e.onLift,a=e.forceShouldAnimate,u=r.movement.displaced.map((function(e){return Er({draggable:o[e.draggableId],destination:n,previousImpact:r,viewport:t.frame,onLift:i,forceShouldAnimate:a})}));return tt(r,u)},vt=function(e){var r=e.impact,t=e.draggable,n=e.droppable,o=e.draggables,i=e.viewport,a=e.onLift,u=et({impact:r,draggable:t,draggables:o,droppable:n,onLift:a});return nt({pageBorderBoxCenter:u,draggable:t,viewport:i})},bt=function(e){var r=e.state,t=e.dimensions,n=e.viewport;"SNAP"!==r.movementMode&&m(!1);var o=r.impact,i=n||r.viewport,a=t||r.dimensions,u=a.draggables,c=a.droppables,l=u[r.critical.draggable.id],s=rr(o);s||m(!1);var d=c[s],p=mt({impact:o,viewport:i,destination:d,draggables:u,onLift:r.onLift}),f=vt({impact:p,draggable:l,droppable:d,draggables:u,viewport:i,onLift:r.onLift});return gt({impact:p,clientSelection:f,state:r,dimensions:a,viewport:i})},ht=function(e){return"SNAP"===e.movementMode},yt=function(e,r,t){var n=function(e,r){return{draggables:e.draggables,droppables:kr(e.droppables,r)}}(e.dimensions,r);return!ht(e)||t?gt({state:e,dimensions:n}):bt({state:e,dimensions:n})},xt={phase:"IDLE",completed:null,shouldFlush:!1},wt=function(e,r){if(void 0===e&&(e=xt),"CLEAN"===r.type)return n({},xt,{shouldFlush:r.payload.shouldFlush});if("INITIAL_PUBLISH"===r.type){"IDLE"!==e.phase&&m(!1);var t=r.payload,o=t.critical,i=t.clientSelection,a=t.viewport,u=t.dimensions,c=t.movementMode,l=u.draggables[o.draggable.id],s=u.droppables[o.droppable.id],d={selection:i,borderBoxCenter:l.client.borderBox.center,offset:ke},p={client:d,page:{selection:Ue(d.selection,a.scroll.initial),borderBoxCenter:Ue(d.selection,a.scroll.initial)}},f=ur(u.droppables).every((function(e){return!e.isFixedOnPage})),g=Br({draggable:l,home:s,draggables:u.draggables,viewport:a}),v=g.impact;return{phase:"DRAGGING",isDragging:!0,critical:o,movementMode:c,dimensions:u,initial:p,current:p,isWindowScrollAllowed:f,impact:v,onLift:g.onLift,onLiftImpact:v,viewport:a,userDirection:Vr,scrollJumpRequest:null,forceShouldAnimate:null}}var b;if("COLLECTION_STARTING"===r.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&m(!1),n({phase:"COLLECTING"},e,((b={}).phase="COLLECTING",b)));if("PUBLISH_WHILE_DRAGGING"===r.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&m(!1),Hr({state:e,published:r.payload});if("MOVE"===r.type){if("DROP_PENDING"===e.phase)return e;dt(e)||m(!1);var h=r.payload.client;return Ve(h,e.current.client.selection)?e:gt({state:e,clientSelection:h,impact:ht(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===r.type){if("DROP_PENDING"===e.phase)return e;if("COLLECTING"===e.phase)return e;dt(e)||m(!1);var y=r.payload,x=y.id,w=y.offset,D=e.dimensions.droppables[x];if(!D)return e;var I=er(D,w);return yt(e,I,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===r.type){if("DROP_PENDING"===e.phase)return e;dt(e)||m(!1);var E=r.payload,S=E.id,C=E.isEnabled,O=e.dimensions.droppables[S];O||m(!1),O.isEnabled===C&&m(!1);var P=n({},O,{isEnabled:C});return yt(e,P,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===r.type){if("DROP_PENDING"===e.phase)return e;dt(e)||m(!1);var N=r.payload,R=N.id,B=N.isCombineEnabled,L=e.dimensions.droppables[R];L||m(!1),L.isCombineEnabled===B&&m(!1);var A=n({},L,{isCombineEnabled:B});return yt(e,A,!0)}if("MOVE_BY_WINDOW_SCROLL"===r.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;dt(e)||m(!1),e.isWindowScrollAllowed||m(!1);var T=r.payload.newScroll;if(Ve(e.viewport.scroll.current,T))return e;var _=rt(e.viewport,T);return ht(e)?bt({state:e,viewport:_}):gt({state:e,viewport:_})}if("UPDATE_VIEWPORT_MAX_SCROLL"===r.type){if(!dt(e))return e;var M=r.payload.maxScroll;if(Ve(M,e.viewport.scroll.max))return e;var j=n({},e.viewport,{scroll:n({},e.viewport.scroll,{max:M})});return n({phase:"DRAGGING"},e,{viewport:j})}if("MOVE_UP"===r.type||"MOVE_DOWN"===r.type||"MOVE_LEFT"===r.type||"MOVE_RIGHT"===r.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&m(!1);var F=st({state:e,type:r.type});return F?gt({state:e,impact:F.impact,clientSelection:F.clientSelection,scrollJumpRequest:F.scrollJumpRequest}):e}if("DROP_PENDING"===r.type){var G,W=r.payload.reason;return"COLLECTING"!==e.phase&&m(!1),n({phase:"DROP_PENDING"},e,((G={}).phase="DROP_PENDING",G.isWaiting=!0,G.reason=W,G))}if("DROP_ANIMATE"===r.type){var k=r.payload,U=k.completed,H=k.dropDuration,V=k.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&m(!1),{phase:"DROP_ANIMATING",dimensions:e.dimensions,completed:U,dropDuration:H,newHomeClientOffset:V}}if("DROP_COMPLETE"===r.type){var z=r.payload;return{phase:"IDLE",completed:z.completed,shouldFlush:z.shouldFlush}}return e},Dt=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},It=function(){return{type:"COLLECTION_STARTING",payload:null}},Et=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},St=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},Ct=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},Ot=function(e){return{type:"MOVE",payload:e}},Pt=function(e){return void 0===e&&(e={shouldFlush:!1}),{type:"CLEAN",payload:e}},Nt=function(e){return{type:"DROP_COMPLETE",payload:e}},Rt=function(e){return{type:"DROP",payload:e}},Bt="cubic-bezier(.2,1,.1,1)",Lt={drop:0,combining:.7},At={drop:.75},Tt=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",_t={fluid:"opacity "+Tt,snap:"transform "+Tt+", opacity "+Tt,drop:function(e){var r=e+"s "+Bt;return"transform "+r+", opacity "+r},outOfTheWay:"transform "+Tt,placeholder:"height "+Tt+", width "+Tt+", margin "+Tt},Mt=function(e){return Ve(e,ke)?null:"translate("+e.x+"px, "+e.y+"px)"},jt={moveTo:Mt,drop:function(e,r){var t=Mt(e);return t?r?t+" scale("+At.drop+")":t:null}},Ft=.33,Gt=.55,Wt=Gt-Ft,kt=function(e){var r=e.getState,t=e.dispatch;return function(e){return function(o){if("DROP"===o.type){var i=r(),a=o.payload.reason;if("COLLECTING"!==i.phase){if("IDLE"!==i.phase){"DROP_PENDING"===i.phase&&i.isWaiting&&m(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&m(!1);var u=i.critical,c=i.dimensions,l=function(e){var r=e.reason,t=e.lastImpact,o=e.home,i=e.viewport,a=e.draggables,u=e.onLiftImpact,c=e.onLift,l="DROP"===r&&Boolean(rr(t));return l?t.destination?{impact:t,didDropInsideDroppable:l}:{impact:n({},t,{movement:Or}),didDropInsideDroppable:l}:{impact:mt({impact:u,destination:o,viewport:i,draggables:a,onLift:c,forceShouldAnimate:!0}),didDropInsideDroppable:l}}({reason:a,lastImpact:i.impact,onLift:i.onLift,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),s=l.impact,d=l.didDropInsideDroppable,p=c.draggables[i.critical.draggable.id],f=d?s.destination:null,g=d&&s.merge?s.merge.combine:null,v={index:u.draggable.index,droppableId:u.droppable.id},b={draggableId:p.descriptor.id,type:p.descriptor.type,source:v,reason:a,mode:i.movementMode,destination:f,combine:g},h=function(e){var r=e.impact,t=e.draggable,n=e.dimensions,o=e.viewport,i=e.onLift,a=n.draggables,u=n.droppables,c=rr(r),l=c?u[c]:null,s=u[t.descriptor.droppableId],d=vt({impact:r,draggable:t,draggables:a,onLift:i,droppable:l||s,viewport:o}),p=He(d,t.client.borderBox.center),f=r.merge;return f&&mr(f.combine.draggableId,i)?He(p,i.displacedBy.point):p}({impact:s,draggable:p,dimensions:c,viewport:i.viewport,onLift:i.onLift}),y={critical:i.critical,result:b,impact:s};if(!Ve(i.current.client.offset,h)||Boolean(b.combine)){var x=function(e){var r=e.current,t=e.destination,n=e.reason,o=qe(r,t);if(o<=0)return Ft;if(o>=1500)return Gt;var i=Ft+Wt*(o/1500);return Number(("CANCEL"===n?.6*i:i).toFixed(2))}({current:i.current.client.offset,destination:h,reason:a});t(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:h,dropDuration:x,completed:y}))}else t(Nt({completed:y,shouldFlush:!1}))}}else t(function(e){return{type:"DROP_PENDING",payload:e}}({reason:a}))}else e(o)}}},Ut=function(e){return e+1},Ht=function(e,r){var t=e.droppableId===r.droppableId,n=Ut(e.index),o=Ut(r.index);return t?"\n You have moved the item from position "+n+"\n to position "+o+"\n ":"\n You have moved the item from position "+n+"\n in list "+e.droppableId+"\n to list "+r.droppableId+"\n in position "+o+"\n "},Vt=function(e,r,t){return r.droppableId===t.droppableId?"\n The item "+e+"\n has been combined with "+t.draggableId:"\n The item "+e+"\n in list "+r.droppableId+"\n has been combined with "+t.draggableId+"\n in list "+t.droppableId+"\n "},zt=function(e){return"\n The item has returned to its starting position\n of "+Ut(e.index)+"\n"},$t=function(e){return"\n You have lifted an item in position "+Ut(e.source.index)+".\n Use the arrow keys to move, space bar to drop, and escape to cancel.\n"},qt=function(e){var r=e.destination;if(r)return Ht(e.source,r);var t=e.combine;return t?Vt(e.draggableId,e.source,t):"You are over an area that cannot be dropped on"},Yt=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+zt(e.source)+"\n ";var r=e.destination,t=e.combine;return r?"\n You have dropped the item.\n "+Ht(e.source,r)+"\n ":t?"\n You have dropped the item.\n "+Vt(e.draggableId,e.source,t)+"\n ":"\n The item has been dropped while not over a drop area.\n "+zt(e.source)+"\n "},Kt=function(){var e=[];return{add:function(r){var t=setTimeout((function(){return function(r){var t=nr(e,(function(e){return e.timerId===r}));-1===t&&m(!1),e.splice(t,1)[0].callback()}(t)})),n={timerId:t,callback:r};e.push(n)},flush:function(){if(e.length){var r=[].concat(e);e.length=0,r.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},Jt=function(e,r){r()},Xt=function(e,r){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:r}},Qt=function(e,r,t,n){if(e){var o=function(e){var r=!1,t=!1,n=setTimeout((function(){t=!0})),o=function(o){r||t||(r=!0,e(o),clearTimeout(n))};return o.wasCalled=function(){return r},o}(t);e(r,{announce:o}),o.wasCalled()||t(n(r))}else t(n(r))},Zt=function(e,r){var t=function(e,r){var t=Kt(),o=null,i=function(t){o||m(!1),o=null,Jt(0,(function(){return Qt(e().onDragEnd,t,r,Yt)}))};return{beforeStart:function(r,t){o&&m(!1),Jt(0,(function(){var n=e().onBeforeDragStart;n&&n(Xt(r,t))}))},start:function(n,i){o&&m(!1);var a=Xt(n,i);o={mode:i,lastCritical:n,lastLocation:a.source,lastCombine:null},t.add((function(){Jt(0,(function(){return Qt(e().onDragStart,a,r,$t)}))}))},update:function(i,a){var u=a.destination,c=a.merge?a.merge.combine:null;o||m(!1);var l=!function(e,r){if(e===r)return!0;var t=e.draggable.id===r.draggable.id&&e.draggable.droppableId===r.draggable.droppableId&&e.draggable.type===r.draggable.type&&e.draggable.index===r.draggable.index,n=e.droppable.id===r.droppable.id&&e.droppable.type===r.droppable.type;return t&&n}(i,o.lastCritical);l&&(o.lastCritical=i);var s,d,p=(d=u,!(null==(s=o.lastLocation)&&null==d||null!=s&&null!=d&&s.droppableId===d.droppableId&&s.index===d.index));p&&(o.lastLocation=u);var f=!function(e,r){return null==e&&null==r||null!=e&&null!=r&&e.draggableId===r.draggableId&&e.droppableId===r.droppableId}(o.lastCombine,c);if(f&&(o.lastCombine=c),l||p||f){var g=n({},Xt(i,o.mode),{combine:c,destination:u});t.add((function(){Jt(0,(function(){return Qt(e().onDragUpdate,g,r,qt)}))}))}},flush:function(){o||m(!1),t.flush()},drop:i,abort:function(){if(o){var e=n({},Xt(o.lastCritical,o.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,r);return function(e){return function(r){return function(n){if("INITIAL_PUBLISH"===n.type){var o=n.payload.critical;return t.beforeStart(o,n.payload.movementMode),r(n),void t.start(o,n.payload.movementMode)}if("DROP_COMPLETE"===n.type){var i=n.payload.completed.result;return t.flush(),r(n),void t.drop(i)}if(r(n),"CLEAN"!==n.type){var a=e.getState();"DRAGGING"===a.phase&&t.update(a.critical,a.impact)}else t.abort()}}}},en=function(e){return function(r){return function(t){if("DROP_ANIMATION_FINISHED"===t.type){var n=e.getState();"DROP_ANIMATING"!==n.phase&&m(!1),e.dispatch(Nt({completed:n.completed,shouldFlush:!1}))}else r(t)}}},rn=function(e){return function(r){return function(t){if(r(t),"PUBLISH_WHILE_DRAGGING"===t.type){var n=e.getState();"DROP_PENDING"===n.phase&&(n.isWaiting||e.dispatch(Rt({reason:n.reason})))}}}},tn=P,nn=function(e){var r,t=e.dimensionMarshal,n=e.styleMarshal,o=e.getResponders,i=e.announce,a=e.autoScroller;return S(wt,tn(function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(e){return function(){var t=e.apply(void 0,arguments),n=function(){throw new Error(x(15))},o={getState:t.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=r.map((function(e){return e(o)}));return n=P.apply(void 0,i)(t.dispatch),y(y({},t),{},{dispatch:n})}}}((r=n,function(){return function(e){return function(t){"INITIAL_PUBLISH"===t.type&&r.dragging(),"DROP_ANIMATE"===t.type&&r.dropping(t.payload.completed.result.reason),"CLEAN"!==t.type&&"DROP_COMPLETE"!==t.type||r.resting(),e(t)}}}),function(e){return function(){return function(r){return function(t){"DROP_COMPLETE"!==t.type&&"CLEAN"!==t.type&&"DROP_ANIMATE"!==t.type||e.stopPublishing(),r(t)}}}}(t),function(e){return function(r){var t=r.getState,n=r.dispatch;return function(r){return function(o){if("LIFT"===o.type){var i=o.payload,a=i.id,u=i.clientSelection,c=i.movementMode,l=t();"DROP_ANIMATING"===l.phase&&n(Nt({completed:l.completed,shouldFlush:!0})),"IDLE"!==t().phase&&m(!1);var s={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===c}},d=e.startPublishing(s),p=d.critical,f=d.dimensions,g=d.viewport;n({type:"INITIAL_PUBLISH",payload:{critical:p,dimensions:f,clientSelection:u,movementMode:c,viewport:g}})}else r(o)}}}}(t),kt,en,rn,function(e){return function(r){return function(t){return function(n){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"CLEAN"===e.type}(n))return e.stop(),void t(n);if(function(e){return"COLLECTION_STARTING"===e.type}(n))return e.cancelPending(),void t(n);if("INITIAL_PUBLISH"===n.type){t(n);var o=r.getState();return"DRAGGING"!==o.phase&&m(!1),void e.start(o)}t(n),e.scroll(r.getState())}}}}(a),Zt(o,i))))},on=function(){return{x:window.pageXOffset,y:window.pageYOffset}},an=function(){var e=document.documentElement;return e||m(!1),e},un=function(){var e=an();return Tr({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},cn=function(e){var r=e.critical,t=e.scrollOptions,n=e.entries,o=function(){var e=on(),r=un(),t=e.y,n=e.x,o=an(),i=o.clientWidth,a=o.clientHeight;return{frame:be({top:t,left:n,right:n+i,bottom:t+a}),scroll:{initial:e,current:e,max:r,diff:{value:ke,displacement:ke}}}}(),i=o.scroll.current,a=r.droppable,u=tr(n.droppables).filter((function(e){return e.descriptor.type===a.type})).map((function(e){return e.callbacks.getDimensionAndWatchScroll(i,t)})),c=tr(n.draggables).filter((function(e){return e.descriptor.type===r.draggable.type})).map((function(e){return e.getDimension(i)}));return{dimensions:{draggables:ar(c),droppables:ir(u)},critical:r,viewport:o}},ln=function(e,r){e.critical.draggable.type!==r.type&&m(!1)},sn=function(e){var r={droppables:{},draggables:{}},t=null,n=function(e){var r=e.getEntries,t=e.callbacks,n=function(){},o={additions:{},removals:{},modified:{}},i=null,a=function(){n(),i||(i=requestAnimationFrame((function(){i=null,t.collectionStarting();var e=t.getCritical(),n=r(),a=o,u=a.additions,c=a.removals,l=a.modified,s=Ae()(u).map((function(e){return n.draggables[e].getDimension(ke)})).sort((function(e,r){return e.descriptor.index-r.descriptor.index})),d=Ae()(l).map((function(r){var t=n.droppables[r];t||m(!1);var o={withoutPlaceholder:!(t.descriptor.id===e.droppable.id)};return t.callbacks.recollect(o)})),p={additions:s,removals:Ae()(c),modified:d};o={additions:{},removals:{},modified:{}},t.publish(p)})))};return{add:function(e){o.additions[e.id]=e,o.modified[e.droppableId]=!0,o.removals[e.id]&&delete o.removals[e.id],a()},remove:function(e){o.removals[e.id]=e,o.modified[e.droppableId]=!0,o.additions[e.id]&&delete o.additions[e.id],a()},stop:function(){i&&(cancelAnimationFrame(i),i=null,o={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:e.publishWhileDragging,collectionStarting:e.collectionStarting,getCritical:function(){return t||m(!1),t.critical}},getEntries:function(){return r}}),o={registerDraggable:function(e,o){var i={descriptor:e,getDimension:o};r.draggables[e.id]=i,t&&(ln(t,e),n.add(e))},updateDraggable:function(e,t,n){var o=r.draggables[e.id];o||m(!1),o.descriptor===e&&delete r.draggables[e.id];var i={descriptor:t,getDimension:n};r.draggables[t.id]=i},unregisterDraggable:function(e){var o=r.draggables[e.id];o||m(!1),o.descriptor===e&&(delete r.draggables[e.id],t&&(t.critical.draggable.id===e.id&&m(!1),ln(t,e),n.remove(e)))},registerDroppable:function(e,n){var o=e.id;r.droppables[o]={descriptor:e,callbacks:n},t&&m(!1)},unregisterDroppable:function(e){var n=r.droppables[e.id];n||m(!1),n.descriptor===e&&(delete r.droppables[e.id],t&&m(!1))},updateDroppableIsEnabled:function(n,o){r.droppables[n]||m(!1),t&&e.updateDroppableIsEnabled({id:n,isEnabled:o})},updateDroppableIsCombineEnabled:function(n,o){r.droppables[n]||m(!1),t&&e.updateDroppableIsCombineEnabled({id:n,isCombineEnabled:o})},scrollDroppable:function(e,n){var o=r.droppables[e];o||m(!1),t&&o.callbacks.scroll(n)},updateDroppableScroll:function(n,o){r.droppables[n]||m(!1),t&&e.updateDroppableScroll({id:n,offset:o})},startPublishing:function(e){t&&m(!1);var n=r.draggables[e.draggableId];n||m(!1);var o=r.droppables[n.descriptor.droppableId];o||m(!1);var i={draggable:n.descriptor,droppable:o.descriptor};return t={critical:i},cn({critical:i,entries:r,scrollOptions:e.scrollOptions})},stopPublishing:function(){if(t){n.stop();var e=t.critical.droppable;tr(r.droppables).filter((function(r){return r.descriptor.type===e.type})).forEach((function(e){return e.callbacks.dragStopped()})),t=null}}};return o},dn=function(e,r){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==r&&"DROP"===e.completed.result.reason)},pn=function(e){window.scrollBy(e.x,e.y)},fn=Ne((function(e){return ur(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),gn=function(e){var r=e.center,t=e.destination,n=e.droppables;if(t){var o=n[t];return o.frame?o:null}var i=function(e,r){var t=or(fn(r),(function(r){return r.frame||m(!1),sr(r.frame.pageMarginBox)(e)}));return t}(r,n);return i},mn=.25,vn=.05,bn=28,hn=function(e){return Math.pow(e,2)},yn={stopDampeningAt:1200,accelerateAt:360},xn=function(e){var r=e.startOfRange,t=e.endOfRange,n=e.current,o=t-r;return 0===o?0:(n-r)/o},wn=yn.accelerateAt,Dn=yn.stopDampeningAt,In=function(e){var r=e.distanceToEdge,t=e.thresholds,n=e.dragStartTime,o=e.shouldUseTimeDampening,i=function(e,r){if(e>r.startScrollingFrom)return 0;if(e<=r.maxScrollValueAt)return bn;if(e===r.startScrollingFrom)return 1;var t=xn({startOfRange:r.maxScrollValueAt,endOfRange:r.startScrollingFrom,current:e}),n=bn*hn(1-t);return Math.ceil(n)}(r,t);return 0===i?0:o?Math.max(function(e,r){var t=r,n=Dn,o=_e()()-t;if(o>=Dn)return e;if(o<wn)return 1;var i=xn({startOfRange:wn,endOfRange:n,current:o}),a=e*hn(i);return Math.ceil(a)}(i,n),1):i},En=function(e){var r=e.container,t=e.distanceToEdges,n=e.dragStartTime,o=e.axis,i=e.shouldUseTimeDampening,a=function(e,r){return{startScrollingFrom:e[r.size]*mn,maxScrollValueAt:e[r.size]*vn}}(r,o);return t[o.end]<t[o.start]?In({distanceToEdge:t[o.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:i}):-1*In({distanceToEdge:t[o.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:i})},Sn=Ke((function(e){return 0===e?0:e})),Cn=function(e){var r=e.dragStartTime,t=e.container,n=e.subject,o=e.center,i=e.shouldUseTimeDampening,a={top:o.y-t.top,right:t.right-o.x,bottom:t.bottom-o.y,left:o.x-t.left},u=En({container:t,distanceToEdges:a,dragStartTime:r,axis:pr,shouldUseTimeDampening:i}),c=En({container:t,distanceToEdges:a,dragStartTime:r,axis:fr,shouldUseTimeDampening:i}),l=Sn({x:c,y:u});if(Ve(l,ke))return null;var s=function(e){var r=e.container,t=e.subject,n=e.proposedScroll,o=t.height>r.height,i=t.width>r.width;return i||o?i&&o?null:{x:i?0:n.x,y:o?0:n.y}:n}({container:t,subject:n,proposedScroll:l});return s?Ve(s,ke)?null:s:null},On=Ke((function(e){return 0===e?0:e>0?1:-1})),Pn=function(){var e=function(e,r){return e<0?e:e>r?e-r:0};return function(r){var t=r.current,n=r.max,o=r.change,i=Ue(t,o),a={x:e(i.x,n.x),y:e(i.y,n.y)};return Ve(a,ke)?null:a}}(),Nn=function(e){var r=e.max,t=e.current,n=e.change,o={x:Math.max(t.x,r.x),y:Math.max(t.y,r.y)},i=On(n),a=Pn({max:o,current:t,change:i});return!a||(0!==i.x&&0===a.x||0!==i.y&&0===a.y)},Rn=function(e,r){return Nn({current:e.scroll.current,max:e.scroll.max,change:r})},Bn=function(e,r){var t=e.frame;return!!t&&Nn({current:t.scroll.current,max:t.scroll.max,change:r})},Ln=function(e){var r=e.state,t=e.dragStartTime,n=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=r.current.page.borderBoxCenter,u=r.dimensions.draggables[r.critical.draggable.id].page.marginBox;if(r.isWindowScrollAllowed){var c=function(e){var r=e.viewport,t=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=Cn({dragStartTime:o,container:r.frame,subject:t,center:n,shouldUseTimeDampening:i});return a&&Rn(r,a)?a:null}({dragStartTime:t,viewport:r.viewport,subject:u,center:a,shouldUseTimeDampening:n});if(c)return void o(c)}var l=gn({center:a,destination:rr(r.impact),droppables:r.dimensions.droppables});if(l){var s=function(e){var r=e.droppable,t=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=r.frame;if(!a)return null;var u=Cn({dragStartTime:o,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:i});return u&&Bn(r,u)?u:null}({dragStartTime:t,droppable:l,subject:u,center:a,shouldUseTimeDampening:n});s&&i(l.descriptor.id,s)}},An=function(e){var r=e.move,t=e.scrollDroppable,n=e.scrollWindow,o=function(e,r){if(!Bn(e,r))return r;var n=function(e,r){var t=e.frame;return t&&Bn(e,r)?Pn({current:t.scroll.current,max:t.scroll.max,change:r}):null}(e,r);if(!n)return t(e.descriptor.id,r),null;var o=He(r,n);return t(e.descriptor.id,o),He(r,o)},i=function(e,r,t){if(!e)return t;if(!Rn(r,t))return t;var o=function(e,r){if(!Rn(e,r))return null;var t=e.scroll.max,n=e.scroll.current;return Pn({current:n,max:t,change:r})}(r,t);if(!o)return n(t),null;var i=He(t,o);return n(i),He(t,i)};return function(e){var t=e.scrollJumpRequest;if(t){var n=rr(e.impact);n||m(!1);var a=o(e.dimensions.droppables[n],t);if(a){var u=e.viewport,c=i(e.isWindowScrollAllowed,u,a);c&&function(e,t){var n=Ue(e.current.client.selection,t);r({client:n})}(e,c)}}}},Tn=function(e){var r=e.scrollDroppable,t=e.scrollWindow,n=e.move,o=function(e){var r=e.scrollWindow,t=e.scrollDroppable,n=Me(r),o=Me(t),i=null,a=function(e){i||m(!1);var r=i,t=r.shouldUseTimeDampening,a=r.dragStartTime;Ln({state:e,scrollWindow:n,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t})},u=function(){i||m(!1),n.cancel(),o.cancel()};return{start:function(e){i&&m(!1);var r=_e()(),t=!1,n=function(){t=!0};Ln({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:n,scrollDroppable:n}),i={dragStartTime:r,shouldUseTimeDampening:t},t&&a(e)},stop:function(){i&&(u(),i=null)},cancelPending:u,scroll:a}}({scrollWindow:t,scrollDroppable:r}),i=An({move:n,scrollWindow:t,scrollDroppable:r});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},cancelPending:o.cancelPending,start:o.start,stop:o.stop}},_n="data-react-beautiful-dnd",Mn=_n+"-drag-handle",jn=_n+"-draggable",Fn=_n+"-droppable",Gn=function(e,r){return e.map((function(e){var t=e.styles[r];return t?e.selector+" { "+t+" }":""})).join(" ")},Wn=function(e){var r,t=(r=e,function(e){return"["+e+'="'+r+'"]'}),n=function(){var e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(Mn),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}}(),o=[function(){var e="\n transition: "+_t.outOfTheWay+";\n ";return{selector:t(jn),styles:{dragging:e,dropAnimating:e,userCancel:e}}}(),n,{selector:t(Fn),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:Gn(o,"always"),resting:Gn(o,"resting"),dragging:Gn(o,"dragging"),dropAnimating:Gn(o,"dropAnimating"),userCancel:Gn(o,"userCancel")}},kn="undefined"!==typeof window?o.useLayoutEffect:o.useEffect,Un=function(){var e=document.querySelector("head");return e||m(!1),e},Hn=function(){var e=document.createElement("style");return e.type="text/css",e};var Vn=i().createContext(null),zn=function(){var e=document.body;return e||m(!1),e},$n={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},qn=function(e){return"react-beautiful-dnd-announcement-"+e};var Yn=i().createContext(null);function Kn(e){var r=(0,o.useRef)(e);return(0,o.useEffect)((function(){r.current=e})),r}var Jn=function(e){return{onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}};function Xn(e){return e.current||m(!1),e.current}function Qn(e){var r=e.uniqueId,t=e.setOnError,a=(0,o.useRef)(null);(0,o.useEffect)((function(){}),[]);var l=Kn(e),s=c((function(){return Jn(l.current)}),[l]),d=function(e){var r=u((function(){return qn(e)}),[e]),t=(0,o.useRef)(null);(0,o.useEffect)((function(){t.current&&m(!1);var e=document.createElement("div");return t.current=e,e.id=r,e.setAttribute("aria-live","assertive"),e.setAttribute("role","log"),e.setAttribute("aria-atomic","true"),Fe()(e.style,$n),zn().appendChild(e),function(){var e=t.current;e||m(!1),zn().removeChild(e),t.current=null}}),[r]);var n=c((function(e){var r=t.current;r&&(r.textContent=e)}),[]);return n}(r),p=function(e){var r=u((function(){return""+e}),[e]),t=u((function(){return Wn(r)}),[r]),n=(0,o.useRef)(null),i=(0,o.useRef)(null),a=c(Ne((function(e){var r=i.current;r||m(!1),r.textContent=e})),[]),l=c((function(e){var r=n.current;r||m(!1),r.textContent=e}),[]);kn((function(){(n.current||i.current)&&m(!1);var e=Hn(),o=Hn();return n.current=e,i.current=o,e.setAttribute(_n+"-always",r),o.setAttribute(_n+"-dynamic",r),Un().appendChild(e),Un().appendChild(o),l(t.always),a(t.resting),function(){var e=function(e){var r=e.current;r||m(!1),Un().removeChild(r),e.current=null};e(n),e(i)}}),[l,a,t.always,t.resting,r]);var s=c((function(){return a(t.dragging)}),[a,t.dragging]),d=c((function(e){a("DROP"!==e?t.userCancel:t.dropAnimating)}),[a,t.dropAnimating,t.userCancel]),p=c((function(){i.current&&a(t.resting)}),[a,t.resting]);return u((function(){return{dragging:s,dropping:d,resting:p,styleContext:r}}),[s,d,p,r])}(r),f=c((function(e){Xn(a).dispatch(e)}),[]),g=u((function(){return O({publishWhileDragging:Dt,updateDroppableScroll:Et,updateDroppableIsEnabled:St,updateDroppableIsCombineEnabled:Ct,collectionStarting:It},f)}),[f]),v=u((function(){return sn(g)}),[g]),b=u((function(){return Tn(n({scrollWindow:pn,scrollDroppable:v.scrollDroppable},O({move:Ot},f)))}),[v.scrollDroppable,f]),h=u((function(){return nn({dimensionMarshal:v,styleMarshal:p,announce:d,autoScroller:b,getResponders:s})}),[d,b,v,s,p]);a.current=h;var y=c((function(){var e=Xn(a);"IDLE"!==e.getState().phase&&e.dispatch(Pt({shouldFlush:!0}))}),[]);t(y);var x=c((function(e){return dn(Xn(a).getState(),e)}),[]),w=c((function(){return dt(Xn(a).getState())}),[]),D=u((function(){return{marshal:v,style:p.styleContext,canLift:x,isMovementAllowed:w}}),[v,x,w,p.styleContext]);return(0,o.useEffect)((function(){return y}),[y]),i().createElement(Yn.Provider,{value:D},i().createElement(_,{context:Vn,store:h},e.children))}var Zn=0;function eo(e){var r=u((function(){return Zn++}),[]);return i().createElement(We,null,(function(t){return i().createElement(Qn,n({setOnError:t,uniqueId:r},e),e.children)}))}var ro=function(e){return function(r){return e===r}},to=ro("scroll"),no=ro("auto"),oo=(ro("visible"),function(e,r){return r(e.overflowX)||r(e.overflowY)}),io=function(e){var r=window.getComputedStyle(e),t={overflowX:r.overflowX,overflowY:r.overflowY};return oo(t,to)||oo(t,no)},ao=function e(r){return null==r||r===document.body||r===document.documentElement?null:io(r)?r:e(r.parentElement)},uo=function(e){return{x:e.scrollLeft,y:e.scrollTop}},co=function e(r){return!!r&&("fixed"===window.getComputedStyle(r).position||e(r.parentElement))},lo=function(e){return{closestScrollable:ao(e),isFixedOnPage:co(e)}},so=function(e){var r=e.ref,t=e.descriptor,n=e.env,o=e.windowScroll,i=e.direction,a=e.isDropDisabled,u=e.isCombineEnabled,c=e.shouldClipSubject,l=n.closestScrollable,s=function(e,r){var t=Ce(e);if(!r)return t;if(e!==r)return t;var n=t.paddingBox.top-r.scrollTop,o=t.paddingBox.left-r.scrollLeft,i=n+r.scrollHeight,a=o+r.scrollWidth,u=he({top:n,right:a,bottom:i,left:o},t.border);return we({borderBox:u,margin:t.margin,border:t.border,padding:t.padding})}(r,l),d=Ee(s,o),p=function(){if(!l)return null;var e=Ce(l),r={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:Ee(e,o),scroll:uo(l),scrollSize:r,shouldClipSubject:c}}();return _r({descriptor:t,isEnabled:!a,isCombineEnabled:u,isFixedOnPage:n.isFixedOnPage,direction:i,client:s,page:d,closest:p})};var po={passive:!1},fo={passive:!0},go=function(e){return e.shouldPublishImmediately?po:fo};function mo(e){var r=(0,o.useContext)(e);return r||m(!1),r}var vo=function(e){return e&&e.env.closestScrollable||null};function bo(){}var ho={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},yo=function(e){var r=e.isAnimatingOpenOnMount,t=e.placeholder,n=function(e){var r=e.isAnimatingOpenOnMount,t=e.placeholder,n=e.animate;return r||"close"===n?ho:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin}}({isAnimatingOpenOnMount:r,placeholder:t,animate:e.animate});return{display:t.display,boxSizing:"border-box",width:n.width,height:n.height,marginTop:n.margin.top,marginRight:n.margin.right,marginBottom:n.margin.bottom,marginLeft:n.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:_t.placeholder}};var xo=i().memo((function(e){var r=(0,o.useRef)(null),t=c((function(){r.current&&(clearTimeout(r.current),r.current=null)}),[]),n=e.animate,a=e.onTransitionEnd,u=e.onClose,l=e.styleContext,s=(0,o.useState)("open"===e.animate),d=s[0],p=s[1];(0,o.useEffect)((function(){return d?"open"!==n?(t(),p(!1),bo):r.current?bo:(r.current=setTimeout((function(){r.current=null,p(!1)})),t):bo}),[n,d,t]);var f=c((function(e){"height"===e.propertyName&&(a(),"close"===n&&u())}),[n,u,a]),g=yo({isAnimatingOpenOnMount:d,animate:e.animate,placeholder:e.placeholder});return i().createElement(e.placeholder.tagName,{style:g,"data-react-beautiful-dnd-placeholder":l,onTransitionEnd:f,ref:e.innerRef})})),wo=i().createContext(null),Do=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Io(e){return e instanceof Do(e).HTMLElement}var Eo=function(e){function r(){for(var r,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(r=e.call.apply(e,[this].concat(n))||this).state={isVisible:Boolean(r.props.on),data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){"close"===r.state.animate&&r.setState({isVisible:!1})},r}return p(r,e),r.getDerivedStateFromProps=function(e,r){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:r.isVisible?{isVisible:!0,data:r.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},r.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},r}(i().PureComponent);var So=function(e,r){return e===r},Co=function(e){var r=e.combine,t=e.destination;return t?t.droppableId:r?r.droppableId:null},Oo=function(e,r){return e===r.droppable.type},Po=function(e,r){return r.draggables[e.draggable.id]},No=ge((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null}},r=n({},e,{shouldAnimatePlaceholder:!1}),t=Ne((function(r,t,n,o){return n.descriptor.droppableId===r?{placeholder:n.placeholder,shouldAnimatePlaceholder:!1,snapshot:o}:t?{placeholder:n.placeholder,shouldAnimatePlaceholder:!0,snapshot:o}:e})),o=Ne((function(e,r,t){var n=t.descriptor.id;return{isDraggingOver:r,draggingOverWith:r?n:null,draggingFromThisWith:t.descriptor.droppableId===e?n:null}}));return function(n,i){var a=i.droppableId,u=i.type;if(n.isDragging){var c=n.critical;if(!Oo(u,c))return e;var l=Po(c,n.dimensions),s=rr(n.impact)===a,d=o(a,s,l);return t(a,s,l,d)}if("DROP_ANIMATING"===n.phase){var p=n.completed;if(!Oo(u,p.critical))return e;var f=Po(p.critical,n.dimensions),g=o(a,Co(p.result)===a,f);return t(a,rr(p.impact)===a,f,g)}if("IDLE"===n.phase&&!n.completed&&n.shouldFlush)return r;if("IDLE"===n.phase&&n.completed){var m=n.completed;if(!Oo(u,m.critical))return e;var v=rr(m.impact)===a,b=Boolean(m.impact.merge);return n.shouldFlush?r:v?b?e:r:e}return e}}),{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:Vn,pure:!0,areStatePropsEqual:So})((function(e){var r=(0,o.useContext)(Yn);r||m(!1);var t=r.style,n=r.isMovementAllowed,a=(0,o.useRef)(null),l=(0,o.useRef)(null),s=e.children,d=e.droppableId,p=e.type,f=e.direction,g=e.ignoreContainerClipping,v=e.isDropDisabled,b=e.isCombineEnabled,h=e.snapshot,y=e.updateViewportMaxScroll,x=c((function(){return a.current}),[]),w=c((function(){return l.current}),[]),D=c((function(e){a.current=e}),[]),I=c((function(e){l.current=e}),[]),E=c((function(){n()&&y({maxScroll:un()})}),[n,y]);!function(e){var r=(0,o.useRef)(null),t=mo(Yn).marshal,n=Kn(e),i=u((function(){return{id:e.droppableId,type:e.type}}),[e.droppableId,e.type]),a=(0,o.useRef)(i),l=u((function(){return Ne((function(e,n){r.current||m(!1);var o={x:e,y:n};t.updateDroppableScroll(i.id,o)}))}),[i.id,t]),s=c((function(){var e=r.current;return e&&e.env.closestScrollable?uo(e.env.closestScrollable):ke}),[]),d=c((function(){var e=s();l(e.x,e.y)}),[s,l]),p=u((function(){return Me(d)}),[d]),f=c((function(){var e=r.current,t=vo(e);e&&t||m(!1),e.scrollOptions.shouldPublishImmediately?d():p()}),[p,d]),g=c((function(e,t){r.current&&m(!1);var o=n.current,a=o.getDroppableRef();a||m(!1);var u=lo(a),c={ref:a,descriptor:i,env:u,scrollOptions:t};r.current=c;var l=so({ref:a,descriptor:i,env:u,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping});return u.closestScrollable&&u.closestScrollable.addEventListener("scroll",f,go(c.scrollOptions)),l}),[i,f,n]),v=c((function(e){var t=r.current,o=vo(t);t&&o||m(!1);var i=n.current,a=function(){return so({ref:t.ref,descriptor:t.descriptor,env:t.env,windowScroll:ke,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping})};return e.withoutPlaceholder?function(e,r){if(!e)return r();var t=e.style.display;e.style.display="none";var n=r();return e.style.display=t,n}(i.getPlaceholderRef(),a):a()}),[n]),b=c((function(){var e=r.current;e||m(!1);var t=vo(e);r.current=null,t&&(p.cancel(),t.removeEventListener("scroll",f,go(e.scrollOptions)))}),[f,p]),h=c((function(e){var t=r.current;t||m(!1);var n=vo(t);n||m(!1),n.scrollTop+=e.y,n.scrollLeft+=e.x}),[]),y=u((function(){return{getDimensionAndWatchScroll:g,recollect:v,dragStopped:b,scroll:h}}),[b,g,v,h]);kn((function(){return a.current=i,t.registerDroppable(i,y),function(){r.current&&b(),t.unregisterDroppable(i)}}),[y,i,b,t]),kn((function(){r.current&&t.updateDroppableIsEnabled(a.current.id,!e.isDropDisabled)}),[e.isDropDisabled,t]),kn((function(){r.current&&t.updateDroppableIsCombineEnabled(a.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,t])}({droppableId:d,type:p,direction:f,isDropDisabled:v,isCombineEnabled:b,ignoreContainerClipping:g,getDroppableRef:x,getPlaceholderRef:w});var S,C=i().createElement(Eo,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var r=e.onClose,n=e.data,o=e.animate;return i().createElement(xo,{placeholder:n,onClose:r,innerRef:I,animate:o,styleContext:t,onTransitionEnd:E})})),O=u((function(){return{innerRef:D,placeholder:C,droppableProps:{"data-react-beautiful-dnd-droppable":t}}}),[C,D,t]),P=u((function(){return{droppableId:d,type:p}}),[d,p]);return(S={props:e,getDroppableRef:function(){return a.current},getPlaceholderRef:function(){return l.current}}).props,S.getDroppableRef,S.getPlaceholderRef,(0,o.useEffect)((function(){})),i().createElement(wo.Provider,{value:P},s(O,h))}));No.defaultProps={type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1};var Ro={dragging:5e3,dropAnimating:4500},Bo=function(e,r){return r?_t.drop(r.duration):e?_t.snap:_t.fluid},Lo=function(e,r){return e?r?Lt.drop:Lt.combining:null},Ao=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode};function To(e){return"DRAGGING"===e.type?function(e){var r=e.dimension.client,t=e.offset,n=e.combineWith,o=e.dropping,i=Boolean(n),a=Ao(e),u=Boolean(o),c=u?jt.drop(t,i):jt.moveTo(t);return{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:Bo(a,o),transform:c,opacity:Lo(i,u),zIndex:u?Ro.dropAnimating:Ro.dragging,pointerEvents:"none"}}(e):(r=e,{transform:jt.moveTo(r.offset),transition:r.shouldAnimateDisplacement?null:"none"});var r}var _o,Mo=function(){var e=!1;return{handle:function(){e&&m(!1),e=!0},isHandled:function(){return e},reset:function(){e=!1}}},jo=function(e,r){return n({},e,r)},Fo=function(e,r,t){r.forEach((function(r){var n=jo(t,r.options);e.addEventListener(r.eventName,r.fn,n)}))},Go=function(e,r,t){r.forEach((function(r){var n=jo(t,r.options);e.removeEventListener(r.eventName,r.fn,n)}))},Wo=function(e){var r=Ne((function(r,t){var n={x:r,y:t};e.onMove(n)})),t=Me((function(e){return r(e.x,e.y)})),n=Me(e.onMoveUp),o=Me(e.onMoveDown),i=Me(e.onMoveRight),a=Me(e.onMoveLeft),u=Me(e.onWindowScroll);return{move:t,moveUp:n,moveDown:o,moveRight:i,moveLeft:a,windowScrollMove:u,cancel:function(){t.cancel(),n.cancel(),o.cancel(),i.cancel(),a.cancel(),u.cancel()}}},ko=27,Uo=32,Ho=37,Vo=38,zo=39,$o=40,qo=function(){var e="visibilitychange";return"undefined"===typeof document?e:or([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}(),Yo={capture:!0},Ko=function(e){var r=!1,t=function(){r&&(r=!1,Go(e(),n,Yo))},n=[{eventName:"click",fn:function(e){e.preventDefault(),t()}},{eventName:"mousedown",fn:t},{eventName:"touchstart",fn:t}];return{preventNext:function(){r&&t(),r||(r=!0,Fo(e(),n,Yo))},abort:t}},Jo=function(e,r){return Math.abs(r.x-e.x)>=5||Math.abs(r.y-e.y)>=5},Xo=((_o={})[13]=!0,_o[9]=!0,_o),Qo=function(e){Xo[e.keyCode]&&e.preventDefault()},Zo=0,ei=function(){},ri=Mo();function ti(e){return e instanceof Do(e).Element}var ni,oi={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0},ii=function e(r,t){if(null==t)return!1;if(Boolean(oi[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==r&&e(r,t.parentElement)},ai=function(e,r){if(r)return!0;var t=e.target,n=e.currentTarget;return!ti(t)||!ti(n)||!ii(n,t)},ui=function(e){return be(e.getBoundingClientRect()).center},ci=((ni={})[34]=!0,ni[33]=!0,ni[36]=!0,ni[35]=!0,ni);function li(){}var si=120,di=.15,pi=Mo(),fi=function(){};var gi="["+Mn+"]",mi=function(e){!function(e){return Boolean(Do(e).SVGElement)&&e instanceof Do(e).SVGElement}(e)||m(!1)},vi=function(e){if(e.hasAttribute(Mn))return mi(e),e;var r=e.querySelector(gi);return mi(e),r||m(!1),Io(r)||m(!1),r};var bi=null,hi={capture:!0},yi=function(){var e=!1,r=function(){e&&(e=!1,window.removeEventListener("focus",t,hi))},t=function(){r(),bi=null},n=function(){e||(e=!0,window.addEventListener("focus",t,hi))};return n.cancel=function(){return r()},n}(),xi={retain:function(e){bi=e,yi()},tryRestoreFocus:function(e,r){if(bi&&e===bi){bi=null,yi.cancel();var t=vi(r);t&&t.focus()}}};function wi(){}function Di(e){e.preventDefault()}function Ii(e){var r=(0,o.useRef)(null),t=c((function(e){r.current&&m(!1),r.current={abort:e}}),[]),n=c((function(){r.current||m(!1),r.current=null}),[]),i=c((function(){r.current||m(!1),r.current.abort()}),[]),a=mo(Yn),l=a.canLift,s=a.style,d=e.isDragging,p=e.isEnabled,f=e.draggableId,g=e.callbacks,v=e.getDraggableRef,b=e.getShouldRespectForcePress,h=e.canDragInteractiveElements,y=Kn(e);!function(e){var r=e.isEnabled,t=e.getDraggableRef;(0,o.useEffect)((function(){}),[t,r])}({isEnabled:p,getDraggableRef:v});var x=c((function(){return Do(v())}),[v]),w=c((function(e){return!!p&&(!r.current&&(!!l(f)&&ai(e,h)))}),[h,l,f,p]),D=function(e){var r=(0,o.useRef)(!1),t=Kn(e),n=e.getDraggableRef,i=c((function(){r.current=!0}),[]),a=c((function(){r.current=!1}),[]);kn((function(){var e=t.current;if(!e.isEnabled)return wi;var o=n();o||m(!1);var i=vi(o);return xi.tryRestoreFocus(e.draggableId,i),function(){var e=t.current;e.isEnabled&&r.current&&(e.isDragging||e.isDropAnimating)&&xi.retain(e.draggableId)}}),[n,t]);var u=(0,o.useRef)(null);return kn((function(){if(u.current){var e=n();e&&e!==u.current&&r.current&&t.current.isEnabled&&vi(e).focus()}})),kn((function(){u.current=n()})),{onBlur:a,onFocus:i}}(e),I=D.onBlur,E=D.onFocus,S=function(e){var r=e.canStartCapturing,t=e.getWindow,n=e.callbacks,i=e.onCaptureStart,a=e.onCaptureEnd,l=(0,o.useRef)(null),s=(0,o.useRef)(!1),d=(0,o.useRef)(ei),p=c((function(){return Boolean(l.current||s.current)}),[]),f=u((function(){return p()&&m(!1),Wo(n)}),[n,p]),g=u((function(){return Ko(t)}),[t]),v=c((function(){if(p()){f.cancel(),d.current();var e=s.current;ri.reset(),e&&g.preventNext(),l.current=null,s.current=!1,a()}}),[p,a,g,f]),b=c((function(){var e=s.current;v(),e&&n.onCancel()}),[n,v]),h=c((function(){s.current&&m(!1);var e=l.current;e||m(!1),l.current=null,s.current=!0,n.onLift({clientSelection:e,movementMode:"FLUID"})}),[n]),y=u((function(){return p()&&m(!1),[{eventName:"mousemove",fn:function(e){var r=e.button,t=e.clientX,n=e.clientY;if(r===Zo){var o={x:t,y:n};if(s.current)return e.preventDefault(),void f.move(o);var i=l.current;i||(v(),m(!1)),Jo(i,o)&&(e.preventDefault(),h())}}},{eventName:"mouseup",fn:function(e){var r=s.current;v(),r&&(e.preventDefault(),n.onDrop())}},{eventName:"mousedown",fn:function(e){s.current&&e.preventDefault(),b()}},{eventName:"keydown",fn:function(e){if(!l.current)return e.keyCode===ko?(e.preventDefault(),void b()):void Qo(e);v()}},{eventName:"resize",fn:b},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(e){e.currentTarget===t()&&(l.current?v():f.windowScrollMove())}},{eventName:"webkitmouseforcedown",fn:function(){b()}},{eventName:qo,fn:b}]}),[p,b,h,f,v,n,t]),x=c((function(){var e=t(),r={capture:!0};d.current=function(){return Go(e,y,r)},Fo(e,y,r)}),[t,y]),w=c((function(e){l.current&&m(!1),l.current=e,i(v),x()}),[x,i,v]);return c((function(e){if(!ri.isHandled()&&(p()&&m(!1),r(e)&&e.button===Zo&&!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))){ri.handle(),e.preventDefault();var t={x:e.clientX,y:e.clientY};w(t)}}),[r,p,w])}(u((function(){return{callbacks:g,getDraggableRef:v,getWindow:x,canStartCapturing:w,onCaptureStart:t,onCaptureEnd:n,getShouldRespectForcePress:b}}),[g,v,x,w,t,n,b])),C=function(e){var r=e.canStartCapturing,t=e.getWindow,n=e.callbacks,i=e.onCaptureStart,a=e.onCaptureEnd,l=e.getDraggableRef,s=(0,o.useRef)(!1),d=(0,o.useRef)(li),p=c((function(){return s.current}),[]),f=u((function(){return p()&&m(!1),Wo(n)}),[n,p]),g=c((function(){p()&&(f.cancel(),d.current(),s.current=!1,a())}),[p,a,f]),v=c((function(){var e=s.current;g(),e&&n.onCancel()}),[n,g]),b=u((function(){return p()&&m(!1),[{eventName:"mousedown",fn:v},{eventName:"mouseup",fn:v},{eventName:"click",fn:v},{eventName:"touchstart",fn:v},{eventName:"resize",fn:v},{eventName:"wheel",fn:v,options:{passive:!0}},{eventName:"scroll",options:{capture:!1},fn:function(e){e.currentTarget===t()&&n.onWindowScroll()}},{eventName:qo,fn:v}]}),[n,v,p,t]),h=c((function(){var e=t(),r={capture:!0};d.current=function(){return Go(e,b,r)},Fo(e,b,r)}),[t,b]),y=c((function(){s.current&&m(!1);var e=l();e||m(!1),s.current=!0,i(g),h();var r=ui(e);n.onLift({clientSelection:r,movementMode:"SNAP"})}),[h,n,l,i,g]);return c((function(e){if(!p()){if(e.defaultPrevented)return;if(!r(e))return;if(e.keyCode!==Uo)return;return e.preventDefault(),void y()}return e.keyCode===ko?(e.preventDefault(),void v()):e.keyCode===Uo?(e.preventDefault(),g(),void n.onDrop()):e.keyCode===$o?(e.preventDefault(),void f.moveDown()):e.keyCode===Vo?(e.preventDefault(),void f.moveUp()):e.keyCode===zo?(e.preventDefault(),void f.moveRight()):e.keyCode===Ho?(e.preventDefault(),void f.moveLeft()):void(ci[e.keyCode]?e.preventDefault():Qo(e))}),[n,r,v,p,f,y,g])}(u((function(){return{callbacks:g,getDraggableRef:v,getWindow:x,canStartCapturing:w,onCaptureStart:t,onCaptureEnd:n}}),[g,w,v,x,n,t])),O=function(e){var r=e.callbacks,t=e.getWindow,n=e.canStartCapturing,i=e.getShouldRespectForcePress,a=e.onCaptureStart,l=e.onCaptureEnd,s=(0,o.useRef)(null),d=(0,o.useRef)(!1),p=(0,o.useRef)(!1),f=(0,o.useRef)(fi),g=c((function(){return Boolean(s.current||d.current)}),[]),v=u((function(){return Ko(t)}),[t]),b=u((function(){return g()&&m(!1),Wo(r)}),[r,g]),h=c((function(){if(g()){if(b.cancel(),f.current(),pi.reset(),p.current=!1,l(),d.current)return v.preventNext(),void(d.current=!1);var e=s.current;e||m(!1),clearTimeout(e.longPressTimerId),s.current=null}}),[g,l,v,b]),y=c((function(){var e=d.current;h(),e&&r.onCancel()}),[r,h]),x=u((function(){return g()&&m(!1),[{eventName:"touchmove",options:{passive:!1,capture:!1},fn:function(e){if(d.current){p.current||(p.current=!0);var r=e.touches[0];if(r){var t={x:r.clientX,y:r.clientY};e.preventDefault(),b.move(t)}}else h()}},{eventName:"touchend",fn:function(e){d.current?(e.preventDefault(),h(),r.onDrop()):h()}},{eventName:"touchcancel",fn:function(e){d.current?(e.preventDefault(),y()):h()}},{eventName:"touchstart",fn:y},{eventName:"orientationchange",fn:y},{eventName:"resize",fn:y},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){s.current?h():b.windowScrollMove()}},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){d.current?(e.keyCode===ko&&e.preventDefault(),y()):y()}},{eventName:"touchforcechange",fn:function(e){if(e.touches[0].force>=di){var r=i();if(!s.current)return r?p.current?void e.preventDefault():void y():void e.preventDefault();r&&y()}}},{eventName:qo,fn:y}]}),[r,y,g,i,b,h]),w=c((function(){var e=t(),r={capture:!0};f.current=function(){return Go(e,x,r)},Fo(e,x,r)}),[t,x]),D=c((function(){var e=s.current;e||m(!1),d.current=!0,s.current=null,p.current=!1,r.onLift({clientSelection:e.point,movementMode:"FLUID"})}),[r]),I=c((function(e){s.current&&m(!1);var r=e.touches[0],t={point:{x:r.clientX,y:r.clientY},longPressTimerId:setTimeout(D,si)};s.current=t,a(h),w()}),[w,a,D,h]);return kn((function(){return Fo(window,[{eventName:"touchmove",fn:fi,options:{capture:!1,passive:!1}}])}),[]),function(e){pi.isHandled()||(g()&&m(!1),n(e)&&(pi.handle(),I(e)))}}(u((function(){return{callbacks:g,getDraggableRef:v,getWindow:x,canStartCapturing:w,getShouldRespectForcePress:b,onCaptureStart:t,onCaptureEnd:n}}),[g,v,x,w,b,t,n]));return kn((function(){return function(){r.current&&(i(),y.current.isDragging&&y.current.callbacks.onCancel())}}),[]),!p&&r.current&&(i(),y.current.isDragging&&g.onCancel()),kn((function(){!d&&r.current&&i()}),[i,d]),u((function(){return p?{onMouseDown:S,onKeyDown:C,onTouchStart:O,onFocus:E,onBlur:I,tabIndex:0,"data-react-beautiful-dnd-drag-handle":s,"aria-roledescription":"Draggable item. Press space bar to lift",draggable:!1,onDragStart:Di}:null}),[p,I,E,C,S,O,s])}function Ei(e){var r=e.draggableId,t=e.index,n=e.getDraggableRef,i=mo(Yn).marshal,a=mo(wo),l=a.droppableId,s=a.type,d=u((function(){return{id:r,droppableId:l,type:s,index:t}}),[r,l,t,s]),p=(0,o.useRef)(d),f=c((function(e){var r=p.current,t=n();return t||m(!1),function(e,r,t){void 0===t&&(t=ke);var n=window.getComputedStyle(r),o=r.getBoundingClientRect(),i=Se(o,n),a=Ee(i,t);return{descriptor:e,placeholder:{client:i,tagName:r.tagName.toLowerCase(),display:n.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(r,t,e)}),[n]);kn((function(){return i.registerDraggable(p.current,f),function(){return i.unregisterDraggable(p.current)}}),[f,i]),kn((function(){if(p.current!==d){var e=p.current;p.current=d,i.updateDraggable(e,d,f)}}),[d,f,i])}var Si=ge((function(){var e=Ne((function(e,r,t,n){return{isDragging:!0,isDropAnimating:Boolean(n),dropAnimation:n,mode:e,draggingOver:r,combineWith:t,combineTargetFor:null}})),r=Ne((function(e){return{isDragging:!1,isDropAnimating:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}})),t={mapped:{type:"SECONDARY",offset:ke,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:r(null)}},n=Ne((function(e,r){return{x:e,y:r}})),o=Ne((function(r,t,n,o,i,a){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:i,mode:t,offset:r,dimension:n,forceShouldAnimate:a,snapshot:e(t,o,i,null)}}})),i=Ne((function(e,t,n){return void 0===t&&(t=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:t,shouldAnimateDisplacement:n,snapshot:r(t)}}})),a=function(e,r,t){var o=t.movement.map[e],a=t.movement,u=t.merge,c=Boolean(u&&u.combine.draggableId===e),l=a.displacedBy.point,s=n(l.x,l.y);return c?i(o?s:ke,r,!o||o.shouldAnimate):o&&o.isVisible?i(s,null,o.shouldAnimate):null};return function(r,i){return function(r,t){if(r.isDragging){if(r.critical.draggable.id!==t.draggableId)return null;var i=r.current.client.offset,a=r.dimensions.draggables[t.draggableId],u=r.movementMode,c=rr(r.impact),l=(d=r.impact).merge?d.merge.combine.draggableId:null,s=r.forceShouldAnimate;return o(n(i.x,i.y),u,a,c,l,s)}var d;if("DROP_ANIMATING"===r.phase){var p=r.completed;if(p.result.draggableId!==t.draggableId)return null;var f=r.dimensions.draggables[t.draggableId],g=p.result,m=g.mode,v=Co(g),b=function(e){return e.combine?e.combine.draggableId:null}(g),h={duration:r.dropDuration,curve:Bt,moveTo:r.newHomeClientOffset,opacity:b?Lt.drop:null,scale:b?At.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:f,dropping:h,draggingOver:v,combineWith:b,mode:m,forceShouldAnimate:null,snapshot:e(m,v,b,h)}}}return null}(r,i)||function(e,r){if(e.isDragging)return e.critical.draggable.id===r.draggableId?null:a(r.draggableId,e.critical.draggable.id,e.impact);if("DROP_ANIMATING"===e.phase){var t=e.completed;return t.result.draggableId===r.draggableId?null:a(r.draggableId,t.result.draggableId,t.impact)}return null}(r,i)||t}}),{lift:function(e){return{type:"LIFT",payload:e}},move:Ot,moveUp:function(){return{type:"MOVE_UP",payload:null}},moveDown:function(){return{type:"MOVE_DOWN",payload:null}},moveLeft:function(){return{type:"MOVE_LEFT",payload:null}},moveRight:function(){return{type:"MOVE_RIGHT",payload:null}},moveByWindowScroll:function(e){return{type:"MOVE_BY_WINDOW_SCROLL",payload:e}},drop:Rt,dropAnimationFinished:function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}}},null,{context:Vn,pure:!0,areStatePropsEqual:So})((function(e){var r=(0,o.useRef)(null),t=c((function(e){r.current=e}),[]),n=c((function(){return r.current}),[]),i=mo(Yn);(0,o.useEffect)((function(){}));var a=e.children,l=e.draggableId,s=e.isDragDisabled,d=e.shouldRespectForcePress,p=e.disableInteractiveElementBlocking,f=e.index,g=e.mapped,v=e.moveUp,b=e.move,h=e.drop,y=e.moveDown,x=e.moveRight,w=e.moveLeft,D=e.moveByWindowScroll,I=e.lift,E=e.dropAnimationFinished;Ei(u((function(){return{draggableId:l,index:f,getDraggableRef:n}}),[l,n,f]));var S=c((function(e){r.current||m(!1),s&&m(!1);var t=e.clientSelection,n=e.movementMode;I({id:l,clientSelection:t,movementMode:n})}),[l,s,I]),C=c((function(){return d}),[d]),O=u((function(){return{onLift:S,onMove:function(e){return b({client:e})},onDrop:function(){return h({reason:"DROP"})},onCancel:function(){return h({reason:"CANCEL"})},onMoveUp:v,onMoveDown:y,onMoveRight:x,onMoveLeft:w,onWindowScroll:function(){return D({newScroll:on()})}}}),[h,b,D,y,w,x,v,S]),P="DRAGGING"===g.type,N="DRAGGING"===g.type&&Boolean(g.dropping),R=Ii(u((function(){return{draggableId:l,isDragging:P,isDropAnimating:N,isEnabled:!s,callbacks:O,getDraggableRef:n,canDragInteractiveElements:p,getShouldRespectForcePress:C}}),[O,p,l,n,C,s,P,N])),B=c((function(e){"DRAGGING"===g.type&&g.dropping&&"transform"===e.propertyName&&E()}),[E,g]),L=u((function(){var e=To(g),r="DRAGGING"===g.type&&g.dropping?B:null;return{innerRef:t,draggableProps:{"data-react-beautiful-dnd-draggable":i.style,style:e,onTransitionEnd:r},dragHandleProps:R}}),[i.style,R,g,B,t]);return a(L,g.snapshot)}));Si.defaultProps={isDragDisabled:!1,disableInteractiveElementBlocking:!1,shouldRespectForcePress:!1};var Ci=window.wp.apiFetch,Oi=t.n(Ci),Pi=window.wp.i18n;window.wp.hooks;const Ni=(e,r)=>{let t=null;return function(...n){const o=this;window.clearTimeout(t),t=window.setTimeout((()=>{e.apply(o,n)}),r)}};var Ri=t(5893);Oi().use(Oi().createRootURLMiddleware(window.epOrdering.restApiRoot));class Bi extends e.Component{titleInput=null;debouncedDefaultResults=Ni((()=>{this.getDefaultResults()}),200);doSearch=Ni((()=>{const{searchText:e,searchResults:r}=this.state,t=e;r[t]=!1,this.setState({searchResults:r}),Oi()({path:`/elasticpress/v1/pointer_search?s=${t}`}).then((e=>{r[t]=e,this.setState({searchResults:r})}))}),200);debouncedHandleTitleChange=Ni((()=>{this.handleTitleChange()}),200);constructor(e){super(e),this.titleInput=document.getElementById("title"),this.state={pointers:window.epOrdering.pointers,posts:window.epOrdering.posts,title:this.titleInput.value,defaultResults:{},searchText:"",searchResults:{}}}componentDidMount(){this.titleInput.addEventListener("keyup",this.debouncedHandleTitleChange);const{title:e}=this.state;e?.length>0&&this.getDefaultResults()}componentWillUnmount(){this.titleInput.removeEventListener("keyup",this.debouncedHandleTitleChange)}handleTitleChange=()=>{this.setState({title:this.titleInput.value}),this.debouncedDefaultResults()};getDefaultResults=()=>{const{title:e}=this.state;Oi()({path:`/elasticpress/v1/pointer_preview?s=${e}`}).then((r=>{const{defaultResults:t}=this.state;t[e]=r,this.setState({defaultResults:t})}))};removePointer=e=>{let{pointers:r}=this.state;delete r[r.indexOf(e)],r=r.filter((e=>null!==e)),this.setState({pointers:r})};getMergedPosts=()=>{let{pointers:e}=this.state;const{title:r,defaultResults:t}=this.state;let n=t[r].slice();const o={};return n.forEach((e=>{o[e.ID]=e})),e=e.sort(((e,r)=>e.order>r.order?1:-1)),e.forEach((e=>{o[e.ID]&&(delete n[n.indexOf(o[e.ID])],n=n.filter((e=>e))),n.splice(parseInt(e.order,10)-1,0,e)})),n};getNextAvailablePosition=()=>{const{pointers:e}=this.state,r={};for(let e=1;e<=window.epOrdering.postsPerPage;e++)r[e]=!0;e.forEach((e=>{delete r[e.order]}));const t=Object.keys(r);return 0!==t.length&&parseInt(t[0],10)};addPointer=e=>{const r=e.ID,{posts:t,pointers:n}=this.state;t[r]||(t[r]=e,this.setState({posts:t}));const o=this.getNextAvailablePosition();o?(n.push({ID:r,order:o}),this.setState({pointers:n})):window.alert((0,Pi.__)("You have added the maximum number of custom results.","elasticpress"))};onDragComplete=e=>{if(!e.destination)return;const r=this.getMergedPosts(),t=parseInt(window.epOrdering.postsPerPage,10),n=e.source.index>=t?e.source.index-1:e.source.index,o=e.destination.index>t?e.destination.index-1:e.destination.index,[i]=r.splice(n,1);r.splice(o,0,i);const a=[];r.forEach(((r,t)=>{(r.order||r.ID===e.draggableId)&&a.push({ID:r.ID,order:t+1})})),this.setState({pointers:a})};searchResults=e=>{const{searchText:r}=this.state;return""===r?null:!1===e?(0,Ri.jsxs)("div",{className:"loading",children:[(0,Ri.jsx)("div",{className:"spinner is-active"}),"Loading..."]}):0===e.length?(0,Ri.jsx)("div",{className:"no-results",children:(0,Pi.__)("No results found.","elasticpress")}):e.map((e=>(0,Ri.jsxs)("div",{className:"pointer-result",children:[(0,Ri.jsx)("span",{className:"title",children:e.post_title}),(0,Ri.jsx)("span",{role:"button",tabIndex:"0",className:"dashicons dashicons-plus add-pointer",onClick:r=>{r.preventDefault(),this.addPointer(e)},onKeyDown:r=>{r.preventDefault(),this.addPointer(e)},children:(0,Ri.jsx)("span",{className:"screen-reader-text",children:(0,Pi.__)("Add Post","elasticpress")})})]},e.ID)))};render(){const{posts:r,defaultResults:t,title:n,pointers:o,searchText:i,searchResults:a}=this.state;if(0===n.length)return(0,Ri.jsx)("div",{className:"new-post",children:(0,Ri.jsx)("p",{children:(0,Pi.__)("Enter your search query above to preview the results.","elasticpress")})});if(!t[n])return(0,Ri.jsxs)("div",{className:"loading",children:[(0,Ri.jsx)("div",{className:"spinner is-active"}),(0,Ri.jsx)("span",{children:(0,Pi.__)("Loading Result Preview…","elasticpress")})]});const u={};t[n].forEach((e=>{u[e.ID]=e}));const c=this.getMergedPosts(),l=(s="ID",o.map((e=>e[s])));var s;const d=!!a[i]&&a[i].filter((e=>-1===l.indexOf(e.ID)));return(0,Ri.jsxs)("div",{children:[(0,Ri.jsx)("input",{type:"hidden",name:"search-ordering-nonce",value:window.epOrdering.nonce}),(0,Ri.jsx)("input",{type:"hidden",name:"ordered_posts",value:JSON.stringify(o)}),(0,Ri.jsx)(eo,{onDragEnd:this.onDragComplete,children:(0,Ri.jsx)(No,{droppableId:"droppable",children:t=>(0,Ri.jsxs)("div",{className:"pointers",...t.droppableProps,ref:t.innerRef,children:[c.map(((t,n)=>{const o=parseInt(window.epOrdering.postsPerPage,10)<=n?n+1:n;let{title:i}=t;void 0===i&&(i=void 0!==r[t.ID]?r[t.ID].post_title:u[t.ID].post_title);const a=void 0!==u[t.ID],c=!0===a?(0,Pi.__)("Return to original position","elasticpress"):(0,Pi.__)("Remove custom result from results list","elasticpress");return(0,Ri.jsxs)(e.Fragment,{children:[parseInt(window.epOrdering.postsPerPage,10)===n&&(0,Ri.jsx)(Si,{draggableId:"divider",index:n,isDragDisabled:!1,children:e=>(0,Ri.jsx)("div",{className:`next-page-notice ${n}`,ref:e.innerRef,...e.draggableProps,...e.dragHandleProps,children:(0,Ri.jsx)("span",{children:(0,Pi.__)("The following posts have been displaced to the next page of search results.","elasticpress")})})},"divider"),(0,Ri.jsx)(Si,{draggableId:t.ID,index:o,children:e=>(0,Ri.jsxs)("div",{className:`pointer ${o}`,ref:e.innerRef,...e.draggableProps,children:[t.order&&!0===a&&(0,Ri.jsx)("span",{className:"pointer-type",children:"RD"}),t.order&&!1===a&&(0,Ri.jsx)("span",{className:"pointer-type",children:"CR"}),(0,Ri.jsx)("strong",{className:"title",children:i}),(0,Ri.jsxs)("div",{className:"pointer-actions",children:[(0,Ri.jsx)("span",{className:"dashicons dashicons-menu handle",...e.dragHandleProps,title:(0,Pi.__)("Drag post up or down to reposition","elasticpress")}),t.order&&(0,Ri.jsx)("span",{role:"button",tabIndex:"0",title:c,className:"dashicons dashicons-undo delete-pointer",onClick:e=>{e.preventDefault(),this.removePointer(t)},onKeyDown:e=>{e.preventDefault(),this.removePointer(t)},children:(0,Ri.jsx)("span",{className:"screen-reader-text",children:"Remove Post"})})]})]})},t.ID)]},t.ID)})),t.placeholder]})})}),(0,Ri.jsxs)("div",{className:"legend",children:[(0,Ri.jsxs)("div",{className:"legend-item",children:[(0,Ri.jsx)("span",{className:"pointer-type",children:"CR"}),(0,Ri.jsx)("span",{className:"type-description",children:(0,Pi.__)("Custom Result (manually added to list)","elasticpress")})]}),(0,Ri.jsxs)("div",{className:"legend-item",children:[(0,Ri.jsx)("span",{className:"pointer-type",children:"RD"}),(0,Ri.jsx)("span",{className:"type-description",children:(0,Pi.__)("Reordered Default (originally in results, but repositioned)","elasticpress")})]})]}),(0,Ri.jsxs)("div",{className:"pointer-search",children:[(0,Ri.jsx)("h2",{className:"section-title",children:(0,Pi.__)("Add to results","elasticpress")}),(0,Ri.jsxs)("div",{className:"search-wrapper",children:[(0,Ri.jsx)("div",{className:"input-wrap",children:(0,Ri.jsx)("input",{type:"text",className:"widefat search-pointers",placeholder:"Search for Post",value:i,onChange:e=>{this.setState({searchText:e.target.value}),this.doSearch()}})}),(0,Ri.jsx)("div",{className:"pointer-results",children:this.searchResults(d)})]})]})]})}}const Li=document.getElementById("ordering-app");if("function"===typeof e.createRoot){(0,e.createRoot)(Li).render((0,Ri.jsx)(Bi,{}))}else(0,e.render)((0,Ri.jsx)(Bi,{}),Li)}()}(); |
|
1
|
+!function(){"use strict";var e={5160:function(e,t,n){var r=n(1609);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},i=r.useSyncExternalStore,a=r.useRef,s=r.useEffect,l=r.useMemo,c=r.useDebugValue},8418:function(e,t,n){n(5160)},1609:function(e){e.exports=window.React},9306:function(e,t,n){var r=n(4901),o=n(6823),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a function")}},6469:function(e,t,n){var r=n(8227),o=n(2360),i=n(4913).f,a=r("unscopables"),s=Array.prototype;void 0===s[a]&&i(s,a,{configurable:!0,value:o(null)}),e.exports=function(e){s[a][e]=!0}},8551:function(e,t,n){var r=n(34),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not an object")}},9617:function(e,t,n){var r=n(5397),o=n(5610),i=n(6198),a=function(e){return function(t,n,a){var s=r(t),l=i(s);if(0===l)return!e&&-1;var c,d=o(a,l);if(e&&n!==n){for(;l>d;)if((c=s[d++])!==c)return!0}else for(;l>d;d++)if((e||d in s)&&s[d]===n)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2195:function(e,t,n){var r=n(9504),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},7740:function(e,t,n){var r=n(9297),o=n(5031),i=n(7347),a=n(4913);e.exports=function(e,t,n){for(var s=o(t),l=a.f,c=i.f,d=0;d<s.length;d++){var u=s[d];r(e,u)||n&&r(n,u)||l(e,u,c(t,u))}}},6699:function(e,t,n){var r=n(3724),o=n(4913),i=n(6980);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},6980:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6840:function(e,t,n){var r=n(4901),o=n(4913),i=n(283),a=n(9433);e.exports=function(e,t,n,s){s||(s={});var l=s.enumerable,c=void 0!==s.name?s.name:t;if(r(n)&&i(n,c,s),s.global)l?e[t]=n:a(t,n);else{try{s.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=n:o.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},9433:function(e,t,n){var r=n(4576),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},3724:function(e,t,n){var r=n(9039);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:function(e,t,n){var r=n(4576),o=n(34),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},8727:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2839:function(e,t,n){var r=n(4576).navigator,o=r&&r.userAgent;e.exports=o?String(o):""},9519:function(e,t,n){var r,o,i=n(4576),a=n(2839),s=i.process,l=i.Deno,c=s&&s.versions||l&&l.version,d=c&&c.v8;d&&(o=(r=d.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},6518:function(e,t,n){var r=n(4576),o=n(7347).f,i=n(6699),a=n(6840),s=n(9433),l=n(7740),c=n(2796);e.exports=function(e,t){var n,d,u,p,f,g=e.target,m=e.global,b=e.stat;if(n=m?r:b?r[g]||s(g,{}):r[g]&&r[g].prototype)for(d in t){if(p=t[d],u=e.dontCallGetSet?(f=o(n,d))&&f.value:n[d],!c(m?d:g+(b?".":"#")+d,e.forced)&&void 0!==u){if(typeof p==typeof u)continue;l(p,u)}(e.sham||u&&u.sham)&&i(p,"sham",!0),a(n,d,p,e)}}},9039:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},616:function(e,t,n){var r=n(9039);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},9565:function(e,t,n){var r=n(616),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},350:function(e,t,n){var r=n(3724),o=n(9297),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),l=s&&"something"===function(){}.name,c=s&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},9504:function(e,t,n){var r=n(616),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);e.exports=r?a:function(e){return function(){return i.apply(e,arguments)}}},7751:function(e,t,n){var r=n(4576),o=n(4901);e.exports=function(e,t){return arguments.length<2?(n=r[e],o(n)?n:void 0):r[e]&&r[e][t];var n}},5966:function(e,t,n){var r=n(9306),o=n(4117);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},4576:function(e,t,n){var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:function(e,t,n){var r=n(9504),o=n(8981),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},421:function(e){e.exports={}},397:function(e,t,n){var r=n(7751);e.exports=r("document","documentElement")},5917:function(e,t,n){var r=n(3724),o=n(9039),i=n(4055);e.exports=!r&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},7055:function(e,t,n){var r=n(9504),o=n(9039),i=n(2195),a=Object,s=r("".split);e.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?s(e,""):a(e)}:a},3706:function(e,t,n){var r=n(9504),o=n(4901),i=n(7629),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},1181:function(e,t,n){var r,o,i,a=n(8622),s=n(4576),l=n(34),c=n(6699),d=n(9297),u=n(7629),p=n(6119),f=n(421),g="Object already initialized",m=s.TypeError,b=s.WeakMap;if(a||u.state){var h=u.state||(u.state=new b);h.get=h.get,h.has=h.has,h.set=h.set,r=function(e,t){if(h.has(e))throw new m(g);return t.facade=e,h.set(e,t),t},o=function(e){return h.get(e)||{}},i=function(e){return h.has(e)}}else{var v=p("state");f[v]=!0,r=function(e,t){if(d(e,v))throw new m(g);return t.facade=e,c(e,v,t),t},o=function(e){return d(e,v)?e[v]:{}},i=function(e){return d(e,v)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return n}}}},4901:function(e){var t="object"==typeof document&&document.all;e.exports="undefined"==typeof t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2796:function(e,t,n){var r=n(9039),o=n(4901),i=/#|\.prototype\./,a=function(e,t){var n=l[s(e)];return n===d||n!==c&&(o(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",d=a.POLYFILL="P";e.exports=a},4117:function(e){e.exports=function(e){return null===e||void 0===e}},34:function(e,t,n){var r=n(4901);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},6395:function(e){e.exports=!1},757:function(e,t,n){var r=n(7751),o=n(4901),i=n(1625),a=n(7040),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,s(e))}},6198:function(e,t,n){var r=n(8014);e.exports=function(e){return r(e.length)}},283:function(e,t,n){var r=n(9504),o=n(9039),i=n(4901),a=n(9297),s=n(3724),l=n(350).CONFIGURABLE,c=n(3706),d=n(1181),u=d.enforce,p=d.get,f=String,g=Object.defineProperty,m=r("".slice),b=r("".replace),h=r([].join),v=s&&!o((function(){return 8!==g((function(){}),"length",{value:8}).length})),y=String(String).split("String"),x=e.exports=function(e,t,n){"Symbol("===m(f(t),0,7)&&(t="["+b(f(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!a(e,"name")||l&&e.name!==t)&&(s?g(e,"name",{value:t,configurable:!0}):e.name=t),v&&n&&a(n,"arity")&&e.length!==n.arity&&g(e,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&g(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=u(e);return a(r,"source")||(r.source=h(y,"string"==typeof t?t:"")),e};Function.prototype.toString=x((function(){return i(this)&&p(this).source||c(this)}),"toString")},741:function(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},2360:function(e,t,n){var r,o=n(8551),i=n(6801),a=n(8727),s=n(421),l=n(397),c=n(4055),d=n(6119),u="prototype",p="script",f=d("IE_PROTO"),g=function(){},m=function(e){return"<"+p+">"+e+"</"+p+">"},b=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}h="undefined"!=typeof document?document.domain&&r?b(r):function(){var e,t=c("iframe"),n="java"+p+":";return t.style.display="none",l.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F}():b(r);for(var e=a.length;e--;)delete h[u][a[e]];return h()};s[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(g[u]=o(e),n=new g,g[u]=null,n[f]=e):n=h(),void 0===t?n:i.f(n,t)}},6801:function(e,t,n){var r=n(3724),o=n(8686),i=n(4913),a=n(8551),s=n(5397),l=n(1072);t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=l(t),c=o.length,d=0;c>d;)i.f(e,n=o[d++],r[n]);return e}},4913:function(e,t,n){var r=n(3724),o=n(5917),i=n(8686),a=n(8551),s=n(6969),l=TypeError,c=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u="enumerable",p="configurable",f="writable";t.f=r?i?function(e,t,n){if(a(e),t=s(t),a(n),"function"===typeof e&&"prototype"===t&&"value"in n&&f in n&&!n[f]){var r=d(e,t);r&&r[f]&&(e[t]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:u in n?n[u]:r[u],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(a(e),t=s(t),a(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},7347:function(e,t,n){var r=n(3724),o=n(9565),i=n(8773),a=n(6980),s=n(5397),l=n(6969),c=n(9297),d=n(5917),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=s(e),t=l(t),d)try{return u(e,t)}catch(e){}if(c(e,t))return a(!o(i.f,e,t),e[t])}},8480:function(e,t,n){var r=n(1828),o=n(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},3717:function(e,t){t.f=Object.getOwnPropertySymbols},1625:function(e,t,n){var r=n(9504);e.exports=r({}.isPrototypeOf)},1828:function(e,t,n){var r=n(9504),o=n(9297),i=n(5397),a=n(9617).indexOf,s=n(421),l=r([].push);e.exports=function(e,t){var n,r=i(e),c=0,d=[];for(n in r)!o(s,n)&&o(r,n)&&l(d,n);for(;t.length>c;)o(r,n=t[c++])&&(~a(d,n)||l(d,n));return d}},1072:function(e,t,n){var r=n(1828),o=n(8727);e.exports=Object.keys||function(e){return r(e,o)}},8773:function(e,t){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},4270:function(e,t,n){var r=n(9565),o=n(4901),i=n(34),a=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&o(n=e.toString)&&!i(s=r(n,e)))return s;if(o(n=e.valueOf)&&!i(s=r(n,e)))return s;if("string"!==t&&o(n=e.toString)&&!i(s=r(n,e)))return s;throw new a("Can't convert object to primitive value")}},5031:function(e,t,n){var r=n(7751),o=n(9504),i=n(8480),a=n(3717),s=n(8551),l=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(s(e)),n=a.f;return n?l(t,n(e)):t}},7750:function(e,t,n){var r=n(4117),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},6119:function(e,t,n){var r=n(5745),o=n(3392),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},7629:function(e,t,n){var r=n(6395),o=n(4576),i=n(9433),a="__core-js_shared__",s=e.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.39.0",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(e,t,n){var r=n(7629);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},4495:function(e,t,n){var r=n(9519),o=n(9039),i=n(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},5610:function(e,t,n){var r=n(1291),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},5397:function(e,t,n){var r=n(7055),o=n(7750);e.exports=function(e){return r(o(e))}},1291:function(e,t,n){var r=n(741);e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},8014:function(e,t,n){var r=n(1291),o=Math.min;e.exports=function(e){var t=r(e);return t>0?o(t,9007199254740991):0}},8981:function(e,t,n){var r=n(7750),o=Object;e.exports=function(e){return o(r(e))}},2777:function(e,t,n){var r=n(9565),o=n(34),i=n(757),a=n(5966),s=n(4270),l=n(8227),c=TypeError,d=l("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,l=a(e,d);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!o(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},6969:function(e,t,n){var r=n(2777),o=n(757);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},6823:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},3392:function(e,t,n){var r=n(9504),o=0,i=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},7040:function(e,t,n){var r=n(4495);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:function(e,t,n){var r=n(3724),o=n(9039);e.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8622:function(e,t,n){var r=n(4576),o=n(4901),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},8227:function(e,t,n){var r=n(4576),o=n(5745),i=n(9297),a=n(3392),s=n(4495),l=n(7040),c=r.Symbol,d=o("wks"),u=l?c.for||c:c&&c.withoutSetter||a;e.exports=function(e){return i(d,e)||(d[e]=s&&i(c,e)?c[e]:u("Symbol."+e)),d[e]}},4423:function(e,t,n){var r=n(6518),o=n(9617).includes,i=n(9039),a=n(6469);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r=window.wp.element,o=(n(4423),n(1609)),i=n.n(o),a=window.ReactDOM,s=n.n(a);function l(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var c=(()=>"function"===typeof Symbol&&Symbol.observable||"@@observable")(),d=()=>Math.random().toString(36).substring(7).split("").join("."),u={INIT:`@@redux/INIT${d()}`,REPLACE:`@@redux/REPLACE${d()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${d()}`};function p(e){if("object"!==typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function f(e,t,n){if("function"!==typeof e)throw new Error(l(2));if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(l(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(l(1));return n(f)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,d=!1;function g(){a===i&&(a=new Map,i.forEach(((e,t)=>{a.set(t,e)})))}function m(){if(d)throw new Error(l(3));return o}function b(e){if("function"!==typeof e)throw new Error(l(4));if(d)throw new Error(l(5));let t=!0;g();const n=s++;return a.set(n,e),function(){if(t){if(d)throw new Error(l(6));t=!1,g(),a.delete(n),i=null}}}function h(e){if(!p(e))throw new Error(l(7));if("undefined"===typeof e.type)throw new Error(l(8));if("string"!==typeof e.type)throw new Error(l(17));if(d)throw new Error(l(9));try{d=!0,o=r(o,e)}finally{d=!1}return(i=a).forEach((e=>{e()})),e}h({type:u.INIT});return{dispatch:h,subscribe:b,getState:m,replaceReducer:function(e){if("function"!==typeof e)throw new Error(l(10));r=e,h({type:u.REPLACE})},[c]:function(){const e=b;return{subscribe(t){if("object"!==typeof t||null===t)throw new Error(l(11));function n(){const e=t;e.next&&e.next(m())}n();return{unsubscribe:e(n)}},[c](){return this}}}}}function g(e,t){return function(...n){return t(e.apply(this,n))}}function m(e,t){if("function"===typeof e)return g(e,t);if("object"!==typeof e||null===e)throw new Error(l(16));const n={};for(const r in e){const o=e[r];"function"===typeof o&&(n[r]=g(o,t))}return n}function b(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}n(8418);var h=o.version.startsWith("19"),v=Symbol.for(h?"react.transitional.element":"react.element"),y=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),E=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),A=S,N=P;function B(e){if("object"===typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case v:switch(e=e.type){case x:case D:case I:case O:case R:return e;default:switch(e=e&&e.$$typeof){case E:case S:case C:case P:case w:return e;default:return t}}case y:return t}}}function T(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,u,p=!1;function f(p,f){const g=!i(f,l),m=!o(p,s,f,l);return s=p,l=f,g&&m?(c=e(s,l),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):g?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(d=t(r,l)),u=n(c,d,l),u):m?function(){const t=e(s,l),r=!a(t,c);return c=t,r&&(u=n(c,d,l)),u}():u}return function(o,i){return p?f(o,i):(s=o,l=i,c=e(s,l),d=t(r,l),u=n(c,d,l),p=!0,u)}}function L(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function M(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function G(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=M(e);let o=r(t,n);return"function"===typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=M(o),o=r(t,n)),o},r}}function _(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function F(e,t,n){return{...n,...e,...t}}function j(e){e()}var k={notify(){},get:()=>[]};function W(e,t){let n,r=k,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){j((()=>{let t=e;for(;t;)t.callback(),t=t.next}))},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function l(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=k)}const c={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>r};return c}var $=(()=>!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement))(),U=(()=>"undefined"!==typeof navigator&&"ReactNative"===navigator.product)(),H=(()=>$||U?o.useLayoutEffect:o.useEffect)();function q(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function V(e,t){if(q(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!q(e[n[r]],t[n[r]]))return!1;return!0}var z={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Y={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},X={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},J={[A]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[N]:X};function K(e){return B(e)===P?X:J[e.$$typeof]||z}var Q=Object.defineProperty,Z=Object.getOwnPropertyNames,ee=Object.getOwnPropertySymbols,te=Object.getOwnPropertyDescriptor,ne=Object.getPrototypeOf,re=Object.prototype;function oe(e,t){if("string"!==typeof t){if(re){const n=ne(t);n&&n!==re&&oe(e,n)}let n=Z(t);ee&&(n=n.concat(ee(t)));const r=K(e),o=K(t);for(let i=0;i<n.length;++i){const a=n[i];if(!Y[a]&&(!o||!o[a])&&(!r||!r[a])){const n=te(t,a);try{Q(e,a,n)}catch(e){}}}}return e}var ie=Symbol.for("react-redux-context"),ae="undefined"!==typeof globalThis?globalThis:{};function se(){if(!o.createContext)return{};const e=ae[ie]??=new Map;let t=e.get(o.createContext);return t||(t=o.createContext(null),e.set(o.createContext,t)),t}var le=se(),ce=[null,null];function de(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function ue(e,t){return e===t}var pe=function(e,t,n,{pure:r,areStatesEqual:i=ue,areOwnPropsEqual:a=V,areStatePropsEqual:s=V,areMergedPropsEqual:l=V,forwardRef:c=!1,context:d=le}={}){const u=d,p=function(e){return e?"function"===typeof e?G(e):_(e,"mapStateToProps"):L((()=>({})))}(e),f=function(e){return e&&"object"===typeof e?L((t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"===typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t))):e?"function"===typeof e?G(e):_(e,"mapDispatchToProps"):L((e=>({dispatch:e})))}(t),g=function(e){return e?"function"===typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,n,a){const s=e(t,n,a);return i?r(s,o)||(o=s):(i=!0,o=s),o}}}(e):_(e,"mergeProps"):()=>F}(n),m=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:m,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:p,initMapDispatchToProps:f,initMergeProps:g,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:a,areMergedPropsEqual:l};function d(t){const[n,i,a]=o.useMemo((()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]}),[t]),s=o.useMemo((()=>u),[n,u]),l=o.useContext(s),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),d=Boolean(l)&&Boolean(l.store);const p=c?t.store:l.store,f=d?l.getServerState:p.getState,g=o.useMemo((()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){return T(t(e,o),n(e,o),r(e,o),e,o)}(p.dispatch,r)),[p]),[b,h]=o.useMemo((()=>{if(!m)return ce;const e=W(p,c?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[p,c,l]),v=o.useMemo((()=>c?l:{...l,subscription:b}),[c,l,b]),y=o.useRef(void 0),x=o.useRef(a),I=o.useRef(void 0),D=o.useRef(!1),w=o.useRef(!1),E=o.useRef(void 0);H((()=>(w.current=!0,()=>{w.current=!1})),[]);const S=o.useMemo((()=>()=>I.current&&a===x.current?I.current:g(p.getState(),a)),[p,a]),O=o.useMemo((()=>e=>b?function(e,t,n,r,o,i,a,s,l,c,d){if(!e)return()=>{};let u=!1,p=null;const f=()=>{if(u||!s.current)return;const e=t.getState();let n,f;try{n=r(e,o.current)}catch(e){f=e,p=e}f||(p=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,d())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(m,p,b,g,x,y,D,w,I,h,e):()=>{}),[b]);var R,P,C;let A;R=de,P=[x,y,D,a,I,h],H((()=>R(...P)),C);try{A=o.useSyncExternalStore(O,S,f?()=>g(f(),a):S)}catch(e){throw E.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${E.current.stack}\n\n`),e}H((()=>{E.current=void 0,I.current=void 0,y.current=A}));const N=o.useMemo((()=>o.createElement(e,{...A,ref:i})),[i,e,A]);return o.useMemo((()=>m?o.createElement(s.Provider,{value:v},N):N),[s,N,v])}const b=o.memo(d);if(b.WrappedComponent=e,b.displayName=d.displayName=n,c){const t=o.forwardRef((function(e,t){return o.createElement(b,{...e,reactReduxForwardedRef:t})}));return t.displayName=n,t.WrappedComponent=e,oe(t,e)}return oe(b,e)}};var fe=function(e){const{children:t,context:n,serverState:r,store:i}=e,a=o.useMemo((()=>{const e=W(i);return{store:i,subscription:e,getServerState:r?()=>r:void 0}}),[i,r]),s=o.useMemo((()=>i.getState()),[i]);H((()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}}),[a,s]);const l=n||le;return o.createElement(l.Provider,{value:a},t)};var ge="Invariant failed";var me=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},be=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},he=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},ve={top:0,right:0,bottom:0,left:0},ye=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?ve:n,o=e.border,i=void 0===o?ve:o,a=e.padding,s=void 0===a?ve:a,l=me(be(t,r)),c=me(he(t,i)),d=me(he(c,s));return{marginBox:l,borderBox:me(t),paddingBox:c,contentBox:d,margin:r,border:i,padding:s}},xe=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(e){if(!e)throw new Error(ge)}(!1),n},Ie=function(e,t){var n,r,o=e.borderBox,i=e.border,a=e.margin,s=e.padding,l=(r=t,{top:(n=o).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return ye({borderBox:l,border:i,margin:a,padding:s})},De=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Ie(e,t)},we=function(e,t){var n={top:xe(t.marginTop),right:xe(t.marginRight),bottom:xe(t.marginBottom),left:xe(t.marginLeft)},r={top:xe(t.paddingTop),right:xe(t.paddingRight),bottom:xe(t.paddingBottom),left:xe(t.paddingLeft)},o={top:xe(t.borderTopWidth),right:xe(t.borderRightWidth),bottom:xe(t.borderBottomWidth),left:xe(t.borderLeftWidth)};return ye({borderBox:e,margin:n,padding:r,border:o})},Ee=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return we(t,n)},Se=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function Oe(){return Oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oe.apply(null,arguments)}function Re(e,t){}Re.bind(null,"warn"),Re.bind(null,"error");function Pe(){}function Ce(e,t,n){const r=t.map((t=>{const r=function(e,t){return{...e,...t}}(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}}));return function(){r.forEach((e=>{e()}))}}const Ae="Invariant failed";class Ne extends Error{}function Be(e,t){throw new Ne(Ae)}Ne.prototype.toString=function(){return this.message};class Te extends i().Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=Pe,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort();e.error instanceof Ne&&e.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=Ce(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof Ne))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const Le=e=>e+1,Me=(e,t)=>{const n=e.droppableId===t.droppableId,r=Le(e.index),o=Le(t.index);return n?`\n You have moved the item from position ${r}\n to position ${o}\n `:`\n You have moved the item from position ${r}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${o}\n `},Ge=(e,t,n)=>t.droppableId===n.droppableId?`\n The item ${e}\n has been combined with ${n.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${n.draggableId}\n in list ${n.droppableId}\n `,_e=e=>`\n The item has returned to its starting position\n of ${Le(e.index)}\n`,Fe={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:e=>`\n You have lifted an item in position ${Le(e.source.index)}\n`,onDragUpdate:e=>{const t=e.destination;if(t)return Me(e.source,t);const n=e.combine;return n?Ge(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},onDragEnd:e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${_e(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${Me(e.source,t)}\n `:n?`\n You have dropped the item.\n ${Ge(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${_e(e.source)}\n `}};function je(e,t){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(n=e[o],r=t[o],!(n===r||Number.isNaN(n)&&Number.isNaN(r)))return!1;var n,r;return!0}function ke(e,t){const n=(0,o.useState)((()=>({inputs:t,result:e()})))[0],r=(0,o.useRef)(!0),i=(0,o.useRef)(n),a=r.current||Boolean(t&&i.current.inputs&&je(t,i.current.inputs))?i.current:{inputs:t,result:e()};return(0,o.useEffect)((()=>{r.current=!1,i.current=a}),[a]),a.result}function We(e,t){return ke((()=>e),t)}const $e={x:0,y:0},Ue=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),He=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),qe=(e,t)=>e.x===t.x&&e.y===t.y,Ve=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),ze=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},Ye=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Xe=(e,t)=>Math.min(...t.map((t=>Ye(e,t)))),Je=e=>t=>({x:e(t.x),y:e(t.y)});const Ke=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Qe=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],Ze=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=me({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n})(t.pageMarginBox,e):me(e);var et=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=((e,t)=>t?Ke(e,t.scroll.diff.displacement):e)(e.marginBox,r),i=((e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e)(o,n,t);return{page:e,withPlaceholder:t,active:Ze(i,r)}},tt=(e,t)=>{e.frame||Be();const n=e.frame,r=He(t,n.scroll.initial),o=Ve(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=et({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function nt(e,t=je){let n=null;function r(...r){if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;const o=e.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return r.clear=function(){n=null},r}const rt=nt((e=>e.reduce(((e,t)=>(e[t.descriptor.id]=t,e)),{}))),ot=nt((e=>e.reduce(((e,t)=>(e[t.descriptor.id]=t,e)),{}))),it=nt((e=>Object.values(e))),at=nt((e=>Object.values(e)));var st=nt(((e,t)=>{const n=at(t).filter((t=>e===t.descriptor.droppableId)).sort(((e,t)=>e.descriptor.index-t.descriptor.index));return n}));function lt(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function ct(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var dt=nt(((e,t)=>t.filter((t=>t.descriptor.id!==e.descriptor.id)))),ut=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const pt={point:$e,value:0},ft={invisible:{},visible:{},all:[]},gt={displaced:ft,displacedBy:pt,at:null};var mt=(e,t)=>n=>e<=n&&n<=t,bt=e=>{const t=mt(e.top,e.bottom),n=mt(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;const a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;if(a&&s)return!0;return a&&i||s&&o}},ht=e=>{const t=mt(e.top,e.bottom),n=mt(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const vt={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},yt={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};const xt=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:$e;return Ke(e,n)})(e,t):e;return((e,t,n)=>!!t.subject.active&&n(t.subject.active)(e))(i,t,o)&&((e,t,n)=>n(t)(e))(i,n,o)},It=e=>xt({...e,isVisibleThroughFrameFn:ht});function Dt({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce((function(e,a){const s=function(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return me(be(n,r))}(a,n),l=a.descriptor.id;e.all.push(l);var c;if(!(c={target:s,destination:t,viewport:r,withDroppableDisplacement:!0},xt({...c,isVisibleThroughFrameFn:bt})))return e.invisible[a.descriptor.id]=!0,e;const d=((e,t,n)=>{if("boolean"===typeof n)return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return!i||i.shouldAnimate})(l,i,o),u={draggableId:l,shouldAnimate:d};return e.visible[l]=u,e}),{all:[],visible:{},invisible:{}})}function wt({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=function(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(e,{inHomeList:t});return{displaced:ft,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function Et({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=ut(e,n);if(null==a)return wt({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find((e=>e.descriptor.index===a));if(!c)return wt({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const d=dt(e,t),u=t.indexOf(c);return{displaced:Dt({afterDragging:d.slice(u),destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function St(e,t){return Boolean(t.effected[e])}var Ot=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||Be(),"REORDER"===c.type){const r=(({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,a=n[0].descriptor.index,s=n[n.length-1].descriptor.index;return i<a||i>(t?s:s+1)?null:i})({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return null==r?null:Et({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:r})}const d=(({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,a=n[i].descriptor.index;return St(i,o)?e?a:a-1:e?a+1:a})({isMovingForward:e,destination:o,displaced:a.displaced,draggables:r,combine:c.combine,afterCritical:l});return null==d?null:Et({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})},Rt=({afterCritical:e,impact:t,draggables:n})=>{const r=ct(t);r||Be();const o=r.draggableId,i=n[o].page.borderBox.center,a=(({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=Boolean(e.visible[n]||e.invisible[n]);return St(n,t)?o?$e:Ve(r.point):o?r.point:$e})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return Ue(i,a)};const Pt=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,Ct=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,At=({axis:e,moveRelativeTo:t,isMoving:n})=>ze(e.line,t.marginBox[e.end]+Pt(e,n),Ct(e,t.marginBox,n)),Nt=({axis:e,moveRelativeTo:t,isMoving:n})=>ze(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),Ct(e,t.marginBox,n));var Bt=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=st(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>ze(e.line,t.contentBox[e.start]+Pt(e,n),Ct(e,t.contentBox,n)))({axis:s,moveInto:r.page,isMoving:a});const{displaced:l,displacedBy:c}=e,d=l.all[0];if(d){const e=n[d];if(St(d,o))return Nt({axis:s,moveRelativeTo:e.page,isMoving:a});const t=Ie(e.page,c.point);return Nt({axis:s,moveRelativeTo:t,isMoving:a})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return a.borderBox.center;if(St(u.descriptor.id,o)){const e=Ie(u.page,Ve(o.displacedBy.point));return At({axis:s,moveRelativeTo:e,isMoving:a})}return At({axis:s,moveRelativeTo:u.page,isMoving:a})},Tt=(e,t)=>{const n=e.frame;return n?Ue(t,n.scroll.diff.displacement):t};var Lt=e=>{const t=(({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return n&&a?"REORDER"===a.type?Bt({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):Rt({impact:e,draggables:r,afterCritical:o}):i})(e),n=e.droppable;return n?Tt(n,t):t},Mt=(e,t)=>{const n=He(t,e.scroll.initial),r=Ve(n);return{frame:me({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function Gt(e,t){return e.map((e=>t[e]))}var _t=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=((e,t)=>Ue(e.scroll.diff.displacement,t))(n,e),o=He(r,t.page.borderBox.center);return Ue(t.client.borderBox.center,o)},Ft=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=He(n,e.page.borderBox.center),s={target:Ke(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?(e=>{return xt({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=mt(e.top,e.bottom),r=mt(e.left,e.right);return e=>t===vt?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(s):It(s)},jt=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!n.isEnabled)return null;const c=st(n.descriptor.id,r),d=ut(t,n),u=(({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled)return null;if(!lt(o))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:n.descriptor.id}};return{...o,at:t}}const a=o.displaced.all,s=a.length?a[0]:null;if(e)return s?i(s):null;const l=dt(t,r);if(!s)return l.length?i(l[l.length-1].descriptor.id):null;const c=l.findIndex((e=>e.descriptor.id===s));-1===c&&Be();const d=c-1;return d<0?null:i(l[d].descriptor.id)})({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||Ot({isMovingForward:e,isInHomeList:d,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!u)return null;const p=Lt({impact:u,draggable:t,droppable:n,draggables:r,afterCritical:l});if(Ft({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})){return{clientSelection:_t({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:u,scrollJumpRequest:null}}const f=He(p,a),g=(({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=Mt(t,Ue(t.scroll.current,o)),a=n.frame?tt(n,Ue(n.frame.scroll.current,o)):n,s=e.displaced,l=Dt({afterDragging:Gt(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=Dt({afterDragging:Gt(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),d={},u={},p=[s,l,c];return s.all.forEach((e=>{const t=function(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}(e,p);t?u[e]=t:d[e]=!0})),{...e,displaced:{all:s.all,invisible:d,visible:u}}})({impact:u,viewport:i,destination:n,draggables:r,maxScrollChange:f});return{clientSelection:s,impact:g,scrollJumpRequest:f}};const kt=e=>{const t=e.subject.active;return t||Be(),t};const Wt=(e,t)=>{const n=e.page.borderBox.center;return St(e.descriptor.id,t)?He(n,t.displacedBy.point):n},$t=(e,t)=>{const n=e.page.borderBox;return St(e.descriptor.id,t)?Ke(n,Ve(t.displacedBy.point)):n};var Ut=nt((function(e,t){const n=t[e.line];return{value:n,point:ze(e.line,n)}}));const Ht=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),qt=(e,t,n)=>{const r=e.frame;ut(t,e)&&Be(),e.subject.withPlaceholder&&Be();const o=Ut(e.axis,t.displaceBy).point,i=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return ze(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],i=st(e.descriptor.id,n).reduce(((e,t)=>e+t.client.marginBox[r.size]),0)+t[r.line]-o;return i<=0?null:ze(r.line,i)})(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=et({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?Ue(r.scroll.max,i):r.scroll.max,l=Ht(r,s),c=et({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var Vt=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=(({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const a=n.axis,s=mt(i[a.start],i[a.end]),l=it(r).filter((e=>e!==n)).filter((e=>e.isEnabled)).filter((e=>Boolean(e.subject.active))).filter((e=>bt(o.frame)(kt(e)))).filter((t=>{const n=kt(t);return e?i[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<i[a.crossAxisStart]})).filter((e=>{const t=kt(e),n=mt(t[a.start],t[a.end]);return s(t[a.start])||s(t[a.end])||n(i[a.start])||n(i[a.end])})).sort(((t,n)=>{const r=kt(t)[a.crossAxisStart],o=kt(n)[a.crossAxisStart];return e?r-o:o-r})).filter(((e,t,n)=>kt(e)[a.crossAxisStart]===kt(n[0])[a.crossAxisStart]));if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter((e=>mt(kt(e)[a.start],kt(e)[a.end])(t[a.line])));return 1===c.length?c[0]:c.length>1?c.sort(((e,t)=>kt(e)[a.start]-kt(t)[a.start]))[0]:l.sort(((e,n)=>{const r=Xe(t,Qe(kt(e))),o=Xe(t,Qe(kt(n)));return r!==o?r-o:kt(e)[a.start]-kt(n)[a.start]}))[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=st(l.descriptor.id,o),d=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>{const i=r.filter((e=>It({target:$t(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0}))).sort(((t,r)=>{const i=Ye(e,Tt(n,Wt(t,o))),a=Ye(e,Tt(n,Wt(r,o)));return i<a?-1:a<i?1:t.descriptor.index-r.descriptor.index}));return i[0]||null})({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),u=(({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(n.length)return null;const e={displaced:ft,displacedBy:pt,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=Lt({impact:e,draggable:r,droppable:i,draggables:o,afterCritical:s}),l=ut(r,i)?i:qt(i,r,o);return Ft({draggable:r,destination:l,newPageBorderBoxCenter:t,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}const l=Boolean(e[i.axis.line]<=t.page.borderBox.center[i.axis.line]),c=(()=>{const e=t.descriptor.index;return t.descriptor.id===r.descriptor.id||l?e:e+1})(),d=Ut(i.axis,r.displaceBy);return Et({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:d,last:ft,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!u)return null;const p=Lt({impact:u,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:_t({pageBorderBoxCenter:p,draggable:n,viewport:a}),impact:u,scrollJumpRequest:null}},zt=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};var Yt=({state:e,type:t})=>{const n=((e,t)=>{const n=zt(e);return n?t[n]:null})(e.impact,e.dimensions.droppables),r=Boolean(n),o=e.dimensions.droppables[e.critical.droppable.id],i=n||o,a=i.axis.direction,s="vertical"===a&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===a&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(s&&!r)return null;const l="MOVE_DOWN"===t||"MOVE_RIGHT"===t,c=e.dimensions.draggables[e.critical.draggable.id],d=e.current.page.borderBoxCenter,{draggables:u,droppables:p}=e.dimensions;return s?jt({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,destination:i,draggables:u,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):Vt({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,isOver:i,draggables:u,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function Xt(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function Jt(e){const t=mt(e.top,e.bottom),n=mt(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function Kt({pageBorderBox:e,draggable:t,droppables:n}){const r=it(n).filter((t=>{if(!t.isEnabled)return!1;const n=t.subject.active;if(!n)return!1;if(o=n,!((r=e).left<o.right&&r.right>o.left&&r.top<o.bottom&&r.bottom>o.top))return!1;var r,o;if(Jt(n)(e.center))return!0;const i=t.axis,a=n.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=mt(n[i.crossAxisStart],n[i.crossAxisEnd]),d=c(s),u=c(l);return!d&&!u||(d?s<a:l>a)}));return r.length?1===r.length?r[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map((t=>{const n=t.axis,o=ze(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:Ye(r,o)}})).sort(((e,t)=>t.distance-e.distance));return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:r}):null}const Qt=(e,t)=>me(Ke(e,t));function Zt({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var en=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=Qt(t.page.borderBox,e),l=Kt({pageBorderBox:s,draggable:t,droppables:r});if(!l)return gt;const c=r[l],d=st(c.descriptor.id,n),u=((e,t)=>{const n=e.frame;return n?Qt(t,n.scroll.diff.value):t})(c,s);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:o,afterCritical:i})=>{if(!r.isCombineEnabled)return null;const a=r.axis,s=Ut(r.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],u=dt(e,o).find((e=>{const t=e.descriptor.id,r=e.page.borderBox,o=r[a.size]/4,s=St(t,i),u=Zt({displaced:n.displaced,id:t});return s?u?d>r[a.start]+o&&d<r[a.end]-o:c>r[a.start]-l+o&&c<r[a.end]-l-o:u?d>r[a.start]+l+o&&d<r[a.end]+l-o:c>r[a.start]+o&&c<r[a.end]-o}));return u?{displacedBy:s,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:u.descriptor.id,droppableId:r.descriptor.id}}}:null})({pageBorderBoxWithDroppableScroll:u,draggable:t,previousImpact:o,destination:c,insideDestination:d,afterCritical:a})||(({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:a})=>{const s=n.axis,l=Ut(n.axis,t.displaceBy),c=l.value,d=e[s.start],u=e[s.end],p=function({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:dt(t,r).find((e=>{const t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=St(t,a),i=Zt({displaced:o,id:t});return r?i?u<=n:d<n-c:i?u<=n+c:d<n}))||null,inHomeList:ut(t,n)});return Et({draggable:t,insideDestination:r,destination:n,viewport:i,last:o,displacedBy:l,index:p})})({pageBorderBoxWithDroppableScroll:u,draggable:t,destination:c,insideDestination:d,last:o.displaced,viewport:i,afterCritical:a})},tn=(e,t)=>({...e,[t.descriptor.id]:t});const nn=({previousImpact:e,impact:t,droppables:n})=>{const r=zt(e),o=zt(t);if(!r)return n;if(r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const a=(e=>{const t=e.subject.withPlaceholder;t||Be();const n=e.frame;if(!n){const t=et({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||Be();const o=Ht(n,r),i=et({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return tn(n,a)};var rn=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const a=r||e.viewport,s=n||e.dimensions,l=t||e.current.client.selection,c=He(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:Ue(e.initial.client.borderBoxCenter,c)},u={selection:Ue(d.selection,a.scroll.current),borderBoxCenter:Ue(d.borderBoxCenter,a.scroll.current),offset:Ue(d.offset,a.scroll.diff.value)},p={client:d,page:u};if("COLLECTING"===e.phase)return{...e,dimensions:s,viewport:a,current:p};const f=s.draggables[e.critical.draggable.id],g=o||en({pageOffset:u.offset,draggable:f,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=(({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=nn({previousImpact:r,impact:o,droppables:n}),a=zt(o);if(!a)return i;const s=n[a];if(ut(e,s))return i;if(s.subject.withPlaceholder)return i;const l=qt(s,e,t);return tn(i,l)})({draggable:f,impact:g,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:m},impact:g,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}};var on=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,a=function(e,t){return e.map((e=>t[e]))}(i.all,n),s=Dt({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},an=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=Lt({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return _t({pageBorderBoxCenter:a,draggable:t,viewport:o})},sn=({state:e,dimensions:t,viewport:n})=>{"SNAP"!==e.movementMode&&Be();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=zt(r);c||Be();const d=s[c],u=on({impact:r,viewport:o,destination:d,draggables:a}),p=an({impact:u,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return rn({impact:u,clientSelection:p,state:e,dimensions:i,viewport:o})},ln=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=Ut(t.axis,e.displaceBy),i=st(t.descriptor.id,n),a=i.indexOf(e);-1===a&&Be();const s=i.slice(a+1),l=s.reduce(((e,t)=>(e[t.descriptor.id]=!0,e)),{}),c={inVirtualList:"virtual"===t.descriptor.mode,displacedBy:o,effected:l};var d;return{impact:{displaced:Dt({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(d=e.descriptor,{index:d.index,droppableId:d.droppableId})}},afterCritical:c}};const cn=e=>{0},dn=e=>{0};var un=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map((e=>{const o=e.descriptor.droppableId,i=(e=>{const t=e.frame;return t||Be(),t})(t[o]),a=i.scroll.diff.value,s=(({draggable:e,offset:t,initialWindowScroll:n})=>{const r=Ie(e.client,t),o=De(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}})({draggable:e,offset:Ue(r,a),initialWindowScroll:n.scroll.initial});return s}))};const pn=e=>"SNAP"===e.movementMode,fn=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:tn(e.droppables,t)}))(e.dimensions,t);return!pn(e)||n?rn({state:e,dimensions:r}):sn({state:e,dimensions:r})};function gn(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const mn={phase:"IDLE",completed:null,shouldFlush:!1};var bn=(e=mn,t)=>{if("FLUSH"===t.type)return{...mn,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&Be();const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[n.draggable.id],l=i.droppables[n.droppable.id],c={selection:r,borderBoxCenter:s.client.borderBox.center,offset:$e},d={client:c,page:{selection:Ue(c.selection,o.scroll.initial),borderBoxCenter:Ue(c.selection,o.scroll.initial),offset:Ue(c.selection,o.scroll.diff.value)}},u=it(i.droppables).every((e=>!e.isFixedOnPage)),{impact:p,afterCritical:f}=ln({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:i,initial:d,current:d,isWindowScrollAllowed:u,impact:p,afterCritical:f,onLiftImpact:p,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&Be();return{...e,phase:"COLLECTING"}}if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&Be(),(({state:e,published:t})=>{cn();const n=t.modified.map((t=>{const n=e.dimensions.droppables[t.droppableId];return tt(n,t.scroll)})),r={...e.dimensions.droppables,...rt(n)},o=ot(un({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach((e=>{delete i[e]}));const a={droppables:r,draggables:i},s=zt(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],d=a.droppables[e.critical.droppable.id],{impact:u,afterCritical:p}=ln({draggable:c,home:d,draggables:i,viewport:e.viewport}),f=l&&l.isCombineEnabled?e.impact:u,g=en({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:f,viewport:e.viewport,afterCritical:p});dn();const m={...e,phase:"DRAGGING",impact:g,onLiftImpact:u,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?m:{...m,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;Xt(e)||Be();const{client:n}=t.payload;return qe(n,e.current.client.selection)?e:rn({state:e,clientSelection:n,impact:pn(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return gn(e);if("COLLECTING"===e.phase)return gn(e);Xt(e)||Be();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=tt(o,r);return fn(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Xt(e)||Be();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Be(),o.isEnabled===r&&Be();const i={...o,isEnabled:r};return fn(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Xt(e)||Be();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Be(),o.isCombineEnabled===r&&Be();const i={...o,isCombineEnabled:r};return fn(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;Xt(e)||Be(),e.isWindowScrollAllowed||Be();const n=t.payload.newScroll;if(qe(e.viewport.scroll.current,n))return gn(e);const r=Mt(e.viewport,n);return pn(e)?sn({state:e,viewport:r}):rn({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!Xt(e))return e;const n=t.payload.maxScroll;if(qe(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&Be();const n=Yt({state:e,type:t.type});return n?rn({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;"COLLECTING"!==e.phase&&Be();return{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&Be();return{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};function hn(e,t){return e instanceof Object&&"type"in e&&e.type===t}const vn=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),yn=()=>({type:"COLLECTION_STARTING",payload:null}),xn=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),In=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Dn=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),wn=e=>({type:"MOVE",payload:e}),En=()=>({type:"MOVE_UP",payload:null}),Sn=()=>({type:"MOVE_DOWN",payload:null}),On=()=>({type:"MOVE_RIGHT",payload:null}),Rn=()=>({type:"MOVE_LEFT",payload:null}),Pn=e=>({type:"DROP_COMPLETE",payload:e}),Cn=e=>({type:"DROP",payload:e}),An=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});const Nn="cubic-bezier(.2,1,.1,1)",Bn={drop:0,combining:.7},Tn={drop:.75},Ln={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Mn=`${Ln.outOfTheWay}s ${"cubic-bezier(0.2, 0, 0, 1)"}`,Gn={fluid:`opacity ${Mn}`,snap:`transform ${Mn}, opacity ${Mn}`,drop:e=>{const t=`${e}s ${Nn}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Mn}`,placeholder:`height ${Mn}, width ${Mn}, margin ${Mn}`},_n=e=>qe(e,$e)?void 0:`translate(${e.x}px, ${e.y}px)`,Fn=_n,jn=(e,t)=>{const n=_n(e);if(n)return t?`${n} scale(${Tn.drop})`:n},{minDropTime:kn,maxDropTime:Wn}=Ln,$n=Wn-kn;const Un=({getState:e,dispatch:t})=>n=>r=>{if(!hn(r,"DROP"))return void n(r);const o=e(),i=r.payload.reason;if("COLLECTING"===o.phase)return void t((e=>({type:"DROP_PENDING",payload:e}))({reason:i}));if("IDLE"===o.phase)return;"DROP_PENDING"===o.phase&&o.isWaiting&&Be(),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&Be();const a=o.critical,s=o.dimensions,l=s.draggables[o.critical.draggable.id],{impact:c,didDropInsideDroppable:d}=(({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>{if(!n.at||"DROP"!==t)return{impact:on({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1};return"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:ft},didDropInsideDroppable:!0}})({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),u=d?lt(c):null,p=d?ct(c):null,f={index:a.draggable.index,droppableId:a.droppable.id},g={draggableId:l.descriptor.id,type:l.descriptor.type,source:f,reason:i,mode:o.movementMode,destination:u,combine:p},m=(({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=zt(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=an({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return He(d,t.client.borderBox.center)})({impact:c,draggable:l,dimensions:s,viewport:o.viewport,afterCritical:o.afterCritical}),b={critical:o.critical,afterCritical:o.afterCritical,result:g,impact:c};if(!(!qe(o.current.client.offset,m)||Boolean(g.combine)))return void t(Pn({completed:b}));const h=(({current:e,destination:t,reason:n})=>{const r=Ye(e,t);if(r<=0)return kn;if(r>=1500)return Wn;const o=kn+$n*(r/1500);return Number(("CANCEL"===n?.6*o:o).toFixed(2))})({current:o.current.client.offset,destination:m,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:m,dropDuration:h,completed:b}))};var Hn=()=>({x:window.pageXOffset,y:window.pageYOffset});function qn({onWindowScroll:e}){const t=Se((function(){e(Hn())})),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let r=Pe;function o(){return r!==Pe}return{start:function(){o()&&Be(),r=Ce(window,[n])},stop:function(){o()||Be(),t.cancel(),r(),r=Pe},isActive:o}}const Vn=e=>{const t=qn({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{!t.isActive()&&hn(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>hn(e,"DROP_COMPLETE")||hn(e,"DROP_ANIMATE")||hn(e,"FLUSH"))(n)&&t.stop(),e(n)}};var zn=()=>{const e=[];return{add:t=>{const n=setTimeout((()=>(t=>{const n=e.findIndex((e=>e.timerId===t));-1===n&&Be();const[r]=e.splice(n,1);r.callback()})(n))),r={timerId:n,callback:t};e.push(r)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach((e=>{clearTimeout(e.timerId),e.callback()}))}}};const Yn=(e,t)=>{cn(),t(),dn()},Xn=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Jn(e,t,n,r){if(!e)return void n(r(t));const o=(e=>{let t=!1,n=!1;const r=setTimeout((()=>{n=!0})),o=o=>{t||n||(t=!0,e(o),clearTimeout(r))};return o.wasCalled=()=>t,o})(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}var Kn=(e,t)=>{const n=((e,t)=>{const n=zn();let r=null;const o=n=>{r||Be(),r=null,Yn(0,(()=>Jn(e().onDragEnd,n,t,Fe.onDragEnd)))};return{beforeCapture:(t,n)=>{r&&Be(),Yn(0,(()=>{const r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:(t,n)=>{r&&Be(),Yn(0,(()=>{const r=e().onBeforeDragStart;r&&r(Xn(t,n))}))},start:(o,i)=>{r&&Be();const a=Xn(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add((()=>{Yn(0,(()=>Jn(e().onDragStart,a,t,Fe.onDragStart)))}))},update:(o,i)=>{const a=lt(i),s=ct(i);r||Be();const l=!((e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r})(o,r.lastCritical);l&&(r.lastCritical=o);const c=(u=a,!(null==(d=r.lastLocation)&&null==u||null!=d&&null!=u&&d.droppableId===u.droppableId&&d.index===u.index));var d,u;c&&(r.lastLocation=a);const p=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(r.lastCombine,s);if(p&&(r.lastCombine=s),!l&&!c&&!p)return;const f={...Xn(o,r.mode),combine:s,destination:a};n.add((()=>{Yn(0,(()=>Jn(e().onDragUpdate,f,t,Fe.onDragUpdate)))}))},flush:()=>{r||Be(),n.flush()},drop:o,abort:()=>{if(!r)return;const e={...Xn(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>r=>{if(hn(r,"BEFORE_INITIAL_CAPTURE"))return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if(hn(r,"INITIAL_PUBLISH")){const e=r.payload.critical;return n.beforeStart(e,r.payload.movementMode),t(r),void n.start(e,r.payload.movementMode)}if(hn(r,"DROP_COMPLETE")){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),hn(r,"FLUSH"))return void n.abort();const o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}};const Qn=e=>t=>n=>{if(!hn(n,"DROP_ANIMATION_FINISHED"))return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&Be(),e.dispatch(Pn({completed:r.completed}))},Zn=e=>{let t=null,n=null;return r=>o=>{if((hn(o,"FLUSH")||hn(o,"DROP_COMPLETE")||hn(o,"DROP_ANIMATION_FINISHED"))&&(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),!hn(o,"DROP_ANIMATE"))return;const i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((()=>{n=null,t=Ce(window,[i])}))}};var er=e=>t=>n=>r=>{if((e=>hn(e,"DROP_COMPLETE")||hn(e,"DROP_ANIMATE")||hn(e,"FLUSH"))(r))return e.stop(),void n(r);if(hn(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();return"DRAGGING"!==o.phase&&Be(),void e.start(o)}n(r),e.scroll(t.getState())};const tr=e=>t=>n=>{if(t(n),!hn(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Cn({reason:r.reason})))},nr=b;var rr=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>{return f(bn,nr(function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(l(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map((e=>e(a)));return i=b(...s)(o.dispatch),{...o,dispatch:i}}}((a=n,()=>e=>t=>{hn(t,"INITIAL_PUBLISH")&&a.dragging(),hn(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(hn(t,"FLUSH")||hn(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>n=>{(hn(n,"DROP_COMPLETE")||hn(n,"FLUSH")||hn(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>r=>o=>{if(!hn(o,"LIFT"))return void r(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&n(Pn({completed:l.completed})),"IDLE"!==t().phase&&Be(),n({type:"FLUSH",payload:null}),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:s}});const c={draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},{critical:d,dimensions:u,viewport:p}=e.startPublishing(c);n({type:"INITIAL_PUBLISH",payload:{critical:d,dimensions:u,clientSelection:a,movementMode:s,viewport:p}})})(e),Un,Qn,Zn,tr,er(i),Vn,(e=>{let t=!1;return()=>n=>r=>{if(hn(r,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if(hn(r,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(hn(r,"DROP_COMPLETE")){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),Kn(r,o))));var a};var or=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=He({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},ir=()=>{const e=document.documentElement;return e||Be(),e},ar=()=>{const e=ir();return or({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},sr=({critical:e,scrollOptions:t,registry:n})=>{cn();const r=(()=>{const e=Hn(),t=ar(),n=e.y,r=e.x,o=ir(),i=o.clientWidth,a=o.clientHeight;return{frame:me({top:n,left:r,right:r+i,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:$e,displacement:$e}}}})(),o=r.scroll.current,i=e.droppable,a=n.droppable.getAllByType(i.type).map((e=>e.callbacks.getDimensionAndWatchScroll(o,t))),s=n.draggable.getAllByType(e.draggable.type).map((e=>e.getDimension(o))),l={draggables:ot(s),droppables:rt(a)};dn();return{dimensions:l,critical:e,viewport:r}};function lr(e,t,n){if(n.descriptor.id===t.id)return!1;if(n.descriptor.type!==t.type)return!1;return"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode}var cr=(e,t)=>{let n=null;const r=function({registry:e,callbacks:t}){let n={additions:{},removals:{},modified:{}},r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame((()=>{r=null,cn();const{additions:o,removals:i,modified:a}=n,s=Object.keys(o).map((t=>e.draggable.getById(t).getDimension($e))).sort(((e,t)=>e.descriptor.index-t.descriptor.index)),l=Object.keys(a).map((t=>({droppableId:t,scroll:e.droppable.getById(t).callbacks.getScrollWhileDragging()}))),c={additions:s,removals:Object.keys(i),modified:l};n={additions:{},removals:{},modified:{}},dn(),t.publish(c)})))};return{add:e=>{const t=e.descriptor.id;n.additions[t]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[t]&&delete n.removals[t],o()},remove:e=>{const t=e.descriptor;n.removals[t.id]=!0,n.modified[t.droppableId]=!0,n.additions[t.id]&&delete n.additions[t.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=t=>{n||Be();const o=n.critical.draggable;"ADDITION"===t.type&&lr(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&lr(e,o,t.value)&&r.remove(t.value)},i={updateDroppableIsEnabled:(r,o)=>{e.droppable.exists(r)||Be(),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:(r,o)=>{n&&(e.droppable.exists(r)||Be(),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:o}))},scrollDroppable:(t,r)=>{n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:(r,o)=>{n&&(e.droppable.exists(r)||Be(),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:t=>{n&&Be();const r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:i.descriptor},s=e.subscribe(o);return n={critical:a,unsubscribe:s},sr({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!n)return;r.stop();const t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((e=>e.callbacks.dragStopped())),n.unsubscribe(),n=null}};return i},dr=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason),ur=e=>{window.scrollBy(e.x,e.y)};const pr=nt((e=>it(e).filter((e=>!!e.isEnabled&&!!e.frame))));var fr=({center:e,destination:t,droppables:n})=>{if(t){const e=n[t];return e.frame?e:null}const r=((e,t)=>{const n=pr(t).find((t=>(t.frame||Be(),Jt(t.frame.pageMarginBox)(e))))||null;return n})(e,n);return r};const gr={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var mr=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;if(0===r)return 0;return(n-e)/r},br=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=((e,t,n=()=>gr)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const o=1-mr({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=r.maxPixelScroll*r.ease(o);return Math.ceil(i)})(e,t,o);return 0===i?0:r?Math.max(((e,t,n)=>{const r=n(),o=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,a=t,s=i,l=Date.now()-a;if(l>=i)return e;if(l<o)return 1;const c=mr({startOfRange:o,endOfRange:s,current:l}),d=e*r.ease(c);return Math.ceil(d)})(i,n,o),1):i},hr=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,n=()=>gr)=>{const r=n();return{startScrollingFrom:e[t.size]*r.startFromPercentage,maxScrollValueAt:e[t.size]*r.maxScrollAtPercentage}})(e,r,i);return t[r.end]<t[r.start]?br({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*br({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const vr=Je((e=>0===e?0:e));var yr=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},s=hr({container:t,distanceToEdges:a,dragStartTime:e,axis:vt,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=hr({container:t,distanceToEdges:a,dragStartTime:e,axis:yt,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=vr({x:l,y:s});if(qe(c,$e))return null;const d=(({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,o=t.width>e.width;return o||r?o&&r?null:{x:o?0:n.x,y:r?0:n.y}:n})({container:t,subject:n,proposedScroll:c});return d?qe(d,$e)?null:d:null};const xr=Je((e=>0===e?0:e>0?1:-1)),Ir=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{const o=Ue(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return qe(i,$e)?null:i}})(),Dr=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=xr(n),i=Ir({max:r,current:t,change:o});return!i||(0!==o.x&&0===i.x||0!==o.y&&0===i.y)},wr=(e,t)=>Dr({current:e.scroll.current,max:e.scroll.max,change:t}),Er=(e,t)=>{const n=e.frame;return!!n&&Dr({current:n.scroll.current,max:n.scroll.max,change:t})};var Sr=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,s=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const o=(({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=yr({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&wr(e,a)?a:null})({dragStartTime:t,viewport:e.viewport,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(o)return void r(o)}const l=fr({center:a,destination:zt(e.impact),droppables:e.dimensions.droppables});if(!l)return;const c=(({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=yr({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Er(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)},Or=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(e,n)=>{if(!Er(e,n))return n;const r=((e,t)=>{const n=e.frame;return n&&Er(e,t)?Ir({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!r)return t(e.descriptor.id,n),null;const o=He(n,r);t(e.descriptor.id,o);return He(n,o)},o=(e,t,r)=>{if(!e)return r;if(!wr(t,r))return r;const o=((e,t)=>{if(!wr(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return Ir({current:r,max:n,change:t})})(t,r);if(!o)return n(r),null;const i=He(r,o);n(i);return He(r,i)};return t=>{const n=t.scrollJumpRequest;if(!n)return;const i=zt(t.impact);i||Be();const a=r(t.dimensions.droppables[i],n);if(!a)return;const s=t.viewport,l=o(t.isWindowScrollAllowed,s,a);l&&((t,n)=>{const r=Ue(t.current.client.selection,n);e({client:r})})(t,l)}},Rr=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>gr})=>{const r=Se(e),o=Se(t);let i=null;const a=e=>{i||Be();const{shouldUseTimeDampening:t,dragStartTime:a}=i;Sr({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{cn(),i&&Be();const t=Date.now();let r=!1;const o=()=>{r=!0};Sr({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:n}),i={dragStartTime:t,shouldUseTimeDampening:r},dn(),r&&a(e)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=Or({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{r().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}};const Pr="data-rfd",Cr=(()=>{const e=`${Pr}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Ar=(()=>{const e=`${Pr}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Nr=(()=>{const e=`${Pr}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Br={contextId:`${Pr}-scroll-container-context-id`},Tr=(e,t)=>e.map((e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""})).join(" ");const Lr="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?o.useLayoutEffect:o.useEffect,Mr=()=>{const e=document.querySelector("head");return e||Be(),e},Gr=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function _r(e,t){const n=ke((()=>(e=>{const t=(n=e,e=>`[${e}="${n}"]`);var n;const r=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(Cr.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}})(),o=[(()=>{const e=`\n transition: ${Gn.outOfTheWay};\n `;return{selector:t(Ar.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(Nr.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:Tr(o,"always"),resting:Tr(o,"resting"),dragging:Tr(o,"dragging"),dropAnimating:Tr(o,"dropAnimating"),userCancel:Tr(o,"userCancel")}})(e)),[e]),r=(0,o.useRef)(null),i=(0,o.useRef)(null),a=We(nt((e=>{const t=i.current;t||Be(),t.textContent=e})),[]),s=We((e=>{const t=r.current;t||Be(),t.textContent=e}),[]);Lr((()=>{(r.current||i.current)&&Be();const o=Gr(t),l=Gr(t);return r.current=o,i.current=l,o.setAttribute(`${Pr}-always`,e),l.setAttribute(`${Pr}-dynamic`,e),Mr().appendChild(o),Mr().appendChild(l),s(n.always),a(n.resting),()=>{const e=e=>{const t=e.current;t||Be(),Mr().removeChild(t),e.current=null};e(r),e(i)}}),[t,s,a,n.always,n.resting,e]);const l=We((()=>a(n.dragging)),[a,n.dragging]),c=We((e=>{a("DROP"!==e?n.userCancel:n.dropAnimating)}),[a,n.dropAnimating,n.userCancel]),d=We((()=>{i.current&&a(n.resting)}),[a,n.resting]);return ke((()=>({dragging:l,dropping:c,resting:d})),[l,c,d])}function Fr(e,t){return Array.from(e.querySelectorAll(t))}var jr=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function kr(e){return e instanceof jr(e).HTMLElement}function Wr(e,t){const n=`[${Cr.contextId}="${e}"]`,r=Fr(document,n);if(!r.length)return null;const o=r.find((e=>e.getAttribute(Cr.draggableId)===t));return o&&kr(o)?o:null}function $r(){const e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((t=>t(e)))}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:(t,n)=>{const r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],e.droppables[t.descriptor.droppableId]&&n({type:"REMOVAL",value:t}))},getById:function(e){const t=r(e);return t||Be(),t},findById:r,exists:e=>Boolean(r(e)),getAllByType:t=>Object.values(e.draggables).filter((e=>e.descriptor.type===t))},droppable:{register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=o(e);return t||Be(),t},findById:o,exists:e=>Boolean(o(e)),getAllByType:t=>Object.values(e.droppables).filter((e=>e.descriptor.type===t))},subscribe:function(e){return t.push(e),function(){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Ur=i().createContext(null),Hr=()=>{const e=document.body;return e||Be(),e};const qr={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};const Vr={separator:"::"};function zr(e,t=Vr){const n=i().useId();return ke((()=>`${e}${t.separator}${n}`),[t.separator,e,n])}var Yr=i().createContext(null);function Xr(e){0}function Jr(e,t){Xr()}function Kr(){Jr()}function Qr(e){const t=(0,o.useRef)(e);return(0,o.useEffect)((()=>{t.current=e})),t}function Zr(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const eo=9,to=13,no=33,ro=34,oo=35,io=36,ao={[to]:!0,[eo]:!0};var so=e=>{ao[e.keyCode]&&e.preventDefault()};const lo=(()=>{const e="visibilitychange";if("undefined"===typeof document)return e;return[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find((e=>`on${e}`in document))||e})();const co={type:"IDLE"};function uo({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:o,clientY:i}=e;if(0!==t)return;const a={x:o,y:i},s=n();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&Be();const l=s.point;if(c=l,d=a,!(Math.abs(d.x-c.x)>=5||Math.abs(d.y-c.y)>=5))return;var c,d;e.preventDefault();const u=s.actions.fluidLift(a);r({type:"DRAGGING",actions:u})}},{eventName:"mouseup",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===n().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==n().type)return 27===t.keyCode?(t.preventDefault(),void e()):void so(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===n().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const r=n();"IDLE"===r.type&&Be(),r.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:lo,fn:e}]}function po(){}const fo={[ro]:!0,[no]:!0,[io]:!0,[oo]:!0};function go(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:r=>27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(fo[r.keyCode]?r.preventDefault():so(r))},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:lo,fn:n}]}const mo={type:"IDLE"};const bo=["input","button","textarea","select","option","optgroup","video","audio"];function ho(e,t){if(null==t)return!1;if(bo.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&ho(e,t.parentElement)}function vo(e,t){const n=t.target;return!!kr(n)&&ho(e,n)}var yo=e=>me(e.getBoundingClientRect()).center;const xo=(()=>{const e="matches";if("undefined"===typeof document)return e;return[e,"msMatchesSelector","webkitMatchesSelector"].find((e=>e in Element.prototype))||e})();function Io(e,t){return null==e?null:e[xo](t)?e:Io(e.parentElement,t)}function Do(e,t){return e.closest?e.closest(t):Io(e,t)}function wo(e,t){const n=t.target;if(!function(e){return e instanceof jr(e).Element}(n))return null;const r=function(e){return`[${Cr.contextId}="${e}"]`}(e),o=Do(n,r);return o&&kr(o)?o:null}function Eo(e){e.preventDefault()}function So({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!!n()&&e===t}function Oo({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!!o&&(!!o.options.isEnabled&&!!dr(t.getState(),r))}function Ro({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!Oo({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const s=r.draggable.getById(o),l=function(e,t){const n=`[${Ar.contextId}="${e}"]`,r=Fr(document,n).find((e=>e.getAttribute(Ar.id)===t));return r&&kr(r)?r:null}(t,s.descriptor.id);if(!l)return null;if(a&&!s.options.canDragInteractiveElements&&vo(l,a))return null;const c=e.claim(i||Pe);let d="PRE_DRAG";function u(){return s.options.shouldRespectForcePress}function p(){return e.isActive(c)}const f=function(e,t){So({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function g(t){function r(){e.release(),d="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=Ce(window,[{eventName:"click",fn:Eo,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(Cn({reason:e}))}return"PRE_DRAG"!==d&&(r(),Be()),n.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),d="DRAGGING",{isActive:()=>So({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>So({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,fluidLift:function(e){const t=Se((e=>{f((()=>wn({client:e})))}));return{...g({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>f(En),moveRight:()=>f(On),moveDown:()=>f(Sn),moveLeft:()=>f(Rn)};return g({liftActionArgs:{id:o,clientSelection:yo(l),movementMode:"SNAP"},cleanup:Pe,actions:e})},abort:function(){So({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&e.release()}}}const Po=[function(e){const t=(0,o.useRef)(co),n=(0,o.useRef)(Pe),r=ke((()=>({eventName:"mousedown",fn:function(t){if(t.defaultPrevented)return;if(0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,s,{sourceEvent:t});if(!o)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};n.current(),d(o,i)}})),[e]),i=ke((()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}})),[e]),a=We((function(){n.current=Ce(window,[i,r],{passive:!1,capture:!0})}),[i,r]),s=We((()=>{"IDLE"!==t.current.type&&(t.current=co,n.current(),a())}),[a]),l=We((()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),c=We((function(){const e=uo({cancel:l,completed:s,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=Ce(window,e,{capture:!0,passive:!1})}),[l,s]),d=We((function(e,n){"IDLE"!==t.current.type&&Be(),t.current={type:"PENDING",point:n,actions:e},c()}),[c]);Lr((function(){return a(),function(){n.current()}}),[a])},function(e){const t=(0,o.useRef)(po),n=ke((()=>({eventName:"keydown",fn:function(n){if(n.defaultPrevented)return;if(32!==n.keyCode)return;const o=e.findClosestDraggableId(n);if(!o)return;const i=e.tryGetLock(o,l,{sourceEvent:n});if(!i)return;n.preventDefault();let a=!0;const s=i.snapLift();function l(){a||Be(),a=!1,t.current(),r()}t.current(),t.current=Ce(window,go(s,l),{capture:!0,passive:!1})}})),[e]),r=We((function(){t.current=Ce(window,[n],{passive:!1,capture:!0})}),[n]);Lr((function(){return r(),function(){t.current()}}),[r])},function(e){const t=(0,o.useRef)(mo),n=(0,o.useRef)(Pe),r=We((function(){return t.current}),[]),i=We((function(e){t.current=e}),[]),a=ke((()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,l,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:s}=i,c={x:a,y:s};n.current(),p(o,c)}})),[e]),s=We((function(){n.current=Ce(window,[a],{capture:!0,passive:!1})}),[a]),l=We((()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(mo),n.current(),s())}),[s,i]),c=We((()=>{const e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),d=We((function(){const e={capture:!0,passive:!1},t={cancel:c,completed:l,getPhase:r},o=Ce(window,function({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const r=n();if("DRAGGING"!==r.type)return void e();r.hasMoved=!0;const{clientX:o,clientY:i}=t.touches[0],a={x:o,y:i};t.preventDefault(),r.actions.move(a)}},{eventName:"touchend",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===n().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const r=n();"IDLE"===r.type&&Be();const o=t.touches[0];if(!o)return;if(!(o.force>=.15))return;const i=r.actions.shouldRespectForcePress();if("PENDING"!==r.type)return i?r.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:lo,fn:e}]}(t),e),i=Ce(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:n=>{"DRAGGING"===t().type?(27===n.keyCode&&n.preventDefault(),e()):e()}},{eventName:lo,fn:e}]}(t),e);n.current=function(){o(),i()}}),[c,r,l]),u=We((function(){const e=r();"PENDING"!==e.type&&Be();const t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,i]),p=We((function(e,t){"IDLE"!==r().type&&Be();const n=setTimeout(u,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),d()}),[d,r,i,u]);Lr((function(){return s(),function(){n.current();const e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(mo))}}),[r,s,i]),Lr((function(){return Ce(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])}),[])}];function Co({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:i}){const a=[...i?Po:[],...r||[]],s=(0,o.useState)((()=>function(){let e=null;function t(){e||Be(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&Be();const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()))[0],l=We((function(e,t){Zr(e)&&!Zr(t)&&s.tryAbandon()}),[s]);Lr((function(){let e=t.getState();return t.subscribe((()=>{const n=t.getState();l(e,n),e=n}))}),[s,t,l]),Lr((()=>s.tryAbandon),[s.tryAbandon]);const c=We((e=>Oo({lockAPI:s,registry:n,store:t,draggableId:e})),[s,n,t]),d=We(((r,o,i)=>Ro({lockAPI:s,registry:n,contextId:e,store:t,draggableId:r,forceSensorStop:o||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null})),[e,s,n,t]),u=We((t=>function(e,t){const n=wo(e,t);return n?n.getAttribute(Cr.draggableId):null}(e,t)),[e]),p=We((e=>{const t=n.draggable.findById(e);return t?t.options:null}),[n.draggable]),f=We((function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))}),[s,t]),g=We((()=>s.isClaimed()),[s]),m=ke((()=>({canGetLock:c,tryGetLock:d,findClosestDraggableId:u,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:g})),[c,d,u,p,f,g]);Xr();for(let e=0;e<a.length;e++)a[e](m)}function Ao(e){return e.current||Be(),e.current}function No(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:s,dragHandleUsageInstructions:l}=e,c=(0,o.useRef)(null);Kr();const d=Qr(e),u=We((()=>(e=>({onBeforeCapture:t=>{(0,a.flushSync)((()=>{e.onBeforeCapture&&e.onBeforeCapture(t)}))},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(d.current)),[d]),p=We((()=>(e=>({...gr,...e.autoScrollerOptions,durationDampening:{...gr.durationDampening,...e.autoScrollerOptions}}))(d.current)),[d]),f=function(e){const t=ke((()=>(e=>`rfd-announcement-${e}`)(e)),[e]),n=(0,o.useRef)(null);(0,o.useEffect)((function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Oe(e.style,qr),Hr().appendChild(e),function(){setTimeout((function(){const t=Hr();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]);const r=We((e=>{const t=n.current;t&&(t.textContent=e)}),[]);return r}(t),g=function({contextId:e,text:t}){const n=zr("hidden-text",{separator:"-"}),r=ke((()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:n})),[n,e]);return(0,o.useEffect)((function(){const e=document.createElement("div");return e.id=r,e.textContent=t,e.style.display="none",Hr().appendChild(e),function(){const t=Hr();t.contains(e)&&t.removeChild(e)}}),[r,t]),r}({contextId:t,text:l}),b=_r(t,s),h=We((e=>{Ao(c).dispatch(e)}),[]),v=ke((()=>m({publishWhileDragging:vn,updateDroppableScroll:xn,updateDroppableIsEnabled:In,updateDroppableIsCombineEnabled:Dn,collectionStarting:yn},h)),[h]),y=function(){const e=ke($r,[]);return(0,o.useEffect)((()=>function(){e.clean()}),[e]),e}(),x=ke((()=>cr(y,v)),[y,v]),I=ke((()=>Rr({scrollWindow:ur,scrollDroppable:x.scrollDroppable,getAutoScrollerOptions:p,...m({move:wn},h)})),[x.scrollDroppable,h,p]),D=function(e){const t=(0,o.useRef)({}),n=(0,o.useRef)(null),r=(0,o.useRef)(null),i=(0,o.useRef)(!1),a=We((function(e,n){const r={id:e,focus:n};return t.current[e]=r,function(){const n=t.current;n[e]!==r&&delete n[e]}}),[]),s=We((function(t){const n=Wr(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),l=We((function(e,t){n.current===e&&(n.current=t)}),[]),c=We((function(){r.current||i.current&&(r.current=requestAnimationFrame((()=>{r.current=null;const e=n.current;e&&s(e)})))}),[s]),d=We((function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(Cr.draggableId)===e&&(n.current=e)}),[]);return Lr((()=>(i.current=!0,function(){i.current=!1;const e=r.current;e&&cancelAnimationFrame(e)})),[]),ke((()=>({register:a,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l})),[a,d,c,l])}(t),w=ke((()=>rr({announce:f,autoScroller:I,dimensionMarshal:x,focusMarshal:D,getResponders:u,styleMarshal:b})),[f,I,x,D,u,b]);c.current=w;const E=We((()=>{const e=Ao(c);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),S=We((()=>{const e=Ao(c).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging}),[]);n(ke((()=>({isDragging:S,tryAbort:E})),[S,E]));const O=We((e=>dr(Ao(c).getState(),e)),[]),R=We((()=>Xt(Ao(c).getState())),[]),P=ke((()=>({marshal:x,focus:D,contextId:t,canLift:O,isMovementAllowed:R,dragHandleUsageInstructionsId:g,registry:y})),[t,x,g,D,O,R,y]);return Co({contextId:t,store:w,registry:y,customSensors:r||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,o.useEffect)((()=>E),[E]),i().createElement(Yr.Provider,{value:P},i().createElement(fe,{context:Ur,store:w},e.children))}function Bo(e){const t=i().useId(),n=e.dragHandleUsageInstructions||Fe.dragHandleUsageInstructions;return i().createElement(Te,null,(r=>i().createElement(No,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children)))}const To=5e3,Lo=4500,Mo=(e,t)=>t?Gn.drop(t.duration):e?Gn.snap:Gn.fluid,Go=(e,t)=>{if(e)return t?Bn.drop:Bn.combining};function _o(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:n,combineWith:r,dropping:o}=e,i=Boolean(r),a=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),s=Boolean(o),l=s?jn(n,i):Fn(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Mo(a,o),transform:l,opacity:Go(i,s),zIndex:s?Lo:To,pointerEvents:"none"}}(e):{transform:Fn((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}function Fo(e){const t=zr("draggable"),{descriptor:n,registry:r,getDraggableRef:i,canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l}=e,c=ke((()=>({canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l})),[a,l,s]),d=We((e=>{const t=i();return t||Be(),function(e,t,n=$e){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=we(o,r),a=De(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(n,t,e)}),[n,i]),u=ke((()=>({uniqueId:t,descriptor:n,options:c,getDimension:d})),[n,d,c,t]),p=(0,o.useRef)(u),f=(0,o.useRef)(!0);Lr((()=>(r.draggable.register(p.current),()=>r.draggable.unregister(p.current))),[r.draggable]),Lr((()=>{if(f.current)return void(f.current=!1);const e=p.current;p.current=u,r.draggable.update(u,e)}),[u,r.draggable])}var jo=i().createContext(null);function ko(e){const t=(0,o.useContext)(e);return t||Be(),t}function Wo(e){e.preventDefault()}var $o=(e,t)=>e===t,Uo=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function Ho(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const qo={mapped:{type:"SECONDARY",offset:$e,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ho(null)}};const Vo=pe((()=>{const e=function(){const e=nt(((e,t)=>({x:e,y:t}))),t=nt(((e,t,n=null,r=null,o=null)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}))),n=nt(((e,n,r,o,i=null,a=null,s=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,o,i,a,null)}})));return(r,o)=>{if(Zr(r)){if(r.critical.draggable.id!==o.draggableId)return null;const t=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=zt(r.impact),l=(i=r.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(t.x,t.y),r.movementMode,a,o.isClone,s,l,c)}var i;if("DROP_ANIMATING"===r.phase){const e=r.completed;if(e.result.draggableId!==o.draggableId)return null;const n=o.isClone,i=r.dimensions.draggables[o.draggableId],a=e.result,s=a.mode,l=Uo(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:r.dropDuration,curve:Nn,moveTo:r.newHomeClientOffset,opacity:c?Bn.drop:null,scale:c?Tn.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:i,dropping:d,draggingOver:l,combineWith:c,mode:s,forceShouldAnimate:null,snapshot:t(s,n,l,c,d)}}}return null}}(),t=function(){const e=nt(((e,t)=>({x:e,y:t}))),t=nt(Ho),n=nt(((e,n=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}))),r=e=>e?n($e,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=ct(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return r(d);if(i.displaced.invisible[t])return null;const o=Ve(a.displacedBy.point),s=e(o.x,o.y);return n(s,d,!0)}if(l)return r(d);const u=i.displacedBy.point,p=e(u.x,u.y);return n(p,d,s.shouldAnimate)};return(e,t)=>{if(Zr(e))return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){const n=e.completed;return n.result.draggableId===t.draggableId?null:o(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return(n,r)=>e(n,r)||t(n,r)||qo}),{dropAnimationFinished:An},null,{context:Ur,areStatePropsEqual:$o})((e=>{const t=(0,o.useRef)(null),n=We(((e=null)=>{t.current=e}),[]),r=We((()=>t.current),[]),{contextId:s,dragHandleUsageInstructionsId:l,registry:c}=ko(Yr),{type:d,droppableId:u}=ko(jo),p=ke((()=>({id:e.draggableId,index:e.index,type:d,droppableId:u})),[e.draggableId,e.index,d,u]),{children:f,draggableId:g,isEnabled:m,shouldRespectForcePress:b,canDragInteractiveElements:h,isClone:v,mapped:y,dropAnimationFinished:x}=e;if(Jr(),Xr(),!v){Fo(ke((()=>({descriptor:p,registry:c,getDraggableRef:r,canDragInteractiveElements:h,shouldRespectForcePress:b,isEnabled:m})),[p,c,r,h,b,m]))}const I=ke((()=>m?{tabIndex:0,role:"button","aria-describedby":l,"data-rfd-drag-handle-draggable-id":g,"data-rfd-drag-handle-context-id":s,draggable:!1,onDragStart:Wo}:null),[s,l,g,m]),D=We((e=>{"DRAGGING"===y.type&&y.dropping&&"transform"===e.propertyName&&(0,a.flushSync)(x)}),[x,y]),w=ke((()=>{const e=_o(y),t="DRAGGING"===y.type&&y.dropping?D:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":s,"data-rfd-draggable-id":g,style:e,onTransitionEnd:t},dragHandleProps:I}}),[s,I,g,y,D,n]),E=ke((()=>({draggableId:p.id,type:p.type,source:{index:p.index,droppableId:p.droppableId}})),[p.droppableId,p.id,p.index,p.type]);return i().createElement(i().Fragment,null,f(w,y.snapshot,E))}));function zo(e){return ko(jo).isUsingCloneFor!==e.draggableId||e.isClone?i().createElement(Vo,e):null}function Yo(e){const t="boolean"!==typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return i().createElement(zo,Oe({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const Xo=e=>t=>e===t,Jo=Xo("scroll"),Ko=Xo("auto"),Qo=(Xo("visible"),(e,t)=>t(e.overflowX)||t(e.overflowY)),Zo=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Qo(n,Jo)||Qo(n,Ko)})(e)?e:Zo(e.parentElement);var ei=e=>({x:e.scrollLeft,y:e.scrollTop});const ti=e=>{if(!e)return!1;return"fixed"===window.getComputedStyle(e).position||ti(e.parentElement)};var ni=({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=n.closestScrollable,c=((e,t)=>{const n=Ee(e);if(!t)return n;if(e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,s=be({top:r,right:a,bottom:i,left:o},n.border);return ye({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})})(e,l),d=De(c,r),u=(()=>{if(!l)return null;const e=Ee(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:De(e,r),scroll:ei(l),scrollSize:t,shouldClipSubject:s}})(),p=(({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:e,client:t}=s,n=or({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:n,diff:{value:$e,displacement:$e}}}})(),c="vertical"===o?vt:yt;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:et({page:a,withPlaceholder:null,axis:c,frame:l})}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:n.isFixedOnPage,direction:o,client:c,page:d,closest:u});return p};const ri={passive:!1},oi={passive:!0};var ii=e=>e.shouldPublishImmediately?ri:oi;const ai=e=>e&&e.env.closestScrollable||null;function si(e){const t=(0,o.useRef)(null),n=ko(Yr),r=zr("droppable"),{registry:i,marshal:a}=n,s=Qr(e),l=ke((()=>({id:e.droppableId,type:e.type,mode:e.mode})),[e.droppableId,e.mode,e.type]),c=(0,o.useRef)(l),d=ke((()=>nt(((e,n)=>{t.current||Be();const r={x:e,y:n};a.updateDroppableScroll(l.id,r)}))),[l.id,a]),u=We((()=>{const e=t.current;return e&&e.env.closestScrollable?ei(e.env.closestScrollable):$e}),[]),p=We((()=>{const e=u();d(e.x,e.y)}),[u,d]),f=ke((()=>Se(p)),[p]),g=We((()=>{const e=t.current,n=ai(e);e&&n||Be();e.scrollOptions.shouldPublishImmediately?p():f()}),[f,p]),m=We(((e,r)=>{t.current&&Be();const o=s.current,i=o.getDroppableRef();i||Be();const a=(e=>({closestScrollable:Zo(e),isFixedOnPage:ti(e)}))(i),c={ref:i,descriptor:l,env:a,scrollOptions:r};t.current=c;const d=ni({ref:i,descriptor:l,env:a,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),u=a.closestScrollable;return u&&(u.setAttribute(Br.contextId,n.contextId),u.addEventListener("scroll",g,ii(c.scrollOptions))),d}),[n.contextId,l,g,s]),b=We((()=>{const e=t.current,n=ai(e);return e&&n||Be(),ei(n)}),[]),h=We((()=>{const e=t.current;e||Be();const n=ai(e);t.current=null,n&&(f.cancel(),n.removeAttribute(Br.contextId),n.removeEventListener("scroll",g,ii(e.scrollOptions)))}),[g,f]),v=We((e=>{const n=t.current;n||Be();const r=ai(n);r||Be(),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),y=ke((()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:b,dragStopped:h,scroll:v})),[h,m,b,v]),x=ke((()=>({uniqueId:r,descriptor:l,callbacks:y})),[y,l,r]);Lr((()=>(c.current=x.descriptor,i.droppable.register(x),()=>{t.current&&h(),i.droppable.unregister(x)})),[y,l,h,x,a,i.droppable]),Lr((()=>{t.current&&a.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)}),[e.isDropDisabled,a]),Lr((()=>{t.current&&a.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,a])}function li(){}const ci={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},di=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||"close"===n?ci:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==n?Gn.placeholder:null}};var ui=i().memo((e=>{const t=(0,o.useRef)(null),n=We((()=>{t.current&&(clearTimeout(t.current),t.current=null)}),[]),{animate:r,onTransitionEnd:a,onClose:s,contextId:l}=e,[c,d]=(0,o.useState)("open"===e.animate);(0,o.useEffect)((()=>c?"open"!==r?(n(),d(!1),li):t.current?li:(t.current=setTimeout((()=>{t.current=null,d(!1)})),n):li),[r,c,n]);const u=We((e=>{"height"===e.propertyName&&(a(),"close"===r&&s())}),[r,s,a]),p=di({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return i().createElement(e.placeholder.tagName,{style:p,"data-rfd-placeholder-context-id":l,onTransitionEnd:u,ref:e.innerRef})}));class pi extends i().PureComponent{constructor(...e){super(...e),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}const fi={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||Be(),document.body}},gi=e=>{let t,n={...e};for(t in fi)void 0===e[t]&&(n={...n,[t]:fi[t]});return n},mi=(e,t)=>e===t.droppable.type,bi=(e,t)=>t.draggables[e.draggable.id],hi=pe((()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=nt((e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}))),r=nt(((r,o,i,a,s,l)=>{const c=s.descriptor.id;if(s.descriptor.droppableId===r){const e=l?{render:l,dragging:n(s.descriptor)}:null,t={isDraggingOver:i,draggingOverWith:i?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:t,useClone:e}}if(!o)return t;if(!a)return e;const d={isDraggingOver:i,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:d,useClone:null}}));return(n,o)=>{const i=gi(o),a=i.droppableId,s=i.type,l=!i.isDropDisabled,c=i.renderClone;if(Zr(n)){const e=n.critical;if(!mi(s,e))return t;const o=bi(e,n.dimensions),i=zt(n.impact)===a;return r(a,l,i,i,o,c)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!mi(s,e.critical))return t;const o=bi(e.critical,n.dimensions);return r(a,l,Uo(e.result)===a,zt(e.impact)===a,o,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!mi(s,r.critical))return t;const o=zt(r.impact)===a,i=Boolean(r.impact.at&&"COMBINE"===r.impact.at.type),l=r.critical.droppable.id===a;return o?i?e:t:l?e:t}return t}}),{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},((e,t,n)=>({...gi(n),...e,...t})),{context:Ur,areStatePropsEqual:$o})((e=>{const t=(0,o.useContext)(Yr);t||Be();const{contextId:n,isMovementAllowed:r}=t,a=(0,o.useRef)(null),l=(0,o.useRef)(null),{children:c,droppableId:d,type:u,mode:p,direction:f,ignoreContainerClipping:g,isDropDisabled:m,isCombineEnabled:b,snapshot:h,useClone:v,updateViewportMaxScroll:y,getContainerForClone:x}=e,I=We((()=>a.current),[]),D=We(((e=null)=>{a.current=e}),[]),w=(We((()=>l.current),[]),We(((e=null)=>{l.current=e}),[]));Jr();const E=We((()=>{r()&&y({maxScroll:ar()})}),[r,y]);si({droppableId:d,type:u,mode:p,direction:f,isDropDisabled:m,isCombineEnabled:b,ignoreContainerClipping:g,getDroppableRef:I});const S=ke((()=>i().createElement(pi,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(({onClose:e,data:t,animate:r})=>i().createElement(ui,{placeholder:t,onClose:e,innerRef:w,animate:r,contextId:n,onTransitionEnd:E})))),[n,E,e.placeholder,e.shouldAnimatePlaceholder,w]),O=ke((()=>({innerRef:D,placeholder:S,droppableProps:{"data-rfd-droppable-id":d,"data-rfd-droppable-context-id":n}})),[n,d,S,D]),R=v?v.dragging.draggableId:null,P=ke((()=>({droppableId:d,type:u,isUsingCloneFor:R})),[d,R,u]);return i().createElement(jo.Provider,{value:P},c(O,h),function(){if(!v)return null;const{dragging:e,render:t}=v,n=i().createElement(zo,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},((n,r)=>t(n,r,e)));return s().createPortal(n,x())}())}));var vi=window.wp.apiFetch,yi=n.n(vi),xi=window.wp.i18n;window.wp.hooks;const Ii=(e,t)=>{let n=null;return function(...r){const o=this;window.clearTimeout(n),n=window.setTimeout((()=>{e.apply(o,r)}),t)}},Di=(e,t)=>e.map((e=>e[t]));function wi(){return wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wi.apply(null,arguments)}yi().use(yi().createRootURLMiddleware(window.epOrdering.restApiRoot));class Ei extends r.Component{titleInput=null;publishButton=null;debouncedDefaultResults=Ii((()=>{this.getDefaultResults()}),200);doSearch=Ii((()=>{const{searchText:e,searchResults:t}=this.state,n=e;t[n]=!1,this.setState({searchResults:t}),yi()({path:`/elasticpress/v1/pointer_search?s=${n}`}).then((e=>{t[n]=e,this.setState({searchResults:t})}))}),200);debouncedHandleTitleChange=Ii((()=>{this.handleTitleChange()}),200);constructor(e){super(e),this.titleInput=document.getElementById("title"),this.publishButton=document.getElementById("publish"),this.state={pointers:window.epOrdering.pointers,posts:window.epOrdering.posts,title:this.titleInput.value,defaultResults:{},searchText:"",searchResults:{},removedPointers:[]}}componentDidMount(){this.titleInput.addEventListener("keyup",this.debouncedHandleTitleChange);const{title:e}=this.state;e?.length>0&&this.getDefaultResults(),this.updatePublishButtonState()}componentDidUpdate(){this.updatePublishButtonState()}componentWillUnmount(){this.titleInput.removeEventListener("keyup",this.debouncedHandleTitleChange)}updatePublishButtonState=()=>{const{title:e,defaultResults:t}=this.state,n=0===e.length||!t[e];this.publishButton.disabled=n};handleTitleChange=()=>{this.setState({title:this.titleInput.value}),this.debouncedDefaultResults()};getDefaultResults=()=>{const{title:e}=this.state;yi()({path:`/elasticpress/v1/pointer_preview?s=${e}`}).then((t=>{const{defaultResults:n}=this.state;n[e]=t,this.setState({defaultResults:n})}))};removePointer=e=>{let{pointers:t}=this.state;const{removedPointers:n}=this.state;delete t[t.indexOf(e)],t=t.filter((e=>null!==e)),n.push(e.ID),this.setState({pointers:t})};getMergedPosts=()=>{let{pointers:e}=this.state;const{title:t,defaultResults:n}=this.state;let r=n[t].slice();e=e.sort(((e,t)=>e.order>t.order?1:-1));const o=Di(e,"ID");return r=r.filter((e=>-1===o.indexOf(e.ID))),e.forEach((e=>{r.splice(parseInt(e.order,10)-1,0,e)})),r};getNextAvailablePosition=()=>{const{pointers:e}=this.state,t={};for(let e=1;e<=window.epOrdering.postsPerPage;e++)t[e]=!0;e.forEach((e=>{delete t[e.order]}));const n=Object.keys(t);return 0!==n.length&&parseInt(n[0],10)};addPointer=e=>{const t=e.ID,{posts:n,pointers:r}=this.state;n[t]||(n[t]=e,this.setState({posts:n}));const o=this.getNextAvailablePosition();o?(r.push({ID:t,order:o,type:"custom-result"}),this.setState({pointers:r})):window.alert((0,xi.__)("You have added the maximum number of custom results.","elasticpress"))};onDragComplete=e=>{if(!e.destination)return;const t=this.getMergedPosts(),n=parseInt(window.epOrdering.postsPerPage,10),r=e.source.index>=n?e.source.index-1:e.source.index,o=e.destination.index>n?e.destination.index-1:e.destination.index,[i]=t.splice(r,1);t.splice(o,0,i);const a=[];t.forEach(((t,n)=>{(t.order||Number(t.ID)===Number(e.draggableId))&&a.push({ID:t.ID,order:n+1,type:t?.type||"reordered"})})),this.setState({pointers:a})};searchResults=e=>{const{searchText:t}=this.state;return""===t?null:!1===e?React.createElement("div",{className:"loading"},React.createElement("div",{className:"spinner is-active"}),"Loading..."):0===e.length?React.createElement("div",{className:"no-results"},(0,xi.__)("No results found.","elasticpress")):e.map((e=>React.createElement("div",{className:"pointer-result",key:e.ID},React.createElement("span",{className:"title"},e.post_title),React.createElement("span",{role:"button",tabIndex:"0",className:"dashicons dashicons-plus add-pointer",onClick:t=>{t.preventDefault(),this.addPointer(e)},onKeyDown:t=>{t.preventDefault(),this.addPointer(e)}},React.createElement("span",{className:"screen-reader-text"},(0,xi.__)("Add Post","elasticpress"))))))};render(){const{posts:e,defaultResults:t,title:n,pointers:o,removedPointers:i,searchText:a,searchResults:s}=this.state;if(0===n.length)return React.createElement("div",{className:"new-post"},React.createElement("p",null,(0,xi.__)("Enter your search query above to preview the results.","elasticpress")));if(!t[n])return React.createElement("div",{className:"loading"},React.createElement("div",{className:"spinner is-active"}),React.createElement("span",null,(0,xi.__)("Loading Result Preview…","elasticpress")));const l={};t[n].forEach((e=>{l[e.ID]=e}));const c=this.getMergedPosts(),d=Di(o,"ID"),u=!!s[a]&&s[a].filter((e=>-1===d.indexOf(e.ID)));return React.createElement("div",null,React.createElement("input",{type:"hidden",name:"search-ordering-nonce",value:window.epOrdering.nonce}),React.createElement("input",{type:"hidden",name:"ordered_posts",value:JSON.stringify(o)}),React.createElement(Bo,{onDragEnd:this.onDragComplete},React.createElement(hi,{droppableId:"droppable"},(t=>React.createElement("div",wi({className:"pointers"},t.droppableProps,{ref:t.innerRef}),c.map(((t,n)=>{const o=parseInt(window.epOrdering.postsPerPage,10)<=n?n+1:n,a=i.includes(t.ID);let{title:s}=t;void 0===s&&(s=void 0!==e[t.ID]?e[t.ID].post_title:l[t.ID].post_title);const c=t?.type||"reordered",d="reordered"===c?(0,xi.__)("Return to original position","elasticpress"):(0,xi.__)("Remove custom result from results list","elasticpress");return React.createElement(r.Fragment,{key:t.ID},parseInt(window.epOrdering.postsPerPage,10)===n&&React.createElement(Yo,{key:"divider",draggableId:"divider",index:n,isDragDisabled:!1},(e=>React.createElement("div",wi({className:`next-page-notice ${n}`,ref:e.innerRef},e.draggableProps,e.dragHandleProps),React.createElement("span",null,(0,xi.__)("The following posts have been displaced to the next page of search results.","elasticpress"))))),React.createElement(Yo,{key:t.ID,draggableId:String(t.ID),index:o},(e=>React.createElement("div",wi({className:`pointer ${o} ${a?"removed":""}`,ref:e.innerRef},e.draggableProps),t.order&&"reordered"===c&&React.createElement("span",{className:"pointer-type"},"RD"),t.order&&"reordered"!==c&&React.createElement("span",{className:"pointer-type"},"CR"),React.createElement("strong",{className:"title"},s),React.createElement("div",{className:"pointer-actions"},t.order&&React.createElement("span",{role:"button",tabIndex:"0",title:d,className:"dashicons dashicons-undo delete-pointer",onClick:e=>{e.preventDefault(),this.removePointer(t)},onKeyDown:e=>{e.preventDefault(),this.removePointer(t)}},React.createElement("span",{className:"screen-reader-text"},"Remove Post")),React.createElement("span",wi({className:"dashicons dashicons-menu handle"},e.dragHandleProps,{title:(0,xi.__)("Drag post up or down to reposition","elasticpress")})))))))})),t.placeholder)))),React.createElement("div",{className:"legend"},React.createElement("div",{className:"legend-item"},React.createElement("span",{className:"pointer-type"},"CR"),React.createElement("span",{className:"type-description"},(0,xi.__)("Custom Result (manually added to list)","elasticpress"))),React.createElement("div",{className:"legend-item"},React.createElement("span",{className:"pointer-type"},"RD"),React.createElement("span",{className:"type-description"},(0,xi.__)("Reordered Default (originally in results, but repositioned)","elasticpress")))),React.createElement("div",{className:"pointer-search"},React.createElement("h2",{className:"section-title"},(0,xi.__)("Add to results","elasticpress")),React.createElement("div",{className:"search-wrapper"},React.createElement("div",{className:"input-wrap"},React.createElement("input",{type:"text",className:"widefat search-pointers",placeholder:"Search for Post",value:a,onChange:e=>{this.setState({searchText:e.target.value}),this.doSearch()}})),React.createElement("div",{className:"pointer-results"},this.searchResults(u)))))}}const Si=document.getElementById("ordering-app");if("function"===typeof r.createRoot){(0,r.createRoot)(Si).render(React.createElement(Ei,null))}else(0,r.render)(React.createElement(Ei,null),Si)}(); |