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

assets.3235.9bf1d89926b9972b5b0a.js Maven / Gradle / Ivy

There is a newer version: 1.5.4
Show newest version
/*! For license information please see 3235.9bf1d89926b9972b5b0a.js.LICENSE.txt */
(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[3235],{28195:function(e,t,r){"use strict";function n(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i=this._config.preview;if(n)t.postMessage({results:s,workerId:a.WORKER_ID,finished:c});else if(S(this._config.chunk)&&!r){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);s=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!c||!S(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){S(this._config.error)?this._config.error(e):n&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),u.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=O(this._chunkLoaded,this),t.onerror=O(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var n in e)t.setRequestHeader(n,e[n])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+i)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var r=t.statusText||e;this._sendError(new Error(r))}}function l(e){var t,r;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),u.call(this,e);var n="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=O(this._chunkLoaded,this),t.onerror=O(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function f(e){var t;u.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,r=this._config.chunkSize;return r?(e=t.substring(0,r),t=t.substring(r)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function d(e){u.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=O((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=O((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=O((function(){this._streamCleanUp(),n=!0,this._streamData("")}),this),this._streamCleanUp=O((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function h(e){var t,r,n,i=Math.pow(2,53),o=-i,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,c=this,l=0,f=0,d=!1,h=!1,v=[],y={data:[],errors:[],meta:{}};if(S(e.step)){var m=e.step;e.step=function(t){if(y=t,D())w();else{if(w(),0===y.data.length)return;l+=t.data.length,e.preview&&l>e.preview?r.abort():(y.data=y.data[0],m(y,c))}}}function O(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){return y&&n&&(T("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!O(e)}))),D()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;D()&&t=v.length?"__parsed_extra":v[n]),e.transform&&(a=e.transform(a,o)),a=k(o,a),"__parsed_extra"===o?(i[o]=i[o]||[],i[o].push(a)):i[o]=a}return e.header&&(n>v.length?T("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+n,f+r):n=n.length/2?"\r\n":"\r"}(i,u)),n=!1,e.delimiter)S(e.delimiter)&&(e.delimiter=e.delimiter(i),y.meta.delimiter=e.delimiter);else{var c=function(t,r,n,i,o){var s,u,c,l;o=o||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var f=0;f=s)return M(!0)}else for(_=l,l++;;){if(-1===(_=e.indexOf(t,_+1)))return d||O.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:l}),A();if(_===h-1)return A(e.substring(l,_).replace(C,t));if(t!==c||e[_+1]!==c){if(t===c||0===_||e[_-1]!==c){-1!==I&&I<_+1&&(I=e.indexOf(r,_+1)),-1!==E&&E<_+1&&(E=e.indexOf(n,_+1));var P=x(-1===E?I:Math.min(I,E));if(e.substr(_+1+P,p)===r){w.push(e.substring(l,_).replace(C,t)),e[l=_+1+P+p]!==t&&(_=e.indexOf(t,l)),I=e.indexOf(r,l),E=e.indexOf(n,l);break}var R=x(E);if(e.substring(_+1+R,_+1+R+v)===n){if(w.push(e.substring(l,_).replace(C,t)),N(_+1+R+v),I=e.indexOf(r,l),_=e.indexOf(t,l),m&&(L(),f))return M();if(s&&b.length>=s)return M(!0);break}O.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:l}),_++}}else _++}return A();function j(e){b.push(e),D=l}function x(t){var r=0;if(-1!==t){var n=e.substring(_+1,t);n&&""===n.trim()&&(r=n.length)}return r}function A(t){return d||(void 0===t&&(t=e.substring(l)),w.push(t),l=h,j(w),m&&L()),M()}function N(t){l=t,j(w),w=[],E=e.indexOf(n,l)}function M(e){return{data:b,errors:O,meta:{delimiter:r,linebreak:n,aborted:f,truncated:!!e,cursor:D+(a||0)}}}function L(){o(M()),b=[],O=[]}},this.abort=function(){f=!0},this.getCharIndex=function(){return l}}function v(e){var t=e.data,r=i[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var o={abort:function(){n=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:m,resume:m};if(S(r.userStep)){for(var a=0;a0}},{key:"leave",value:function(e){var t,r,n=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),r=e,t.filter((function(e){return e!==r}))),n>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&o(t.prototype,r),e}(),u=i((function(){return/firefox/i.test(navigator.userAgent)})),c=i((function(){return Boolean(window.safari)}));function l(e,t){for(var r=0;re))return r[s];c=s-1}}var f=e-t[a=Math.max(0,c)],d=f*f;return r[a]+n[a]*f+i[a]*d+o[a]*f*d}}])&&l(t.prototype,r),e}();function h(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var r=t.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}function g(e){return{x:e.clientX,y:e.clientY}}var p,v="__NATIVE_FILE__",y="__NATIVE_URL__",m="__NATIVE_TEXT__",b="__NATIVE_HTML__";function O(e,t,r){var n=t.reduce((function(t,r){return t||e.getData(r)}),"");return null!=n?n:r}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var w=(S(p={},v,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),S(p,b,{exposeProperties:{html:function(e,t){return O(e,t,"")}},matchesTypes:["Html","text/html"]}),S(p,y,{exposeProperties:{urls:function(e,t){return O(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),S(p,m,{exposeProperties:{text:function(e,t){return O(e,t,"")}},matchesTypes:["Text","text/plain"]}),p);function D(e,t){for(var r=0;r-1}))}))[0]||null}function E(e,t){for(var r=0;r0&&i.actions.hover(t,{clientOffset:g(e)}),t.some((function(e){return i.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=i.getCurrentDropEffect())))})),x(this,"handleTopDragOverCapture",(function(){i.dragOverTargetIds=[]})),x(this,"handleTopDragOver",(function(e){var t=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));i.altKeyPressed=e.altKey,i.actions.hover(t||[],{clientOffset:g(e)}),(t||[]).some((function(e){return i.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))})),x(this,"handleTopDragLeaveCapture",(function(e){i.isDraggingNativeItem()&&e.preventDefault(),i.enterLeaveCounter.leave(e.target)&&i.isDraggingNativeItem()&&setTimeout((function(){return i.endDragNativeItem()}),0)})),x(this,"handleTopDropCapture",(function(e){var t;i.dropTargetIds=[],i.isDraggingNativeItem()?(e.preventDefault(),null===(t=i.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):I(e.dataTransfer)&&e.preventDefault(),i.enterLeaveCounter.reset()})),x(this,"handleTopDrop",(function(e){var t=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(t,{clientOffset:g(e)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()})),x(this,"handleSelectStart",(function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))})),this.options=new _(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new s(this.isNodeInDocument)}var t,r;return t=e,(r=[{key:"profile",value:function(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}},{key:"teardown",value:function(){var e,t=this.rootElement;void 0!==t&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(e=this.window)||void 0===e||e.cancelAnimationFrame(this.asyncEndDragFrameId)))}},{key:"connectDragPreview",value:function(e,t,r){var n=this;return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),function(){n.sourcePreviewNodes.delete(e),n.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,r){var n=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);var i=function(t){return n.handleDragStart(t,e)},o=function(e){return n.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",i),t.addEventListener("selectstart",o),function(){n.sourceNodes.delete(e),n.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",i),t.removeEventListener("selectstart",o),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var r=this,n=function(t){return r.handleDragEnter(t,e)},i=function(t){return r.handleDragOver(t,e)},o=function(t){return r.handleDrop(t,e)};return t.addEventListener("dragenter",n),t.addEventListener("dragover",i),t.addEventListener("drop",o),function(){t.removeEventListener("dragenter",n),t.removeEventListener("dragover",i),t.removeEventListener("drop",o)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return R({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return R({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(n).some((function(t){return n[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var r=new T(w[e]);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){var e;return null===(e=t.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){var e;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}}])&&j(t.prototype,r),e}(),N=function(e,t,r){return new A(e,t,r)}},34566:function(e,t,r){"use strict";r.d(t,{L:function(){return n}});var n=(0,r(67294).createContext)({dragDropManager:void 0})},14129:function(e,t,r){"use strict";r.d(t,{W:function(){return Fe}});var n=r(48521),i=r(67294),o=r(28195),a="dnd-core/INIT_COORDS",s="dnd-core/BEGIN_DRAG",u="dnd-core/PUBLISH_DRAG_SOURCE",c="dnd-core/HOVER",l="dnd-core/DROP",f="dnd-core/END_DRAG";function d(e,t){return{type:a,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function h(e){return h="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},h(e)}function g(e,t,r){return t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:r||null}),e)}function p(e,t){return e.filter((function(e){return e!==t}))}function v(e){return"object"===h(e)}function y(e,t){var r=new Map,n=function(e){r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);var i=[];return r.forEach((function(e,t){1===e&&i.push(t)})),i}var m={type:a,payload:{clientOffset:null,sourceClientOffset:null}};function b(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},n=r.publishSource,i=void 0===n||n,o=r.clientOffset,a=r.getSourceClientOffset,u=e.getMonitor(),c=e.getRegistry();e.dispatch(d(o)),O(t,u,c);var l=D(t,u);if(null!==l){var f=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");S(a),f=a(l)}e.dispatch(d(o,f));var h=c.getSource(l),g=h.beginDrag(u,l);if(null!=g){w(g),c.pinSource(l);var p=c.getSourceType(l);return{type:s,payload:{itemType:p,item:g,sourceId:l,clientOffset:o||null,sourceClientOffset:f||null,isSourcePublic:!!i}}}}else e.dispatch(m)}}function O(e,t,r){(0,o.k)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){(0,o.k)(r.getSource(e),"Expected sourceIds to be registered.")}))}function S(e){(0,o.k)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function w(e){(0,o.k)(v(e),"Item must be an object.")}function D(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function k(e){return function(){if(e.getMonitor().isDragging())return{type:u}}}function T(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function I(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.clientOffset;E(t);var i=t.slice(0),o=e.getMonitor(),a=e.getRegistry();C(i,o,a);var s=o.getItemType();return _(i,a,s),P(i,o,a),{type:c,payload:{targetIds:i,clientOffset:n||null}}}}function E(e){(0,o.k)(Array.isArray(e),"Expected targetIds to be an array.")}function C(e,t,r){(0,o.k)(t.isDragging(),"Cannot call hover while not dragging."),(0,o.k)(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n=0;n--){var i=e[n];T(t.getTargetType(i),r)||e.splice(n,1)}}function P(e,t,r){e.forEach((function(e){r.getTarget(e).hover(t,e)}))}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},r=e.getMonitor(),n=e.getRegistry();N(r);var i=L(r);i.forEach((function(i,o){var a=M(i,o,n,r),s={type:l,payload:{dropResult:j(j({},t),a)}};e.dispatch(s)}))}}function N(e){(0,o.k)(e.isDragging(),"Cannot call drop while not dragging."),(0,o.k)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function M(e,t,r,n){var i=r.getTarget(e),a=i?i.drop(n,e):void 0;return function(e){(0,o.k)(void 0===e||v(e),"Drop result must either be an object or undefined.")}(a),void 0===a&&(a=0===t?{}:n.getDropResult()),a}function L(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function U(e){return function(){var t=e.getMonitor(),r=e.getRegistry();!function(e){(0,o.k)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var n=t.getSourceId();return null!=n&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:f}}}function H(e,t){for(var r=0;r0;n.backend&&(e&&!n.isSetUp?(n.backend.setup(),n.isSetUp=!0):!e&&n.isSetUp&&(n.backend.teardown(),n.isSetUp=!1))},this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}var t,r;return t=e,r=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,r=function(e){return{beginDrag:b(e),publishDragSource:k(e),hover:I(e),drop:A(e),endDrag:U(e)}}(this);return Object.keys(r).reduce((function(n,i){var o,a=r[i];return n[i]=(o=a,function(){for(var r=arguments.length,n=new Array(r),i=0;i2&&void 0!==arguments[2]?arguments[2]:B;if(e.length!==t.length)return!1;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:Y,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case a:case s:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case c:return q(e.clientOffset,r.clientOffset)?e:G(G({},e),{},{clientOffset:r.clientOffset});case f:case l:return Y;default:return e}}var V="dnd-core/ADD_SOURCE",J="dnd-core/ADD_TARGET",Q="dnd-core/REMOVE_SOURCE",Z="dnd-core/REMOVE_TARGET";function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:ne,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case s:return te(te({},e),{},{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case u:return te(te({},e),{},{isSourcePublic:!0});case c:return te(te({},e),{},{targetIds:r.targetIds});case Z:return-1===e.targetIds.indexOf(r.targetId)?e:te(te({},e),{},{targetIds:p(e.targetIds,r.targetId)});case l:return te(te({},e),{},{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case f:return te(te({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case V:case J:return e+1;case Q:case Z:return e-1;default:return e}}var ae=[],se=[];function ue(e,t){return e!==ae&&(e===se||void 0===t||(r=e,t.filter((function(e){return r.indexOf(e)>-1}))).length>0);var r}function ce(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case c:break;case V:case J:case Z:case Q:return ae;default:return se}var t=e.payload,r=t.targetIds,n=void 0===r?[]:r,i=t.prevTargetIds,o=void 0===i?[]:i,a=y(n,o),s=a.length>0||!W(n,o);if(!s)return ae;var u=o[o.length-1],l=n[n.length-1];return u!==l&&(u&&a.push(u),l&&a.push(l)),a}function le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:ce(e.dirtyHandlerIds,{type:t.type,payload:de(de({},t.payload),{},{prevTargetIds:g(e,"dragOperation.targetIds",[])})}),dragOffset:$(e.dragOffset,t),refCount:oe(e.refCount,t),dragOperation:ie(e.dragOperation,t),stateId:le(e.stateId)}}function pe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ve(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},n=r.handlerIds;(0,o.k)("function"==typeof e,"listener must be a function."),(0,o.k)(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId,a=function(){var r=t.store.getState(),o=r.stateId;try{o===i||o===i+1&&!ue(r.dirtyHandlerIds,n)||e()}finally{i=o}};return this.store.subscribe(a)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,o.k)("function"==typeof e,"listener must be a function.");var r=this.store.getState().dragOffset;return this.store.subscribe((function(){var n=t.store.getState().dragOffset;n!==r&&(r=n,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return(0,o.k)(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return(0,o.k)(t,"Expected to find a valid target. targetId=".concat(e)),!(!this.isDragging()||this.didDrop())&&T(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return(0,o.k)(t,"Expected to find a valid source. sourceId=".concat(e)),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var r=t.shallow;if(!this.isDragging())return!1;var n=this.registry.getTargetType(e),i=this.getItemType();if(i&&!T(n,i))return!1;var o=this.getTargetIds();if(!o.length)return!1;var a=o.indexOf(e);return r?a===o.length-1:a>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return n=(r=this.store.getState().dragOffset).clientOffset,i=r.initialClientOffset,o=r.initialSourceClientOffset,n&&i&&o?pe((t=o,{x:(e=n).x+t.x,y:e.y+t.y}),i):null;var e,t,r,n,i,o}},{key:"getDifferenceFromInitialOffset",value:function(){return t=(e=this.store.getState().dragOffset).clientOffset,r=e.initialClientOffset,t&&r?pe(t,r):null;var e,t,r}}],r&&ve(t.prototype,r),e}(),be=0;function Oe(e){return Oe="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},Oe(e)}function Se(e,t){t&&Array.isArray(e)?e.forEach((function(e){return Se(e,!1)})):(0,o.k)("string"==typeof e||"symbol"===Oe(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(ye||(ye={}));const we="undefined"!=typeof global?global:self,De=we.MutationObserver||we.WebKitMutationObserver;function ke(e){return function(){const t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}const Te="function"==typeof De?function(e){let t=1;const r=new De(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}:ke;class Ie{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const Ee=new class{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.indexthis.capacity){for(let t=0,r=e.length-this.index;t{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Te(this.flush),this.requestErrorThrow=ke((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},Ce=new class{create(e){const t=this.freeTasks,r=t.length?t.pop():new Ie(this.onError,(e=>t[t.length]=e));return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}(Ee.registerPendingError);function _e(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]&&arguments[1];(0,o.k)(this.isSourceId(e),"Expected a valid source ID.");var r=t&&e===this.pinnedSourceId,n=r?this.pinnedSource:this.dragSources.get(e);return n}},{key:"getTarget",value:function(e){return(0,o.k)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return(0,o.k)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return(0,o.k)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return Re(e)===ye.SOURCE}},{key:"isTargetId",value:function(e){return Re(e)===ye.TARGET}},{key:"removeSource",value:function(e){var t,r=this;(0,o.k)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:Q,payload:{sourceId:e}}}(e)),t=function(){r.dragSources.delete(e),r.types.delete(e)},Ee.enqueueTask(Ce.create(t))}},{key:"removeTarget",value:function(e){(0,o.k)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:Z,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);(0,o.k)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){(0,o.k)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,r){var n=function(e){var t=(be++).toString();switch(e){case ye.SOURCE:return"S".concat(t);case ye.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}(e);return this.types.set(n,t),e===ye.SOURCE?this.dragSources.set(n,r):e===ye.TARGET&&this.dropTargets.set(n,r),n}}],r&&_e(t.prototype,r),e}();function Ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=Ne(n),o=new me(i,new xe(i)),a=new F(i,o),s=e(a,t,r);return a.receiveBackend(s),a}function Ne(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return(0,z.createStore)(ge,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var Me=r(34566);function Le(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:ze(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=t;return i[He]||(i[He]={dragDropManager:Ae(e,t,r,n)}),i[He]}(e.backend,e.context,e.options,e.debugMode);return[t,!e.context]}(function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["children"])),s=(r=2,function(e){if(Array.isArray(e))return e}(t=a)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(t,r)||function(e,t){if(e){if("string"==typeof e)return Le(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Le(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],c=s[1];return(0,i.useEffect)((function(){if(c){var e=ze();return++Ue,function(){0==--Ue&&(e[He]=null)}}}),[]),(0,n.jsx)(Me.L.Provider,Object.assign({value:u},{children:o}),void 0)}));function ze(){return void 0!==r.g?r.g:window}},7137:function(e,t,r){"use strict";r.d(t,{J:function(){return l}});var n=r(14141),i=r(64063),o=r.n(i),a=r(67294);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r, or turn it into a ")+"drag source or a drop target itself.")}}function a(e){var t={};return Object.keys(e).forEach((function(r){var n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{var a=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,i.isValidElement)(t)){var n=t;return e(n,r),n}var a=t;o(a);var s=r?function(t){return e(t,r)}:e;return u(a,s)}}(n);t[r]=function(){return a}}})),t}function s(e,t){"function"==typeof e?e(t):e.current=t}function u(e,t){var r=e.ref;return(0,n.k)("string"!=typeof r,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a  or 
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,i.cloneElement)(e,{ref:function(e){s(r,e),s(t,e)}}):(0,i.cloneElement)(e,{ref:t})}},16798:function(e,t,r){"use strict";r.d(t,{vE:function(){return u}});var n=r(57460),i=r.n(n);function o(e,t){return i().parse(e,t)}function a(e,t){i().parse(e,Object.assign({},{download:!0},t))}function s(e,t){return void 0===t&&(t={}),i().unparse(e,t)}function u(){return{readString:o,readRemoteFile:a,jsonToCSV:s}}r(67294),i().BAD_DELIMITERS,i().RECORD_SEP,i().UNIT_SEP,i().WORKERS_SUPPORTED,i().LocalChunkSize,i().DefaultDelimiter}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy