@angular/cdk 7.2.2 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/cdk-drag-drop.umd.js +2798 -2597
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -2
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +86 -15
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +2 -2
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/drag-drop/typings/directives/drag.d.ts +8 -4
- package/drag-drop/typings/directives/drop-list.d.ts +17 -3
- package/drag-drop/typings/drag-drop.d.ts +33 -0
- package/drag-drop/typings/drag-ref.d.ts +20 -13
- package/drag-drop/typings/drop-list-ref.d.ts +8 -4
- package/drag-drop/typings/index.d.ts +2 -2
- package/drag-drop/typings/index.metadata.json +1 -1
- package/drag-drop/typings/public-api.d.ts +4 -1
- package/esm2015/cdk.js +1 -1
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/drag-drop.js +2213 -2058
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/overlay.js +58 -11
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/stepper.js +1 -1
- package/esm2015/stepper.js.map +1 -1
- package/esm5/cdk.es5.js +1 -1
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +2792 -2594
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/overlay.es5.js +88 -17
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/stepper.es5.js +2 -2
- package/esm5/stepper.es5.js.map +1 -1
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-ref.d.ts +4 -0
- package/overlay/typings/position/flexible-connected-position-strategy.d.ts +17 -4
- package/overlay/typings/position/overlay-position-builder.d.ts +3 -3
- package/package.json +4 -4
- package/stepper/typings/stepper.d.ts +1 -1
- package/typings/drag-drop/directives/drag.d.ts +8 -4
- package/typings/drag-drop/directives/drop-list.d.ts +17 -3
- package/typings/drag-drop/drag-drop.d.ts +33 -0
- package/typings/drag-drop/drag-ref.d.ts +20 -13
- package/typings/drag-drop/drop-list-ref.d.ts +8 -4
- package/typings/drag-drop/index.d.ts +2 -2
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/drag-drop/public-api.d.ts +4 -1
- package/typings/esm5/drag-drop/directives/drag.d.ts +8 -4
- package/typings/esm5/drag-drop/directives/drop-list.d.ts +17 -3
- package/typings/esm5/drag-drop/drag-drop.d.ts +33 -0
- package/typings/esm5/drag-drop/drag-ref.d.ts +20 -13
- package/typings/esm5/drag-drop/drop-list-ref.d.ts +8 -4
- package/typings/esm5/drag-drop/index.d.ts +2 -2
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/public-api.d.ts +4 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/overlay-ref.d.ts +4 -0
- package/typings/esm5/overlay/position/flexible-connected-position-strategy.d.ts +17 -4
- package/typings/esm5/overlay/position/overlay-position-builder.d.ts +3 -3
- package/typings/esm5/stepper/stepper.d.ts +1 -1
- package/typings/index.metadata.json +1 -1
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-ref.d.ts +4 -0
- package/typings/overlay/position/flexible-connected-position-strategy.d.ts +17 -4
- package/typings/overlay/position/overlay-position-builder.d.ts +3 -3
- package/typings/stepper/stepper.d.ts +1 -1
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/cdk/platform"),require("rxjs"),require("@angular/cdk/coercion"),require("@angular/cdk/bidi"),require("@angular/cdk/scrolling"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/cdk/drag-drop",["exports","@angular/core","@angular/common","@angular/cdk/platform","rxjs","@angular/cdk/coercion","@angular/cdk/bidi","@angular/cdk/scrolling","rxjs/operators"],e):e((t.ng=t.ng||{},t.ng.cdk=t.ng.cdk||{},t.ng.cdk.dragDrop={}),t.ng.core,t.ng.common,t.ng.cdk.platform,t.rxjs,t.ng.cdk.coercion,t.ng.cdk.bidi,t.ng.cdk.scrolling,t.rxjs.operators)}(this,function(t,e,i,n,r,o,s,a,p){"use strict";function c(t,e,i){var n=l(e,t.length-1),r=l(i,t.length-1);if(n!==r){for(var o=t[n],s=r<n?-1:1,a=n;a!==r;a+=s)t[a]=t[a+s];t[r]=o}}function d(t,e,i,n){var r=l(i,t.length-1),o=l(n,e.length);t.length&&e.splice(o,0,t.splice(r,1)[0])}function h(t,e,i,n){var r=l(n,e.length);t.length&&e.splice(r,0,t[i])}function l(t,e){return Math.max(0,Math.min(e,t))}function u(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function g(t,e){var i=e?"":"none";u(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:i,msUserSelect:i,webkitUserSelect:i,MozUserSelect:i})}function _(t){var e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function f(t){var e=getComputedStyle(t),i=m(e,"transition-property"),n=i.find(function(t){return"transform"===t||"all"===t});if(!n)return 0;var r=i.indexOf(n),o=m(e,"transition-duration"),s=m(e,"transition-delay");return _(o[r])+_(s[r])}function m(t,e){return t.getPropertyValue(e).split(",").map(function(t){return t.trim()})}function v(t,e){return"translate3d("+Math.round(t)+"px, "+Math.round(e)+"px, 0)"}function y(t){var e=t.cloneNode(!0);return e.removeAttribute("id"),e}function b(t,e,i){return Math.max(e,Math.min(i,t))}function D(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function E(t){return t.type.startsWith("touch")}function P(){return{dragStartThreshold:5,pointerDirectionChangeThreshold:5}}function w(t,e){for(var i=t.parentElement;i;){if(i.matches?i.matches(e):i.msMatchesSelector(e))return i;i=i.parentElement}return null}function x(t,e,i){t.top+=e,t.bottom=t.top+t.height,t.left+=i,t.right=t.left+t.width}function R(t,e){for(var i=0;i<t.length;i++)if(e(t[i],i,t))return i;return-1}function C(t,e,i){var n=t.top,r=t.bottom,o=t.left,s=t.right;return i>=n&&i<=r&&e>=o&&e<=s}var I=new e.InjectionToken("CDK_DROP_LIST"),k=I,S=n.normalizePassiveListenerOptions({passive:!1,capture:!0}),O=function(){function t(t,e){var i=this;this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new r.Subject,this.pointerUp=new r.Subject,this._preventDefaultWhileDragging=function(t){i._activeDragInstances.size&&t.preventDefault()},this._document=e}return t.prototype.registerDropContainer=function(t){if(!this._dropInstances.has(t)){if(this.getDropContainer(t.id))throw Error('Drop instance with id "'+t.id+'" has already been registered.');this._dropInstances.add(t)}},t.prototype.registerDragItem=function(t){var e=this;this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(function(){e._document.addEventListener("touchmove",e._preventDefaultWhileDragging,S)})},t.prototype.removeDropContainer=function(t){this._dropInstances.delete(t)},t.prototype.removeDragItem=function(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._preventDefaultWhileDragging,S)},t.prototype.startDragging=function(t,e){var i=this;if(this._activeDragInstances.add(t),1===this._activeDragInstances.size){var n=e.type.startsWith("touch"),r=n?"touchmove":"mousemove",o=n?"touchend":"mouseup";this._globalListeners.set(r,{handler:function(t){return i.pointerMove.next(t)},options:S}).set(o,{handler:function(t){return i.pointerUp.next(t)},options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:S}),n||this._globalListeners.set("wheel",{handler:this._preventDefaultWhileDragging,options:S}),this._ngZone.runOutsideAngular(function(){i._globalListeners.forEach(function(t,e){i._document.addEventListener(e,t.handler,t.options)})})}},t.prototype.stopDragging=function(t){this._activeDragInstances.delete(t),0===this._activeDragInstances.size&&this._clearGlobalListeners()},t.prototype.isDragging=function(t){return this._activeDragInstances.has(t)},t.prototype.getDropContainer=function(t){return Array.from(this._dropInstances).find(function(e){return e.id===t})},t.prototype.ngOnDestroy=function(){var t=this;this._dragInstances.forEach(function(e){return t.removeDragItem(e)}),this._dropInstances.forEach(function(e){return t.removeDropContainer(e)}),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()},t.prototype._clearGlobalListeners=function(){var t=this;this._globalListeners.forEach(function(e,i){t._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:e.NgZone},{type:void 0,decorators:[{type:e.Inject,args:[i.DOCUMENT]}]}]},t.ngInjectableDef=e.defineInjectable({factory:function(){return new t(e.inject(e.NgZone),e.inject(i.DOCUMENT))},token:t,providedIn:"root"}),t}(),T=new e.InjectionToken("CDK_DRAG_PARENT"),L=function(){function t(t,e){this.element=t,this._stateChanges=new r.Subject,this._disabled=!1,this._parentDrag=e,g(t.nativeElement,!1)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=o.coerceBooleanProperty(t),this._stateChanges.next(this)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._stateChanges.complete()},t.decorators=[{type:e.Directive,args:[{selector:"[cdkDragHandle]",host:{class:"cdk-drag-handle"}}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[T]},{type:e.Optional}]}]},t.propDecorators={disabled:[{type:e.Input,args:["cdkDragHandleDisabled"]}]},t}(),j=function(){function t(t){this.templateRef=t}return t.decorators=[{type:e.Directive,args:[{selector:"ng-template[cdkDragPlaceholder]"}]}],t.ctorParameters=function(){return[{type:e.TemplateRef}]},t.propDecorators={data:[{type:e.Input}]},t}(),M=function(){function t(t){this.templateRef=t}return t.decorators=[{type:e.Directive,args:[{selector:"ng-template[cdkDragPreview]"}]}],t.ctorParameters=function(){return[{type:e.TemplateRef}]},t.propDecorators={data:[{type:e.Input}]},t}(),A=n.normalizePassiveListenerOptions({passive:!0}),N=n.normalizePassiveListenerOptions({passive:!1}),z=function(){function t(t,e,i,n,o,s,a,p,c){var d=this;this._document=e,this._ngZone=i,this._viewContainerRef=n,this._viewportRuler=o,this._dragDropRegistry=s,this._config=a,this.dropContainer=p,this._dir=c,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new r.Subject,this._moveEventSubscriptions=0,this._pointerMoveSubscription=r.Subscription.EMPTY,this._pointerUpSubscription=r.Subscription.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._disabled=!1,this.beforeStarted=new r.Subject,this.started=new r.Subject,this.released=new r.Subject,this.ended=new r.Subject,this.entered=new r.Subject,this.exited=new r.Subject,this.dropped=new r.Subject,this.moved=new r.Observable(function(t){var e=d._moveEvents.subscribe(t);return d._moveEventSubscriptions++,function(){e.unsubscribe(),d._moveEventSubscriptions--}}),this._pointerDown=function(t){if(d.beforeStarted.next(),d._handles.length){var e=d._handles.find(function(e){var i=t.target;return!!i&&(i===e||e.contains(i))});!e||d._disabledHandles.has(e)||d.disabled||d._initializeDragSequence(e,t)}else d.disabled||d._initializeDragSequence(d._rootElement,t)},this._pointerMove=function(t){if(!d._hasStartedDragging){var e=d._getPointerPositionOnPage(t);return void(Math.abs(e.x-d._pickupPositionOnPage.x)+Math.abs(e.y-d._pickupPositionOnPage.y)>=d._config.dragStartThreshold&&(d._hasStartedDragging=!0,d._ngZone.run(function(){return d._startDragSequence(t)})))}d._boundaryElement&&(d._previewRect&&(d._previewRect.width||d._previewRect.height)||(d._previewRect=(d._preview||d._rootElement).getBoundingClientRect()));var i=d._getConstrainedPointerPosition(t);if(d._hasMoved=!0,t.preventDefault(),d._updatePointerDirectionDelta(i),d.dropContainer)d._updateActiveDropContainer(i);else{var n=d._activeTransform;n.x=i.x-d._pickupPositionOnPage.x+d._passiveTransform.x,n.y=i.y-d._pickupPositionOnPage.y+d._passiveTransform.y;var r=v(n.x,n.y);if(d._rootElement.style.transform=d._initialTransform?r+" "+d._initialTransform:r,"undefined"!=typeof SVGElement&&d._rootElement instanceof SVGElement){var o="translate("+n.x+" "+n.y+")";d._rootElement.setAttribute("transform",o)}}d._moveEventSubscriptions>0&&d._ngZone.run(function(){d._moveEvents.next({source:d,pointerPosition:i,event:t,delta:d._pointerDirectionDelta})})},this._pointerUp=function(t){if(d._dragDropRegistry.isDragging(d)&&(d._removeSubscriptions(),d._dragDropRegistry.stopDragging(d),d._handles&&(d._rootElement.style.webkitTapHighlightColor=d._rootElementTapHighlight),d._hasStartedDragging)){if(d.released.next({source:d}),!d.dropContainer)return d._passiveTransform.x=d._activeTransform.x,d._passiveTransform.y=d._activeTransform.y,d._ngZone.run(function(){return d.ended.next({source:d})}),void d._dragDropRegistry.stopDragging(d);d._animatePreviewToPlaceholder().then(function(){d._cleanupDragArtifacts(t),d._dragDropRegistry.stopDragging(d)})}},this.withRootElement(t),s.registerDragItem(this)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||!(!this.dropContainer||!this.dropContainer.disabled)},set:function(t){var e=o.coerceBooleanProperty(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions())},enumerable:!0,configurable:!0}),t.prototype.getPlaceholderElement=function(){return this._placeholder},t.prototype.getRootElement=function(){return this._rootElement},t.prototype.withHandles=function(t){return this._handles=t.map(function(t){return o.coerceElement(t)}),this._handles.forEach(function(t){return g(t,!1)}),this._toggleNativeDragInteractions(),this},t.prototype.withPreviewTemplate=function(t,e){return this._previewTemplate={template:t,context:e},this},t.prototype.withPlaceholderTemplate=function(t,e){return this._placeholderTemplate={template:t,context:e},this},t.prototype.withRootElement=function(t){var e=o.coerceElement(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),e.addEventListener("mousedown",this._pointerDown,N),e.addEventListener("touchstart",this._pointerDown,A),this._initialTransform=void 0,this._rootElement=e),this},t.prototype.withBoundaryElement=function(t){return this._boundaryElement=t?o.coerceElement(t):null,this},t.prototype.dispose=function(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&D(this._rootElement),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._boundaryElement=this._rootElement=this._placeholderTemplate=this._previewTemplate=this._nextSibling=null},t.prototype.isDragging=function(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)},t.prototype.reset=function(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}},t.prototype.disableHandle=function(t){this._handles.indexOf(t)>-1&&this._disabledHandles.add(t)},t.prototype.enableHandle=function(t){this._disabledHandles.delete(t)},t.prototype._removeSubscriptions=function(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe()},t.prototype._destroyPreview=function(){this._preview&&D(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null},t.prototype._destroyPlaceholder=function(){this._placeholder&&D(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null},t.prototype._startDragSequence=function(t){if(this.started.next({source:this}),E(t)&&(this._lastTouchEventTime=Date.now()),this.dropContainer){var e=this._rootElement;this._nextSibling=e.nextSibling;var i=this._preview=this._createPreviewElement(),n=this._placeholder=this._createPlaceholderElement();e.style.display="none",this._document.body.appendChild(e.parentNode.replaceChild(n,e)),this._document.body.appendChild(i),this.dropContainer.start()}},t.prototype._initializeDragSequence=function(t,e){e.stopPropagation();var i=this.isDragging(),n=E(e),r=!n&&0!==e.button,o=this._rootElement,s=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),!(i||r||s)){null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._handles.length&&(this._rootElementTapHighlight=o.style.webkitTapHighlightColor,o.style.webkitTapHighlightColor="transparent"),this._toggleNativeDragInteractions(),this._hasStartedDragging=this._hasMoved=!1,this._initialContainer=this.dropContainer,this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollPosition=this._viewportRuler.getViewportScrollPosition(),this._boundaryElement&&(this._boundaryRect=this._boundaryElement.getBoundingClientRect()),this._pickupPositionInElement=this._previewTemplate&&this._previewTemplate.template?{x:0,y:0}:this._getPointerPositionInElement(t,e);var a=this._pickupPositionOnPage=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:a.x,y:a.y},this._dragDropRegistry.startDragging(this,e)}},t.prototype._cleanupDragArtifacts=function(t){var e=this;this._rootElement.style.display="",this._nextSibling?this._nextSibling.parentNode.insertBefore(this._rootElement,this._nextSibling):this._initialContainer.element.nativeElement.appendChild(this._rootElement),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(function(){var i=e.dropContainer,n=i.getItemIndex(e),r=e._getPointerPositionOnPage(t),o=r.x,s=r.y,a=i._isOverContainer(o,s);e.ended.next({source:e}),e.dropped.next({item:e,currentIndex:n,previousIndex:e._initialContainer.getItemIndex(e),container:i,previousContainer:e._initialContainer,isPointerOverContainer:a}),i.drop(e,n,e._initialContainer,a),e.dropContainer=e._initialContainer})},t.prototype._updateActiveDropContainer=function(t){var e=this,i=t.x,n=t.y,r=this.dropContainer._getSiblingContainerFromPosition(this,i,n)||this._initialContainer._getSiblingContainerFromPosition(this,i,n);!r&&this.dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,n)&&(r=this._initialContainer),r&&r!==this.dropContainer&&this._ngZone.run(function(){e.exited.next({item:e,container:e.dropContainer}),e.dropContainer.exit(e),e.entered.next({item:e,container:r}),e.dropContainer=r,e.dropContainer.enter(e,i,n)}),this.dropContainer._sortItem(this,i,n,this._pointerDirectionDelta),this._preview.style.transform=v(i-this._pickupPositionInElement.x,n-this._pickupPositionInElement.y)},t.prototype._createPreviewElement=function(){var t,e=this._previewTemplate;if(e&&e.template){var i=this._viewContainerRef.createEmbeddedView(e.template,e.context);t=i.rootNodes[0],this._previewRef=i,t.style.transform=v(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{var n=this._rootElement,r=n.getBoundingClientRect();t=y(n),t.style.width=r.width+"px",t.style.height=r.height+"px",t.style.transform=v(r.left,r.top)}return u(t.style,{pointerEvents:"none",position:"fixed",top:"0",left:"0",zIndex:"1000"}),g(t,!1),t.classList.add("cdk-drag-preview"),t.setAttribute("dir",this._dir?this._dir.value:"ltr"),t},t.prototype._animatePreviewToPlaceholder=function(){var t=this;if(!this._hasMoved)return Promise.resolve();var e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=v(e.left,e.top);var i=f(this._preview);return 0===i?Promise.resolve():this._ngZone.runOutsideAngular(function(){return new Promise(function(e){var n=function(i){(!i||i.target===t._preview&&"transform"===i.propertyName)&&(t._preview.removeEventListener("transitionend",n),e(),clearTimeout(r))},r=setTimeout(n,1.5*i);t._preview.addEventListener("transitionend",n)})})},t.prototype._createPlaceholderElement=function(){var t,e=this._placeholderTemplate;return e&&e.template?(this._placeholderRef=this._viewContainerRef.createEmbeddedView(e.template,e.context),t=this._placeholderRef.rootNodes[0]):t=y(this._rootElement),t.classList.add("cdk-drag-placeholder"),t},t.prototype._getPointerPositionInElement=function(t,e){var i=this._rootElement.getBoundingClientRect(),n=t===this._rootElement?null:t,r=n?n.getBoundingClientRect():i,o=E(e)?e.targetTouches[0]:e,s=o.pageX-r.left-this._scrollPosition.left,a=o.pageY-r.top-this._scrollPosition.top;return{x:r.left-i.left+s,y:r.top-i.top+a}},t.prototype._getPointerPositionOnPage=function(t){var e=E(t)?t.touches[0]||t.changedTouches[0]:t;return{x:e.pageX-this._scrollPosition.left,y:e.pageY-this._scrollPosition.top}},t.prototype._getConstrainedPointerPosition=function(t){var e=this._getPointerPositionOnPage(t),i=this.dropContainer?this.dropContainer.lockAxis:null;if("x"===this.lockAxis||"x"===i?e.y=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==i||(e.x=this._pickupPositionOnPage.x),this._boundaryRect){var n=this._pickupPositionInElement,r=n.x,o=n.y,s=this._boundaryRect,a=this._previewRect,p=s.top+o,c=s.bottom-(a.height-o),d=s.left+r,h=s.right-(a.width-r);e.x=b(e.x,d,h),e.y=b(e.y,p,c)}return e},t.prototype._updatePointerDirectionDelta=function(t){var e=t.x,i=t.y,n=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-r.x),s=Math.abs(i-r.y);return o>this._config.pointerDirectionChangeThreshold&&(n.x=e>r.x?1:-1,r.x=e),s>this._config.pointerDirectionChangeThreshold&&(n.y=i>r.y?1:-1,r.y=i),n},t.prototype._toggleNativeDragInteractions=function(){if(this._rootElement&&this._handles){var t=this.disabled||this._handles.length>0;t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,g(this._rootElement,t))}},t.prototype._removeRootElementListeners=function(t){t.removeEventListener("mousedown",this._pointerDown,N),t.removeEventListener("touchstart",this._pointerDown,A)},t}(),B=new e.InjectionToken("CDK_DRAG_CONFIG",{providedIn:"root",factory:P}),H=function(){function t(t,i,n,o,s,a,c,d,h){var l=this;this.element=t,this.dropContainer=i,this._document=n,this._ngZone=o,this._viewContainerRef=s,this._viewportRuler=a,this._dragDropRegistry=c,this._config=d,this._dir=h,this._destroyed=new r.Subject,this._disabled=!1,this.started=new e.EventEmitter,this.released=new e.EventEmitter,this.ended=new e.EventEmitter,this.entered=new e.EventEmitter,this.exited=new e.EventEmitter,this.dropped=new e.EventEmitter,this.moved=new r.Observable(function(t){var e=l._dragRef.moved.pipe(p.map(function(t){return{source:l,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta}})).subscribe(t);return function(){e.unsubscribe()}});var u=this._dragRef=new z(t,this._document,this._ngZone,this._viewContainerRef,this._viewportRuler,this._dragDropRegistry,this._config,this.dropContainer?this.dropContainer._dropListRef:void 0,this._dir);u.data=this,this._syncInputs(u),this._proxyEvents(u)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||this.dropContainer&&this.dropContainer.disabled},set:function(t){this._disabled=o.coerceBooleanProperty(t),this._dragRef.disabled=this._disabled},enumerable:!0,configurable:!0}),t.prototype.getPlaceholderElement=function(){return this._dragRef.getPlaceholderElement()},t.prototype.getRootElement=function(){return this._dragRef.getRootElement()},t.prototype.reset=function(){this._dragRef.reset()},t.prototype.ngAfterViewInit=function(){var t=this;this._ngZone.onStable.asObservable().pipe(p.take(1),p.takeUntil(this._destroyed)).subscribe(function(){t._updateRootElement(),t._handles.changes.pipe(p.startWith(t._handles),p.tap(function(e){var i=e.filter(function(e){return e._parentDrag===t}).map(function(t){return t.element});t._dragRef.withHandles(i)}),p.switchMap(function(t){return r.merge.apply(void 0,t.map(function(t){return t._stateChanges}))}),p.takeUntil(t._destroyed)).subscribe(function(e){var i=t._dragRef,n=e.element.nativeElement;e.disabled?i.disableHandle(n):i.enableHandle(n)})})},t.prototype.ngOnChanges=function(t){var e=t.rootElementSelector;e&&!e.firstChange&&this._updateRootElement()},t.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()},t.prototype._updateRootElement=function(){var t=this.element.nativeElement,e=this.rootElementSelector?w(t,this.rootElementSelector):t;if(e&&e.nodeType!==this._document.ELEMENT_NODE)throw Error('cdkDrag must be attached to an element node. Currently attached to "'+e.nodeName+'".');this._dragRef.withRootElement(e||t)},t.prototype._getBoundaryElement=function(){var t=this.boundaryElementSelector;return t?w(this.element.nativeElement,t):null},t.prototype._syncInputs=function(t){var e=this;t.beforeStarted.subscribe(function(){if(!t.isDragging()){var i=e,n=i._placeholderTemplate,r=i._previewTemplate;t.disabled=e.disabled,t.lockAxis=e.lockAxis,t.withBoundaryElement(e._getBoundaryElement()),n?t.withPlaceholderTemplate(n.templateRef,n.data):t.withPlaceholderTemplate(null),r?t.withPreviewTemplate(r.templateRef,r.data):t.withPreviewTemplate(null)}})},t.prototype._proxyEvents=function(t){var e=this;t.started.subscribe(function(){e.started.emit({source:e})}),t.released.subscribe(function(){e.released.emit({source:e})}),t.ended.subscribe(function(){e.ended.emit({source:e})}),t.entered.subscribe(function(t){e.entered.emit({container:t.container.data,item:e})}),t.exited.subscribe(function(t){e.exited.emit({container:t.container.data,item:e})}),t.dropped.subscribe(function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:e})})},t.decorators=[{type:e.Directive,args:[{selector:"[cdkDrag]",exportAs:"cdkDrag",host:{class:"cdk-drag","[class.cdk-drag-dragging]":"_dragRef.isDragging()"},providers:[{provide:T,useExisting:t}]}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[I]},{type:e.Optional},{type:e.SkipSelf}]},{type:void 0,decorators:[{type:e.Inject,args:[i.DOCUMENT]}]},{type:e.NgZone},{type:e.ViewContainerRef},{type:a.ViewportRuler},{type:O},{type:void 0,decorators:[{type:e.Inject,args:[B]}]},{type:s.Directionality,decorators:[{type:e.Optional}]}]},t.propDecorators={_handles:[{type:e.ContentChildren,args:[L,{descendants:!0}]}],_previewTemplate:[{type:e.ContentChild,args:[M]}],_placeholderTemplate:[{type:e.ContentChild,args:[j]}],data:[{type:e.Input,args:["cdkDragData"]}],lockAxis:[{type:e.Input,args:["cdkDragLockAxis"]}],rootElementSelector:[{type:e.Input,args:["cdkDragRootElement"]}],boundaryElementSelector:[{type:e.Input,args:["cdkDragBoundary"]}],disabled:[{type:e.Input,args:["cdkDragDisabled"]}],started:[{type:e.Output,args:["cdkDragStarted"]}],released:[{type:e.Output,args:["cdkDragReleased"]}],ended:[{type:e.Output,args:["cdkDragEnded"]}],entered:[{type:e.Output,args:["cdkDragEntered"]}],exited:[{type:e.Output,args:["cdkDragExited"]}],dropped:[{type:e.Output,args:["cdkDragDropped"]}],moved:[{type:e.Output,args:["cdkDragMoved"]}]},t}(),U=function(){function t(){this._items=new Set,this._disabled=!1}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=o.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._items.clear()},t.decorators=[{type:e.Directive,args:[{selector:"[cdkDropListGroup]",exportAs:"cdkDropListGroup"}]}],t.propDecorators={disabled:[{type:e.Input,args:["cdkDropListGroupDisabled"]}]},t}(),F=0,G=function(){function t(t,e,i,n){this.element=t,this._dragDropRegistry=e,this._dir=n,this.id="cdk-drop-list-ref-"+F++,this.disabled=!1,this.enterPredicate=function(){return!0},this.beforeStarted=new r.Subject,this.entered=new r.Subject,this.exited=new r.Subject,this.dropped=new r.Subject,this.sorted=new r.Subject,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,e.registerDropContainer(this),this._document=i}return t.prototype.dispose=function(){this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._dragDropRegistry.removeDropContainer(this)},t.prototype.isDragging=function(){return this._isDragging},t.prototype.start=function(){var t=this;this.beforeStarted.next(),this._isDragging=!0,this._activeDraggables=this._draggables.slice(),this._cacheOwnPosition(),this._cacheItemPositions(),this._siblings.forEach(function(e){return e._startReceiving(t)})},t.prototype.enter=function(t,e,i){this.entered.next({item:t,container:this}),this.start();var n=this._getItemIndexFromPointerPosition(t,e,i),r=this._activeDraggables.indexOf(t),o=this._activeDraggables[n],s=t.getPlaceholderElement();if(r>-1&&this._activeDraggables.splice(r,1),o&&!this._dragDropRegistry.isDragging(o)){var a=o.getRootElement();a.parentElement.insertBefore(s,a),this._activeDraggables.splice(n,0,t)}else this.element.nativeElement.appendChild(s),this._activeDraggables.push(t);s.style.transform="",this._cacheItemPositions()},t.prototype.exit=function(t){this._reset(),this.exited.next({item:t,container:this})},t.prototype.drop=function(t,e,i,n){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i.getItemIndex(t),container:this,previousContainer:i,isPointerOverContainer:n})},t.prototype.withItems=function(t){return this._draggables=t.slice(),this},t.prototype.connectedTo=function(t){return this._siblings=t.slice(),this},t.prototype.withOrientation=function(t){return this._orientation=t,this},t.prototype.getItemIndex=function(t){return this._isDragging?R("horizontal"===this._orientation&&this._dir&&"rtl"===this._dir.value?this._itemPositions.slice().reverse():this._itemPositions,function(e){return e.drag===t}):this._draggables.indexOf(t)},t.prototype.isReceiving=function(){return this._activeSiblings.size>0},t.prototype._sortItem=function(t,e,i,n){if(this._isPointerNearDropContainer(e,i)){var r=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,i,n);if(!(-1===o&&r.length>0)){var s="horizontal"===this._orientation,a=R(r,function(e){return e.drag===t}),p=r[o],d=r[a].clientRect,h=p.clientRect,l=a>o?1:-1;this._previousSwap.drag=p.drag,this._previousSwap.delta=s?n.x:n.y;var u=this._getItemOffsetPx(d,h,l),g=this._getSiblingOffsetPx(a,r,l),_=r.slice();c(r,a,o),this.sorted.next({previousIndex:a,currentIndex:o,container:this,item:t}),r.forEach(function(e,i){if(_[i]!==e){var n=e.drag===t,r=n?u:g,o=n?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=r,s?(o.style.transform="translate3d("+Math.round(e.offset)+"px, 0, 0)",x(e.clientRect,0,r)):(o.style.transform="translate3d(0, "+Math.round(e.offset)+"px, 0)",x(e.clientRect,r,0))}})}}},t.prototype._cacheOwnPosition=function(){this._clientRect=this.element.nativeElement.getBoundingClientRect()},t.prototype._cacheItemPositions=function(){var t=this,e="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(function(e){var i=t._dragDropRegistry.isDragging(e)?e.getPlaceholderElement():e.getRootElement(),n=i.getBoundingClientRect();return{drag:e,offset:0,clientRect:{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height}}}).sort(function(t,i){return e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top})},t.prototype._reset=function(){var t=this;this._isDragging=!1,this._activeDraggables.forEach(function(t){return t.getRootElement().style.transform=""}),this._siblings.forEach(function(e){return e._stopReceiving(t)}),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0},t.prototype._getSiblingOffsetPx=function(t,e,i){var n="horizontal"===this._orientation,r=e[t].clientRect,o=e[t+-1*i],s=r[n?"width":"height"]*i;if(o){var a=n?"left":"top",p=n?"right":"bottom";-1===i?s-=o.clientRect[a]-r[p]:s+=r[a]-o.clientRect[p]}return s},t.prototype._isPointerNearDropContainer=function(t,e){var i=this._clientRect,n=i.top,r=i.right,o=i.bottom,s=i.left,a=i.width,p=i.height,c=.05*a,d=.05*p;return e>n-d&&e<o+d&&t>s-c&&t<r+c},t.prototype._getItemOffsetPx=function(t,e,i){var n="horizontal"===this._orientation,r=n?e.left-t.left:e.top-t.top;return-1===i&&(r+=n?e.width-t.width:e.height-t.height),r},t.prototype._getItemIndexFromPointerPosition=function(t,e,i,n){var r=this,o="horizontal"===this._orientation;return R(this._itemPositions,function(s,a,p){var c=s.drag,d=s.clientRect;if(c===t)return p.length<2;if(n){var h=o?n.x:n.y;if(c===r._previousSwap.drag&&h===r._previousSwap.delta)return!1}return o?e>=Math.floor(d.left)&&e<=Math.floor(d.right):i>=Math.floor(d.top)&&i<=Math.floor(d.bottom)})},t.prototype._isOverContainer=function(t,e){return C(this._clientRect,t,e)},t.prototype._getSiblingContainerFromPosition=function(t,e,i){return this._siblings.find(function(n){return n._canReceive(t,e,i)})},t.prototype._canReceive=function(t,e,i){if(!this.enterPredicate(t,this)||!C(this._clientRect,e,i))return!1;var n=this._document.elementFromPoint(e,i);if(!n)return!1;var r=this.element.nativeElement;return n===r||r.contains(n)},t.prototype._startReceiving=function(t){var e=this._activeSiblings;e.has(t)||(e.add(t),this._cacheOwnPosition())},t.prototype._stopReceiving=function(t){this._activeSiblings.delete(t)},t}(),Z=0,q=function(){function t(i,n,r,o,s,a){var p=this;this.element=i,this._changeDetectorRef=r,this._group=s,this.connectedTo=[],this.orientation="vertical",this.id="cdk-drop-list-"+Z++,this._disabled=!1,this.enterPredicate=function(){return!0},this.dropped=new e.EventEmitter,this.entered=new e.EventEmitter,this.exited=new e.EventEmitter,this.sorted=new e.EventEmitter;var c=this._dropListRef=new G(i,n,a||document,o);c.data=this,c.enterPredicate=function(t,e){return p.enterPredicate(t.data,e.data)},this._syncInputs(c),this._handleEvents(c),t._dropLists.push(this),s&&s._items.add(this)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||!!this._group&&this._group.disabled},set:function(t){this._disabled=o.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){var e=t._dropLists.indexOf(this);this._dropListRef.dispose(),e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this)},t.prototype.start=function(){this._dropListRef.start()},t.prototype.drop=function(t,e,i,n){this._dropListRef.drop(t._dragRef,e,i._dropListRef,n)},t.prototype.enter=function(t,e,i){this._dropListRef.enter(t._dragRef,e,i)},t.prototype.exit=function(t){this._dropListRef.exit(t._dragRef)},t.prototype.getItemIndex=function(t){
|
|
9
|
-
return this._dropListRef.getItemIndex(t._dragRef)},t.prototype._sortItem=function(t,e,i,n){return this._dropListRef._sortItem(t._dragRef,e,i,n)},t.prototype._getSiblingContainerFromPosition=function(t,e,i){var n=this._dropListRef._getSiblingContainerFromPosition(t._dragRef,e,i);return n?n.data:null},t.prototype._isOverContainer=function(t,e){return this._dropListRef._isOverContainer(t,e)},t.prototype._syncInputs=function(e){var
|
|
8
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/cdk/platform"),require("@angular/cdk/coercion"),require("rxjs"),require("@angular/core"),require("@angular/common"),require("@angular/cdk/scrolling"),require("@angular/cdk/bidi"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/cdk/drag-drop",["exports","@angular/cdk/platform","@angular/cdk/coercion","rxjs","@angular/core","@angular/common","@angular/cdk/scrolling","@angular/cdk/bidi","rxjs/operators"],e):e((t.ng=t.ng||{},t.ng.cdk=t.ng.cdk||{},t.ng.cdk.dragDrop={}),t.ng.cdk.platform,t.ng.cdk.coercion,t.rxjs,t.ng.core,t.ng.common,t.ng.cdk.scrolling,t.ng.cdk.bidi,t.rxjs.operators)}(this,function(t,e,i,n,r,o,s,a,p){"use strict";function c(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function d(t,e){var i=e?"":"none";c(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:i,msUserSelect:i,webkitUserSelect:i,MozUserSelect:i})}function h(t){var e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function l(t){var e=getComputedStyle(t),i=u(e,"transition-property"),n=i.find(function(t){return"transform"===t||"all"===t});if(!n)return 0;var r=i.indexOf(n),o=u(e,"transition-duration"),s=u(e,"transition-delay");return h(o[r])+h(s[r])}function u(t,e){return t.getPropertyValue(e).split(",").map(function(t){return t.trim()})}function g(t,e){return"translate3d("+Math.round(t)+"px, "+Math.round(e)+"px, 0)"}function _(t){var e=t.cloneNode(!0);return e.removeAttribute("id"),e}function f(t,e,i){return Math.max(e,Math.min(i,t))}function m(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function v(t){return t.type.startsWith("touch")}function y(t,e,i){var n=E(e,t.length-1),r=E(i,t.length-1);if(n!==r){for(var o=t[n],s=r<n?-1:1,a=n;a!==r;a+=s)t[a]=t[a+s];t[r]=o}}function b(t,e,i,n){var r=E(i,t.length-1),o=E(n,e.length);t.length&&e.splice(o,0,t.splice(r,1)[0])}function D(t,e,i,n){var r=E(n,e.length);t.length&&e.splice(r,0,t[i])}function E(t,e){return Math.max(0,Math.min(e,t))}function w(t,e,i){t.top+=e,t.bottom=t.top+t.height,t.left+=i,t.right=t.left+t.width}function R(t,e){for(var i=0;i<t.length;i++)if(e(t[i],i,t))return i;return-1}function x(t,e,i){var n=t.top,r=t.bottom,o=t.left,s=t.right;return i>=n&&i<=r&&e>=o&&e<=s}function P(){return{dragStartThreshold:5,pointerDirectionChangeThreshold:5}}function C(t,e){for(var i=t.parentElement;i;){if(i.matches?i.matches(e):i.msMatchesSelector(e))return i;i=i.parentElement}return null}var I=e.normalizePassiveListenerOptions({passive:!0}),k=e.normalizePassiveListenerOptions({passive:!1}),S=function(){function t(t,e,i,r,o,s){var a=this;this._config=e,this._document=i,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new n.Subject,this._moveEventSubscriptions=0,this._pointerMoveSubscription=n.Subscription.EMPTY,this._pointerUpSubscription=n.Subscription.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this._disabled=!1,this.beforeStarted=new n.Subject,this.started=new n.Subject,this.released=new n.Subject,this.ended=new n.Subject,this.entered=new n.Subject,this.exited=new n.Subject,this.dropped=new n.Subject,this.moved=new n.Observable(function(t){var e=a._moveEvents.subscribe(t);return a._moveEventSubscriptions++,function(){e.unsubscribe(),a._moveEventSubscriptions--}}),this._pointerDown=function(t){if(a.beforeStarted.next(),a._handles.length){var e=a._handles.find(function(e){var i=t.target;return!!i&&(i===e||e.contains(i))});!e||a._disabledHandles.has(e)||a.disabled||a._initializeDragSequence(e,t)}else a.disabled||a._initializeDragSequence(a._rootElement,t)},this._pointerMove=function(t){if(!a._hasStartedDragging){var e=a._getPointerPositionOnPage(t);return void(Math.abs(e.x-a._pickupPositionOnPage.x)+Math.abs(e.y-a._pickupPositionOnPage.y)>=a._config.dragStartThreshold&&(a._hasStartedDragging=!0,a._ngZone.run(function(){return a._startDragSequence(t)})))}a._boundaryElement&&(a._previewRect&&(a._previewRect.width||a._previewRect.height)||(a._previewRect=(a._preview||a._rootElement).getBoundingClientRect()));var i=a._getConstrainedPointerPosition(t);if(a._hasMoved=!0,t.preventDefault(),a._updatePointerDirectionDelta(i),a._dropContainer)a._updateActiveDropContainer(i);else{var n=a._activeTransform;n.x=i.x-a._pickupPositionOnPage.x+a._passiveTransform.x,n.y=i.y-a._pickupPositionOnPage.y+a._passiveTransform.y;var r=g(n.x,n.y);if(a._rootElement.style.transform=a._initialTransform?r+" "+a._initialTransform:r,"undefined"!=typeof SVGElement&&a._rootElement instanceof SVGElement){var o="translate("+n.x+" "+n.y+")";a._rootElement.setAttribute("transform",o)}}a._moveEventSubscriptions>0&&a._ngZone.run(function(){a._moveEvents.next({source:a,pointerPosition:i,event:t,delta:a._pointerDirectionDelta})})},this._pointerUp=function(t){if(a._dragDropRegistry.isDragging(a)&&(a._removeSubscriptions(),a._dragDropRegistry.stopDragging(a),a._handles&&(a._rootElement.style.webkitTapHighlightColor=a._rootElementTapHighlight),a._hasStartedDragging)){if(a.released.next({source:a}),!a._dropContainer)return a._passiveTransform.x=a._activeTransform.x,a._passiveTransform.y=a._activeTransform.y,a._ngZone.run(function(){return a.ended.next({source:a})}),void a._dragDropRegistry.stopDragging(a);a._animatePreviewToPlaceholder().then(function(){a._cleanupDragArtifacts(t),a._dragDropRegistry.stopDragging(a)})}},this.withRootElement(t),s.registerDragItem(this)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)},set:function(t){var e=i.coerceBooleanProperty(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions())},enumerable:!0,configurable:!0}),t.prototype.getPlaceholderElement=function(){return this._placeholder},t.prototype.getRootElement=function(){return this._rootElement},t.prototype.withHandles=function(t){return this._handles=t.map(function(t){return i.coerceElement(t)}),this._handles.forEach(function(t){return d(t,!1)}),this._toggleNativeDragInteractions(),this},t.prototype.withPreviewTemplate=function(t){return this._previewTemplate=t,this},t.prototype.withPlaceholderTemplate=function(t){return this._placeholderTemplate=t,this},t.prototype.withRootElement=function(t){var e=i.coerceElement(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),e.addEventListener("mousedown",this._pointerDown,k),e.addEventListener("touchstart",this._pointerDown,I),this._initialTransform=void 0,this._rootElement=e),this},t.prototype.withBoundaryElement=function(t){return this._boundaryElement=t?i.coerceElement(t):null,this},t.prototype.dispose=function(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&m(this._rootElement),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._boundaryElement=this._rootElement=this._placeholderTemplate=this._previewTemplate=this._nextSibling=null},t.prototype.isDragging=function(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)},t.prototype.reset=function(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}},t.prototype.disableHandle=function(t){this._handles.indexOf(t)>-1&&this._disabledHandles.add(t)},t.prototype.enableHandle=function(t){this._disabledHandles.delete(t)},t.prototype.withDirection=function(t){return this._direction=t,this},t.prototype._withDropContainer=function(t){this._dropContainer=t},t.prototype._removeSubscriptions=function(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe()},t.prototype._destroyPreview=function(){this._preview&&m(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null},t.prototype._destroyPlaceholder=function(){this._placeholder&&m(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null},t.prototype._startDragSequence=function(t){if(this.started.next({source:this}),v(t)&&(this._lastTouchEventTime=Date.now()),this._dropContainer){var e=this._rootElement;this._nextSibling=e.nextSibling;var i=this._preview=this._createPreviewElement(),n=this._placeholder=this._createPlaceholderElement();e.style.display="none",this._document.body.appendChild(e.parentNode.replaceChild(n,e)),this._document.body.appendChild(i),this._dropContainer.start()}},t.prototype._initializeDragSequence=function(t,e){e.stopPropagation();var i=this.isDragging(),n=v(e),r=!n&&0!==e.button,o=this._rootElement,s=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),!(i||r||s)){null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._handles.length&&(this._rootElementTapHighlight=o.style.webkitTapHighlightColor,o.style.webkitTapHighlightColor="transparent"),this._toggleNativeDragInteractions(),this._hasStartedDragging=this._hasMoved=!1,this._initialContainer=this._dropContainer,this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollPosition=this._viewportRuler.getViewportScrollPosition(),this._boundaryElement&&(this._boundaryRect=this._boundaryElement.getBoundingClientRect()),this._pickupPositionInElement=this._previewTemplate&&this._previewTemplate.template?{x:0,y:0}:this._getPointerPositionInElement(t,e);var a=this._pickupPositionOnPage=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:a.x,y:a.y},this._dragDropRegistry.startDragging(this,e)}},t.prototype._cleanupDragArtifacts=function(t){var e=this;this._rootElement.style.display="",this._nextSibling?this._nextSibling.parentNode.insertBefore(this._rootElement,this._nextSibling):this._initialContainer.element.appendChild(this._rootElement),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(function(){var i=e._dropContainer,n=i.getItemIndex(e),r=e._getPointerPositionOnPage(t),o=r.x,s=r.y,a=i._isOverContainer(o,s);e.ended.next({source:e}),e.dropped.next({item:e,currentIndex:n,previousIndex:e._initialContainer.getItemIndex(e),container:i,previousContainer:e._initialContainer,isPointerOverContainer:a}),i.drop(e,n,e._initialContainer,a),e._dropContainer=e._initialContainer})},t.prototype._updateActiveDropContainer=function(t){var e=this,i=t.x,n=t.y,r=this._dropContainer._getSiblingContainerFromPosition(this,i,n)||this._initialContainer._getSiblingContainerFromPosition(this,i,n);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,n)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(function(){e.exited.next({item:e,container:e._dropContainer}),e._dropContainer.exit(e),e.entered.next({item:e,container:r}),e._dropContainer=r,e._dropContainer.enter(e,i,n)}),this._dropContainer._sortItem(this,i,n,this._pointerDirectionDelta),this._preview.style.transform=g(i-this._pickupPositionInElement.x,n-this._pickupPositionInElement.y)},t.prototype._createPreviewElement=function(){var t,e=this._previewTemplate,i=e?e.template:null;if(i){var n=e.viewContainer.createEmbeddedView(i,e.context);t=n.rootNodes[0],this._previewRef=n,t.style.transform=g(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{var r=this._rootElement,o=r.getBoundingClientRect();t=_(r),t.style.width=o.width+"px",t.style.height=o.height+"px",t.style.transform=g(o.left,o.top)}return c(t.style,{pointerEvents:"none",position:"fixed",top:"0",left:"0",zIndex:"1000"}),d(t,!1),t.classList.add("cdk-drag-preview"),t.setAttribute("dir",this._direction),t},t.prototype._animatePreviewToPlaceholder=function(){var t=this;if(!this._hasMoved)return Promise.resolve();var e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=g(e.left,e.top);var i=l(this._preview);return 0===i?Promise.resolve():this._ngZone.runOutsideAngular(function(){return new Promise(function(e){var n=function(i){(!i||i.target===t._preview&&"transform"===i.propertyName)&&(t._preview.removeEventListener("transitionend",n),e(),clearTimeout(r))},r=setTimeout(n,1.5*i);t._preview.addEventListener("transitionend",n)})})},t.prototype._createPlaceholderElement=function(){var t,e=this._placeholderTemplate,i=e?e.template:null;return i?(this._placeholderRef=e.viewContainer.createEmbeddedView(i,e.context),t=this._placeholderRef.rootNodes[0]):t=_(this._rootElement),t.classList.add("cdk-drag-placeholder"),t},t.prototype._getPointerPositionInElement=function(t,e){var i=this._rootElement.getBoundingClientRect(),n=t===this._rootElement?null:t,r=n?n.getBoundingClientRect():i,o=v(e)?e.targetTouches[0]:e,s=o.pageX-r.left-this._scrollPosition.left,a=o.pageY-r.top-this._scrollPosition.top;return{x:r.left-i.left+s,y:r.top-i.top+a}},t.prototype._getPointerPositionOnPage=function(t){var e=v(t)?t.touches[0]||t.changedTouches[0]:t;return{x:e.pageX-this._scrollPosition.left,y:e.pageY-this._scrollPosition.top}},t.prototype._getConstrainedPointerPosition=function(t){var e=this._getPointerPositionOnPage(t),i=this._dropContainer?this._dropContainer.lockAxis:null;if("x"===this.lockAxis||"x"===i?e.y=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==i||(e.x=this._pickupPositionOnPage.x),this._boundaryRect){var n=this._pickupPositionInElement,r=n.x,o=n.y,s=this._boundaryRect,a=this._previewRect,p=s.top+o,c=s.bottom-(a.height-o),d=s.left+r,h=s.right-(a.width-r);e.x=f(e.x,d,h),e.y=f(e.y,p,c)}return e},t.prototype._updatePointerDirectionDelta=function(t){var e=t.x,i=t.y,n=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-r.x),s=Math.abs(i-r.y);return o>this._config.pointerDirectionChangeThreshold&&(n.x=e>r.x?1:-1,r.x=e),s>this._config.pointerDirectionChangeThreshold&&(n.y=i>r.y?1:-1,r.y=i),n},t.prototype._toggleNativeDragInteractions=function(){if(this._rootElement&&this._handles){var t=this.disabled||this._handles.length>0;t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,d(this._rootElement,t))}},t.prototype._removeRootElementListeners=function(t){t.removeEventListener("mousedown",this._pointerDown,k),t.removeEventListener("touchstart",this._pointerDown,I)},t}(),O=0,T=function(){function t(t,e,i){this._dragDropRegistry=e,this.id="cdk-drop-list-ref-"+O++,this.disabled=!1,this.enterPredicate=function(){return!0},this.beforeStarted=new n.Subject,this.entered=new n.Subject,this.exited=new n.Subject,this.dropped=new n.Subject,this.sorted=new n.Subject,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",e.registerDropContainer(this),this._document=i,this.element=t instanceof r.ElementRef?t.nativeElement:t}return t.prototype.dispose=function(){this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._dragDropRegistry.removeDropContainer(this)},t.prototype.isDragging=function(){return this._isDragging},t.prototype.start=function(){var t=this;this.beforeStarted.next(),this._isDragging=!0,this._activeDraggables=this._draggables.slice(),this._cacheOwnPosition(),this._cacheItemPositions(),this._siblings.forEach(function(e){return e._startReceiving(t)})},t.prototype.enter=function(t,e,i){this.entered.next({item:t,container:this}),this.start();var n=this._getItemIndexFromPointerPosition(t,e,i),r=this._activeDraggables.indexOf(t),o=this._activeDraggables[n],s=t.getPlaceholderElement();if(r>-1&&this._activeDraggables.splice(r,1),o&&!this._dragDropRegistry.isDragging(o)){var a=o.getRootElement();a.parentElement.insertBefore(s,a),this._activeDraggables.splice(n,0,t)}else this.element.appendChild(s),this._activeDraggables.push(t);s.style.transform="",this._cacheItemPositions()},t.prototype.exit=function(t){this._reset(),this.exited.next({item:t,container:this})},t.prototype.drop=function(t,e,i,n){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i.getItemIndex(t),container:this,previousContainer:i,isPointerOverContainer:n})},t.prototype.withItems=function(t){var e=this;return this._draggables=t.slice(),t.forEach(function(t){return t._withDropContainer(e)}),this},t.prototype.withDirection=function(t){return this._direction=t,this},t.prototype.connectedTo=function(t){return this._siblings=t.slice(),this},t.prototype.withOrientation=function(t){return this._orientation=t,this},t.prototype.getItemIndex=function(t){return this._isDragging?R("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,function(e){return e.drag===t}):this._draggables.indexOf(t)},t.prototype.isReceiving=function(){return this._activeSiblings.size>0},t.prototype._sortItem=function(t,e,i,n){if(this._isPointerNearDropContainer(e,i)){var r=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,i,n);if(!(-1===o&&r.length>0)){var s="horizontal"===this._orientation,a=R(r,function(e){return e.drag===t}),p=r[o],c=r[a].clientRect,d=p.clientRect,h=a>o?1:-1;this._previousSwap.drag=p.drag,this._previousSwap.delta=s?n.x:n.y;var l=this._getItemOffsetPx(c,d,h),u=this._getSiblingOffsetPx(a,r,h),g=r.slice();y(r,a,o),this.sorted.next({previousIndex:a,currentIndex:o,container:this,item:t}),r.forEach(function(e,i){if(g[i]!==e){var n=e.drag===t,r=n?l:u,o=n?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=r,s?(o.style.transform="translate3d("+Math.round(e.offset)+"px, 0, 0)",w(e.clientRect,0,r)):(o.style.transform="translate3d(0, "+Math.round(e.offset)+"px, 0)",w(e.clientRect,r,0))}})}}},t.prototype._cacheOwnPosition=function(){this._clientRect=this.element.getBoundingClientRect()},t.prototype._cacheItemPositions=function(){var t=this,e="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(function(e){var i=t._dragDropRegistry.isDragging(e)?e.getPlaceholderElement():e.getRootElement(),n=i.getBoundingClientRect();return{drag:e,offset:0,clientRect:{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height}}}).sort(function(t,i){return e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top})},t.prototype._reset=function(){var t=this;this._isDragging=!1,this._activeDraggables.forEach(function(t){return t.getRootElement().style.transform=""}),this._siblings.forEach(function(e){return e._stopReceiving(t)}),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0},t.prototype._getSiblingOffsetPx=function(t,e,i){var n="horizontal"===this._orientation,r=e[t].clientRect,o=e[t+-1*i],s=r[n?"width":"height"]*i;if(o){var a=n?"left":"top",p=n?"right":"bottom";-1===i?s-=o.clientRect[a]-r[p]:s+=r[a]-o.clientRect[p]}return s},t.prototype._isPointerNearDropContainer=function(t,e){var i=this._clientRect,n=i.top,r=i.right,o=i.bottom,s=i.left,a=i.width,p=i.height,c=.05*a,d=.05*p;return e>n-d&&e<o+d&&t>s-c&&t<r+c},t.prototype._getItemOffsetPx=function(t,e,i){var n="horizontal"===this._orientation,r=n?e.left-t.left:e.top-t.top;return-1===i&&(r+=n?e.width-t.width:e.height-t.height),r},t.prototype._getItemIndexFromPointerPosition=function(t,e,i,n){var r=this,o="horizontal"===this._orientation;return R(this._itemPositions,function(s,a,p){var c=s.drag,d=s.clientRect;if(c===t)return p.length<2;if(n){var h=o?n.x:n.y;if(c===r._previousSwap.drag&&h===r._previousSwap.delta)return!1}return o?e>=Math.floor(d.left)&&e<=Math.floor(d.right):i>=Math.floor(d.top)&&i<=Math.floor(d.bottom)})},t.prototype._isOverContainer=function(t,e){return x(this._clientRect,t,e)},t.prototype._getSiblingContainerFromPosition=function(t,e,i){return this._siblings.find(function(n){return n._canReceive(t,e,i)})},t.prototype._canReceive=function(t,e,i){if(!this.enterPredicate(t,this)||!x(this._clientRect,e,i))return!1;var n=this._document.elementFromPoint(e,i);return!!n&&(n===this.element||this.element.contains(n))},t.prototype._startReceiving=function(t){var e=this._activeSiblings;e.has(t)||(e.add(t),this._cacheOwnPosition())},t.prototype._stopReceiving=function(t){this._activeSiblings.delete(t)},t}(),L=e.normalizePassiveListenerOptions({passive:!1,capture:!0}),j=function(){function t(t,e){var i=this;this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new n.Subject,this.pointerUp=new n.Subject,this._preventDefaultWhileDragging=function(t){i._activeDragInstances.size&&t.preventDefault()},this._document=e}return t.prototype.registerDropContainer=function(t){if(!this._dropInstances.has(t)){if(this.getDropContainer(t.id))throw Error('Drop instance with id "'+t.id+'" has already been registered.');this._dropInstances.add(t)}},t.prototype.registerDragItem=function(t){var e=this;this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(function(){e._document.addEventListener("touchmove",e._preventDefaultWhileDragging,L)})},t.prototype.removeDropContainer=function(t){this._dropInstances.delete(t)},t.prototype.removeDragItem=function(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._preventDefaultWhileDragging,L)},t.prototype.startDragging=function(t,e){var i=this;if(this._activeDragInstances.add(t),1===this._activeDragInstances.size){var n=e.type.startsWith("touch"),r=n?"touchmove":"mousemove",o=n?"touchend":"mouseup";this._globalListeners.set(r,{handler:function(t){return i.pointerMove.next(t)},options:L}).set(o,{handler:function(t){return i.pointerUp.next(t)},options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:L}),n||this._globalListeners.set("wheel",{handler:this._preventDefaultWhileDragging,options:L}),this._ngZone.runOutsideAngular(function(){i._globalListeners.forEach(function(t,e){i._document.addEventListener(e,t.handler,t.options)})})}},t.prototype.stopDragging=function(t){this._activeDragInstances.delete(t),0===this._activeDragInstances.size&&this._clearGlobalListeners()},t.prototype.isDragging=function(t){return this._activeDragInstances.has(t)},t.prototype.getDropContainer=function(t){return Array.from(this._dropInstances).find(function(e){return e.id===t})},t.prototype.ngOnDestroy=function(){var t=this;this._dragInstances.forEach(function(e){return t.removeDragItem(e)}),this._dropInstances.forEach(function(e){return t.removeDropContainer(e)}),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()},t.prototype._clearGlobalListeners=function(){var t=this;this._globalListeners.forEach(function(e,i){t._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()},t.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:r.NgZone},{type:void 0,decorators:[{type:r.Inject,args:[o.DOCUMENT]}]}]},t.ngInjectableDef=r.defineInjectable({factory:function(){return new t(r.inject(r.NgZone),r.inject(o.DOCUMENT))},token:t,providedIn:"root"}),t}(),M={dragStartThreshold:5,pointerDirectionChangeThreshold:5},A=function(){function t(t,e,i,n){this._document=t,this._ngZone=e,this._viewportRuler=i,this._dragDropRegistry=n}return t.prototype.createDrag=function(t,e){return void 0===e&&(e=M),new S(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)},t.prototype.createDropList=function(t){return new T(t,this._dragDropRegistry,this._document)},t.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:r.Inject,args:[o.DOCUMENT]}]},{type:r.NgZone},{type:s.ViewportRuler},{type:j}]},t.ngInjectableDef=r.defineInjectable({factory:function(){return new t(r.inject(o.DOCUMENT),r.inject(r.NgZone),r.inject(s.ViewportRuler),r.inject(j))},token:t,providedIn:"root"}),t}(),N=new r.InjectionToken("CDK_DROP_LIST"),U=N,z=new r.InjectionToken("CDK_DRAG_PARENT"),B=function(){function t(t,e){this.element=t,this._stateChanges=new n.Subject,this._disabled=!1,this._parentDrag=e,d(t.nativeElement,!1)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t),this._stateChanges.next(this)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._stateChanges.complete()},t.decorators=[{type:r.Directive,args:[{selector:"[cdkDragHandle]",host:{class:"cdk-drag-handle"}}]}],t.ctorParameters=function(){return[{type:r.ElementRef},{type:void 0,decorators:[{type:r.Inject,args:[z]},{type:r.Optional}]}]},t.propDecorators={disabled:[{type:r.Input,args:["cdkDragHandleDisabled"]}]},t}(),H=function(){function t(t){this.templateRef=t}return t.decorators=[{type:r.Directive,args:[{selector:"ng-template[cdkDragPlaceholder]"}]}],t.ctorParameters=function(){return[{type:r.TemplateRef}]},t.propDecorators={data:[{type:r.Input}]},t}(),Z=function(){function t(t){this.templateRef=t}return t.decorators=[{type:r.Directive,args:[{selector:"ng-template[cdkDragPreview]"}]}],t.ctorParameters=function(){return[{type:r.TemplateRef}]},t.propDecorators={data:[{type:r.Input}]},t}(),F=new r.InjectionToken("CDK_DRAG_CONFIG",{providedIn:"root",factory:P}),G=function(){function t(t,e,i,o,s,a,c,d,h,l){var u=this;this.element=t,this.dropContainer=e,this._document=i,this._ngZone=o,this._viewContainerRef=s,this._dir=h,this._destroyed=new n.Subject,this._disabled=!1,this.started=new r.EventEmitter,this.released=new r.EventEmitter,this.ended=new r.EventEmitter,this.entered=new r.EventEmitter,this.exited=new r.EventEmitter,this.dropped=new r.EventEmitter,this.moved=new n.Observable(function(t){var e=u._dragRef.moved.pipe(p.map(function(t){return{source:u,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta}})).subscribe(t);return function(){e.unsubscribe()}}),this._dragRef=l?l.createDrag(t,d):new S(t,d,i,o,a,c),this._dragRef.data=this,this._syncInputs(this._dragRef),this._proxyEvents(this._dragRef)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||this.dropContainer&&this.dropContainer.disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t),this._dragRef.disabled=this._disabled},enumerable:!0,configurable:!0}),t.prototype.getPlaceholderElement=function(){return this._dragRef.getPlaceholderElement()},t.prototype.getRootElement=function(){return this._dragRef.getRootElement()},t.prototype.reset=function(){this._dragRef.reset()},t.prototype.ngAfterViewInit=function(){var t=this;this._ngZone.onStable.asObservable().pipe(p.take(1),p.takeUntil(this._destroyed)).subscribe(function(){t._updateRootElement(),t._handles.changes.pipe(p.startWith(t._handles),p.tap(function(e){var i=e.filter(function(e){return e._parentDrag===t}).map(function(t){return t.element});t._dragRef.withHandles(i)}),p.switchMap(function(t){return n.merge.apply(void 0,t.map(function(t){return t._stateChanges}))}),p.takeUntil(t._destroyed)).subscribe(function(e){var i=t._dragRef,n=e.element.nativeElement;e.disabled?i.disableHandle(n):i.enableHandle(n)})})},t.prototype.ngOnChanges=function(t){var e=t.rootElementSelector;e&&!e.firstChange&&this._updateRootElement()},t.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()},t.prototype._updateRootElement=function(){var t=this.element.nativeElement,e=this.rootElementSelector?C(t,this.rootElementSelector):t;if(e&&e.nodeType!==this._document.ELEMENT_NODE)throw Error('cdkDrag must be attached to an element node. Currently attached to "'+e.nodeName+'".');this._dragRef.withRootElement(e||t)},t.prototype._getBoundaryElement=function(){var t=this.boundaryElementSelector;return t?C(this.element.nativeElement,t):null},t.prototype._syncInputs=function(t){var e=this;t.beforeStarted.subscribe(function(){if(!t.isDragging()){var i=e._dir,n=e._placeholderTemplate?{template:e._placeholderTemplate.templateRef,context:e._placeholderTemplate.data,viewContainer:e._viewContainerRef}:null,r=e._previewTemplate?{template:e._previewTemplate.templateRef,context:e._previewTemplate.data,viewContainer:e._viewContainerRef}:null;t.disabled=e.disabled,t.lockAxis=e.lockAxis,t.withBoundaryElement(e._getBoundaryElement()).withPlaceholderTemplate(n).withPreviewTemplate(r),i&&t.withDirection(i.value)}})},t.prototype._proxyEvents=function(t){var e=this;t.started.subscribe(function(){e.started.emit({source:e})}),t.released.subscribe(function(){e.released.emit({source:e})}),t.ended.subscribe(function(){e.ended.emit({source:e})}),t.entered.subscribe(function(t){e.entered.emit({container:t.container.data,item:e})}),t.exited.subscribe(function(t){e.exited.emit({container:t.container.data,item:e})}),t.dropped.subscribe(function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:e})})},t.decorators=[{type:r.Directive,args:[{selector:"[cdkDrag]",exportAs:"cdkDrag",host:{class:"cdk-drag","[class.cdk-drag-dragging]":"_dragRef.isDragging()"},providers:[{provide:z,useExisting:t}]}]}],t.ctorParameters=function(){return[{type:r.ElementRef},{type:void 0,decorators:[{type:r.Inject,args:[N]},{type:r.Optional},{type:r.SkipSelf}]},{type:void 0,decorators:[{type:r.Inject,args:[o.DOCUMENT]}]},{type:r.NgZone},{type:r.ViewContainerRef},{type:s.ViewportRuler},{type:j},{type:void 0,decorators:[{type:r.Inject,args:[F]}]},{type:a.Directionality,decorators:[{type:r.Optional}]},{type:A}]},t.propDecorators={_handles:[{type:r.ContentChildren,args:[B,{descendants:!0}]}],_previewTemplate:[{type:r.ContentChild,args:[Z]}],_placeholderTemplate:[{type:r.ContentChild,args:[H]}],data:[{type:r.Input,args:["cdkDragData"]}],lockAxis:[{type:r.Input,args:["cdkDragLockAxis"]}],rootElementSelector:[{type:r.Input,args:["cdkDragRootElement"]}],boundaryElementSelector:[{type:r.Input,args:["cdkDragBoundary"]}],disabled:[{type:r.Input,args:["cdkDragDisabled"]}],started:[{type:r.Output,args:["cdkDragStarted"]}],released:[{type:r.Output,args:["cdkDragReleased"]}],ended:[{type:r.Output,args:["cdkDragEnded"]}],entered:[{type:r.Output,args:["cdkDragEntered"]}],exited:[{type:r.Output,args:["cdkDragExited"]}],dropped:[{type:r.Output,args:["cdkDragDropped"]}],moved:[{type:r.Output,args:["cdkDragMoved"]}]},t}(),q=function(){function t(){this._items=new Set,this._disabled=!1}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._items.clear()},t.decorators=[{type:r.Directive,args:[{selector:"[cdkDropListGroup]",exportAs:"cdkDropListGroup"}]}],t.propDecorators={disabled:[{type:r.Input,args:["cdkDropListGroupDisabled"]}]},t}(),V=0,W=function(){function t(e,i,o,s,a,p,c){var d=this;this.element=e,this._changeDetectorRef=o,this._dir=s,this._group=a,this._destroyed=new n.Subject,this.connectedTo=[],this.orientation="vertical",this.id="cdk-drop-list-"+V++,this._disabled=!1,this.enterPredicate=function(){return!0},this.dropped=new r.EventEmitter,
|
|
9
|
+
this.entered=new r.EventEmitter,this.exited=new r.EventEmitter,this.sorted=new r.EventEmitter,this._dropListRef=c?c.createDropList(e):new T(e,i,p||document),this._dropListRef.data=this,this._dropListRef.enterPredicate=function(t,e){return d.enterPredicate(t.data,e.data)},this._syncInputs(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),a&&a._items.add(this)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||!!this._group&&this._group.disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._draggables.changes.pipe(p.startWith(this._draggables),p.takeUntil(this._destroyed)).subscribe(function(e){t._dropListRef.withItems(e.map(function(t){return t._dragRef}))})},t.prototype.ngOnDestroy=function(){var e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()},t.prototype.start=function(){this._dropListRef.start()},t.prototype.drop=function(t,e,i,n){this._dropListRef.drop(t._dragRef,e,i._dropListRef,n)},t.prototype.enter=function(t,e,i){this._dropListRef.enter(t._dragRef,e,i)},t.prototype.exit=function(t){this._dropListRef.exit(t._dragRef)},t.prototype.getItemIndex=function(t){return this._dropListRef.getItemIndex(t._dragRef)},t.prototype._sortItem=function(t,e,i,n){return this._dropListRef._sortItem(t._dragRef,e,i,n)},t.prototype._getSiblingContainerFromPosition=function(t,e,i){var n=this._dropListRef._getSiblingContainerFromPosition(t._dragRef,e,i);return n?n.data:null},t.prototype._isOverContainer=function(t,e){return this._dropListRef._isOverContainer(t,e)},t.prototype._syncInputs=function(e){var n=this;this._dir&&this._dir.change.pipe(p.startWith(this._dir.value),p.takeUntil(this._destroyed)).subscribe(function(t){return e.withDirection(t)}),e.beforeStarted.subscribe(function(){var r=i.coerceArray(n.connectedTo).map(function(e){return"string"==typeof e?t._dropLists.find(function(t){return t.id===e}):e});n._group&&n._group._items.forEach(function(t){-1===r.indexOf(t)&&r.push(t)}),e.lockAxis=n.lockAxis,e.connectedTo(r.filter(function(t){return t&&t!==n}).map(function(t){return t._dropListRef})).withOrientation(n.orientation)})},t.prototype._handleEvents=function(t){var e=this;t.beforeStarted.subscribe(function(){e._changeDetectorRef.markForCheck()}),t.entered.subscribe(function(t){e.entered.emit({container:e,item:t.item.data})}),t.exited.subscribe(function(t){e.exited.emit({container:e,item:t.item.data})}),t.sorted.subscribe(function(t){e.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:e,item:t.item.data})}),t.dropped.subscribe(function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer}),e._changeDetectorRef.markForCheck()})},t._dropLists=[],t.decorators=[{type:r.Directive,args:[{selector:"[cdkDropList], cdk-drop-list",exportAs:"cdkDropList",providers:[{provide:q,useValue:void 0},{provide:U,useExisting:t}],host:{class:"cdk-drop-list","[id]":"id","[class.cdk-drop-list-dragging]":"_dropListRef.isDragging()","[class.cdk-drop-list-receiving]":"_dropListRef.isReceiving()"}}]}],t.ctorParameters=function(){return[{type:r.ElementRef},{type:j},{type:r.ChangeDetectorRef},{type:a.Directionality,decorators:[{type:r.Optional}]},{type:q,decorators:[{type:r.Optional},{type:r.SkipSelf}]},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[o.DOCUMENT]}]},{type:A}]},t.propDecorators={_draggables:[{type:r.ContentChildren,args:[r.forwardRef(function(){return G}),{descendants:!1}]}],connectedTo:[{type:r.Input,args:["cdkDropListConnectedTo"]}],data:[{type:r.Input,args:["cdkDropListData"]}],orientation:[{type:r.Input,args:["cdkDropListOrientation"]}],id:[{type:r.Input}],lockAxis:[{type:r.Input,args:["cdkDropListLockAxis"]}],disabled:[{type:r.Input,args:["cdkDropListDisabled"]}],enterPredicate:[{type:r.Input,args:["cdkDropListEnterPredicate"]}],dropped:[{type:r.Output,args:["cdkDropListDropped"]}],entered:[{type:r.Output,args:["cdkDropListEntered"]}],exited:[{type:r.Output,args:["cdkDropListExited"]}],sorted:[{type:r.Output,args:["cdkDropListSorted"]}]},t}(),K=function(){function t(){}return t.decorators=[{type:r.NgModule,args:[{declarations:[W,q,G,B,Z,H],exports:[W,q,G,B,Z,H],providers:[A]}]}],t}();t.DragDrop=A,t.DragRef=S,t.DropListRef=T,t.CdkDropList=W,t.CDK_DROP_LIST=N,t.CDK_DROP_LIST_CONTAINER=U,t.moveItemInArray=y,t.transferArrayItem=b,t.copyArrayItem=D,t.DragDropModule=K,t.DragDropRegistry=j,t.CdkDropListGroup=q,t.CDK_DRAG_CONFIG_FACTORY=P,t.CDK_DRAG_CONFIG=F,t.CdkDrag=G,t.CdkDragHandle=B,t.CdkDragPreview=Z,t.CdkDragPlaceholder=H,t.ɵb=z,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
10
10
|
//# sourceMappingURL=cdk-drag-drop.umd.min.js.map
|