blob: f563c4a738f36cd11919158b12371f44e9891f0c [file] [log] [blame]
{"version":3,"sources":["src/cdk/cdk-drag-drop.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","dragDrop","core","common","scrolling","platform","coercion","rxjs","operators","bidi","this","i0","i1","i2","extendStyles","dest","source","key","hasOwnProperty","toggleNativeDragInteractions","element","enable","userSelect","style","touchAction","webkitUserDrag","webkitTapHighlightColor","msUserSelect","webkitUserSelect","MozUserSelect","toggleVisibility","styles","position","top","opacity","left","parseCssTimeUnitsToMs","value","multiplier","toLowerCase","indexOf","parseFloat","parseCssPropertyValue","computedStyle","name","getPropertyValue","split","map","part","trim","getMutableClientRect","clientRect","getBoundingClientRect","right","bottom","width","height","isInsideClientRect","x","y","adjustClientRect","isPointerNearClientRect","rect","threshold","pointerX","pointerY","xThreshold","yThreshold","ParentPositionTracker","_document","_viewportRuler","positions","Map","prototype","clear","cache","elements","_this","set","scrollPosition","getViewportScrollPosition","forEach","scrollTop","scrollLeft","handleScroll","event","target","cachedPosition","get","newTop","newLeft","scrolledParentNode","documentElement","viewportScrollPosition","topDifference","leftDifference","node","contains","deepCloneNode","clone","cloneNode","descendantsWithId","querySelectorAll","nodeName","removeAttribute","i","length","transferCanvasData","transferInputData","transferData","selector","callback","descendantElements","cloneElements","cloneUniqueId","type","context","getContext","drawImage","_a","passiveEventListenerOptions","normalizePassiveListenerOptions","passive","activeEventListenerOptions","DragRef","_config","_ngZone","_dragDropRegistry","_passiveTransform","_activeTransform","_moveEvents","Subject","_pointerMoveSubscription","Subscription","EMPTY","_pointerUpSubscription","_scrollSubscription","_resizeSubscription","_boundaryElement","_nativeInteractionsEnabled","_handles","_disabledHandles","Set","_direction","dragStartDelay","_disabled","beforeStarted","started","released","ended","entered","exited","dropped","moved","_pointerDown","next","targetHandle","find","handle","has","disabled","_initializeDragSequence","_rootElement","_pointerMove","pointerPosition","_getPointerPositionOnPage","_hasStartedDragging","_previewRect","_preview","preventDefault","constrainedPointerPosition","_getConstrainedPointerPosition","_hasMoved","_lastKnownPointerPosition","_updatePointerDirectionDelta","_dropContainer","_updateActiveDropContainer","activeTransform","_pickupPositionOnPage","_applyRootElementTransform","SVGElement","setAttribute","observers","run","distance","_getDragDistance","delta","_pointerDirectionDelta","Math","abs","dragStartThreshold","isDelayElapsed","Date","now","_dragStartTime","_getDragStartDelay","container","_endDragSequence","isDragging","isReceiving","_startDragSequence","_pointerUp","withRootElement","withParent","parentDragRef","_parentPositions","registerDragItem","Object","defineProperty","newValue","coerceBooleanProperty","_toggleNativeDragInteractions","enumerable","configurable","getPlaceholderElement","_placeholder","getRootElement","getVisibleElement","withHandles","handles","coerceElement","disabledHandles","add","withPreviewTemplate","template","_previewTemplate","withPlaceholderTemplate","_placeholderTemplate","rootElement","_removeRootElementListeners","runOutsideAngular","addEventListener","_initialTransform","undefined","_ownerSVGElement","ownerSVGElement","withBoundaryElement","boundaryElement","unsubscribe","change","subscribe","_containInsideBoundaryOnResize","parent","_parentDragRef","dispose","removeNode","_anchor","_destroyPreview","_destroyPlaceholder","removeDragItem","_removeSubscriptions","complete","reset","transform","disableHandle","enableHandle","delete","withDirection","direction","_withDropContainer","getFreeDragPosition","setFreeDragPosition","_sortFromLastPointerPosition","_previewRef","destroy","_placeholderRef","stopDragging","_rootElementTapHighlight","_stopScrolling","_animatePreviewToPlaceholder","then","_cleanupDragArtifacts","_cleanupCachedDimensions","isTouchEvent","_lastTouchEventTime","dropContainer","parentNode","preview","_createPreviewElement","placeholder","_createPlaceholderElement","anchor","createComment","shadowRoot","_getShadowRoot","insertBefore","body","appendChild","replaceChild","getPreviewInsertionPoint","documentRef","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","start","_initialContainer","_initialIndex","getItemIndex","getScrollableParents","referenceElement","stopPropagation","isTouchSequence","isAuxiliaryMouseButton","button","isSyntheticEvent","draggable","pointerMove","pointerUp","scroll","scrollEvent","_updateOnScroll","_boundaryRect","previewTemplate","_pickupPositionInElement","matchSize","_getPointerPositionInElement","_pointerPositionAtLastDirectionChange","startDragging","currentIndex","isPointerOverContainer","_isOverContainer","item","previousIndex","previousContainer","drop","_b","rawX","rawY","newContainer","_getSiblingContainerFromPosition","exit","enter","sortingDisabled","_startScrollingIfNecessary","_sortItem","getTransform","previewConfig","previewClass","rootRect","viewRef","viewContainer","createEmbeddedView","detectChanges","getRootNode","matchElementSize","pointerEvents","margin","zIndex","classList","Array","isArray","className","Promise","resolve","placeholderRect","duration","getTransformTransitionDurationInMs","getComputedStyle","transitionedProperties","property","prop","propertyIndex","rawDurations","rawDelays","handler","propertyName","removeEventListener","clearTimeout","timeout","setTimeout","placeholderConfig","placeholderTemplate","elementRect","handleElement","referenceRect","point","targetTouches","_getViewportScrollPosition","pageX","pageY","touches","changedTouches","svgMatrix","getScreenCTM","svgPoint","createSVGPoint","matrixTransform","inverse","dropContainerLock","lockAxis","constrainPosition","pickupX","pickupY","boundaryRect","previewRect","minY","maxY","clamp","pointerPositionOnPage","positionSinceLastChange","changeX","changeY","pointerDirectionChangeThreshold","shouldEnable","currentPosition","pickupPosition","leftOverflow","rightOverflow","topOverflow","bottomOverflow","touch","mouse","scrollDifference","_cachedShadowRoot","round","min","max","removeChild","rootNodes","nodeType","ELEMENT_NODE","wrapper","createElement","sourceRect","__read","o","n","m","Symbol","iterator","r","e","call","ar","done","push","error","__spread","arguments","concat","moveItemInArray","array","fromIndex","toIndex","from","clamp$1","to","DropListRef","autoScrollDisabled","autoScrollStep","enterPredicate","sortPredicate","sorted","_isDragging","_itemPositions","_previousSwap","drag","overlaps","_draggables","_siblings","_orientation","_activeSiblings","_viewportScrollSubscription","_verticalScrollDirection","_horizontalScrollDirection","_stopScrollTimers","_startScrollInterval","interval","animationFrameScheduler","pipe","takeUntil","_scrollNode","scrollStep","incrementVerticalScroll","incrementHorizontalScroll","withScrollableParents","registerDropContainer","removeDropContainer","_draggingStarted","_notifyReceivingSiblings","index","newIndex","_getItemIndexFromPointerPosition","activeDraggables","_activeDraggables","newPositionReference","splice","parentElement","_shouldEnterAsFirstChild","reference","unshift","_cacheItemPositions","_cacheParentPositions","_reset","withItems","items","previousItems","filter","every","_cacheItems","connectedTo","slice","withOrientation","orientation","_scrollableElements","findIndex","reverse","currentItem","size","pointerDelta","_clientRect","siblings","isHorizontal","siblingAtNewPosition","newPosition","itemOffset","_getItemOffsetPx","siblingOffset","_getSiblingOffsetPx","oldOrder","sibling","isDraggedItem","offset","elementToOffset","scrollNode","verticalScrollDirection","horizontalScrollDirection","getElementScrollDirections","computedVertical","getVerticalScrollDirection","computedHorizontal","getHorizontalScrollDirection","scrollHeight","clientHeight","scrollWidth","clientWidth","getViewportSize","window","_initialScrollSnap","msScrollSnapType","scrollSnapType","_listenToScrollEvents","elementToMeasure","sort","a","b","_stopReceiving","immediateSibling","end","itemPositions","lastItemRect","firstItemRect","_","floor","_canReceive","elementFromPoint","nativeElement","_startReceiving","activeSiblings","scrollDifference_1","draggedItems","predicate","amount","scrollBy","activeCapturingEventOptions","capture","DragDropRegistry","_dropInstances","_dragInstances","_activeDragInstances","_globalListeners","_draggingPredicate","_preventDefaultWhileDragging","_persistentTouchmoveListener","some","startsWith","options","config","_clearGlobalListeners","ngOnDestroy","instance","ɵprov","ɵɵdefineInjectable","DragDropRegistry_Factory","ɵɵinject","NgZone","DOCUMENT","token","providedIn","decorators","Injectable","args","ctorParameters","Inject","DEFAULT_CONFIG","DragDrop","createDrag","createDropList","DragDrop_Factory","ViewportRuler","CDK_DRAG_PARENT","InjectionToken","CDK_DROP_LIST_GROUP","CdkDropListGroup","_items","Directive","exportAs","providers","provide","useExisting","propDecorators","Input","CDK_DRAG_CONFIG","_uniqueIdCounter","CDK_DROP_LIST","CdkDropList","_changeDetectorRef","_scrollDispatcher","_dir","_group","_destroyed","id","EventEmitter","_unsortedItems","_dropListRef","data","_assignDefaults","_setupInputSyncSubscription","_handleEvents","_dropLists","addItem","_syncItemsWithRef","removeItem","getSortedItems","_dragRef","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","ref","startWith","coerceArray","list","_scrollableParentsResolved","scrollableParents","getAncestorScrollContainers","scrollable","getElementRef","coerceNumberProperty","markForCheck","emit","draggingDisabled","listAutoScrollDisabled","listOrientation","useValue","host","class","[attr.id]","[class.cdk-drop-list-disabled]","[class.cdk-drop-list-dragging]","[class.cdk-drop-list-receiving]","ElementRef","ChangeDetectorRef","ScrollDispatcher","Directionality","Optional","SkipSelf","Output","CDK_DRAG_HANDLE","CdkDragHandle","parentDrag","_stateChanges","_parentDrag","CdkDragPlaceholder","CDK_DRAG_PLACEHOLDER","templateRef","TemplateRef","CDK_DRAG_PREVIEW","CdkDragPreview","_matchSize","DragDropModule","CdkDrag","_viewContainerRef","_selfHandle","Observable","observer","subscription","movedEvent","_syncInputs","ngAfterViewInit","onStable","take","_updateRootElement","changes","tap","childHandleElements","rootElementSelector","switchMap","merge","apply","handleInstance","dragRef","freeDragPosition","ngOnChanges","rootSelectorChange","positionChange","firstChange","getClosestMatchingAncestor","_getBoundaryElement","boundary","dir","currentElement","matches","msMatchesSelector","[class.cdk-drag-disabled]","[class.cdk-drag-dragging]","ViewContainerRef","Self","ContentChildren","descendants","ContentChild","NgModule","declarations","CdkScrollableModule","copyArrayItem","currentArray","targetArray","targetIndex","transferArrayItem"],"mappings":"CAAC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,iBAAkBA,QAAQ,mBAAoBA,QAAQ,0BAA2BA,QAAQ,yBAA0BA,QAAQ,yBAA0BA,QAAQ,QAASA,QAAQ,kBAAmBA,QAAQ,sBAC/Q,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,yBAA0B,CAAC,UAAW,gBAAiB,kBAAmB,yBAA0B,wBAAyB,wBAAyB,OAAQ,iBAAkB,qBAAsBJ,GAChOA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,IAAMT,EAAOQ,GAAG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EAAQ4qB,iBAAmBA,GAC3B5qB,EAAQ8mB,cAAgBA,EACxB9mB,EAAQkmB,oBAAsBA,EAC9BlmB,EAAQgrB,QAAUA,GAClBhrB,EAAQoqB,cAAgBA,GACxBpqB,EAAQwqB,mBAAqBA,GAC7BxqB,EAAQ6qB,eAAiBA,GACzB7qB,EAAQ+mB,YAAcA,EACtB/mB,EAAQmmB,iBAAmBA,EAC3BnmB,EAAQ2lB,SAAWA,EACnB3lB,EAAQ+qB,eAAiBA,GACzB/qB,EAAQ8jB,iBAAmBA,EAC3B9jB,EAAQmI,QAAUA,EAClBnI,EAAQuc,YAAcA,EACtBvc,EAAQ2tB,cAziER,SAASA,GAAcC,EAAcC,EAAavZ,EAAcwZ,GAC5D,IAAIxR,EAAKD,EAAQyR,EAAaD,EAAY5mB,QACtC2mB,EAAa3mB,QACb4mB,EAAY/O,OAAOxC,EAAI,EAAGsR,EAAatZ,KAuiE/CtU,EAAQgc,gBAAkBA,EAC1Bhc,EAAQ+tB,kBA3jER,SAASA,GAAkBH,EAAcC,EAAavZ,EAAcwZ,GAChE,IAAI1R,EAAOC,EAAQ/H,EAAcsZ,EAAa3mB,OAAS,GACnDqV,EAAKD,EAAQyR,EAAaD,EAAY5mB,QACtC2mB,EAAa3mB,QACb4mB,EAAY/O,OAAOxC,EAAI,EAAGsR,EAAa9O,OAAO1C,EAAM,GAAG,KAyjE/D9O,OAAOC,eAAevN,EAAS,aAAc,CAAE4C,OAAO","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/scrolling'), require('@angular/cdk/platform'), require('@angular/cdk/coercion'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/bidi')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/drag-drop', ['exports', '@angular/core', '@angular/common', '@angular/cdk/scrolling', '@angular/cdk/platform', '@angular/cdk/coercion', 'rxjs', 'rxjs/operators', '@angular/cdk/bidi'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.dragDrop = {}), global.ng.core, global.ng.common, global.ng.cdk.scrolling, global.ng.cdk.platform, global.ng.cdk.coercion, global.rxjs, global.rxjs.operators, global.ng.cdk.bidi));\n}(this, (function (exports, i0, i1, i2, platform, coercion, rxjs, operators, bidi) { 'use strict';\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Shallow-extends a stylesheet object with another stylesheet object.\n * @docs-private\n */\n function extendStyles(dest, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n dest[key] = source[key];\n }\n }\n return dest;\n }\n /**\n * Toggles whether the native drag interactions should be enabled for an element.\n * @param element Element on which to toggle the drag interactions.\n * @param enable Whether the drag interactions should be enabled.\n * @docs-private\n */\n function toggleNativeDragInteractions(element, enable) {\n var userSelect = enable ? '' : 'none';\n extendStyles(element.style, {\n touchAction: enable ? '' : 'none',\n webkitUserDrag: enable ? '' : 'none',\n webkitTapHighlightColor: enable ? '' : 'transparent',\n userSelect: userSelect,\n msUserSelect: userSelect,\n webkitUserSelect: userSelect,\n MozUserSelect: userSelect\n });\n }\n /**\n * Toggles whether an element is visible while preserving its dimensions.\n * @param element Element whose visibility to toggle\n * @param enable Whether the element should be visible.\n * @docs-private\n */\n function toggleVisibility(element, enable) {\n var styles = element.style;\n styles.position = enable ? '' : 'fixed';\n styles.top = styles.opacity = enable ? '' : '0';\n styles.left = enable ? '' : '-999em';\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /** Parses a CSS time value to milliseconds. */\n function parseCssTimeUnitsToMs(value) {\n // Some browsers will return it in seconds, whereas others will return milliseconds.\n var multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n return parseFloat(value) * multiplier;\n }\n /** Gets the transform transition duration, including the delay, of an element in milliseconds. */\n function getTransformTransitionDurationInMs(element) {\n var computedStyle = getComputedStyle(element);\n var transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n var property = transitionedProperties.find(function (prop) { return prop === 'transform' || prop === 'all'; });\n // If there's no transition for `all` or `transform`, we shouldn't do anything.\n if (!property) {\n return 0;\n }\n // Get the index of the property that we're interested in and match\n // it up to the same index in `transition-delay` and `transition-duration`.\n var propertyIndex = transitionedProperties.indexOf(property);\n var rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n var rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n return parseCssTimeUnitsToMs(rawDurations[propertyIndex]) +\n parseCssTimeUnitsToMs(rawDelays[propertyIndex]);\n }\n /** Parses out multiple values from a computed style into an array. */\n function parseCssPropertyValue(computedStyle, name) {\n var value = computedStyle.getPropertyValue(name);\n return value.split(',').map(function (part) { return part.trim(); });\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /** Gets a mutable version of an element's bounding `ClientRect`. */\n function getMutableClientRect(element) {\n var clientRect = element.getBoundingClientRect();\n // We need to clone the `clientRect` here, because all the values on it are readonly\n // and we need to be able to update them. Also we can't use a spread here, because\n // the values on a `ClientRect` aren't own properties. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n return {\n top: clientRect.top,\n right: clientRect.right,\n bottom: clientRect.bottom,\n left: clientRect.left,\n width: clientRect.width,\n height: clientRect.height\n };\n }\n /**\n * Checks whether some coordinates are within a `ClientRect`.\n * @param clientRect ClientRect that is being checked.\n * @param x Coordinates along the X axis.\n * @param y Coordinates along the Y axis.\n */\n function isInsideClientRect(clientRect, x, y) {\n var top = clientRect.top, bottom = clientRect.bottom, left = clientRect.left, right = clientRect.right;\n return y >= top && y <= bottom && x >= left && x <= right;\n }\n /**\n * Updates the top/left positions of a `ClientRect`, as well as their bottom/right counterparts.\n * @param clientRect `ClientRect` that should be updated.\n * @param top Amount to add to the `top` position.\n * @param left Amount to add to the `left` position.\n */\n function adjustClientRect(clientRect, top, left) {\n clientRect.top += top;\n clientRect.bottom = clientRect.top + clientRect.height;\n clientRect.left += left;\n clientRect.right = clientRect.left + clientRect.width;\n }\n /**\n * Checks whether the pointer coordinates are close to a ClientRect.\n * @param rect ClientRect to check against.\n * @param threshold Threshold around the ClientRect.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\n function isPointerNearClientRect(rect, threshold, pointerX, pointerY) {\n var top = rect.top, right = rect.right, bottom = rect.bottom, left = rect.left, width = rect.width, height = rect.height;\n var xThreshold = width * threshold;\n var yThreshold = height * threshold;\n return pointerY > top - yThreshold && pointerY < bottom + yThreshold &&\n pointerX > left - xThreshold && pointerX < right + xThreshold;\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /** Keeps track of the scroll position and dimensions of the parents of an element. */\n var ParentPositionTracker = /** @class */ (function () {\n function ParentPositionTracker(_document, _viewportRuler) {\n this._document = _document;\n this._viewportRuler = _viewportRuler;\n /** Cached positions of the scrollable parent elements. */\n this.positions = new Map();\n }\n /** Clears the cached positions. */\n ParentPositionTracker.prototype.clear = function () {\n this.positions.clear();\n };\n /** Caches the positions. Should be called at the beginning of a drag sequence. */\n ParentPositionTracker.prototype.cache = function (elements) {\n var _this = this;\n this.clear();\n this.positions.set(this._document, {\n scrollPosition: this._viewportRuler.getViewportScrollPosition(),\n });\n elements.forEach(function (element) {\n _this.positions.set(element, {\n scrollPosition: { top: element.scrollTop, left: element.scrollLeft },\n clientRect: getMutableClientRect(element)\n });\n });\n };\n /** Handles scrolling while a drag is taking place. */\n ParentPositionTracker.prototype.handleScroll = function (event) {\n var target = event.target;\n var cachedPosition = this.positions.get(target);\n if (!cachedPosition) {\n return null;\n }\n // Used when figuring out whether an element is inside the scroll parent. If the scrolled\n // parent is the `document`, we use the `documentElement`, because IE doesn't support\n // `contains` on the `document`.\n var scrolledParentNode = target === this._document ? target.documentElement : target;\n var scrollPosition = cachedPosition.scrollPosition;\n var newTop;\n var newLeft;\n if (target === this._document) {\n var viewportScrollPosition = this._viewportRuler.getViewportScrollPosition();\n newTop = viewportScrollPosition.top;\n newLeft = viewportScrollPosition.left;\n }\n else {\n newTop = target.scrollTop;\n newLeft = target.scrollLeft;\n }\n var topDifference = scrollPosition.top - newTop;\n var leftDifference = scrollPosition.left - newLeft;\n // Go through and update the cached positions of the scroll\n // parents that are inside the element that was scrolled.\n this.positions.forEach(function (position, node) {\n if (position.clientRect && target !== node && scrolledParentNode.contains(node)) {\n adjustClientRect(position.clientRect, topDifference, leftDifference);\n }\n });\n scrollPosition.top = newTop;\n scrollPosition.left = newLeft;\n return { top: topDifference, left: leftDifference };\n };\n return ParentPositionTracker;\n }());\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /** Creates a deep clone of an element. */\n function deepCloneNode(node) {\n var clone = node.cloneNode(true);\n var descendantsWithId = clone.querySelectorAll('[id]');\n var nodeName = node.nodeName.toLowerCase();\n // Remove the `id` to avoid having multiple elements with the same id on the page.\n clone.removeAttribute('id');\n for (var i = 0; i < descendantsWithId.length; i++) {\n descendantsWithId[i].removeAttribute('id');\n }\n if (nodeName === 'canvas') {\n transferCanvasData(node, clone);\n }\n else if (nodeName === 'input' || nodeName === 'select' || nodeName === 'textarea') {\n transferInputData(node, clone);\n }\n transferData('canvas', node, clone, transferCanvasData);\n transferData('input, textarea, select', node, clone, transferInputData);\n return clone;\n }\n /** Matches elements between an element and its clone and allows for their data to be cloned. */\n function transferData(selector, node, clone, callback) {\n var descendantElements = node.querySelectorAll(selector);\n if (descendantElements.length) {\n var cloneElements = clone.querySelectorAll(selector);\n for (var i = 0; i < descendantElements.length; i++) {\n callback(descendantElements[i], cloneElements[i]);\n }\n }\n }\n // Counter for unique cloned radio button names.\n var cloneUniqueId = 0;\n /** Transfers the data of one input element to another. */\n function transferInputData(source, clone) {\n // Browsers throw an error when assigning the value of a file input programmatically.\n if (clone.type !== 'file') {\n clone.value = source.value;\n }\n // Radio button `name` attributes must be unique for radio button groups\n // otherwise original radio buttons can lose their checked state\n // once the clone is inserted in the DOM.\n if (clone.type === 'radio' && clone.name) {\n clone.name = \"mat-clone-\" + clone.name + \"-\" + cloneUniqueId++;\n }\n }\n /** Transfers the data of one canvas element to another. */\n function transferCanvasData(source, clone) {\n var context = clone.getContext('2d');\n if (context) {\n // In some cases `drawImage` can throw (e.g. if the canvas size is 0x0).\n // We can't do much about it so just ignore the error.\n try {\n context.drawImage(source, 0, 0);\n }\n catch (_a) { }\n }\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /** Options that can be used to bind a passive event listener. */\n var passiveEventListenerOptions = platform.normalizePassiveListenerOptions({ passive: true });\n /** Options that can be used to bind an active event listener. */\n var activeEventListenerOptions = platform.normalizePassiveListenerOptions({ passive: false });\n /**\n * Time in milliseconds for which to ignore mouse events, after\n * receiving a touch event. Used to avoid doing double work for\n * touch devices where the browser fires fake mouse events, in\n * addition to touch events.\n */\n var MOUSE_EVENT_IGNORE_TIME = 800;\n /**\n * Reference to a draggable item. Used to manipulate or dispose of the item.\n */\n var DragRef = /** @class */ (function () {\n function DragRef(element, _config, _document, _ngZone, _viewportRuler, _dragDropRegistry) {\n var _this = this;\n this._config = _config;\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n /**\n * CSS `transform` applied to the element when it isn't being dragged. We need a\n * passive transform in order for the dragged element to retain its new position\n * after the user has stopped dragging and because we need to know the relative\n * position in case they start dragging again. This corresponds to `element.style.transform`.\n */\n this._passiveTransform = { x: 0, y: 0 };\n /** CSS `transform` that is applied to the element while it's being dragged. */\n this._activeTransform = { x: 0, y: 0 };\n /** Emits when the item is being moved. */\n this._moveEvents = new rxjs.Subject();\n /** Subscription to pointer movement events. */\n this._pointerMoveSubscription = rxjs.Subscription.EMPTY;\n /** Subscription to the event that is dispatched when the user lifts their pointer. */\n this._pointerUpSubscription = rxjs.Subscription.EMPTY;\n /** Subscription to the viewport being scrolled. */\n this._scrollSubscription = rxjs.Subscription.EMPTY;\n /** Subscription to the viewport being resized. */\n this._resizeSubscription = rxjs.Subscription.EMPTY;\n /** Cached reference to the boundary element. */\n this._boundaryElement = null;\n /** Whether the native dragging interactions have been enabled on the root element. */\n this._nativeInteractionsEnabled = true;\n /** Elements that can be used to drag the draggable item. */\n this._handles = [];\n /** Registered handles that are currently disabled. */\n this._disabledHandles = new Set();\n /** Layout direction of the item. */\n this._direction = 'ltr';\n /**\n * Amount of milliseconds to wait after the user has put their\n * pointer down before starting to drag the element.\n */\n this.dragStartDelay = 0;\n this._disabled = false;\n /** Emits as the drag sequence is being prepared. */\n this.beforeStarted = new rxjs.Subject();\n /** Emits when the user starts dragging the item. */\n this.started = new rxjs.Subject();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new rxjs.Subject();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new rxjs.Subject();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new rxjs.Subject();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new rxjs.Subject();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new rxjs.Subject();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = this._moveEvents;\n /** Handler for the `mousedown`/`touchstart` events. */\n this._pointerDown = function (event) {\n _this.beforeStarted.next();\n // Delegate the event based on whether it started from a handle or the element itself.\n if (_this._handles.length) {\n var targetHandle = _this._handles.find(function (handle) {\n var target = event.target;\n return !!target && (target === handle || handle.contains(target));\n });\n if (targetHandle && !_this._disabledHandles.has(targetHandle) && !_this.disabled) {\n _this._initializeDragSequence(targetHandle, event);\n }\n }\n else if (!_this.disabled) {\n _this._initializeDragSequence(_this._rootElement, event);\n }\n };\n /** Handler that is invoked when the user moves their pointer after they've initiated a drag. */\n this._pointerMove = function (event) {\n var pointerPosition = _this._getPointerPositionOnPage(event);\n if (!_this._hasStartedDragging) {\n var distanceX = Math.abs(pointerPosition.x - _this._pickupPositionOnPage.x);\n var distanceY = Math.abs(pointerPosition.y - _this._pickupPositionOnPage.y);\n var isOverThreshold = distanceX + distanceY >= _this._config.dragStartThreshold;\n // Only start dragging after the user has moved more than the minimum distance in either\n // direction. Note that this is preferrable over doing something like `skip(minimumDistance)`\n // in the `pointerMove` subscription, because we're not guaranteed to have one move event\n // per pixel of movement (e.g. if the user moves their pointer quickly).\n if (isOverThreshold) {\n var isDelayElapsed = Date.now() >= _this._dragStartTime + _this._getDragStartDelay(event);\n var container = _this._dropContainer;\n if (!isDelayElapsed) {\n _this._endDragSequence(event);\n return;\n }\n // Prevent other drag sequences from starting while something in the container is still\n // being dragged. This can happen while we're waiting for the drop animation to finish\n // and can cause errors, because some elements might still be moving around.\n if (!container || (!container.isDragging() && !container.isReceiving())) {\n // Prevent the default action as soon as the dragging sequence is considered as\n // \"started\" since waiting for the next event can allow the device to begin scrolling.\n event.preventDefault();\n _this._hasStartedDragging = true;\n _this._ngZone.run(function () { return _this._startDragSequence(event); });\n }\n }\n return;\n }\n // We only need the preview dimensions if we have a boundary element.\n if (_this._boundaryElement) {\n // Cache the preview element rect if we haven't cached it already or if\n // we cached it too early before the element dimensions were computed.\n if (!_this._previewRect || (!_this._previewRect.width && !_this._previewRect.height)) {\n _this._previewRect = (_this._preview || _this._rootElement).getBoundingClientRect();\n }\n }\n // We prevent the default action down here so that we know that dragging has started. This is\n // important for touch devices where doing this too early can unnecessarily block scrolling,\n // if there's a dragging delay.\n event.preventDefault();\n var constrainedPointerPosition = _this._getConstrainedPointerPosition(pointerPosition);\n _this._hasMoved = true;\n _this._lastKnownPointerPosition = pointerPosition;\n _this._updatePointerDirectionDelta(constrainedPointerPosition);\n if (_this._dropContainer) {\n _this._updateActiveDropContainer(constrainedPointerPosition, pointerPosition);\n }\n else {\n var activeTransform = _this._activeTransform;\n activeTransform.x =\n constrainedPointerPosition.x - _this._pickupPositionOnPage.x + _this._passiveTransform.x;\n activeTransform.y =\n constrainedPointerPosition.y - _this._pickupPositionOnPage.y + _this._passiveTransform.y;\n _this._applyRootElementTransform(activeTransform.x, activeTransform.y);\n // Apply transform as attribute if dragging and svg element to work for IE\n if (typeof SVGElement !== 'undefined' && _this._rootElement instanceof SVGElement) {\n var appliedTransform = \"translate(\" + activeTransform.x + \" \" + activeTransform.y + \")\";\n _this._rootElement.setAttribute('transform', appliedTransform);\n }\n }\n // Since this event gets fired for every pixel while dragging, we only\n // want to fire it if the consumer opted into it. Also we have to\n // re-enter the zone because we run all of the events on the outside.\n if (_this._moveEvents.observers.length) {\n _this._ngZone.run(function () {\n _this._moveEvents.next({\n source: _this,\n pointerPosition: constrainedPointerPosition,\n event: event,\n distance: _this._getDragDistance(constrainedPointerPosition),\n delta: _this._pointerDirectionDelta\n });\n });\n }\n };\n /** Handler that is invoked when the user lifts their pointer up, after initiating a drag. */\n this._pointerUp = function (event) {\n _this._endDragSequence(event);\n };\n this.withRootElement(element).withParent(_config.parentDragRef || null);\n this._parentPositions = new ParentPositionTracker(_document, _viewportRuler);\n _dragDropRegistry.registerDragItem(this);\n }\n Object.defineProperty(DragRef.prototype, \"disabled\", {\n /** Whether starting to drag this element is disabled. */\n get: function () {\n return this._disabled || !!(this._dropContainer && this._dropContainer.disabled);\n },\n set: function (value) {\n var newValue = coercion.coerceBooleanProperty(value);\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._toggleNativeDragInteractions();\n this._handles.forEach(function (handle) { return toggleNativeDragInteractions(handle, newValue); });\n }\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n DragRef.prototype.getPlaceholderElement = function () {\n return this._placeholder;\n };\n /** Returns the root draggable element. */\n DragRef.prototype.getRootElement = function () {\n return this._rootElement;\n };\n /**\n * Gets the currently-visible element that represents the drag item.\n * While dragging this is the placeholder, otherwise it's the root element.\n */\n DragRef.prototype.getVisibleElement = function () {\n return this.isDragging() ? this.getPlaceholderElement() : this.getRootElement();\n };\n /** Registers the handles that can be used to drag the element. */\n DragRef.prototype.withHandles = function (handles) {\n var _this = this;\n this._handles = handles.map(function (handle) { return coercion.coerceElement(handle); });\n this._handles.forEach(function (handle) { return toggleNativeDragInteractions(handle, _this.disabled); });\n this._toggleNativeDragInteractions();\n // Delete any lingering disabled handles that may have been destroyed. Note that we re-create\n // the set, rather than iterate over it and filter out the destroyed handles, because while\n // the ES spec allows for sets to be modified while they're being iterated over, some polyfills\n // use an array internally which may throw an error.\n var disabledHandles = new Set();\n this._disabledHandles.forEach(function (handle) {\n if (_this._handles.indexOf(handle) > -1) {\n disabledHandles.add(handle);\n }\n });\n this._disabledHandles = disabledHandles;\n return this;\n };\n /**\n * Registers the template that should be used for the drag preview.\n * @param template Template that from which to stamp out the preview.\n */\n DragRef.prototype.withPreviewTemplate = function (template) {\n this._previewTemplate = template;\n return this;\n };\n /**\n * Registers the template that should be used for the drag placeholder.\n * @param template Template that from which to stamp out the placeholder.\n */\n DragRef.prototype.withPlaceholderTemplate = function (template) {\n this._placeholderTemplate = template;\n return this;\n };\n /**\n * Sets an alternate drag root element. The root element is the element that will be moved as\n * the user is dragging. Passing an alternate root element is useful when trying to enable\n * dragging on an element that you might not have access to.\n */\n DragRef.prototype.withRootElement = function (rootElement) {\n var _this = this;\n var element = coercion.coerceElement(rootElement);\n if (element !== this._rootElement) {\n if (this._rootElement) {\n this._removeRootElementListeners(this._rootElement);\n }\n this._ngZone.runOutsideAngular(function () {\n element.addEventListener('mousedown', _this._pointerDown, activeEventListenerOptions);\n element.addEventListener('touchstart', _this._pointerDown, passiveEventListenerOptions);\n });\n this._initialTransform = undefined;\n this._rootElement = element;\n }\n if (typeof SVGElement !== 'undefined' && this._rootElement instanceof SVGElement) {\n this._ownerSVGElement = this._rootElement.ownerSVGElement;\n }\n return this;\n };\n /**\n * Element to which the draggable's position will be constrained.\n */\n DragRef.prototype.withBoundaryElement = function (boundaryElement) {\n var _this = this;\n this._boundaryElement = boundaryElement ? coercion.coerceElement(boundaryElement) : null;\n this._resizeSubscription.unsubscribe();\n if (boundaryElement) {\n this._resizeSubscription = this._viewportRuler\n .change(10)\n .subscribe(function () { return _this._containInsideBoundaryOnResize(); });\n }\n return this;\n };\n /** Sets the parent ref that the ref is nested in. */\n DragRef.prototype.withParent = function (parent) {\n this._parentDragRef = parent;\n return this;\n };\n /** Removes the dragging functionality from the DOM element. */\n DragRef.prototype.dispose = function () {\n this._removeRootElementListeners(this._rootElement);\n // Do this check before removing from the registry since it'll\n // stop being considered as dragged once it is removed.\n if (this.isDragging()) {\n // Since we move out the element to the end of the body while it's being\n // dragged, we have to make sure that it's removed if it gets destroyed.\n removeNode(this._rootElement);\n }\n removeNode(this._anchor);\n this._destroyPreview();\n this._destroyPlaceholder();\n this._dragDropRegistry.removeDragItem(this);\n this._removeSubscriptions();\n this.beforeStarted.complete();\n this.started.complete();\n this.released.complete();\n this.ended.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this._moveEvents.complete();\n this._handles = [];\n this._disabledHandles.clear();\n this._dropContainer = undefined;\n this._resizeSubscription.unsubscribe();\n this._parentPositions.clear();\n this._boundaryElement = this._rootElement = this._ownerSVGElement = this._placeholderTemplate =\n this._previewTemplate = this._anchor = this._parentDragRef = null;\n };\n /** Checks whether the element is currently being dragged. */\n DragRef.prototype.isDragging = function () {\n return this._hasStartedDragging && this._dragDropRegistry.isDragging(this);\n };\n /** Resets a standalone drag item to its initial position. */\n DragRef.prototype.reset = function () {\n this._rootElement.style.transform = this._initialTransform || '';\n this._activeTransform = { x: 0, y: 0 };\n this._passiveTransform = { x: 0, y: 0 };\n };\n /**\n * Sets a handle as disabled. While a handle is disabled, it'll capture and interrupt dragging.\n * @param handle Handle element that should be disabled.\n */\n DragRef.prototype.disableHandle = function (handle) {\n if (!this._disabledHandles.has(handle) && this._handles.indexOf(handle) > -1) {\n this._disabledHandles.add(handle);\n toggleNativeDragInteractions(handle, true);\n }\n };\n /**\n * Enables a handle, if it has been disabled.\n * @param handle Handle element to be enabled.\n */\n DragRef.prototype.enableHandle = function (handle) {\n if (this._disabledHandles.has(handle)) {\n this._disabledHandles.delete(handle);\n toggleNativeDragInteractions(handle, this.disabled);\n }\n };\n /** Sets the layout direction of the draggable item. */\n DragRef.prototype.withDirection = function (direction) {\n this._direction = direction;\n return this;\n };\n /** Sets the container that the item is part of. */\n DragRef.prototype._withDropContainer = function (container) {\n this._dropContainer = container;\n };\n /**\n * Gets the current position in pixels the draggable outside of a drop container.\n */\n DragRef.prototype.getFreeDragPosition = function () {\n var position = this.isDragging() ? this._activeTransform : this._passiveTransform;\n return { x: position.x, y: position.y };\n };\n /**\n * Sets the current position in pixels the draggable outside of a drop container.\n * @param value New position to be set.\n */\n DragRef.prototype.setFreeDragPosition = function (value) {\n this._activeTransform = { x: 0, y: 0 };\n this._passiveTransform.x = value.x;\n this._passiveTransform.y = value.y;\n if (!this._dropContainer) {\n this._applyRootElementTransform(value.x, value.y);\n }\n return this;\n };\n /** Updates the item's sort order based on the last-known pointer position. */\n DragRef.prototype._sortFromLastPointerPosition = function () {\n var position = this._lastKnownPointerPosition;\n if (position && this._dropContainer) {\n this._updateActiveDropContainer(this._getConstrainedPointerPosition(position), position);\n }\n };\n /** Unsubscribes from the global subscriptions. */\n DragRef.prototype._removeSubscriptions = function () {\n this._pointerMoveSubscription.unsubscribe();\n this._pointerUpSubscription.unsubscribe();\n this._scrollSubscription.unsubscribe();\n };\n /** Destroys the preview element and its ViewRef. */\n DragRef.prototype._destroyPreview = function () {\n if (this._preview) {\n removeNode(this._preview);\n }\n if (this._previewRef) {\n this._previewRef.destroy();\n }\n this._preview = this._previewRef = null;\n };\n /** Destroys the placeholder element and its ViewRef. */\n DragRef.prototype._destroyPlaceholder = function () {\n if (this._placeholder) {\n removeNode(this._placeholder);\n }\n if (this._placeholderRef) {\n this._placeholderRef.destroy();\n }\n this._placeholder = this._placeholderRef = null;\n };\n /**\n * Clears subscriptions and stops the dragging sequence.\n * @param event Browser event object that ended the sequence.\n */\n DragRef.prototype._endDragSequence = function (event) {\n var _this = this;\n // Note that here we use `isDragging` from the service, rather than from `this`.\n // The difference is that the one from the service reflects whether a dragging sequence\n // has been initiated, whereas the one on `this` includes whether the user has passed\n // the minimum dragging threshold.\n if (!this._dragDropRegistry.isDragging(this)) {\n return;\n }\n this._removeSubscriptions();\n this._dragDropRegistry.stopDragging(this);\n this._toggleNativeDragInteractions();\n if (this._handles) {\n this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;\n }\n if (!this._hasStartedDragging) {\n return;\n }\n this.released.next({ source: this });\n if (this._dropContainer) {\n // Stop scrolling immediately, instead of waiting for the animation to finish.\n this._dropContainer._stopScrolling();\n this._animatePreviewToPlaceholder().then(function () {\n _this._cleanupDragArtifacts(event);\n _this._cleanupCachedDimensions();\n _this._dragDropRegistry.stopDragging(_this);\n });\n }\n else {\n // Convert the active transform into a passive one. This means that next time\n // the user starts dragging the item, its position will be calculated relatively\n // to the new passive transform.\n this._passiveTransform.x = this._activeTransform.x;\n this._passiveTransform.y = this._activeTransform.y;\n this._ngZone.run(function () {\n _this.ended.next({\n source: _this,\n distance: _this._getDragDistance(_this._getPointerPositionOnPage(event))\n });\n });\n this._cleanupCachedDimensions();\n this._dragDropRegistry.stopDragging(this);\n }\n };\n /** Starts the dragging sequence. */\n DragRef.prototype._startDragSequence = function (event) {\n if (isTouchEvent(event)) {\n this._lastTouchEventTime = Date.now();\n }\n this._toggleNativeDragInteractions();\n var dropContainer = this._dropContainer;\n if (dropContainer) {\n var element = this._rootElement;\n var parent = element.parentNode;\n var preview = this._preview = this._createPreviewElement();\n var placeholder = this._placeholder = this._createPlaceholderElement();\n var anchor = this._anchor = this._anchor || this._document.createComment('');\n // Needs to happen before the root element is moved.\n var shadowRoot = this._getShadowRoot();\n // Insert an anchor node so that we can restore the element's position in the DOM.\n parent.insertBefore(anchor, element);\n // We move the element out at the end of the body and we make it hidden, because keeping it in\n // place will throw off the consumer's `:last-child` selectors. We can't remove the element\n // from the DOM completely, because iOS will stop firing all subsequent events in the chain.\n toggleVisibility(element, false);\n this._document.body.appendChild(parent.replaceChild(placeholder, element));\n getPreviewInsertionPoint(this._document, shadowRoot).appendChild(preview);\n this.started.next({ source: this }); // Emit before notifying the container.\n dropContainer.start();\n this._initialContainer = dropContainer;\n this._initialIndex = dropContainer.getItemIndex(this);\n }\n else {\n this.started.next({ source: this });\n this._initialContainer = this._initialIndex = undefined;\n }\n // Important to run after we've called `start` on the parent container\n // so that it has had time to resolve its scrollable parents.\n this._parentPositions.cache(dropContainer ? dropContainer.getScrollableParents() : []);\n };\n /**\n * Sets up the different variables and subscriptions\n * that will be necessary for the dragging sequence.\n * @param referenceElement Element that started the drag sequence.\n * @param event Browser event object that started the sequence.\n */\n DragRef.prototype._initializeDragSequence = function (referenceElement, event) {\n var _this = this;\n // Stop propagation if the item is inside another\n // draggable so we don't start multiple drag sequences.\n if (this._parentDragRef) {\n event.stopPropagation();\n }\n var isDragging = this.isDragging();\n var isTouchSequence = isTouchEvent(event);\n var isAuxiliaryMouseButton = !isTouchSequence && event.button !== 0;\n var rootElement = this._rootElement;\n var isSyntheticEvent = !isTouchSequence && this._lastTouchEventTime &&\n this._lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date.now();\n // If the event started from an element with the native HTML drag&drop, it'll interfere\n // with our own dragging (e.g. `img` tags do it by default). Prevent the default action\n // to stop it from happening. Note that preventing on `dragstart` also seems to work, but\n // it's flaky and it fails if the user drags it away quickly. Also note that we only want\n // to do this for `mousedown` since doing the same for `touchstart` will stop any `click`\n // events from firing on touch devices.\n if (event.target && event.target.draggable && event.type === 'mousedown') {\n event.preventDefault();\n }\n // Abort if the user is already dragging or is using a mouse button other than the primary one.\n if (isDragging || isAuxiliaryMouseButton || isSyntheticEvent) {\n return;\n }\n // If we've got handles, we need to disable the tap highlight on the entire root element,\n // otherwise iOS will still add it, even though all the drag interactions on the handle\n // are disabled.\n if (this._handles.length) {\n this._rootElementTapHighlight = rootElement.style.webkitTapHighlightColor || '';\n rootElement.style.webkitTapHighlightColor = 'transparent';\n }\n this._hasStartedDragging = this._hasMoved = false;\n // Avoid multiple subscriptions and memory leaks when multi touch\n // (isDragging check above isn't enough because of possible temporal and/or dimensional delays)\n this._removeSubscriptions();\n this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);\n this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);\n this._scrollSubscription = this._dragDropRegistry.scroll.subscribe(function (scrollEvent) {\n _this._updateOnScroll(scrollEvent);\n });\n if (this._boundaryElement) {\n this._boundaryRect = getMutableClientRect(this._boundaryElement);\n }\n // If we have a custom preview we can't know ahead of time how large it'll be so we position\n // it next to the cursor. The exception is when the consumer has opted into making the preview\n // the same size as the root element, in which case we do know the size.\n var previewTemplate = this._previewTemplate;\n this._pickupPositionInElement = previewTemplate && previewTemplate.template &&\n !previewTemplate.matchSize ? { x: 0, y: 0 } :\n this._getPointerPositionInElement(referenceElement, event);\n var pointerPosition = this._pickupPositionOnPage = this._lastKnownPointerPosition =\n this._getPointerPositionOnPage(event);\n this._pointerDirectionDelta = { x: 0, y: 0 };\n this._pointerPositionAtLastDirectionChange = { x: pointerPosition.x, y: pointerPosition.y };\n this._dragStartTime = Date.now();\n this._dragDropRegistry.startDragging(this, event);\n };\n /** Cleans up the DOM artifacts that were added to facilitate the element being dragged. */\n DragRef.prototype._cleanupDragArtifacts = function (event) {\n var _this = this;\n // Restore the element's visibility and insert it at its old position in the DOM.\n // It's important that we maintain the position, because moving the element around in the DOM\n // can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,\n // while moving the existing elements in all other cases.\n toggleVisibility(this._rootElement, true);\n this._anchor.parentNode.replaceChild(this._rootElement, this._anchor);\n this._destroyPreview();\n this._destroyPlaceholder();\n this._boundaryRect = this._previewRect = undefined;\n // Re-enter the NgZone since we bound `document` events on the outside.\n this._ngZone.run(function () {\n var container = _this._dropContainer;\n var currentIndex = container.getItemIndex(_this);\n var pointerPosition = _this._getPointerPositionOnPage(event);\n var distance = _this._getDragDistance(_this._getPointerPositionOnPage(event));\n var isPointerOverContainer = container._isOverContainer(pointerPosition.x, pointerPosition.y);\n _this.ended.next({ source: _this, distance: distance });\n _this.dropped.next({\n item: _this,\n currentIndex: currentIndex,\n previousIndex: _this._initialIndex,\n container: container,\n previousContainer: _this._initialContainer,\n isPointerOverContainer: isPointerOverContainer,\n distance: distance\n });\n container.drop(_this, currentIndex, _this._initialIndex, _this._initialContainer, isPointerOverContainer, distance);\n _this._dropContainer = _this._initialContainer;\n });\n };\n /**\n * Updates the item's position in its drop container, or moves it\n * into a new one, depending on its current drag position.\n */\n DragRef.prototype._updateActiveDropContainer = function (_a, _b) {\n var _this = this;\n var x = _a.x, y = _a.y;\n var rawX = _b.x, rawY = _b.y;\n // Drop container that draggable has been moved into.\n var newContainer = this._initialContainer._getSiblingContainerFromPosition(this, x, y);\n // If we couldn't find a new container to move the item into, and the item has left its\n // initial container, check whether the it's over the initial container. This handles the\n // case where two containers are connected one way and the user tries to undo dragging an\n // item into a new container.\n if (!newContainer && this._dropContainer !== this._initialContainer &&\n this._initialContainer._isOverContainer(x, y)) {\n newContainer = this._initialContainer;\n }\n if (newContainer && newContainer !== this._dropContainer) {\n this._ngZone.run(function () {\n // Notify the old container that the item has left.\n _this.exited.next({ item: _this, container: _this._dropContainer });\n _this._dropContainer.exit(_this);\n // Notify the new container that the item has entered.\n _this._dropContainer = newContainer;\n _this._dropContainer.enter(_this, x, y, newContainer === _this._initialContainer &&\n // If we're re-entering the initial container and sorting is disabled,\n // put item the into its starting index to begin with.\n newContainer.sortingDisabled ? _this._initialIndex : undefined);\n _this.entered.next({\n item: _this,\n container: newContainer,\n currentIndex: newContainer.getItemIndex(_this)\n });\n });\n }\n this._dropContainer._startScrollingIfNecessary(rawX, rawY);\n this._dropContainer._sortItem(this, x, y, this._pointerDirectionDelta);\n this._preview.style.transform =\n getTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);\n };\n /**\n * Creates the element that will be rendered next to the user's pointer\n * and will be used as a preview of the element that is being dragged.\n */\n DragRef.prototype._createPreviewElement = function () {\n var previewConfig = this._previewTemplate;\n var previewClass = this.previewClass;\n var previewTemplate = previewConfig ? previewConfig.template : null;\n var preview;\n if (previewTemplate && previewConfig) {\n // Measure the element before we've inserted the preview\n // since the insertion could throw off the measurement.\n var rootRect = previewConfig.matchSize ? this._rootElement.getBoundingClientRect() : null;\n var viewRef = previewConfig.viewContainer.createEmbeddedView(previewTemplate, previewConfig.context);\n viewRef.detectChanges();\n preview = getRootNode(viewRef, this._document);\n this._previewRef = viewRef;\n if (previewConfig.matchSize) {\n matchElementSize(preview, rootRect);\n }\n else {\n preview.style.transform =\n getTransform(this._pickupPositionOnPage.x, this._pickupPositionOnPage.y);\n }\n }\n else {\n var element = this._rootElement;\n preview = deepCloneNode(element);\n matchElementSize(preview, element.getBoundingClientRect());\n }\n extendStyles(preview.style, {\n // It's important that we disable the pointer events on the preview, because\n // it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.\n pointerEvents: 'none',\n // We have to reset the margin, because it can throw off positioning relative to the viewport.\n margin: '0',\n position: 'fixed',\n top: '0',\n left: '0',\n zIndex: \"\" + (this._config.zIndex || 1000)\n });\n toggleNativeDragInteractions(preview, false);\n preview.classList.add('cdk-drag-preview');\n preview.setAttribute('dir', this._direction);\n if (previewClass) {\n if (Array.isArray(previewClass)) {\n previewClass.forEach(function (className) { return preview.classList.add(className); });\n }\n else {\n preview.classList.add(previewClass);\n }\n }\n return preview;\n };\n /**\n * Animates the preview element from its current position to the location of the drop placeholder.\n * @returns Promise that resolves when the animation completes.\n */\n DragRef.prototype._animatePreviewToPlaceholder = function () {\n var _this = this;\n // If the user hasn't moved yet, the transitionend event won't fire.\n if (!this._hasMoved) {\n return Promise.resolve();\n }\n var placeholderRect = this._placeholder.getBoundingClientRect();\n // Apply the class that adds a transition to the preview.\n this._preview.classList.add('cdk-drag-animating');\n // Move the preview to the placeholder position.\n this._preview.style.transform = getTransform(placeholderRect.left, placeholderRect.top);\n // If the element doesn't have a `transition`, the `transitionend` event won't fire. Since\n // we need to trigger a style recalculation in order for the `cdk-drag-animating` class to\n // apply its style, we take advantage of the available info to figure out whether we need to\n // bind the event in the first place.\n var duration = getTransformTransitionDurationInMs(this._preview);\n if (duration === 0) {\n return Promise.resolve();\n }\n return this._ngZone.runOutsideAngular(function () {\n return new Promise(function (resolve) {\n var handler = (function (event) {\n if (!event || (event.target === _this._preview && event.propertyName === 'transform')) {\n _this._preview.removeEventListener('transitionend', handler);\n resolve();\n clearTimeout(timeout);\n }\n });\n // If a transition is short enough, the browser might not fire the `transitionend` event.\n // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll\n // fire if the transition hasn't completed when it was supposed to.\n var timeout = setTimeout(handler, duration * 1.5);\n _this._preview.addEventListener('transitionend', handler);\n });\n });\n };\n /** Creates an element that will be shown instead of the current element while dragging. */\n DragRef.prototype._createPlaceholderElement = function () {\n var placeholderConfig = this._placeholderTemplate;\n var placeholderTemplate = placeholderConfig ? placeholderConfig.template : null;\n var placeholder;\n if (placeholderTemplate) {\n this._placeholderRef = placeholderConfig.viewContainer.createEmbeddedView(placeholderTemplate, placeholderConfig.context);\n this._placeholderRef.detectChanges();\n placeholder = getRootNode(this._placeholderRef, this._document);\n }\n else {\n placeholder = deepCloneNode(this._rootElement);\n }\n placeholder.classList.add('cdk-drag-placeholder');\n return placeholder;\n };\n /**\n * Figures out the coordinates at which an element was picked up.\n * @param referenceElement Element that initiated the dragging.\n * @param event Event that initiated the dragging.\n */\n DragRef.prototype._getPointerPositionInElement = function (referenceElement, event) {\n var elementRect = this._rootElement.getBoundingClientRect();\n var handleElement = referenceElement === this._rootElement ? null : referenceElement;\n var referenceRect = handleElement ? handleElement.getBoundingClientRect() : elementRect;\n var point = isTouchEvent(event) ? event.targetTouches[0] : event;\n var scrollPosition = this._getViewportScrollPosition();\n var x = point.pageX - referenceRect.left - scrollPosition.left;\n var y = point.pageY - referenceRect.top - scrollPosition.top;\n return {\n x: referenceRect.left - elementRect.left + x,\n y: referenceRect.top - elementRect.top + y\n };\n };\n /** Determines the point of the page that was touched by the user. */\n DragRef.prototype._getPointerPositionOnPage = function (event) {\n var scrollPosition = this._getViewportScrollPosition();\n var point = isTouchEvent(event) ?\n // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\n // Also note that on real devices we're guaranteed for either `touches` or `changedTouches`\n // to have a value, but Firefox in device emulation mode has a bug where both can be empty\n // for `touchstart` and `touchend` so we fall back to a dummy object in order to avoid\n // throwing an error. The value returned here will be incorrect, but since this only\n // breaks inside a developer tool and the value is only used for secondary information,\n // we can get away with it. See https://bugzilla.mozilla.org/show_bug.cgi?id=1615824.\n (event.touches[0] || event.changedTouches[0] || { pageX: 0, pageY: 0 }) : event;\n var x = point.pageX - scrollPosition.left;\n var y = point.pageY - scrollPosition.top;\n // if dragging SVG element, try to convert from the screen coordinate system to the SVG\n // coordinate system\n if (this._ownerSVGElement) {\n var svgMatrix = this._ownerSVGElement.getScreenCTM();\n if (svgMatrix) {\n var svgPoint = this._ownerSVGElement.createSVGPoint();\n svgPoint.x = x;\n svgPoint.y = y;\n return svgPoint.matrixTransform(svgMatrix.inverse());\n }\n }\n return { x: x, y: y };\n };\n /** Gets the pointer position on the page, accounting for any position constraints. */\n DragRef.prototype._getConstrainedPointerPosition = function (point) {\n var dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;\n var _a = this.constrainPosition ? this.constrainPosition(point, this) : point, x = _a.x, y = _a.y;\n if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n y = this._pickupPositionOnPage.y;\n }\n else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n x = this._pickupPositionOnPage.x;\n }\n if (this._boundaryRect) {\n var _b = this._pickupPositionInElement, pickupX = _b.x, pickupY = _b.y;\n var boundaryRect = this._boundaryRect;\n var previewRect = this._previewRect;\n var minY = boundaryRect.top + pickupY;\n var maxY = boundaryRect.bottom - (previewRect.height - pickupY);\n var minX = boundaryRect.left + pickupX;\n var maxX = boundaryRect.right - (previewRect.width - pickupX);\n x = clamp(x, minX, maxX);\n y = clamp(y, minY, maxY);\n }\n return { x: x, y: y };\n };\n /** Updates the current drag delta, based on the user's current pointer position on the page. */\n DragRef.prototype._updatePointerDirectionDelta = function (pointerPositionOnPage) {\n var x = pointerPositionOnPage.x, y = pointerPositionOnPage.y;\n var delta = this._pointerDirectionDelta;\n var positionSinceLastChange = this._pointerPositionAtLastDirectionChange;\n // Amount of pixels the user has dragged since the last time the direction changed.\n var changeX = Math.abs(x - positionSinceLastChange.x);\n var changeY = Math.abs(y - positionSinceLastChange.y);\n // Because we handle pointer events on a per-pixel basis, we don't want the delta\n // to change for every pixel, otherwise anything that depends on it can look erratic.\n // To make the delta more consistent, we track how much the user has moved since the last\n // delta change and we only update it after it has reached a certain threshold.\n if (changeX > this._config.pointerDirectionChangeThreshold) {\n delta.x = x > positionSinceLastChange.x ? 1 : -1;\n positionSinceLastChange.x = x;\n }\n if (changeY > this._config.pointerDirectionChangeThreshold) {\n delta.y = y > positionSinceLastChange.y ? 1 : -1;\n positionSinceLastChange.y = y;\n }\n return delta;\n };\n /** Toggles the native drag interactions, based on how many handles are registered. */\n DragRef.prototype._toggleNativeDragInteractions = function () {\n if (!this._rootElement || !this._handles) {\n return;\n }\n var shouldEnable = this._handles.length > 0 || !this.isDragging();\n if (shouldEnable !== this._nativeInteractionsEnabled) {\n this._nativeInteractionsEnabled = shouldEnable;\n toggleNativeDragInteractions(this._rootElement, shouldEnable);\n }\n };\n /** Removes the manually-added event listeners from the root element. */\n DragRef.prototype._removeRootElementListeners = function (element) {\n element.removeEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.removeEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n };\n /**\n * Applies a `transform` to the root element, taking into account any existing transforms on it.\n * @param x New transform value along the X axis.\n * @param y New transform value along the Y axis.\n */\n DragRef.prototype._applyRootElementTransform = function (x, y) {\n var transform = getTransform(x, y);\n // Cache the previous transform amount only after the first drag sequence, because\n // we don't want our own transforms to stack on top of each other.\n if (this._initialTransform == null) {\n this._initialTransform = this._rootElement.style.transform || '';\n }\n // Preserve the previous `transform` value, if there was one. Note that we apply our own\n // transform before the user's, because things like rotation can affect which direction\n // the element will be translated towards.\n this._rootElement.style.transform = this._initialTransform ?\n transform + ' ' + this._initialTransform : transform;\n };\n /**\n * Gets the distance that the user has dragged during the current drag sequence.\n * @param currentPosition Current position of the user's pointer.\n */\n DragRef.prototype._getDragDistance = function (currentPosition) {\n var pickupPosition = this._pickupPositionOnPage;\n if (pickupPosition) {\n return { x: currentPosition.x - pickupPosition.x, y: currentPosition.y - pickupPosition.y };\n }\n return { x: 0, y: 0 };\n };\n /** Cleans up any cached element dimensions that we don't need after dragging has stopped. */\n DragRef.prototype._cleanupCachedDimensions = function () {\n this._boundaryRect = this._previewRect = undefined;\n this._parentPositions.clear();\n };\n /**\n * Checks whether the element is still inside its boundary after the viewport has been resized.\n * If not, the position is adjusted so that the element fits again.\n */\n DragRef.prototype._containInsideBoundaryOnResize = function () {\n var _a = this._passiveTransform, x = _a.x, y = _a.y;\n if ((x === 0 && y === 0) || this.isDragging() || !this._boundaryElement) {\n return;\n }\n var boundaryRect = this._boundaryElement.getBoundingClientRect();\n var elementRect = this._rootElement.getBoundingClientRect();\n // It's possible that the element got hidden away after dragging (e.g. by switching to a\n // different tab). Don't do anything in this case so we don't clear the user's position.\n if ((boundaryRect.width === 0 && boundaryRect.height === 0) ||\n (elementRect.width === 0 && elementRect.height === 0)) {\n return;\n }\n var leftOverflow = boundaryRect.left - elementRect.left;\n var rightOverflow = elementRect.right - boundaryRect.right;\n var topOverflow = boundaryRect.top - elementRect.top;\n var bottomOverflow = elementRect.bottom - boundaryRect.bottom;\n // If the element has become wider than the boundary, we can't\n // do much to make it fit so we just anchor it to the left.\n if (boundaryRect.width > elementRect.width) {\n if (leftOverflow > 0) {\n x += leftOverflow;\n }\n if (rightOverflow > 0) {\n x -= rightOverflow;\n }\n }\n else {\n x = 0;\n }\n // If the element has become taller than the boundary, we can't\n // do much to make it fit so we just anchor it to the top.\n if (boundaryRect.height > elementRect.height) {\n if (topOverflow > 0) {\n y += topOverflow;\n }\n if (bottomOverflow > 0) {\n y -= bottomOverflow;\n }\n }\n else {\n y = 0;\n }\n if (x !== this._passiveTransform.x || y !== this._passiveTransform.y) {\n this.setFreeDragPosition({ y: y, x: x });\n }\n };\n /** Gets the drag start delay, based on the event type. */\n DragRef.prototype._getDragStartDelay = function (event) {\n var value = this.dragStartDelay;\n if (typeof value === 'number') {\n return value;\n }\n else if (isTouchEvent(event)) {\n return value.touch;\n }\n return value ? value.mouse : 0;\n };\n /** Updates the internal state of the draggable element when scrolling has occurred. */\n DragRef.prototype._updateOnScroll = function (event) {\n var scrollDifference = this._parentPositions.handleScroll(event);\n if (scrollDifference) {\n var target = event.target;\n // ClientRect dimensions are based on the scroll position of the page and its parent node so\n // we have to update the cached boundary ClientRect if the user has scrolled. Check for\n // the `document` specifically since IE doesn't support `contains` on it.\n if (this._boundaryRect && (target === this._document ||\n (target !== this._boundaryElement && target.contains(this._boundaryElement)))) {\n adjustClientRect(this._boundaryRect, scrollDifference.top, scrollDifference.left);\n }\n this._pickupPositionOnPage.x += scrollDifference.left;\n this._pickupPositionOnPage.y += scrollDifference.top;\n // If we're in free drag mode, we have to update the active transform, because\n // it isn't relative to the viewport like the preview inside a drop list.\n if (!this._dropContainer) {\n this._activeTransform.x -= scrollDifference.left;\n this._activeTransform.y -= scrollDifference.top;\n this._applyRootElementTransform(this._activeTransform.x, this._activeTransform.y);\n }\n }\n };\n /** Gets the scroll position of the viewport. */\n DragRef.prototype._getViewportScrollPosition = function () {\n var cachedPosition = this._parentPositions.positions.get(this._document);\n return cachedPosition ? cachedPosition.scrollPosition :\n this._viewportRuler.getViewportScrollPosition();\n };\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n DragRef.prototype._getShadowRoot = function () {\n if (this._cachedShadowRoot === undefined) {\n this._cachedShadowRoot = platform._getShadowRoot(this._rootElement);\n }\n return this._cachedShadowRoot;\n };\n return DragRef;\n }());\n /**\n * Gets a 3d `transform` that can be applied to an element.\n * @param x Desired position of the element along the X axis.\n * @param y Desired position of the element along the Y axis.\n */\n function getTransform(x, y) {\n // Round the transforms since some browsers will\n // blur the elements for sub-pixel transforms.\n return \"translate3d(\" + Math.round(x) + \"px, \" + Math.round(y) + \"px, 0)\";\n }\n /** Clamps a value between a minimum and a maximum. */\n function clamp(value, min, max) {\n return Math.max(min, Math.min(max, value));\n }\n /**\n * Helper to remove a node from the DOM and to do all the necessary null checks.\n * @param node Node to be removed.\n */\n function removeNode(node) {\n if (node && node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n /** Determines whether an event is a touch event. */\n function isTouchEvent(event) {\n // This function is called for every pixel that the user has dragged so we need it to be\n // as fast as possible. Since we only bind mouse events and touch events, we can assume\n // that if the event's name starts with `t`, it's a touch event.\n return event.type[0] === 't';\n }\n /** Gets the element into which the drag preview should be inserted. */\n function getPreviewInsertionPoint(documentRef, shadowRoot) {\n // We can't use the body if the user is in fullscreen mode,\n // because the preview will render under the fullscreen element.\n // TODO(crisbeto): dedupe this with the `FullscreenOverlayContainer` eventually.\n return shadowRoot ||\n documentRef.fullscreenElement ||\n documentRef.webkitFullscreenElement ||\n documentRef.mozFullScreenElement ||\n documentRef.msFullscreenElement ||\n documentRef.body;\n }\n /**\n * Gets the root HTML element of an embedded view.\n * If the root is not an HTML element it gets wrapped in one.\n */\n function getRootNode(viewRef, _document) {\n var rootNodes = viewRef.rootNodes;\n if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {\n return rootNodes[0];\n }\n var wrapper = _document.createElement('div');\n rootNodes.forEach(function (node) { return wrapper.appendChild(node); });\n return wrapper;\n }\n /**\n * Matches the target element's size to the source's size.\n * @param target Element that needs to be resized.\n * @param sourceRect Dimensions of the source element.\n */\n function matchElementSize(target, sourceRect) {\n target.style.width = sourceRect.width + \"px\";\n target.style.height = sourceRect.height + \"px\";\n target.style.transform = getTransform(sourceRect.left, sourceRect.top);\n }\n\n /*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */\n /* global Reflect, Promise */\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b)\n if (Object.prototype.hasOwnProperty.call(b, p))\n d[p] = b[p]; };\n return extendStatics(d, b);\n };\n function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n }\n var __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };\n function __rest(s, e) {\n var t = {};\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n }\n function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i = decorators.length - 1; i >= 0; i--)\n if (d = decorators[i])\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n }\n function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); };\n }\n function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try {\n step(generator.next(value));\n }\n catch (e) {\n reject(e);\n } }\n function rejected(value) { try {\n step(generator[\"throw\"](value));\n }\n catch (e) {\n reject(e);\n } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator(thisArg, body) {\n var _ = { label: 0, sent: function () { if (t[0] & 1)\n throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f)\n throw new TypeError(\"Generator is already executing.\");\n while (_)\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)\n return t;\n if (y = 0, t)\n op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return { value: op[1], done: false };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2])\n _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n }\n catch (e) {\n op = [6, e];\n y = 0;\n }\n finally {\n f = t = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n var __createBinding = Object.create ? (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });\n }) : (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n o[k2] = m[k];\n });\n function __exportStar(m, o) {\n for (var p in m)\n if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p))\n __createBinding(o, m, p);\n }\n function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m)\n return m.call(o);\n if (o && typeof o.length === \"number\")\n return {\n next: function () {\n if (o && i >= o.length)\n o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m)\n return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done)\n ar.push(r.value);\n }\n catch (error) {\n e = { error: error };\n }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"]))\n m.call(i);\n }\n finally {\n if (e)\n throw e.error;\n }\n }\n return ar;\n }\n /** @deprecated */\n function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n }\n /** @deprecated */\n function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++)\n s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n }\n function __spreadArray(to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n }\n function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n }\n function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n])\n i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try {\n step(g[n](v));\n }\n catch (e) {\n settle(q[0][3], e);\n } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length)\n resume(q[0][0], q[0][1]); }\n }\n function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n }\n function __asyncValues(o) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }\n }\n function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n }\n else {\n cooked.raw = raw;\n }\n return cooked;\n }\n ;\n var __setModuleDefault = Object.create ? (function (o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n }) : function (o, v) {\n o[\"default\"] = v;\n };\n function __importStar(mod) {\n if (mod && mod.__esModule)\n return mod;\n var result = {};\n if (mod != null)\n for (var k in mod)\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k))\n __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n }\n function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n }\n function __classPrivateFieldGet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return privateMap.get(receiver);\n }\n function __classPrivateFieldSet(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n privateMap.set(receiver, value);\n return value;\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\n function moveItemInArray(array, fromIndex, toIndex) {\n var from = clamp$1(fromIndex, array.length - 1);\n var to = clamp$1(toIndex, array.length - 1);\n if (from === to) {\n return;\n }\n var target = array[from];\n var delta = to < from ? -1 : 1;\n for (var i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n array[to] = target;\n }\n /**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\n function transferArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n var from = clamp$1(currentIndex, currentArray.length - 1);\n var to = clamp$1(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n }\n }\n /**\n * Copies an item from one array to another, leaving it in its\n * original position in current array.\n * @param currentArray Array from which to copy the item.\n * @param targetArray Array into which is copy the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n *\n */\n function copyArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n var to = clamp$1(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray[currentIndex]);\n }\n }\n /** Clamps a number between zero and a maximum. */\n function clamp$1(value, max) {\n return Math.max(0, Math.min(max, value));\n }\n\n /**\n * Proximity, as a ratio to width/height, at which a\n * dragged item will affect the drop container.\n */\n var DROP_PROXIMITY_THRESHOLD = 0.05;\n /**\n * Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the\n * viewport. The value comes from trying it out manually until it feels right.\n */\n var SCROLL_PROXIMITY_THRESHOLD = 0.05;\n /**\n * Reference to a drop list. Used to manipulate or dispose of the container.\n */\n var DropListRef = /** @class */ (function () {\n function DropListRef(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {\n var _this = this;\n this._dragDropRegistry = _dragDropRegistry;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n /** Whether starting a dragging sequence from this container is disabled. */\n this.disabled = false;\n /** Whether sorting items within the list is disabled. */\n this.sortingDisabled = false;\n /**\n * Whether auto-scrolling the view when the user\n * moves their pointer close to the edges is disabled.\n */\n this.autoScrollDisabled = false;\n /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n this.autoScrollStep = 2;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = function () { return true; };\n /** Functions that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = function () { return true; };\n /** Emits right before dragging has started. */\n this.beforeStarted = new rxjs.Subject();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new rxjs.Subject();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new rxjs.Subject();\n /** Emits when the user drops an item inside the container. */\n this.dropped = new rxjs.Subject();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new rxjs.Subject();\n /** Whether an item in the list is being dragged. */\n this._isDragging = false;\n /** Cache of the dimensions of all the items inside the container. */\n this._itemPositions = [];\n /**\n * Keeps track of the item that was last swapped with the dragged item, as well as what direction\n * the pointer was moving in when the swap occured and whether the user's pointer continued to\n * overlap with the swapped item after the swapping occurred.\n */\n this._previousSwap = { drag: null, delta: 0, overlaps: false };\n /** Draggable items in the container. */\n this._draggables = [];\n /** Drop lists that are connected to the current one. */\n this._siblings = [];\n /** Direction in which the list is oriented. */\n this._orientation = 'vertical';\n /** Connected siblings that currently have a dragged item. */\n this._activeSiblings = new Set();\n /** Layout direction of the drop list. */\n this._direction = 'ltr';\n /** Subscription to the window being scrolled. */\n this._viewportScrollSubscription = rxjs.Subscription.EMPTY;\n /** Vertical direction in which the list is currently scrolling. */\n this._verticalScrollDirection = 0 /* NONE */;\n /** Horizontal direction in which the list is currently scrolling. */\n this._horizontalScrollDirection = 0 /* NONE */;\n /** Used to signal to the current auto-scroll sequence when to stop. */\n this._stopScrollTimers = new rxjs.Subject();\n /** Shadow root of the current element. Necessary for `elementFromPoint` to resolve correctly. */\n this._cachedShadowRoot = null;\n /** Starts the interval that'll auto-scroll the element. */\n this._startScrollInterval = function () {\n _this._stopScrolling();\n rxjs.interval(0, rxjs.animationFrameScheduler)\n .pipe(operators.takeUntil(_this._stopScrollTimers))\n .subscribe(function () {\n var node = _this._scrollNode;\n var scrollStep = _this.autoScrollStep;\n if (_this._verticalScrollDirection === 1 /* UP */) {\n incrementVerticalScroll(node, -scrollStep);\n }\n else if (_this._verticalScrollDirection === 2 /* DOWN */) {\n incrementVerticalScroll(node, scrollStep);\n }\n if (_this._horizontalScrollDirection === 1 /* LEFT */) {\n incrementHorizontalScroll(node, -scrollStep);\n }\n else if (_this._horizontalScrollDirection === 2 /* RIGHT */) {\n incrementHorizontalScroll(node, scrollStep);\n }\n });\n };\n this.element = coercion.coerceElement(element);\n this._document = _document;\n this.withScrollableParents([this.element]);\n _dragDropRegistry.registerDropContainer(this);\n this._parentPositions = new ParentPositionTracker(_document, _viewportRuler);\n }\n /** Removes the drop list functionality from the DOM element. */\n DropListRef.prototype.dispose = function () {\n this._stopScrolling();\n this._stopScrollTimers.complete();\n this._viewportScrollSubscription.unsubscribe();\n this.beforeStarted.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this.sorted.complete();\n this._activeSiblings.clear();\n this._scrollNode = null;\n this._parentPositions.clear();\n this._dragDropRegistry.removeDropContainer(this);\n };\n /** Whether an item from this list is currently being dragged. */\n DropListRef.prototype.isDragging = function () {\n return this._isDragging;\n };\n /** Starts dragging an item. */\n DropListRef.prototype.start = function () {\n this._draggingStarted();\n this._notifyReceivingSiblings();\n };\n /**\n * Emits an event to indicate that the user moved an item into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param index Index at which the item entered. If omitted, the container will try to figure it\n * out automatically.\n */\n DropListRef.prototype.enter = function (item, pointerX, pointerY, index) {\n this._draggingStarted();\n // If sorting is disabled, we want the item to return to its starting\n // position if the user is returning it to its initial container.\n var newIndex;\n if (index == null) {\n newIndex = this.sortingDisabled ? this._draggables.indexOf(item) : -1;\n if (newIndex === -1) {\n // We use the coordinates of where the item entered the drop\n // zone to figure out at which index it should be inserted.\n newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY);\n }\n }\n else {\n newIndex = index;\n }\n var activeDraggables = this._activeDraggables;\n var currentIndex = activeDraggables.indexOf(item);\n var placeholder = item.getPlaceholderElement();\n var newPositionReference = activeDraggables[newIndex];\n // If the item at the new position is the same as the item that is being dragged,\n // it means that we're trying to restore the item to its initial position. In this\n // case we should use the next item from the list as the reference.\n if (newPositionReference === item) {\n newPositionReference = activeDraggables[newIndex + 1];\n }\n // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it\n // into another container and back again), we have to ensure that it isn't duplicated.\n if (currentIndex > -1) {\n activeDraggables.splice(currentIndex, 1);\n }\n // Don't use items that are being dragged as a reference, because\n // their element has been moved down to the bottom of the body.\n if (newPositionReference && !this._dragDropRegistry.isDragging(newPositionReference)) {\n var element = newPositionReference.getRootElement();\n element.parentElement.insertBefore(placeholder, element);\n activeDraggables.splice(newIndex, 0, item);\n }\n else if (this._shouldEnterAsFirstChild(pointerX, pointerY)) {\n var reference = activeDraggables[0].getRootElement();\n reference.parentNode.insertBefore(placeholder, reference);\n activeDraggables.unshift(item);\n }\n else {\n coercion.coerceElement(this.element).appendChild(placeholder);\n activeDraggables.push(item);\n }\n // The transform needs to be cleared so it doesn't throw off the measurements.\n placeholder.style.transform = '';\n // Note that the positions were already cached when we called `start` above,\n // but we need to refresh them since the amount of items has changed and also parent rects.\n this._cacheItemPositions();\n this._cacheParentPositions();\n // Notify siblings at the end so that the item has been inserted into the `activeDraggables`.\n this._notifyReceivingSiblings();\n this.entered.next({ item: item, container: this, currentIndex: this.getItemIndex(item) });\n };\n /**\n * Removes an item from the container after it was dragged into another container by the user.\n * @param item Item that was dragged out.\n */\n DropListRef.prototype.exit = function (item) {\n this._reset();\n this.exited.next({ item: item, container: this });\n };\n /**\n * Drops an item into this container.\n * @param item Item being dropped into the container.\n * @param currentIndex Index at which the item should be inserted.\n * @param previousIndex Index of the item when dragging started.\n * @param previousContainer Container from which the item got dragged in.\n * @param isPointerOverContainer Whether the user's pointer was over the\n * container when the item was dropped.\n * @param distance Distance the user has dragged since the start of the dragging sequence.\n */\n DropListRef.prototype.drop = function (item, currentIndex, previousIndex, previousContainer, isPointerOverContainer, distance) {\n this._reset();\n this.dropped.next({\n item: item,\n currentIndex: currentIndex,\n previousIndex: previousIndex,\n container: this,\n previousContainer: previousContainer,\n isPointerOverContainer: isPointerOverContainer,\n distance: distance\n });\n };\n /**\n * Sets the draggable items that are a part of this list.\n * @param items Items that are a part of this list.\n */\n DropListRef.prototype.withItems = function (items) {\n var _this = this;\n var previousItems = this._draggables;\n this._draggables = items;\n items.forEach(function (item) { return item._withDropContainer(_this); });\n if (this.isDragging()) {\n var draggedItems = previousItems.filter(function (item) { return item.isDragging(); });\n // If all of the items being dragged were removed\n // from the list, abort the current drag sequence.\n if (draggedItems.every(function (item) { return items.indexOf(item) === -1; })) {\n this._reset();\n }\n else {\n this._cacheItems();\n }\n }\n return this;\n };\n /** Sets the layout direction of the drop list. */\n DropListRef.prototype.withDirection = function (direction) {\n this._direction = direction;\n return this;\n };\n /**\n * Sets the containers that are connected to this one. When two or more containers are\n * connected, the user will be allowed to transfer items between them.\n * @param connectedTo Other containers that the current containers should be connected to.\n */\n DropListRef.prototype.connectedTo = function (connectedTo) {\n this._siblings = connectedTo.slice();\n return this;\n };\n /**\n * Sets the orientation of the container.\n * @param orientation New orientation for the container.\n */\n DropListRef.prototype.withOrientation = function (orientation) {\n this._orientation = orientation;\n return this;\n };\n /**\n * Sets which parent elements are can be scrolled while the user is dragging.\n * @param elements Elements that can be scrolled.\n */\n DropListRef.prototype.withScrollableParents = function (elements) {\n var element = coercion.coerceElement(this.element);\n // We always allow the current element to be scrollable\n // so we need to ensure that it's in the array.\n this._scrollableElements =\n elements.indexOf(element) === -1 ? __spread([element], elements) : elements.slice();\n return this;\n };\n /** Gets the scrollable parents that are registered with this drop container. */\n DropListRef.prototype.getScrollableParents = function () {\n return this._scrollableElements;\n };\n /**\n * Figures out the index of an item in the container.\n * @param item Item whose index should be determined.\n */\n DropListRef.prototype.getItemIndex = function (item) {\n if (!this._isDragging) {\n return this._draggables.indexOf(item);\n }\n // Items are sorted always by top/left in the cache, however they flow differently in RTL.\n // The rest of the logic still stands no matter what orientation we're in, however\n // we need to invert the array when determining the index.\n var items = this._orientation === 'horizontal' && this._direction === 'rtl' ?\n this._itemPositions.slice().reverse() : this._itemPositions;\n return findIndex(items, function (currentItem) { return currentItem.drag === item; });\n };\n /**\n * Whether the list is able to receive the item that\n * is currently being dragged inside a connected drop list.\n */\n DropListRef.prototype.isReceiving = function () {\n return this._activeSiblings.size > 0;\n };\n /**\n * Sorts an item inside the container based on its position.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDelta Direction in which the pointer is moving along each axis.\n */\n DropListRef.prototype._sortItem = function (item, pointerX, pointerY, pointerDelta) {\n // Don't sort the item if sorting is disabled or it's out of range.\n if (this.sortingDisabled || !this._clientRect ||\n !isPointerNearClientRect(this._clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n return;\n }\n var siblings = this._itemPositions;\n var newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY, pointerDelta);\n if (newIndex === -1 && siblings.length > 0) {\n return;\n }\n var isHorizontal = this._orientation === 'horizontal';\n var currentIndex = findIndex(siblings, function (currentItem) { return currentItem.drag === item; });\n var siblingAtNewPosition = siblings[newIndex];\n var currentPosition = siblings[currentIndex].clientRect;\n var newPosition = siblingAtNewPosition.clientRect;\n var delta = currentIndex > newIndex ? 1 : -1;\n // How many pixels the item's placeholder should be offset.\n var itemOffset = this._getItemOffsetPx(currentPosition, newPosition, delta);\n // How many pixels all the other items should be offset.\n var siblingOffset = this._getSiblingOffsetPx(currentIndex, siblings, delta);\n // Save the previous order of the items before moving the item to its new index.\n // We use this to check whether an item has been moved as a result of the sorting.\n var oldOrder = siblings.slice();\n // Shuffle the array in place.\n moveItemInArray(siblings, currentIndex, newIndex);\n this.sorted.next({\n previousIndex: currentIndex,\n currentIndex: newIndex,\n container: this,\n item: item\n });\n siblings.forEach(function (sibling, index) {\n // Don't do anything if the position hasn't changed.\n if (oldOrder[index] === sibling) {\n return;\n }\n var isDraggedItem = sibling.drag === item;\n var offset = isDraggedItem ? itemOffset : siblingOffset;\n var elementToOffset = isDraggedItem ? item.getPlaceholderElement() :\n sibling.drag.getRootElement();\n // Update the offset to reflect the new position.\n sibling.offset += offset;\n // Since we're moving the items with a `transform`, we need to adjust their cached\n // client rects to reflect their new position, as well as swap their positions in the cache.\n // Note that we shouldn't use `getBoundingClientRect` here to update the cache, because the\n // elements may be mid-animation which will give us a wrong result.\n if (isHorizontal) {\n // Round the transforms since some browsers will\n // blur the elements, for sub-pixel transforms.\n elementToOffset.style.transform = \"translate3d(\" + Math.round(sibling.offset) + \"px, 0, 0)\";\n adjustClientRect(sibling.clientRect, 0, offset);\n }\n else {\n elementToOffset.style.transform = \"translate3d(0, \" + Math.round(sibling.offset) + \"px, 0)\";\n adjustClientRect(sibling.clientRect, offset, 0);\n }\n });\n // Note that it's important that we do this after the client rects have been adjusted.\n this._previousSwap.overlaps = isInsideClientRect(newPosition, pointerX, pointerY);\n this._previousSwap.drag = siblingAtNewPosition.drag;\n this._previousSwap.delta = isHorizontal ? pointerDelta.x : pointerDelta.y;\n };\n /**\n * Checks whether the user's pointer is close to the edges of either the\n * viewport or the drop list and starts the auto-scroll sequence.\n * @param pointerX User's pointer position along the x axis.\n * @param pointerY User's pointer position along the y axis.\n */\n DropListRef.prototype._startScrollingIfNecessary = function (pointerX, pointerY) {\n var _this = this;\n if (this.autoScrollDisabled) {\n return;\n }\n var scrollNode;\n var verticalScrollDirection = 0 /* NONE */;\n var horizontalScrollDirection = 0 /* NONE */;\n // Check whether we should start scrolling any of the parent containers.\n this._parentPositions.positions.forEach(function (position, element) {\n var _a;\n // We have special handling for the `document` below. Also this would be\n // nicer with a for...of loop, but it requires changing a compiler flag.\n if (element === _this._document || !position.clientRect || scrollNode) {\n return;\n }\n if (isPointerNearClientRect(position.clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n _a = __read(getElementScrollDirections(element, position.clientRect, pointerX, pointerY), 2), verticalScrollDirection = _a[0], horizontalScrollDirection = _a[1];\n if (verticalScrollDirection || horizontalScrollDirection) {\n scrollNode = element;\n }\n }\n });\n // Otherwise check if we can start scrolling the viewport.\n if (!verticalScrollDirection && !horizontalScrollDirection) {\n var _a = this._viewportRuler.getViewportSize(), width = _a.width, height = _a.height;\n var clientRect = { width: width, height: height, top: 0, right: width, bottom: height, left: 0 };\n verticalScrollDirection = getVerticalScrollDirection(clientRect, pointerY);\n horizontalScrollDirection = getHorizontalScrollDirection(clientRect, pointerX);\n scrollNode = window;\n }\n if (scrollNode && (verticalScrollDirection !== this._verticalScrollDirection ||\n horizontalScrollDirection !== this._horizontalScrollDirection ||\n scrollNode !== this._scrollNode)) {\n this._verticalScrollDirection = verticalScrollDirection;\n this._horizontalScrollDirection = horizontalScrollDirection;\n this._scrollNode = scrollNode;\n if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {\n this._ngZone.runOutsideAngular(this._startScrollInterval);\n }\n else {\n this._stopScrolling();\n }\n }\n };\n /** Stops any currently-running auto-scroll sequences. */\n DropListRef.prototype._stopScrolling = function () {\n this._stopScrollTimers.next();\n };\n /** Starts the dragging sequence within the list. */\n DropListRef.prototype._draggingStarted = function () {\n var styles = coercion.coerceElement(this.element).style;\n this.beforeStarted.next();\n this._isDragging = true;\n // We need to disable scroll snapping while the user is dragging, because it breaks automatic\n // scrolling. The browser seems to round the value based on the snapping points which means\n // that we can't increment/decrement the scroll position.\n this._initialScrollSnap = styles.msScrollSnapType || styles.scrollSnapType || '';\n styles.scrollSnapType = styles.msScrollSnapType = 'none';\n this._cacheItems();\n this._viewportScrollSubscription.unsubscribe();\n this._listenToScrollEvents();\n };\n /** Caches the positions of the configured scrollable parents. */\n DropListRef.prototype._cacheParentPositions = function () {\n var element = coercion.coerceElement(this.element);\n this._parentPositions.cache(this._scrollableElements);\n // The list element is always in the `scrollableElements`\n // so we can take advantage of the cached `ClientRect`.\n this._clientRect = this._parentPositions.positions.get(element).clientRect;\n };\n /** Refreshes the position cache of the items and sibling containers. */\n DropListRef.prototype._cacheItemPositions = function () {\n var isHorizontal = this._orientation === 'horizontal';\n this._itemPositions = this._activeDraggables.map(function (drag) {\n var elementToMeasure = drag.getVisibleElement();\n return { drag: drag, offset: 0, clientRect: getMutableClientRect(elementToMeasure) };\n }).sort(function (a, b) {\n return isHorizontal ? a.clientRect.left - b.clientRect.left :\n a.clientRect.top - b.clientRect.top;\n });\n };\n /** Resets the container to its initial state. */\n DropListRef.prototype._reset = function () {\n var _this = this;\n this._isDragging = false;\n var styles = coercion.coerceElement(this.element).style;\n styles.scrollSnapType = styles.msScrollSnapType = this._initialScrollSnap;\n // TODO(crisbeto): may have to wait for the animations to finish.\n this._activeDraggables.forEach(function (item) {\n var rootElement = item.getRootElement();\n if (rootElement) {\n rootElement.style.transform = '';\n }\n });\n this._siblings.forEach(function (sibling) { return sibling._stopReceiving(_this); });\n this._activeDraggables = [];\n this._itemPositions = [];\n this._previousSwap.drag = null;\n this._previousSwap.delta = 0;\n this._previousSwap.overlaps = false;\n this._stopScrolling();\n this._viewportScrollSubscription.unsubscribe();\n this._parentPositions.clear();\n };\n /**\n * Gets the offset in pixels by which the items that aren't being dragged should be moved.\n * @param currentIndex Index of the item currently being dragged.\n * @param siblings All of the items in the list.\n * @param delta Direction in which the user is moving.\n */\n DropListRef.prototype._getSiblingOffsetPx = function (currentIndex, siblings, delta) {\n var isHorizontal = this._orientation === 'horizontal';\n var currentPosition = siblings[currentIndex].clientRect;\n var immediateSibling = siblings[currentIndex + delta * -1];\n var siblingOffset = currentPosition[isHorizontal ? 'width' : 'height'] * delta;\n if (immediateSibling) {\n var start = isHorizontal ? 'left' : 'top';\n var end = isHorizontal ? 'right' : 'bottom';\n // Get the spacing between the start of the current item and the end of the one immediately\n // after it in the direction in which the user is dragging, or vice versa. We add it to the\n // offset in order to push the element to where it will be when it's inline and is influenced\n // by the `margin` of its siblings.\n if (delta === -1) {\n siblingOffset -= immediateSibling.clientRect[start] - currentPosition[end];\n }\n else {\n siblingOffset += currentPosition[start] - immediateSibling.clientRect[end];\n }\n }\n return siblingOffset;\n };\n /**\n * Gets the offset in pixels by which the item that is being dragged should be moved.\n * @param currentPosition Current position of the item.\n * @param newPosition Position of the item where the current item should be moved.\n * @param delta Direction in which the user is moving.\n */\n DropListRef.prototype._getItemOffsetPx = function (currentPosition, newPosition, delta) {\n var isHorizontal = this._orientation === 'horizontal';\n var itemOffset = isHorizontal ? newPosition.left - currentPosition.left :\n newPosition.top - currentPosition.top;\n // Account for differences in the item width/height.\n if (delta === -1) {\n itemOffset += isHorizontal ? newPosition.width - currentPosition.width :\n newPosition.height - currentPosition.height;\n }\n return itemOffset;\n };\n /**\n * Checks if pointer is entering in the first position\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n */\n DropListRef.prototype._shouldEnterAsFirstChild = function (pointerX, pointerY) {\n if (!this._activeDraggables.length) {\n return false;\n }\n var itemPositions = this._itemPositions;\n var isHorizontal = this._orientation === 'horizontal';\n // `itemPositions` are sorted by position while `activeDraggables` are sorted by child index\n // check if container is using some sort of \"reverse\" ordering (eg: flex-direction: row-reverse)\n var reversed = itemPositions[0].drag !== this._activeDraggables[0];\n if (reversed) {\n var lastItemRect = itemPositions[itemPositions.length - 1].clientRect;\n return isHorizontal ? pointerX >= lastItemRect.right : pointerY >= lastItemRect.bottom;\n }\n else {\n var firstItemRect = itemPositions[0].clientRect;\n return isHorizontal ? pointerX <= firstItemRect.left : pointerY <= firstItemRect.top;\n }\n };\n /**\n * Gets the index of an item in the drop container, based on the position of the user's pointer.\n * @param item Item that is being sorted.\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n * @param delta Direction in which the user is moving their pointer.\n */\n DropListRef.prototype._getItemIndexFromPointerPosition = function (item, pointerX, pointerY, delta) {\n var _this = this;\n var isHorizontal = this._orientation === 'horizontal';\n var index = findIndex(this._itemPositions, function (_a, _, array) {\n var drag = _a.drag, clientRect = _a.clientRect;\n if (drag === item) {\n // If there's only one item left in the container, it must be\n // the dragged item itself so we use it as a reference.\n return array.length < 2;\n }\n if (delta) {\n var direction = isHorizontal ? delta.x : delta.y;\n // If the user is still hovering over the same item as last time, their cursor hasn't left\n // the item after we made the swap, and they didn't change the direction in which they're\n // dragging, we don't consider it a direction swap.\n if (drag === _this._previousSwap.drag && _this._previousSwap.overlaps &&\n direction === _this._previousSwap.delta) {\n return false;\n }\n }\n return isHorizontal ?\n // Round these down since most browsers report client rects with\n // sub-pixel precision, whereas the pointer coordinates are rounded to pixels.\n pointerX >= Math.floor(clientRect.left) && pointerX < Math.floor(clientRect.right) :\n pointerY >= Math.floor(clientRect.top) && pointerY < Math.floor(clientRect.bottom);\n });\n return (index === -1 || !this.sortPredicate(index, item, this)) ? -1 : index;\n };\n /** Caches the current items in the list and their positions. */\n DropListRef.prototype._cacheItems = function () {\n this._activeDraggables = this._draggables.slice();\n this._cacheItemPositions();\n this._cacheParentPositions();\n };\n /**\n * Checks whether the user's pointer is positioned over the container.\n * @param x Pointer position along the X axis.\n * @param y Pointer position along the Y axis.\n */\n DropListRef.prototype._isOverContainer = function (x, y) {\n return this._clientRect != null && isInsideClientRect(this._clientRect, x, y);\n };\n /**\n * Figures out whether an item should be moved into a sibling\n * drop container, based on its current position.\n * @param item Drag item that is being moved.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n DropListRef.prototype._getSiblingContainerFromPosition = function (item, x, y) {\n return this._siblings.find(function (sibling) { return sibling._canReceive(item, x, y); });\n };\n /**\n * Checks whether the drop list can receive the passed-in item.\n * @param item Item that is being dragged into the list.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n DropListRef.prototype._canReceive = function (item, x, y) {\n if (!this._clientRect || !isInsideClientRect(this._clientRect, x, y) ||\n !this.enterPredicate(item, this)) {\n return false;\n }\n var elementFromPoint = this._getShadowRoot().elementFromPoint(x, y);\n // If there's no element at the pointer position, then\n // the client rect is probably scrolled out of the view.\n if (!elementFromPoint) {\n return false;\n }\n var nativeElement = coercion.coerceElement(this.element);\n // The `ClientRect`, that we're using to find the container over which the user is\n // hovering, doesn't give us any information on whether the element has been scrolled\n // out of the view or whether it's overlapping with other containers. This means that\n // we could end up transferring the item into a container that's invisible or is positioned\n // below another one. We use the result from `elementFromPoint` to get the top-most element\n // at the pointer position and to find whether it's one of the intersecting drop containers.\n return elementFromPoint === nativeElement || nativeElement.contains(elementFromPoint);\n };\n /**\n * Called by one of the connected drop lists when a dragging sequence has started.\n * @param sibling Sibling in which dragging has started.\n */\n DropListRef.prototype._startReceiving = function (sibling, items) {\n var _this = this;\n var activeSiblings = this._activeSiblings;\n if (!activeSiblings.has(sibling) && items.every(function (item) {\n // Note that we have to add an exception to the `enterPredicate` for items that started off\n // in this drop list. The drag ref has logic that allows an item to return to its initial\n // container, if it has left the initial container and none of the connected containers\n // allow it to enter. See `DragRef._updateActiveDropContainer` for more context.\n return _this.enterPredicate(item, _this) || _this._draggables.indexOf(item) > -1;\n })) {\n activeSiblings.add(sibling);\n this._cacheParentPositions();\n this._listenToScrollEvents();\n }\n };\n /**\n * Called by a connected drop list when dragging has stopped.\n * @param sibling Sibling whose dragging has stopped.\n */\n DropListRef.prototype._stopReceiving = function (sibling) {\n this._activeSiblings.delete(sibling);\n this._viewportScrollSubscription.unsubscribe();\n };\n /**\n * Starts listening to scroll events on the viewport.\n * Used for updating the internal state of the list.\n */\n DropListRef.prototype._listenToScrollEvents = function () {\n var _this = this;\n this._viewportScrollSubscription = this._dragDropRegistry.scroll.subscribe(function (event) {\n if (_this.isDragging()) {\n var scrollDifference_1 = _this._parentPositions.handleScroll(event);\n if (scrollDifference_1) {\n // Since we know the amount that the user has scrolled we can shift all of the\n // client rectangles ourselves. This is cheaper than re-measuring everything and\n // we can avoid inconsistent behavior where we might be measuring the element before\n // its position has changed.\n _this._itemPositions.forEach(function (_a) {\n var clientRect = _a.clientRect;\n adjustClientRect(clientRect, scrollDifference_1.top, scrollDifference_1.left);\n });\n // We need two loops for this, because we want all of the cached\n // positions to be up-to-date before we re-sort the item.\n _this._itemPositions.forEach(function (_a) {\n var drag = _a.drag;\n if (_this._dragDropRegistry.isDragging(drag)) {\n // We need to re-sort the item manually, because the pointer move\n // events won't be dispatched while the user is scrolling.\n drag._sortFromLastPointerPosition();\n }\n });\n }\n }\n else if (_this.isReceiving()) {\n _this._cacheParentPositions();\n }\n });\n };\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n DropListRef.prototype._getShadowRoot = function () {\n if (!this._cachedShadowRoot) {\n var shadowRoot = platform._getShadowRoot(coercion.coerceElement(this.element));\n this._cachedShadowRoot = shadowRoot || this._document;\n }\n return this._cachedShadowRoot;\n };\n /** Notifies any siblings that may potentially receive the item. */\n DropListRef.prototype._notifyReceivingSiblings = function () {\n var _this = this;\n var draggedItems = this._activeDraggables.filter(function (item) { return item.isDragging(); });\n this._siblings.forEach(function (sibling) { return sibling._startReceiving(_this, draggedItems); });\n };\n return DropListRef;\n }());\n /**\n * Finds the index of an item that matches a predicate function. Used as an equivalent\n * of `Array.prototype.findIndex` which isn't part of the standard Google typings.\n * @param array Array in which to look for matches.\n * @param predicate Function used to determine whether an item is a match.\n */\n function findIndex(array, predicate) {\n for (var i = 0; i < array.length; i++) {\n if (predicate(array[i], i, array)) {\n return i;\n }\n }\n return -1;\n }\n /**\n * Increments the vertical scroll position of a node.\n * @param node Node whose scroll position should change.\n * @param amount Amount of pixels that the `node` should be scrolled.\n */\n function incrementVerticalScroll(node, amount) {\n if (node === window) {\n node.scrollBy(0, amount);\n }\n else {\n // Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.\n node.scrollTop += amount;\n }\n }\n /**\n * Increments the horizontal scroll position of a node.\n * @param node Node whose scroll position should change.\n * @param amount Amount of pixels that the `node` should be scrolled.\n */\n function incrementHorizontalScroll(node, amount) {\n if (node === window) {\n node.scrollBy(amount, 0);\n }\n else {\n // Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.\n node.scrollLeft += amount;\n }\n }\n /**\n * Gets whether the vertical auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerY Position of the user's pointer along the y axis.\n */\n function getVerticalScrollDirection(clientRect, pointerY) {\n var top = clientRect.top, bottom = clientRect.bottom, height = clientRect.height;\n var yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {\n return 1 /* UP */;\n }\n else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {\n return 2 /* DOWN */;\n }\n return 0 /* NONE */;\n }\n /**\n * Gets whether the horizontal auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerX Position of the user's pointer along the x axis.\n */\n function getHorizontalScrollDirection(clientRect, pointerX) {\n var left = clientRect.left, right = clientRect.right, width = clientRect.width;\n var xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {\n return 1 /* LEFT */;\n }\n else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {\n return 2 /* RIGHT */;\n }\n return 0 /* NONE */;\n }\n /**\n * Gets the directions in which an element node should be scrolled,\n * assuming that the user's pointer is already within it scrollable region.\n * @param element Element for which we should calculate the scroll direction.\n * @param clientRect Bounding client rectangle of the element.\n * @param pointerX Position of the user's pointer along the x axis.\n * @param pointerY Position of the user's pointer along the y axis.\n */\n function getElementScrollDirections(element, clientRect, pointerX, pointerY) {\n var computedVertical = getVerticalScrollDirection(clientRect, pointerY);\n var computedHorizontal = getHorizontalScrollDirection(clientRect, pointerX);\n var verticalScrollDirection = 0 /* NONE */;\n var horizontalScrollDirection = 0 /* NONE */;\n // Note that we here we do some extra checks for whether the element is actually scrollable in\n // a certain direction and we only assign the scroll direction if it is. We do this so that we\n // can allow other elements to be scrolled, if the current element can't be scrolled anymore.\n // This allows us to handle cases where the scroll regions of two scrollable elements overlap.\n if (computedVertical) {\n var scrollTop = element.scrollTop;\n if (computedVertical === 1 /* UP */) {\n if (scrollTop > 0) {\n verticalScrollDirection = 1 /* UP */;\n }\n }\n else if (element.scrollHeight - scrollTop > element.clientHeight) {\n verticalScrollDirection = 2 /* DOWN */;\n }\n }\n if (computedHorizontal) {\n var scrollLeft = element.scrollLeft;\n if (computedHorizontal === 1 /* LEFT */) {\n if (scrollLeft > 0) {\n horizontalScrollDirection = 1 /* LEFT */;\n }\n }\n else if (element.scrollWidth - scrollLeft > element.clientWidth) {\n horizontalScrollDirection = 2 /* RIGHT */;\n }\n }\n return [verticalScrollDirection, horizontalScrollDirection];\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /** Event options that can be used to bind an active, capturing event. */\n var activeCapturingEventOptions = platform.normalizePassiveListenerOptions({\n passive: false,\n capture: true\n });\n /**\n * Service that keeps track of all the drag item and drop container\n * instances, and manages global event listeners on the `document`.\n * @docs-private\n */\n // Note: this class is generic, rather than referencing CdkDrag and CdkDropList directly, in order\n // to avoid circular imports. If we were to reference them here, importing the registry into the\n // classes that are registering themselves will introduce a circular import.\n var DragDropRegistry = /** @class */ (function () {\n function DragDropRegistry(_ngZone, _document) {\n var _this = this;\n this._ngZone = _ngZone;\n /** Registered drop container instances. */\n this._dropInstances = new Set();\n /** Registered drag item instances. */\n this._dragInstances = new Set();\n /** Drag item instances that are currently being dragged. */\n this._activeDragInstances = [];\n /** Keeps track of the event listeners that we've bound to the `document`. */\n this._globalListeners = new Map();\n /**\n * Predicate function to check if an item is being dragged. Moved out into a property,\n * because it'll be called a lot and we don't want to create a new function every time.\n */\n this._draggingPredicate = function (item) { return item.isDragging(); };\n /**\n * Emits the `touchmove` or `mousemove` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerMove = new rxjs.Subject();\n /**\n * Emits the `touchend` or `mouseup` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerUp = new rxjs.Subject();\n /** Emits when the viewport has been scrolled while the user is dragging an item. */\n this.scroll = new rxjs.Subject();\n /**\n * Event listener that will prevent the default browser action while the user is dragging.\n * @param event Event whose default action should be prevented.\n */\n this._preventDefaultWhileDragging = function (event) {\n if (_this._activeDragInstances.length > 0) {\n event.preventDefault();\n }\n };\n /** Event listener for `touchmove` that is bound even if no dragging is happening. */\n this._persistentTouchmoveListener = function (event) {\n if (_this._activeDragInstances.length > 0) {\n // Note that we only want to prevent the default action after dragging has actually started.\n // Usually this is the same time at which the item is added to the `_activeDragInstances`,\n // but it could be pushed back if the user has set up a drag delay or threshold.\n if (_this._activeDragInstances.some(_this._draggingPredicate)) {\n event.preventDefault();\n }\n _this.pointerMove.next(event);\n }\n };\n this._document = _document;\n }\n /** Adds a drop container to the registry. */\n DragDropRegistry.prototype.registerDropContainer = function (drop) {\n if (!this._dropInstances.has(drop)) {\n this._dropInstances.add(drop);\n }\n };\n /** Adds a drag item instance to the registry. */\n DragDropRegistry.prototype.registerDragItem = function (drag) {\n var _this = this;\n this._dragInstances.add(drag);\n // The `touchmove` event gets bound once, ahead of time, because WebKit\n // won't preventDefault on a dynamically-added `touchmove` listener.\n // See https://bugs.webkit.org/show_bug.cgi?id=184250.\n if (this._dragInstances.size === 1) {\n this._ngZone.runOutsideAngular(function () {\n // The event handler has to be explicitly active,\n // because newer browsers make it passive by default.\n _this._document.addEventListener('touchmove', _this._persistentTouchmoveListener, activeCapturingEventOptions);\n });\n }\n };\n /** Removes a drop container from the registry. */\n DragDropRegistry.prototype.removeDropContainer = function (drop) {\n this._dropInstances.delete(drop);\n };\n /** Removes a drag item instance from the registry. */\n DragDropRegistry.prototype.removeDragItem = function (drag) {\n this._dragInstances.delete(drag);\n this.stopDragging(drag);\n if (this._dragInstances.size === 0) {\n this._document.removeEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);\n }\n };\n /**\n * Starts the dragging sequence for a drag instance.\n * @param drag Drag instance which is being dragged.\n * @param event Event that initiated the dragging.\n */\n DragDropRegistry.prototype.startDragging = function (drag, event) {\n var _this = this;\n // Do not process the same drag twice to avoid memory leaks and redundant listeners\n if (this._activeDragInstances.indexOf(drag) > -1) {\n return;\n }\n this._activeDragInstances.push(drag);\n if (this._activeDragInstances.length === 1) {\n var isTouchEvent = event.type.startsWith('touch');\n // We explicitly bind __active__ listeners here, because newer browsers will default to\n // passive ones for `mousemove` and `touchmove`. The events need to be active, because we\n // use `preventDefault` to prevent the page from scrolling while the user is dragging.\n this._globalListeners\n .set(isTouchEvent ? 'touchend' : 'mouseup', {\n handler: function (e) { return _this.pointerUp.next(e); },\n options: true\n })\n .set('scroll', {\n handler: function (e) { return _this.scroll.next(e); },\n // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't\n // the document. See https://github.com/angular/components/issues/17144.\n options: true\n })\n // Preventing the default action on `mousemove` isn't enough to disable text selection\n // on Safari so we need to prevent the selection event as well. Alternatively this can\n // be done by setting `user-select: none` on the `body`, however it has causes a style\n // recalculation which can be expensive on pages with a lot of elements.\n .set('selectstart', {\n handler: this._preventDefaultWhileDragging,\n options: activeCapturingEventOptions\n });\n // We don't have to bind a move event for touch drag sequences, because\n // we already have a persistent global one bound from `registerDragItem`.\n if (!isTouchEvent) {\n this._globalListeners.set('mousemove', {\n handler: function (e) { return _this.pointerMove.next(e); },\n options: activeCapturingEventOptions\n });\n }\n this._ngZone.runOutsideAngular(function () {\n _this._globalListeners.forEach(function (config, name) {\n _this._document.addEventListener(name, config.handler, config.options);\n });\n });\n }\n };\n /** Stops dragging a drag item instance. */\n DragDropRegistry.prototype.stopDragging = function (drag) {\n var index = this._activeDragInstances.indexOf(drag);\n if (index > -1) {\n this._activeDragInstances.splice(index, 1);\n if (this._activeDragInstances.length === 0) {\n this._clearGlobalListeners();\n }\n }\n };\n /** Gets whether a drag item instance is currently being dragged. */\n DragDropRegistry.prototype.isDragging = function (drag) {\n return this._activeDragInstances.indexOf(drag) > -1;\n };\n DragDropRegistry.prototype.ngOnDestroy = function () {\n var _this = this;\n this._dragInstances.forEach(function (instance) { return _this.removeDragItem(instance); });\n this._dropInstances.forEach(function (instance) { return _this.removeDropContainer(instance); });\n this._clearGlobalListeners();\n this.pointerMove.complete();\n this.pointerUp.complete();\n };\n /** Clears out the global event listeners from the `document`. */\n DragDropRegistry.prototype._clearGlobalListeners = function () {\n var _this = this;\n this._globalListeners.forEach(function (config, name) {\n _this._document.removeEventListener(name, config.handler, config.options);\n });\n this._globalListeners.clear();\n };\n return DragDropRegistry;\n }());\n DragDropRegistry.ɵprov = i0.ɵɵdefineInjectable({ factory: function DragDropRegistry_Factory() { return new DragDropRegistry(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.DOCUMENT)); }, token: DragDropRegistry, providedIn: \"root\" });\n DragDropRegistry.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n DragDropRegistry.ctorParameters = function () { return [\n { type: i0.NgZone },\n { type: undefined, decorators: [{ type: i0.Inject, args: [i1.DOCUMENT,] }] }\n ]; };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /** Default configuration to be used when creating a `DragRef`. */\n var DEFAULT_CONFIG = {\n dragStartThreshold: 5,\n pointerDirectionChangeThreshold: 5\n };\n /**\n * Service that allows for drag-and-drop functionality to be attached to DOM elements.\n */\n var DragDrop = /** @class */ (function () {\n function DragDrop(_document, _ngZone, _viewportRuler, _dragDropRegistry) {\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n }\n /**\n * Turns an element into a draggable item.\n * @param element Element to which to attach the dragging functionality.\n * @param config Object used to configure the dragging behavior.\n */\n DragDrop.prototype.createDrag = function (element, config) {\n if (config === void 0) { config = DEFAULT_CONFIG; }\n return new DragRef(element, config, this._document, this._ngZone, this._viewportRuler, this._dragDropRegistry);\n };\n /**\n * Turns an element into a drop list.\n * @param element Element to which to attach the drop list functionality.\n */\n DragDrop.prototype.createDropList = function (element) {\n return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);\n };\n return DragDrop;\n }());\n DragDrop.ɵprov = i0.ɵɵdefineInjectable({ factory: function DragDrop_Factory() { return new DragDrop(i0.ɵɵinject(i1.DOCUMENT), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i2.ViewportRuler), i0.ɵɵinject(DragDropRegistry)); }, token: DragDrop, providedIn: \"root\" });\n DragDrop.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n DragDrop.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: i0.Inject, args: [i1.DOCUMENT,] }] },\n { type: i0.NgZone },\n { type: i2.ViewportRuler },\n { type: DragDropRegistry }\n ]; };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Injection token that can be used for a `CdkDrag` to provide itself as a parent to the\n * drag-specific child directive (`CdkDragHandle`, `CdkDragPreview` etc.). Used primarily\n * to avoid circular imports.\n * @docs-private\n */\n var CDK_DRAG_PARENT = new i0.InjectionToken('CDK_DRAG_PARENT');\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Injection token that can be used to reference instances of `CdkDropListGroup`. It serves as\n * alternative token to the actual `CdkDropListGroup` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\n var CDK_DROP_LIST_GROUP = new i0.InjectionToken('CdkDropListGroup');\n /**\n * Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList`\n * elements that are placed inside a `cdkDropListGroup` will be connected to each other\n * automatically. Can be used as an alternative to the `cdkDropListConnectedTo` input\n * from `cdkDropList`.\n */\n var CdkDropListGroup = /** @class */ (function () {\n function CdkDropListGroup() {\n /** Drop lists registered inside the group. */\n this._items = new Set();\n this._disabled = false;\n }\n Object.defineProperty(CdkDropListGroup.prototype, \"disabled\", {\n /** Whether starting a dragging sequence from inside this group is disabled. */\n get: function () { return this._disabled; },\n set: function (value) {\n this._disabled = coercion.coerceBooleanProperty(value);\n },\n enumerable: false,\n configurable: true\n });\n CdkDropListGroup.prototype.ngOnDestroy = function () {\n this._items.clear();\n };\n return CdkDropListGroup;\n }());\n CdkDropListGroup.decorators = [\n { type: i0.Directive, args: [{\n selector: '[cdkDropListGroup]',\n exportAs: 'cdkDropListGroup',\n providers: [{ provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup }],\n },] }\n ];\n CdkDropListGroup.propDecorators = {\n disabled: [{ type: i0.Input, args: ['cdkDropListGroupDisabled',] }]\n };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Injection token that can be used to configure the\n * behavior of the drag&drop-related components.\n */\n var CDK_DRAG_CONFIG = new i0.InjectionToken('CDK_DRAG_CONFIG');\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Asserts that a particular node is an element.\n * @param node Node to be checked.\n * @param name Name to attach to the error message.\n */\n function assertElementNode(node, name) {\n if (node.nodeType !== 1) {\n throw Error(name + \" must be attached to an element node. \" +\n (\"Currently attached to \\\"\" + node.nodeName + \"\\\".\"));\n }\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /** Counter used to generate unique ids for drop zones. */\n var _uniqueIdCounter = 0;\n /**\n * Injection token that can be used to reference instances of `CdkDropList`. It serves as\n * alternative token to the actual `CdkDropList` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\n var CDK_DROP_LIST = new i0.InjectionToken('CdkDropList');\n var ɵ0 = undefined;\n /** Container that wraps a set of draggable items. */\n var CdkDropList = /** @class */ (function () {\n function CdkDropList(\n /** Element that the drop list is attached to. */\n element, dragDrop, _changeDetectorRef, _scrollDispatcher, _dir, _group, config) {\n var _this = this;\n this.element = element;\n this._changeDetectorRef = _changeDetectorRef;\n this._scrollDispatcher = _scrollDispatcher;\n this._dir = _dir;\n this._group = _group;\n /** Emits when the list has been destroyed. */\n this._destroyed = new rxjs.Subject();\n /**\n * Other draggable containers that this container is connected to and into which the\n * container's items can be transferred. Can either be references to other drop containers,\n * or their unique IDs.\n */\n this.connectedTo = [];\n /**\n * Unique ID for the drop zone. Can be used as a reference\n * in the `connectedTo` of another `CdkDropList`.\n */\n this.id = \"cdk-drop-list-\" + _uniqueIdCounter++;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = function () { return true; };\n /** Functions that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = function () { return true; };\n /** Emits when the user drops an item inside the container. */\n this.dropped = new i0.EventEmitter();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new i0.EventEmitter();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new i0.EventEmitter();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new i0.EventEmitter();\n /**\n * Keeps track of the items that are registered with this container. Historically we used to\n * do this with a `ContentChildren` query, however queries don't handle transplanted views very\n * well which means that we can't handle cases like dragging the headers of a `mat-table`\n * correctly. What we do instead is to have the items register themselves with the container\n * and then we sort them based on their position in the DOM.\n */\n this._unsortedItems = new Set();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDropList');\n }\n this._dropListRef = dragDrop.createDropList(element);\n this._dropListRef.data = this;\n if (config) {\n this._assignDefaults(config);\n }\n this._dropListRef.enterPredicate = function (drag, drop) {\n return _this.enterPredicate(drag.data, drop.data);\n };\n this._dropListRef.sortPredicate =\n function (index, drag, drop) {\n return _this.sortPredicate(index, drag.data, drop.data);\n };\n this._setupInputSyncSubscription(this._dropListRef);\n this._handleEvents(this._dropListRef);\n CdkDropList._dropLists.push(this);\n if (_group) {\n _group._items.add(this);\n }\n }\n Object.defineProperty(CdkDropList.prototype, \"disabled\", {\n /** Whether starting a dragging sequence from this container is disabled. */\n get: function () {\n return this._disabled || (!!this._group && this._group.disabled);\n },\n set: function (value) {\n // Usually we sync the directive and ref state right before dragging starts, in order to have\n // a single point of failure and to avoid having to use setters for everything. `disabled` is\n // a special case, because it can prevent the `beforeStarted` event from firing, which can lock\n // the user in a disabled state, so we also need to sync it as it's being set.\n this._dropListRef.disabled = this._disabled = coercion.coerceBooleanProperty(value);\n },\n enumerable: false,\n configurable: true\n });\n /** Registers an items with the drop list. */\n CdkDropList.prototype.addItem = function (item) {\n this._unsortedItems.add(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n };\n /** Removes an item from the drop list. */\n CdkDropList.prototype.removeItem = function (item) {\n this._unsortedItems.delete(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n };\n /** Gets the registered items in the list, sorted by their position in the DOM. */\n CdkDropList.prototype.getSortedItems = function () {\n return Array.from(this._unsortedItems).sort(function (a, b) {\n var documentPosition = a._dragRef.getVisibleElement().compareDocumentPosition(b._dragRef.getVisibleElement());\n // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n // tslint:disable-next-line:no-bitwise\n return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n });\n };\n CdkDropList.prototype.ngOnDestroy = function () {\n var index = CdkDropList._dropLists.indexOf(this);\n if (index > -1) {\n CdkDropList._dropLists.splice(index, 1);\n }\n if (this._group) {\n this._group._items.delete(this);\n }\n this._unsortedItems.clear();\n this._dropListRef.dispose();\n this._destroyed.next();\n this._destroyed.complete();\n };\n /** Syncs the inputs of the CdkDropList with the options of the underlying DropListRef. */\n CdkDropList.prototype._setupInputSyncSubscription = function (ref) {\n var _this = this;\n if (this._dir) {\n this._dir.change\n .pipe(operators.startWith(this._dir.value), operators.takeUntil(this._destroyed))\n .subscribe(function (value) { return ref.withDirection(value); });\n }\n ref.beforeStarted.subscribe(function () {\n var siblings = coercion.coerceArray(_this.connectedTo).map(function (drop) {\n if (typeof drop === 'string') {\n var correspondingDropList = CdkDropList._dropLists.find(function (list) { return list.id === drop; });\n if (!correspondingDropList && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n console.warn(\"CdkDropList could not find connected drop list with id \\\"\" + drop + \"\\\"\");\n }\n return correspondingDropList;\n }\n return drop;\n });\n if (_this._group) {\n _this._group._items.forEach(function (drop) {\n if (siblings.indexOf(drop) === -1) {\n siblings.push(drop);\n }\n });\n }\n // Note that we resolve the scrollable parents here so that we delay the resolution\n // as long as possible, ensuring that the element is in its final place in the DOM.\n if (!_this._scrollableParentsResolved) {\n var scrollableParents = _this._scrollDispatcher\n .getAncestorScrollContainers(_this.element)\n .map(function (scrollable) { return scrollable.getElementRef().nativeElement; });\n _this._dropListRef.withScrollableParents(scrollableParents);\n // Only do this once since it involves traversing the DOM and the parents\n // shouldn't be able to change without the drop list being destroyed.\n _this._scrollableParentsResolved = true;\n }\n ref.disabled = _this.disabled;\n ref.lockAxis = _this.lockAxis;\n ref.sortingDisabled = coercion.coerceBooleanProperty(_this.sortingDisabled);\n ref.autoScrollDisabled = coercion.coerceBooleanProperty(_this.autoScrollDisabled);\n ref.autoScrollStep = coercion.coerceNumberProperty(_this.autoScrollStep, 2);\n ref\n .connectedTo(siblings.filter(function (drop) { return drop && drop !== _this; }).map(function (list) { return list._dropListRef; }))\n .withOrientation(_this.orientation);\n });\n };\n /** Handles events from the underlying DropListRef. */\n CdkDropList.prototype._handleEvents = function (ref) {\n var _this = this;\n ref.beforeStarted.subscribe(function () {\n _this._syncItemsWithRef();\n _this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(function (event) {\n _this.entered.emit({\n container: _this,\n item: event.item.data,\n currentIndex: event.currentIndex\n });\n });\n ref.exited.subscribe(function (event) {\n _this.exited.emit({\n container: _this,\n item: event.item.data\n });\n _this._changeDetectorRef.markForCheck();\n });\n ref.sorted.subscribe(function (event) {\n _this.sorted.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n container: _this,\n item: event.item.data\n });\n });\n ref.dropped.subscribe(function (event) {\n _this.dropped.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n previousContainer: event.previousContainer.data,\n container: event.container.data,\n item: event.item.data,\n isPointerOverContainer: event.isPointerOverContainer,\n distance: event.distance\n });\n // Mark for check since all of these events run outside of change\n // detection and we're not guaranteed for something else to have triggered it.\n _this._changeDetectorRef.markForCheck();\n });\n };\n /** Assigns the default input values based on a provided config object. */\n CdkDropList.prototype._assignDefaults = function (config) {\n var lockAxis = config.lockAxis, draggingDisabled = config.draggingDisabled, sortingDisabled = config.sortingDisabled, listAutoScrollDisabled = config.listAutoScrollDisabled, listOrientation = config.listOrientation;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.sortingDisabled = sortingDisabled == null ? false : sortingDisabled;\n this.autoScrollDisabled = listAutoScrollDisabled == null ? false : listAutoScrollDisabled;\n this.orientation = listOrientation || 'vertical';\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n };\n /** Syncs up the registered drag items with underlying drop list ref. */\n CdkDropList.prototype._syncItemsWithRef = function () {\n this._dropListRef.withItems(this.getSortedItems().map(function (item) { return item._dragRef; }));\n };\n return CdkDropList;\n }());\n /** Keeps track of the drop lists that are currently on the page. */\n CdkDropList._dropLists = [];\n CdkDropList.decorators = [\n { type: i0.Directive, args: [{\n selector: '[cdkDropList], cdk-drop-list',\n exportAs: 'cdkDropList',\n providers: [\n // Prevent child drop lists from picking up the same group as their parent.\n { provide: CDK_DROP_LIST_GROUP, useValue: ɵ0 },\n { provide: CDK_DROP_LIST, useExisting: CdkDropList },\n ],\n host: {\n 'class': 'cdk-drop-list',\n '[attr.id]': 'id',\n '[class.cdk-drop-list-disabled]': 'disabled',\n '[class.cdk-drop-list-dragging]': '_dropListRef.isDragging()',\n '[class.cdk-drop-list-receiving]': '_dropListRef.isReceiving()',\n }\n },] }\n ];\n CdkDropList.ctorParameters = function () { return [\n { type: i0.ElementRef },\n { type: DragDrop },\n { type: i0.ChangeDetectorRef },\n { type: i2.ScrollDispatcher },\n { type: bidi.Directionality, decorators: [{ type: i0.Optional }] },\n { type: CdkDropListGroup, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [CDK_DROP_LIST_GROUP,] }, { type: i0.SkipSelf }] },\n { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [CDK_DRAG_CONFIG,] }] }\n ]; };\n CdkDropList.propDecorators = {\n connectedTo: [{ type: i0.Input, args: ['cdkDropListConnectedTo',] }],\n data: [{ type: i0.Input, args: ['cdkDropListData',] }],\n orientation: [{ type: i0.Input, args: ['cdkDropListOrientation',] }],\n id: [{ type: i0.Input }],\n lockAxis: [{ type: i0.Input, args: ['cdkDropListLockAxis',] }],\n disabled: [{ type: i0.Input, args: ['cdkDropListDisabled',] }],\n sortingDisabled: [{ type: i0.Input, args: ['cdkDropListSortingDisabled',] }],\n enterPredicate: [{ type: i0.Input, args: ['cdkDropListEnterPredicate',] }],\n sortPredicate: [{ type: i0.Input, args: ['cdkDropListSortPredicate',] }],\n autoScrollDisabled: [{ type: i0.Input, args: ['cdkDropListAutoScrollDisabled',] }],\n autoScrollStep: [{ type: i0.Input, args: ['cdkDropListAutoScrollStep',] }],\n dropped: [{ type: i0.Output, args: ['cdkDropListDropped',] }],\n entered: [{ type: i0.Output, args: ['cdkDropListEntered',] }],\n exited: [{ type: i0.Output, args: ['cdkDropListExited',] }],\n sorted: [{ type: i0.Output, args: ['cdkDropListSorted',] }]\n };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Injection token that can be used to reference instances of `CdkDragHandle`. It serves as\n * alternative token to the actual `CdkDragHandle` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\n var CDK_DRAG_HANDLE = new i0.InjectionToken('CdkDragHandle');\n /** Handle that can be used to drag a CdkDrag instance. */\n var CdkDragHandle = /** @class */ (function () {\n function CdkDragHandle(element, parentDrag) {\n this.element = element;\n /** Emits when the state of the handle has changed. */\n this._stateChanges = new rxjs.Subject();\n this._disabled = false;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDragHandle');\n }\n this._parentDrag = parentDrag;\n }\n Object.defineProperty(CdkDragHandle.prototype, \"disabled\", {\n /** Whether starting to drag through this handle is disabled. */\n get: function () { return this._disabled; },\n set: function (value) {\n this._disabled = coercion.coerceBooleanProperty(value);\n this._stateChanges.next(this);\n },\n enumerable: false,\n configurable: true\n });\n CdkDragHandle.prototype.ngOnDestroy = function () {\n this._stateChanges.complete();\n };\n return CdkDragHandle;\n }());\n CdkDragHandle.decorators = [\n { type: i0.Directive, args: [{\n selector: '[cdkDragHandle]',\n host: {\n 'class': 'cdk-drag-handle'\n },\n providers: [{ provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle }],\n },] }\n ];\n CdkDragHandle.ctorParameters = function () { return [\n { type: i0.ElementRef },\n { type: undefined, decorators: [{ type: i0.Inject, args: [CDK_DRAG_PARENT,] }, { type: i0.Optional }, { type: i0.SkipSelf }] }\n ]; };\n CdkDragHandle.propDecorators = {\n disabled: [{ type: i0.Input, args: ['cdkDragHandleDisabled',] }]\n };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as\n * alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\n var CDK_DRAG_PLACEHOLDER = new i0.InjectionToken('CdkDragPlaceholder');\n /**\n * Element that will be used as a template for the placeholder of a CdkDrag when\n * it is being dragged. The placeholder is displayed in place of the element being dragged.\n */\n var CdkDragPlaceholder = /** @class */ (function () {\n function CdkDragPlaceholder(templateRef) {\n this.templateRef = templateRef;\n }\n return CdkDragPlaceholder;\n }());\n CdkDragPlaceholder.decorators = [\n { type: i0.Directive, args: [{\n selector: 'ng-template[cdkDragPlaceholder]',\n providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }],\n },] }\n ];\n CdkDragPlaceholder.ctorParameters = function () { return [\n { type: i0.TemplateRef }\n ]; };\n CdkDragPlaceholder.propDecorators = {\n data: [{ type: i0.Input }]\n };\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Injection token that can be used to reference instances of `CdkDragPreview`. It serves as\n * alternative token to the actual `CdkDragPreview` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\n var CDK_DRAG_PREVIEW = new i0.InjectionToken('CdkDragPreview');\n /**\n * Element that will be used as a template for the preview\n * of a CdkDrag when it is being dragged.\n */\n var CdkDragPreview = /** @class */ (function () {\n function CdkDragPreview(templateRef) {\n this.templateRef = templateRef;\n this._matchSize = false;\n }\n Object.defineProperty(CdkDragPreview.prototype, \"matchSize\", {\n /** Whether the preview should preserve the same size as the item that is being dragged. */\n get: function () { return this._matchSize; },\n set: function (value) { this._matchSize = coercion.coerceBooleanProperty(value); },\n enumerable: false,\n configurable: true\n });\n return CdkDragPreview;\n }());\n CdkDragPreview.decorators = [\n { type: i0.Directive, args: [{\n selector: 'ng-template[cdkDragPreview]',\n providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }],\n },] }\n ];\n CdkDragPreview.ctorParameters = function () { return [\n { type: i0.TemplateRef }\n ]; };\n CdkDragPreview.propDecorators = {\n data: [{ type: i0.Input }],\n matchSize: [{ type: i0.Input }]\n };\n\n var DRAG_HOST_CLASS = 'cdk-drag';\n /** Element that can be moved inside a CdkDropList container. */\n var CdkDrag = /** @class */ (function () {\n function CdkDrag(\n /** Element that the draggable is attached to. */\n element, \n /** Droppable container that the draggable is a part of. */\n dropContainer, \n /**\n * @deprecated `_document` parameter no longer being used and will be removed.\n * @breaking-change 12.0.0\n */\n _document, _ngZone, _viewContainerRef, config, _dir, dragDrop, _changeDetectorRef, _selfHandle, _parentDrag) {\n var _this = this;\n this.element = element;\n this.dropContainer = dropContainer;\n this._ngZone = _ngZone;\n this._viewContainerRef = _viewContainerRef;\n this._dir = _dir;\n this._changeDetectorRef = _changeDetectorRef;\n this._selfHandle = _selfHandle;\n this._parentDrag = _parentDrag;\n this._destroyed = new rxjs.Subject();\n /** Emits when the user starts dragging the item. */\n this.started = new i0.EventEmitter();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new i0.EventEmitter();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new i0.EventEmitter();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new i0.EventEmitter();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new i0.EventEmitter();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new i0.EventEmitter();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = new rxjs.Observable(function (observer) {\n var subscription = _this._dragRef.moved.pipe(operators.map(function (movedEvent) { return ({\n source: _this,\n pointerPosition: movedEvent.pointerPosition,\n event: movedEvent.event,\n delta: movedEvent.delta,\n distance: movedEvent.distance\n }); })).subscribe(observer);\n return function () {\n subscription.unsubscribe();\n };\n });\n this._dragRef = dragDrop.createDrag(element, {\n dragStartThreshold: config && config.dragStartThreshold != null ?\n config.dragStartThreshold : 5,\n pointerDirectionChangeThreshold: config && config.pointerDirectionChangeThreshold != null ?\n config.pointerDirectionChangeThreshold : 5,\n zIndex: config === null || config === void 0 ? void 0 : config.zIndex,\n });\n this._dragRef.data = this;\n // We have to keep track of the drag instances in order to be able to match an element to\n // a drag instance. We can't go through the global registry of `DragRef`, because the root\n // element could be different.\n CdkDrag._dragInstances.push(this);\n if (config) {\n this._assignDefaults(config);\n }\n // Note that usually the container is assigned when the drop list is picks up the item, but in\n // some cases (mainly transplanted views with OnPush, see #18341) we may end up in a situation\n // where there are no items on the first change detection pass, but the items get picked up as\n // soon as the user triggers another pass by dragging. This is a problem, because the item would\n // have to switch from standalone mode to drag mode in the middle of the dragging sequence which\n // is too late since the two modes save different kinds of information. We work around it by\n // assigning the drop container both from here and the list.\n if (dropContainer) {\n this._dragRef._withDropContainer(dropContainer._dropListRef);\n dropContainer.addItem(this);\n }\n this._syncInputs(this._dragRef);\n this._handleEvents(this._dragRef);\n }\n Object.defineProperty(CdkDrag.prototype, \"disabled\", {\n /** Whether starting to drag this element is disabled. */\n get: function () {\n return this._disabled || (this.dropContainer && this.dropContainer.disabled);\n },\n set: function (value) {\n this._disabled = coercion.coerceBooleanProperty(value);\n this._dragRef.disabled = this._disabled;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n CdkDrag.prototype.getPlaceholderElement = function () {\n return this._dragRef.getPlaceholderElement();\n };\n /** Returns the root draggable element. */\n CdkDrag.prototype.getRootElement = function () {\n return this._dragRef.getRootElement();\n };\n /** Resets a standalone drag item to its initial position. */\n CdkDrag.prototype.reset = function () {\n this._dragRef.reset();\n };\n /**\n * Gets the pixel coordinates of the draggable outside of a drop container.\n */\n CdkDrag.prototype.getFreeDragPosition = function () {\n return this._dragRef.getFreeDragPosition();\n };\n CdkDrag.prototype.ngAfterViewInit = function () {\n var _this = this;\n // We need to wait for the zone to stabilize, in order for the reference\n // element to be in the proper place in the DOM. This is mostly relevant\n // for draggable elements inside portals since they get stamped out in\n // their original DOM position and then they get transferred to the portal.\n this._ngZone.onStable\n .pipe(operators.take(1), operators.takeUntil(this._destroyed))\n .subscribe(function () {\n _this._updateRootElement();\n // Listen for any newly-added handles.\n _this._handles.changes.pipe(operators.startWith(_this._handles), \n // Sync the new handles with the DragRef.\n operators.tap(function (handles) {\n var childHandleElements = handles\n .filter(function (handle) { return handle._parentDrag === _this; })\n .map(function (handle) { return handle.element; });\n // Usually handles are only allowed to be a descendant of the drag element, but if\n // the consumer defined a different drag root, we should allow the drag element\n // itself to be a handle too.\n if (_this._selfHandle && _this.rootElementSelector) {\n childHandleElements.push(_this.element);\n }\n _this._dragRef.withHandles(childHandleElements);\n }), \n // Listen if the state of any of the handles changes.\n operators.switchMap(function (handles) {\n return rxjs.merge.apply(void 0, __spread(handles.map(function (item) {\n return item._stateChanges.pipe(operators.startWith(item));\n })));\n }), operators.takeUntil(_this._destroyed)).subscribe(function (handleInstance) {\n // Enabled/disable the handle that changed in the DragRef.\n var dragRef = _this._dragRef;\n var handle = handleInstance.element.nativeElement;\n handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);\n });\n if (_this.freeDragPosition) {\n _this._dragRef.setFreeDragPosition(_this.freeDragPosition);\n }\n });\n };\n CdkDrag.prototype.ngOnChanges = function (changes) {\n var rootSelectorChange = changes['rootElementSelector'];\n var positionChange = changes['freeDragPosition'];\n // We don't have to react to the first change since it's being\n // handled in `ngAfterViewInit` where it needs to be deferred.\n if (rootSelectorChange && !rootSelectorChange.firstChange) {\n this._updateRootElement();\n }\n // Skip the first change since it's being handled in `ngAfterViewInit`.\n if (positionChange && !positionChange.firstChange && this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n };\n CdkDrag.prototype.ngOnDestroy = function () {\n if (this.dropContainer) {\n this.dropContainer.removeItem(this);\n }\n var index = CdkDrag._dragInstances.indexOf(this);\n if (index > -1) {\n CdkDrag._dragInstances.splice(index, 1);\n }\n this._destroyed.next();\n this._destroyed.complete();\n this._dragRef.dispose();\n };\n /** Syncs the root element with the `DragRef`. */\n CdkDrag.prototype._updateRootElement = function () {\n var element = this.element.nativeElement;\n var rootElement = this.rootElementSelector ?\n getClosestMatchingAncestor(element, this.rootElementSelector) : element;\n if (rootElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n assertElementNode(rootElement, 'cdkDrag');\n }\n this._dragRef.withRootElement(rootElement || element);\n };\n /** Gets the boundary element, based on the `boundaryElement` value. */\n CdkDrag.prototype._getBoundaryElement = function () {\n var boundary = this.boundaryElement;\n if (!boundary) {\n return null;\n }\n if (typeof boundary === 'string') {\n return getClosestMatchingAncestor(this.element.nativeElement, boundary);\n }\n var element = coercion.coerceElement(boundary);\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n !element.contains(this.element.nativeElement)) {\n throw Error('Draggable element is not inside of the node passed into cdkDragBoundary.');\n }\n return element;\n };\n /** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */\n CdkDrag.prototype._syncInputs = function (ref) {\n var _this = this;\n ref.beforeStarted.subscribe(function () {\n if (!ref.isDragging()) {\n var dir = _this._dir;\n var dragStartDelay = _this.dragStartDelay;\n var placeholder = _this._placeholderTemplate ? {\n template: _this._placeholderTemplate.templateRef,\n context: _this._placeholderTemplate.data,\n viewContainer: _this._viewContainerRef\n } : null;\n var preview = _this._previewTemplate ? {\n template: _this._previewTemplate.templateRef,\n context: _this._previewTemplate.data,\n matchSize: _this._previewTemplate.matchSize,\n viewContainer: _this._viewContainerRef\n } : null;\n ref.disabled = _this.disabled;\n ref.lockAxis = _this.lockAxis;\n ref.dragStartDelay = (typeof dragStartDelay === 'object' && dragStartDelay) ?\n dragStartDelay : coercion.coerceNumberProperty(dragStartDelay);\n ref.constrainPosition = _this.constrainPosition;\n ref.previewClass = _this.previewClass;\n ref\n .withBoundaryElement(_this._getBoundaryElement())\n .withPlaceholderTemplate(placeholder)\n .withPreviewTemplate(preview);\n if (dir) {\n ref.withDirection(dir.value);\n }\n }\n });\n // This only needs to be resolved once.\n ref.beforeStarted.pipe(operators.take(1)).subscribe(function () {\n var _a, _b;\n // If we managed to resolve a parent through DI, use it.\n if (_this._parentDrag) {\n ref.withParent(_this._parentDrag._dragRef);\n return;\n }\n // Otherwise fall back to resolving the parent by looking up the DOM. This can happen if\n // the item was projected into another item by something like `ngTemplateOutlet`.\n var parent = _this.element.nativeElement.parentElement;\n while (parent) {\n // `classList` needs to be null checked, because IE doesn't have it on some elements.\n if ((_a = parent.classList) === null || _a === void 0 ? void 0 : _a.contains(DRAG_HOST_CLASS)) {\n ref.withParent(((_b = CdkDrag._dragInstances.find(function (drag) {\n return drag.element.nativeElement === parent;\n })) === null || _b === void 0 ? void 0 : _b._dragRef) || null);\n break;\n }\n parent = parent.parentElement;\n }\n });\n };\n /** Handles the events from the underlying `DragRef`. */\n CdkDrag.prototype._handleEvents = function (ref) {\n var _this = this;\n ref.started.subscribe(function () {\n _this.started.emit({ source: _this });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n _this._changeDetectorRef.markForCheck();\n });\n ref.released.subscribe(function () {\n _this.released.emit({ source: _this });\n });\n ref.ended.subscribe(function (event) {\n _this.ended.emit({ source: _this, distance: event.distance });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n _this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(function (event) {\n _this.entered.emit({\n container: event.container.data,\n item: _this,\n currentIndex: event.currentIndex\n });\n });\n ref.exited.subscribe(function (event) {\n _this.exited.emit({\n container: event.container.data,\n item: _this\n });\n });\n ref.dropped.subscribe(function (event) {\n _this.dropped.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n previousContainer: event.previousContainer.data,\n container: event.container.data,\n isPointerOverContainer: event.isPointerOverContainer,\n item: _this,\n distance: event.distance\n });\n });\n };\n /** Assigns the default input values based on a provided config object. */\n CdkDrag.prototype._assignDefaults = function (config) {\n var lockAxis = config.lockAxis, dragStartDelay = config.dragStartDelay, constrainPosition = config.constrainPosition, previewClass = config.previewClass, boundaryElement = config.boundaryElement, draggingDisabled = config.draggingDisabled, rootElementSelector = config.rootElementSelector;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.dragStartDelay = dragStartDelay || 0;\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n if (constrainPosition) {\n this.constrainPosition = constrainPosition;\n }\n if (previewClass) {\n this.previewClass = previewClass;\n }\n if (boundaryElement) {\n this.boundaryElement = boundaryElement;\n }\n if (rootElementSelector) {\n this.rootElementSelector = rootElementSelector;\n }\n };\n return CdkDrag;\n }());\n CdkDrag._dragInstances = [];\n CdkDrag.decorators = [\n { type: i0.Directive, args: [{\n selector: '[cdkDrag]',\n exportAs: 'cdkDrag',\n host: {\n 'class': DRAG_HOST_CLASS,\n '[class.cdk-drag-disabled]': 'disabled',\n '[class.cdk-drag-dragging]': '_dragRef.isDragging()',\n },\n providers: [{ provide: CDK_DRAG_PARENT, useExisting: CdkDrag }]\n },] }\n ];\n CdkDrag.ctorParameters = function () { return [\n { type: i0.ElementRef },\n { type: undefined, decorators: [{ type: i0.Inject, args: [CDK_DROP_LIST,] }, { type: i0.Optional }, { type: i0.SkipSelf }] },\n { type: undefined, decorators: [{ type: i0.Inject, args: [i1.DOCUMENT,] }] },\n { type: i0.NgZone },\n { type: i0.ViewContainerRef },\n { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [CDK_DRAG_CONFIG,] }] },\n { type: bidi.Directionality, decorators: [{ type: i0.Optional }] },\n { type: DragDrop },\n { type: i0.ChangeDetectorRef },\n { type: CdkDragHandle, decorators: [{ type: i0.Optional }, { type: i0.Self }, { type: i0.Inject, args: [CDK_DRAG_HANDLE,] }] },\n { type: CdkDrag, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }, { type: i0.Inject, args: [CDK_DRAG_PARENT,] }] }\n ]; };\n CdkDrag.propDecorators = {\n _handles: [{ type: i0.ContentChildren, args: [CDK_DRAG_HANDLE, { descendants: true },] }],\n _previewTemplate: [{ type: i0.ContentChild, args: [CDK_DRAG_PREVIEW,] }],\n _placeholderTemplate: [{ type: i0.ContentChild, args: [CDK_DRAG_PLACEHOLDER,] }],\n data: [{ type: i0.Input, args: ['cdkDragData',] }],\n lockAxis: [{ type: i0.Input, args: ['cdkDragLockAxis',] }],\n rootElementSelector: [{ type: i0.Input, args: ['cdkDragRootElement',] }],\n boundaryElement: [{ type: i0.Input, args: ['cdkDragBoundary',] }],\n dragStartDelay: [{ type: i0.Input, args: ['cdkDragStartDelay',] }],\n freeDragPosition: [{ type: i0.Input, args: ['cdkDragFreeDragPosition',] }],\n disabled: [{ type: i0.Input, args: ['cdkDragDisabled',] }],\n constrainPosition: [{ type: i0.Input, args: ['cdkDragConstrainPosition',] }],\n previewClass: [{ type: i0.Input, args: ['cdkDragPreviewClass',] }],\n started: [{ type: i0.Output, args: ['cdkDragStarted',] }],\n released: [{ type: i0.Output, args: ['cdkDragReleased',] }],\n ended: [{ type: i0.Output, args: ['cdkDragEnded',] }],\n entered: [{ type: i0.Output, args: ['cdkDragEntered',] }],\n exited: [{ type: i0.Output, args: ['cdkDragExited',] }],\n dropped: [{ type: i0.Output, args: ['cdkDragDropped',] }],\n moved: [{ type: i0.Output, args: ['cdkDragMoved',] }]\n };\n /** Gets the closest ancestor of an element that matches a selector. */\n function getClosestMatchingAncestor(element, selector) {\n var currentElement = element.parentElement;\n while (currentElement) {\n // IE doesn't support `matches` so we have to fall back to `msMatchesSelector`.\n if (currentElement.matches ? currentElement.matches(selector) :\n currentElement.msMatchesSelector(selector)) {\n return currentElement;\n }\n currentElement = currentElement.parentElement;\n }\n return null;\n }\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var DragDropModule = /** @class */ (function () {\n function DragDropModule() {\n }\n return DragDropModule;\n }());\n DragDropModule.decorators = [\n { type: i0.NgModule, args: [{\n declarations: [\n CdkDropList,\n CdkDropListGroup,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder,\n ],\n exports: [\n i2.CdkScrollableModule,\n CdkDropList,\n CdkDropListGroup,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder,\n ],\n providers: [\n DragDrop,\n ]\n },] }\n ];\n\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.CDK_DRAG_CONFIG = CDK_DRAG_CONFIG;\n exports.CDK_DRAG_HANDLE = CDK_DRAG_HANDLE;\n exports.CDK_DRAG_PARENT = CDK_DRAG_PARENT;\n exports.CDK_DRAG_PLACEHOLDER = CDK_DRAG_PLACEHOLDER;\n exports.CDK_DRAG_PREVIEW = CDK_DRAG_PREVIEW;\n exports.CDK_DROP_LIST = CDK_DROP_LIST;\n exports.CDK_DROP_LIST_GROUP = CDK_DROP_LIST_GROUP;\n exports.CdkDrag = CdkDrag;\n exports.CdkDragHandle = CdkDragHandle;\n exports.CdkDragPlaceholder = CdkDragPlaceholder;\n exports.CdkDragPreview = CdkDragPreview;\n exports.CdkDropList = CdkDropList;\n exports.CdkDropListGroup = CdkDropListGroup;\n exports.DragDrop = DragDrop;\n exports.DragDropModule = DragDropModule;\n exports.DragDropRegistry = DragDropRegistry;\n exports.DragRef = DragRef;\n exports.DropListRef = DropListRef;\n exports.copyArrayItem = copyArrayItem;\n exports.moveItemInArray = moveItemInArray;\n exports.transferArrayItem = transferArrayItem;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-drag-drop.umd.js.map\n"]}