{"version":3,"file":"angular-grid-layout-ngx13.mjs","sources":["../../../projects/angular-grid-layout/src/lib/utils/react-grid-layout.utils.ts","../../../projects/angular-grid-layout/src/lib/utils/passive-listeners.ts","../../../projects/angular-grid-layout/src/lib/utils/pointer.utils.ts","../../../projects/angular-grid-layout/src/lib/utils/grid.utils.ts","../../../projects/angular-grid-layout/src/lib/directives/drag-handle.ts","../../../projects/angular-grid-layout/src/lib/directives/resize-handle.ts","../../../projects/angular-grid-layout/src/lib/grid.definitions.ts","../../../projects/angular-grid-layout/src/lib/utils/operators.ts","../../../projects/angular-grid-layout/src/lib/coercion/boolean-property.ts","../../../projects/angular-grid-layout/src/lib/coercion/number-property.ts","../../../projects/angular-grid-layout/src/lib/grid.service.ts","../../../projects/angular-grid-layout/src/lib/grid-item/grid-item.component.ts","../../../projects/angular-grid-layout/src/lib/grid-item/grid-item.component.html","../../../projects/angular-grid-layout/src/lib/utils/client-rect.ts","../../../projects/angular-grid-layout/src/lib/utils/scroll.ts","../../../projects/angular-grid-layout/src/lib/grid.component.ts","../../../projects/angular-grid-layout/src/lib/grid.component.html","../../../projects/angular-grid-layout/src/lib/grid.module.ts","../../../projects/angular-grid-layout/src/public-api.ts","../../../projects/angular-grid-layout/src/angular-grid-layout-ngx13.ts"],"sourcesContent":["\n/**\n * IMPORTANT:\n * This utils are taken from the project: https://github.com/STRML/react-grid-layout.\n * The code should be as less modified as possible for easy maintenance.\n */\n\n// Disable lint since we don't want to modify this code\n// tslint:disable\nexport type LayoutItem = {\n    w: number;\n    h: number;\n    x: number;\n    y: number;\n    id: string;\n    minW?: number;\n    minH?: number;\n    maxW?: number;\n    maxH?: number;\n    moved?: boolean;\n    static?: boolean;\n    isDraggable?: boolean | null | undefined;\n    isResizable?: boolean | null | undefined;\n};\nexport type Layout = Array<LayoutItem>;\nexport type Position = {\n    left: number;\n    top: number;\n    width: number;\n    height: number;\n};\nexport type ReactDraggableCallbackData = {\n    node: HTMLElement;\n    x?: number;\n    y?: number;\n    deltaX: number;\n    deltaY: number;\n    lastX?: number;\n    lastY?: number;\n};\n\nexport type PartialPosition = { left: number; top: number };\nexport type DroppingPosition = { x: number; y: number; e: Event };\nexport type Size = { width: number; height: number };\nexport type GridDragEvent = {\n    e: Event;\n    node: HTMLElement;\n    newPosition: PartialPosition;\n};\nexport type GridResizeEvent = { e: Event; node: HTMLElement; size: Size };\nexport type DragOverEvent = MouseEvent & {\n    nativeEvent: {\n        layerX: number;\n        layerY: number;\n        target: {\n            className: String;\n        };\n    };\n};\n\n//type REl = ReactElement<any>;\n//export type ReactChildren = ReactChildrenArray<REl>;\n\n// All callbacks are of the signature (layout, oldItem, newItem, placeholder, e).\nexport type EventCallback = (\n    arg0: Layout,\n    oldItem: LayoutItem | null | undefined,\n    newItem: LayoutItem | null | undefined,\n    placeholder: LayoutItem | null | undefined,\n    arg4: Event,\n    arg5: HTMLElement | null | undefined,\n) => void;\nexport type CompactType = ('horizontal' | 'vertical') | null | undefined;\n\nconst DEBUG = false;\n\n/**\n * Return the bottom coordinate of the layout.\n *\n * @param  {Array} layout Layout array.\n * @return {Number}       Bottom coordinate.\n */\nexport function bottom(layout: Layout): number {\n    let max = 0,\n        bottomY;\n    for (let i = 0, len = layout.length; i < len; i++) {\n        bottomY = layout[i].y + layout[i].h;\n        if (bottomY > max) {\n            max = bottomY;\n        }\n    }\n    return max;\n}\n\nexport function cloneLayout(layout: Layout): Layout {\n    const newLayout = Array(layout.length);\n    for (let i = 0, len = layout.length; i < len; i++) {\n        newLayout[i] = cloneLayoutItem(layout[i]);\n    }\n    return newLayout;\n}\n\n// Fast path to cloning, since this is monomorphic\n/** NOTE: This code has been modified from the original source */\nexport function cloneLayoutItem(layoutItem: LayoutItem): LayoutItem {\n    const clonedLayoutItem: LayoutItem = {\n        w: layoutItem.w,\n        h: layoutItem.h,\n        x: layoutItem.x,\n        y: layoutItem.y,\n        id: layoutItem.id,\n        moved: !!layoutItem.moved,\n        static: !!layoutItem.static,\n    };\n\n    if (layoutItem.minW !== undefined) { clonedLayoutItem.minW = layoutItem.minW;}\n    if (layoutItem.maxW !== undefined) { clonedLayoutItem.maxW = layoutItem.maxW;}\n    if (layoutItem.minH !== undefined) { clonedLayoutItem.minH = layoutItem.minH;}\n    if (layoutItem.maxH !== undefined) { clonedLayoutItem.maxH = layoutItem.maxH;}\n    // These can be null\n    if (layoutItem.isDraggable !== undefined) { clonedLayoutItem.isDraggable = layoutItem.isDraggable;}\n    if (layoutItem.isResizable !== undefined) { clonedLayoutItem.isResizable = layoutItem.isResizable;}\n\n    return clonedLayoutItem;\n}\n\n/**\n * Given two layoutitems, check if they collide.\n */\nexport function collides(l1: LayoutItem, l2: LayoutItem): boolean {\n    if (l1.id === l2.id) {\n        return false;\n    } // same element\n    if (l1.x + l1.w <= l2.x) {\n        return false;\n    } // l1 is left of l2\n    if (l1.x >= l2.x + l2.w) {\n        return false;\n    } // l1 is right of l2\n    if (l1.y + l1.h <= l2.y) {\n        return false;\n    } // l1 is above l2\n    if (l1.y >= l2.y + l2.h) {\n        return false;\n    } // l1 is below l2\n    return true; // boxes overlap\n}\n\n/**\n * Given a layout, compact it. This involves going down each y coordinate and removing gaps\n * between items.\n *\n * @param  {Array} layout Layout.\n * @param  {Boolean} verticalCompact Whether or not to compact the layout\n *   vertically.\n * @return {Array}       Compacted Layout.\n */\nexport function compact(\n    layout: Layout,\n    compactType: CompactType,\n    cols: number,\n): Layout {\n    // Statics go in the compareWith array right away so items flow around them.\n    const compareWith = getStatics(layout);\n    // We go through the items by row and column.\n    const sorted = sortLayoutItems(layout, compactType);\n    // Holding for new items.\n    const out = Array(layout.length);\n\n    for (let i = 0, len = sorted.length; i < len; i++) {\n        let l = cloneLayoutItem(sorted[i]);\n\n        // Don't move static elements\n        if (!l.static) {\n            l = compactItem(compareWith, l, compactType, cols, sorted);\n\n            // Add to comparison array. We only collide with items before this one.\n            // Statics are already in this array.\n            compareWith.push(l);\n        }\n\n        // Add to output array to make sure they still come out in the right order.\n        out[layout.indexOf(sorted[i])] = l;\n\n        // Clear moved flag, if it exists.\n        l.moved = false;\n    }\n\n    return out;\n}\n\nconst heightWidth = {x: 'w', y: 'h'};\n\n/**\n * Before moving item down, it will check if the movement will cause collisions and move those items down before.\n */\nfunction resolveCompactionCollision(\n    layout: Layout,\n    item: LayoutItem,\n    moveToCoord: number,\n    axis: 'x' | 'y',\n) {\n    const sizeProp = heightWidth[axis];\n    item[axis] += 1;\n    const itemIndex = layout\n        .map(layoutItem => {\n            return layoutItem.id;\n        })\n        .indexOf(item.id);\n\n    // Go through each item we collide with.\n    for (let i = itemIndex + 1; i < layout.length; i++) {\n        const otherItem = layout[i];\n        // Ignore static items\n        if (otherItem.static) {\n            continue;\n        }\n\n        // Optimization: we can break early if we know we're past this el\n        // We can do this b/c it's a sorted layout\n        if (otherItem.y > item.y + item.h) {\n            break;\n        }\n\n        if (collides(item, otherItem)) {\n            resolveCompactionCollision(\n                layout,\n                otherItem,\n                moveToCoord + item[sizeProp],\n                axis,\n            );\n        }\n    }\n\n    item[axis] = moveToCoord;\n}\n\n/**\n * Compact an item in the layout.\n */\nexport function compactItem(\n    compareWith: Layout,\n    l: LayoutItem,\n    compactType: CompactType,\n    cols: number,\n    fullLayout: Layout,\n): LayoutItem {\n    const compactV = compactType === 'vertical';\n    const compactH = compactType === 'horizontal';\n    if (compactV) {\n        // Bottom 'y' possible is the bottom of the layout.\n        // This allows you to do nice stuff like specify {y: Infinity}\n        // This is here because the layout must be sorted in order to get the correct bottom `y`.\n        l.y = Math.min(bottom(compareWith), l.y);\n        // Move the element up as far as it can go without colliding.\n        while (l.y > 0 && !getFirstCollision(compareWith, l)) {\n            l.y--;\n        }\n    } else if (compactH) {\n        l.y = Math.min(bottom(compareWith), l.y);\n        // Move the element left as far as it can go without colliding.\n        while (l.x > 0 && !getFirstCollision(compareWith, l)) {\n            l.x--;\n        }\n    }\n\n    // Move it down, and keep moving it down if it's colliding.\n    let collides;\n    while ((collides = getFirstCollision(compareWith, l))) {\n        if (compactH) {\n            resolveCompactionCollision(\n                fullLayout,\n                l,\n                collides.x + collides.w,\n                'x',\n            );\n        } else {\n            resolveCompactionCollision(\n                fullLayout,\n                l,\n                collides.y + collides.h,\n                'y',\n            );\n        }\n        // Since we can't grow without bounds horizontally, if we've overflown, let's move it down and try again.\n        if (compactH && l.x + l.w > cols) {\n            l.x = cols - l.w;\n            l.y++;\n        }\n    }\n    return l;\n}\n\n/**\n * Given a layout, make sure all elements fit within its bounds.\n *\n * @param  {Array} layout Layout array.\n * @param  {Number} bounds Number of columns.\n */\nexport function correctBounds(layout: Layout, bounds: { cols: number }): Layout {\n    const collidesWith = getStatics(layout);\n    for (let i = 0, len = layout.length; i < len; i++) {\n        const l = layout[i];\n        // Overflows right\n        if (l.x + l.w > bounds.cols) {\n            l.x = bounds.cols - l.w;\n        }\n        // Overflows left\n        if (l.x < 0) {\n            l.x = 0;\n            l.w = bounds.cols;\n        }\n        if (!l.static) {\n            collidesWith.push(l);\n        } else {\n            // If this is static and collides with other statics, we must move it down.\n            // We have to do something nicer than just letting them overlap.\n            while (getFirstCollision(collidesWith, l)) {\n                l.y++;\n            }\n        }\n    }\n    return layout;\n}\n\n/**\n * Get a layout item by ID. Used so we can override later on if necessary.\n *\n * @param  {Array}  layout Layout array.\n * @param  {String} id     ID\n * @return {LayoutItem}    Item at ID.\n */\nexport function getLayoutItem(\n    layout: Layout,\n    id: string,\n): LayoutItem | null | undefined {\n    for (let i = 0, len = layout.length; i < len; i++) {\n        if (layout[i].id === id) {\n            return layout[i];\n        }\n    }\n    return null;\n}\n\n/**\n * Returns the first item this layout collides with.\n * It doesn't appear to matter which order we approach this from, although\n * perhaps that is the wrong thing to do.\n *\n * @param  {Object} layoutItem Layout item.\n * @return {Object|undefined}  A colliding layout item, or undefined.\n */\nexport function getFirstCollision(\n    layout: Layout,\n    layoutItem: LayoutItem,\n): LayoutItem | null | undefined {\n    for (let i = 0, len = layout.length; i < len; i++) {\n        if (collides(layout[i], layoutItem)) {\n            return layout[i];\n        }\n    }\n    return null;\n}\n\nexport function getAllCollisions(\n    layout: Layout,\n    layoutItem: LayoutItem,\n): Array<LayoutItem> {\n    return layout.filter(l => collides(l, layoutItem));\n}\n\n/**\n * Get all static elements.\n * @param  {Array} layout Array of layout objects.\n * @return {Array}        Array of static layout items..\n */\nexport function getStatics(layout: Layout): Array<LayoutItem> {\n    return layout.filter(l => l.static);\n}\n\n/**\n * Move an element. Responsible for doing cascading movements of other elements.\n *\n * @param  {Array}      layout            Full layout to modify.\n * @param  {LayoutItem} l                 element to move.\n * @param  {Number}     [x]               X position in grid units.\n * @param  {Number}     [y]               Y position in grid units.\n */\nexport function moveElement(\n    layout: Layout,\n    l: LayoutItem,\n    x: number | null | undefined,\n    y: number | null | undefined,\n    isUserAction: boolean | null | undefined,\n    preventCollision: boolean | null | undefined,\n    compactType: CompactType,\n    cols: number,\n): Layout {\n    // If this is static and not explicitly enabled as draggable,\n    // no move is possible, so we can short-circuit this immediately.\n    if (l.static && l.isDraggable !== true) {\n        return layout;\n    }\n\n    // Short-circuit if nothing to do.\n    if (l.y === y && l.x === x) {\n        return layout;\n    }\n\n    log(\n        `Moving element ${l.id} to [${String(x)},${String(y)}] from [${l.x},${\n            l.y\n        }]`,\n    );\n    const oldX = l.x;\n    const oldY = l.y;\n\n    // This is quite a bit faster than extending the object\n    if (typeof x === 'number') {\n        l.x = x;\n    }\n    if (typeof y === 'number') {\n        l.y = y;\n    }\n    l.moved = true;\n\n    // If this collides with anything, move it.\n    // When doing this comparison, we have to sort the items we compare with\n    // to ensure, in the case of multiple collisions, that we're getting the\n    // nearest collision.\n    let sorted = sortLayoutItems(layout, compactType);\n    const movingUp =\n        compactType === 'vertical' && typeof y === 'number'\n            ? oldY >= y\n            : compactType === 'horizontal' && typeof x === 'number'\n            ? oldX >= x\n            : false;\n    if (movingUp) {\n        sorted = sorted.reverse();\n    }\n    const collisions = getAllCollisions(sorted, l);\n\n    // There was a collision; abort\n    if (preventCollision && collisions.length) {\n        log(`Collision prevented on ${l.id}, reverting.`);\n        l.x = oldX;\n        l.y = oldY;\n        l.moved = false;\n        return layout;\n    }\n\n    // Move each item that collides away from this element.\n    for (let i = 0, len = collisions.length; i < len; i++) {\n        const collision = collisions[i];\n        log(\n            `Resolving collision between ${l.id} at [${l.x},${l.y}] and ${\n                collision.id\n            } at [${collision.x},${collision.y}]`,\n        );\n\n        // Short circuit so we can't infinite loop\n        if (collision.moved) {\n            continue;\n        }\n\n        // Don't move static items - we have to move *this* element away\n        if (collision.static) {\n            layout = moveElementAwayFromCollision(\n                layout,\n                collision,\n                l,\n                isUserAction,\n                compactType,\n                cols,\n            );\n        } else {\n            layout = moveElementAwayFromCollision(\n                layout,\n                l,\n                collision,\n                isUserAction,\n                compactType,\n                cols,\n            );\n        }\n    }\n\n    return layout;\n}\n\n/**\n * This is where the magic needs to happen - given a collision, move an element away from the collision.\n * We attempt to move it up if there's room, otherwise it goes below.\n *\n * @param  {Array} layout            Full layout to modify.\n * @param  {LayoutItem} collidesWith Layout item we're colliding with.\n * @param  {LayoutItem} itemToMove   Layout item we're moving.\n */\nexport function moveElementAwayFromCollision(\n    layout: Layout,\n    collidesWith: LayoutItem,\n    itemToMove: LayoutItem,\n    isUserAction: boolean | null | undefined,\n    compactType: CompactType,\n    cols: number,\n): Layout {\n    const compactH = compactType === 'horizontal';\n    // Compact vertically if not set to horizontal\n    const compactV = compactType !== 'horizontal';\n    const preventCollision = collidesWith.static; // we're already colliding (not for static items)\n\n    // If there is enough space above the collision to put this element, move it there.\n    // We only do this on the main collision as this can get funky in cascades and cause\n    // unwanted swapping behavior.\n    if (isUserAction) {\n        // Reset isUserAction flag because we're not in the main collision anymore.\n        isUserAction = false;\n\n        // Make a mock item so we don't modify the item here, only modify in moveElement.\n        const fakeItem: LayoutItem = {\n            x: compactH\n                ? Math.max(collidesWith.x - itemToMove.w, 0)\n                : itemToMove.x,\n            y: compactV\n                ? Math.max(collidesWith.y - itemToMove.h, 0)\n                : itemToMove.y,\n            w: itemToMove.w,\n            h: itemToMove.h,\n            id: '-1',\n        };\n\n        // No collision? If so, we can go up there; otherwise, we'll end up moving down as normal\n        if (!getFirstCollision(layout, fakeItem)) {\n            log(\n                `Doing reverse collision on ${itemToMove.id} up to [${\n                    fakeItem.x\n                },${fakeItem.y}].`,\n            );\n            return moveElement(\n                layout,\n                itemToMove,\n                compactH ? fakeItem.x : undefined,\n                compactV ? fakeItem.y : undefined,\n                isUserAction,\n                preventCollision,\n                compactType,\n                cols,\n            );\n        }\n    }\n\n    return moveElement(\n        layout,\n        itemToMove,\n        compactH ? itemToMove.x + 1 : undefined,\n        compactV ? itemToMove.y + 1 : undefined,\n        isUserAction,\n        preventCollision,\n        compactType,\n        cols,\n    );\n}\n\n/**\n * Helper to convert a number to a percentage string.\n *\n * @param  {Number} num Any number\n * @return {String}     That number as a percentage.\n */\nexport function perc(num: number): string {\n    return num * 100 + '%';\n}\n\nexport function setTransform({top, left, width, height}: Position): Object {\n    // Replace unitless items with px\n    const translate = `translate(${left}px,${top}px)`;\n    return {\n        transform: translate,\n        WebkitTransform: translate,\n        MozTransform: translate,\n        msTransform: translate,\n        OTransform: translate,\n        width: `${width}px`,\n        height: `${height}px`,\n        position: 'absolute',\n    };\n}\n\nexport function setTopLeft({top, left, width, height}: Position): Object {\n    return {\n        top: `${top}px`,\n        left: `${left}px`,\n        width: `${width}px`,\n        height: `${height}px`,\n        position: 'absolute',\n    };\n}\n\n/**\n * Get layout items sorted from top left to right and down.\n *\n * @return {Array} Array of layout objects.\n * @return {Array}        Layout, sorted static items first.\n */\nexport function sortLayoutItems(\n    layout: Layout,\n    compactType: CompactType,\n): Layout {\n    if (compactType === 'horizontal') {\n        return sortLayoutItemsByColRow(layout);\n    } else {\n        return sortLayoutItemsByRowCol(layout);\n    }\n}\n\nexport function sortLayoutItemsByRowCol(layout: Layout): Layout {\n    return ([] as any[]).concat(layout).sort(function (a, b) {\n        if (a.y > b.y || (a.y === b.y && a.x > b.x)) {\n            return 1;\n        } else if (a.y === b.y && a.x === b.x) {\n            // Without this, we can get different sort results in IE vs. Chrome/FF\n            return 0;\n        }\n        return -1;\n    });\n}\n\nexport function sortLayoutItemsByColRow(layout: Layout): Layout {\n    return ([] as any[]).concat(layout).sort(function (a, b) {\n        if (a.x > b.x || (a.x === b.x && a.y > b.y)) {\n            return 1;\n        }\n        return -1;\n    });\n}\n\n/**\n * Validate a layout. Throws errors.\n *\n * @param  {Array}  layout        Array of layout items.\n * @param  {String} [contextName] Context name for errors.\n * @throw  {Error}                Validation error.\n */\nexport function validateLayout(\n    layout: Layout,\n    contextName: string = 'Layout',\n): void {\n    const subProps = ['x', 'y', 'w', 'h'];\n    if (!Array.isArray(layout)) {\n        throw new Error(contextName + ' must be an array!');\n    }\n    for (let i = 0, len = layout.length; i < len; i++) {\n        const item = layout[i];\n        for (let j = 0; j < subProps.length; j++) {\n            if (typeof item[subProps[j]] !== 'number') {\n                throw new Error(\n                    'ReactGridLayout: ' +\n                    contextName +\n                    '[' +\n                    i +\n                    '].' +\n                    subProps[j] +\n                    ' must be a number!',\n                );\n            }\n        }\n        if (item.id && typeof item.id !== 'string') {\n            throw new Error(\n                'ReactGridLayout: ' +\n                contextName +\n                '[' +\n                i +\n                '].i must be a string!',\n            );\n        }\n        if (item.static !== undefined && typeof item.static !== 'boolean') {\n            throw new Error(\n                'ReactGridLayout: ' +\n                contextName +\n                '[' +\n                i +\n                '].static must be a boolean!',\n            );\n        }\n    }\n}\n\n// Flow can't really figure this out, so we just use Object\nexport function autoBindHandlers(el: Object, fns: Array<string>): void {\n    fns.forEach(key => (el[key] = el[key].bind(el)));\n}\n\nfunction log(...args) {\n    if (!DEBUG) {\n        return;\n    }\n    // eslint-disable-next-line no-console\n    console.log(...args);\n}\n\nexport const noop = () => {};\n","/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function ktdSupportsPassiveEventListeners(): boolean {\n    if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n        try {\n            window.addEventListener('test', null!, Object.defineProperty({}, 'passive', {\n                get: () => supportsPassiveEvents = true\n            }));\n        } finally {\n            supportsPassiveEvents = supportsPassiveEvents || false;\n        }\n    }\n\n    return supportsPassiveEvents;\n}\n\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nexport function ktdNormalizePassiveListenerOptions(options: AddEventListenerOptions):\n    AddEventListenerOptions | boolean {\n    return ktdSupportsPassiveEventListeners() ? options : !!options.capture;\n}\n","import { fromEvent, iif, merge, Observable } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport { ktdNormalizePassiveListenerOptions } from './passive-listeners';\n\n/** Options that can be used to bind a passive event listener. */\nconst passiveEventListenerOptions = ktdNormalizePassiveListenerOptions({passive: true});\n\n/** Options that can be used to bind an active event listener. */\nconst activeEventListenerOptions = ktdNormalizePassiveListenerOptions({passive: false});\n\nlet isMobile: boolean | null = null;\n\nexport function ktdIsMobileOrTablet(): boolean {\n\n    if (isMobile != null) {\n        return isMobile;\n    }\n\n    // Generic match pattern to identify mobile or tablet devices\n    const isMobileDevice = /Android|webOS|BlackBerry|Windows Phone|iPad|iPhone|iPod/i.test(navigator.userAgent);\n\n    // Since IOS 13 is not safe to just check for the generic solution. See: https://stackoverflow.com/questions/58019463/how-to-detect-device-name-in-safari-on-ios-13-while-it-doesnt-show-the-correct\n    const isIOSMobileDevice = /iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);\n\n    isMobile = isMobileDevice || isIOSMobileDevice;\n\n    return isMobile;\n}\n\nexport function ktdIsMouseEvent(event: any): event is MouseEvent {\n    return (event as MouseEvent).clientX != null;\n}\n\nexport function ktdIsTouchEvent(event: any): event is TouchEvent {\n    return (event as TouchEvent).touches != null && (event as TouchEvent).touches.length != null;\n}\n\nexport function ktdPointerClientX(event: MouseEvent | TouchEvent): number {\n    return ktdIsMouseEvent(event) ? event.clientX : event.touches[0].clientX;\n}\n\nexport function ktdPointerClientY(event: MouseEvent | TouchEvent): number {\n    return ktdIsMouseEvent(event) ? event.clientY : event.touches[0].clientY;\n}\n\nexport function ktdPointerClient(event: MouseEvent | TouchEvent): {clientX: number, clientY: number} {\n    return  {\n        clientX: ktdIsMouseEvent(event) ? event.clientX : event.touches[0].clientX,\n        clientY: ktdIsMouseEvent(event) ? event.clientY : event.touches[0].clientY\n    };\n}\n\n/**\n * Emits when a mousedown or touchstart emits. Avoids conflicts between both events.\n * @param element, html element where to  listen the events.\n * @param touchNumber number of the touch to track the event, default to the first one.\n */\nexport function ktdMouseOrTouchDown(element, touchNumber = 1): Observable<MouseEvent | TouchEvent> {\n    return iif(\n        () => ktdIsMobileOrTablet(),\n        fromEvent<TouchEvent>(element, 'touchstart', passiveEventListenerOptions as AddEventListenerOptions).pipe(\n            filter((touchEvent) => touchEvent.touches.length === touchNumber)\n        ),\n        fromEvent<MouseEvent>(element, 'mousedown', activeEventListenerOptions as AddEventListenerOptions).pipe(\n            filter((mouseEvent: MouseEvent) => {\n                /**\n                 * 0 : Left mouse button\n                 * 1 : Wheel button or middle button (if present)\n                 * 2 : Right mouse button\n                 */\n                return mouseEvent.button === 0; // Mouse down to be only fired if is left click\n            })\n        )\n    );\n}\n\n/**\n * Emits when a 'mousemove' or a 'touchmove' event gets fired.\n * @param element, html element where to  listen the events.\n * @param touchNumber number of the touch to track the event, default to the first one.\n */\nexport function ktdMouseOrTouchMove(element, touchNumber = 1): Observable<MouseEvent | TouchEvent> {\n    return iif(\n        () => ktdIsMobileOrTablet(),\n        fromEvent<TouchEvent>(element, 'touchmove', activeEventListenerOptions as AddEventListenerOptions).pipe(\n            filter((touchEvent) => touchEvent.touches.length === touchNumber),\n        ),\n        fromEvent<MouseEvent>(element, 'mousemove', activeEventListenerOptions as AddEventListenerOptions)\n    );\n}\n\nexport function ktdTouchEnd(element, touchNumber = 1): Observable<TouchEvent> {\n    return merge(\n        fromEvent<TouchEvent>(element, 'touchend').pipe(\n            filter((touchEvent) => touchEvent.touches.length === touchNumber - 1)\n        ),\n        fromEvent<TouchEvent>(element, 'touchcancel').pipe(\n            filter((touchEvent) => touchEvent.touches.length === touchNumber - 1)\n        )\n    );\n}\n\n/**\n * Emits when a there is a 'mouseup' or the touch ends.\n * @param element, html element where to  listen the events.\n * @param touchNumber number of the touch to track the event, default to the first one.\n */\nexport function ktdMouseOrTouchEnd(element, touchNumber = 1): Observable<MouseEvent | TouchEvent> {\n    return iif(\n        () => ktdIsMobileOrTablet(),\n        ktdTouchEnd(element, touchNumber),\n        fromEvent<MouseEvent>(element, 'mouseup'),\n    );\n}\n","import { compact, CompactType, getFirstCollision, Layout, LayoutItem, moveElement } from './react-grid-layout.utils';\nimport { KtdDraggingData, KtdGridCfg, KtdGridCompactType, KtdGridItemRect, KtdGridLayout, KtdGridLayoutItem } from '../grid.definitions';\nimport { ktdPointerClientX, ktdPointerClientY } from './pointer.utils';\nimport { KtdDictionary } from '../../types';\nimport { KtdGridItemComponent } from '../grid-item/grid-item.component';\n\n/** Tracks items by id. This function is mean to be used in conjunction with the ngFor that renders the 'ktd-grid-items' */\nexport function ktdTrackById(index: number, item: {id: string}) {\n    return item.id;\n}\n\n/**\n * Call react-grid-layout utils 'compact()' function and return the compacted layout.\n * @param layout to be compacted.\n * @param compactType, type of compaction.\n * @param cols, number of columns of the grid.\n */\nexport function ktdGridCompact(layout: KtdGridLayout, compactType: KtdGridCompactType, cols: number): KtdGridLayout {\n    return compact(layout, compactType, cols)\n        // Prune react-grid-layout compact extra properties.\n        .map(item => ({ id: item.id, x: item.x, y: item.y, w: item.w, h: item.h, minW: item.minW, minH: item.minH, maxW: item.maxW, maxH: item.maxH }));\n}\n\nfunction screenXPosToGridValue(screenXPos: number, cols: number, width: number): number {\n    return Math.round((screenXPos * cols) / width);\n}\n\nfunction screenYPosToGridValue(screenYPos: number, rowHeight: number, height: number): number {\n    return Math.round(screenYPos / rowHeight);\n}\n\n/** Returns a Dictionary where the key is the id and the value is the change applied to that item. If no changes Dictionary is empty. */\nexport function ktdGetGridLayoutDiff(gridLayoutA: KtdGridLayoutItem[], gridLayoutB: KtdGridLayoutItem[]): KtdDictionary<{ change: 'move' | 'resize' | 'moveresize' }> {\n    const diff: KtdDictionary<{ change: 'move' | 'resize' | 'moveresize' }> = {};\n\n    gridLayoutA.forEach(itemA => {\n        const itemB = gridLayoutB.find(_itemB => _itemB.id === itemA.id);\n        if (itemB != null) {\n            const posChanged = itemA.x !== itemB.x || itemA.y !== itemB.y;\n            const sizeChanged = itemA.w !== itemB.w || itemA.h !== itemB.h;\n            const change: 'move' | 'resize' | 'moveresize' | null = posChanged && sizeChanged ? 'moveresize' : posChanged ? 'move' : sizeChanged ? 'resize' : null;\n            if (change) {\n                diff[itemB.id] = {change};\n            }\n        }\n    });\n    return diff;\n}\n\n/**\n * Given the grid config & layout data and the current drag position & information, returns the corresponding layout and drag item position\n * @param gridItem grid item that is been dragged\n * @param config current grid configuration\n * @param compactionType type of compaction that will be performed\n * @param draggingData contains all the information about the drag\n */\nexport function ktdGridItemDragging(gridItem: KtdGridItemComponent, config: KtdGridCfg, compactionType: CompactType, draggingData: KtdDraggingData): { layout: KtdGridLayoutItem[]; draggedItemPos: KtdGridItemRect } {\n    const {pointerDownEvent, pointerDragEvent, gridElemClientRect, dragElemClientRect, scrollDifference} = draggingData;\n\n    const gridItemId = gridItem.id;\n\n    const draggingElemPrevItem = config.layout.find(item => item.id === gridItemId)!;\n\n    const clientStartX = ktdPointerClientX(pointerDownEvent);\n    const clientStartY = ktdPointerClientY(pointerDownEvent);\n    const clientX = ktdPointerClientX(pointerDragEvent);\n    const clientY = ktdPointerClientY(pointerDragEvent);\n\n    const offsetX = clientStartX - dragElemClientRect.left;\n    const offsetY = clientStartY - dragElemClientRect.top;\n\n    // Grid element positions taking into account the possible scroll total difference from the beginning.\n    const gridElementLeftPosition = gridElemClientRect.left + scrollDifference.left;\n    const gridElementTopPosition = gridElemClientRect.top + scrollDifference.top;\n\n    // Calculate position relative to the grid element.\n    const gridRelXPos = clientX - gridElementLeftPosition - offsetX;\n    const gridRelYPos = clientY - gridElementTopPosition - offsetY;\n\n    // Get layout item position\n    const layoutItem: KtdGridLayoutItem = {\n        ...draggingElemPrevItem,\n        x: screenXPosToGridValue(gridRelXPos, config.cols, gridElemClientRect.width),\n        y: screenYPosToGridValue(gridRelYPos, config.rowHeight, gridElemClientRect.height)\n    };\n\n    // Correct the values if they overflow, since 'moveElement' function doesn't do it\n    layoutItem.x = Math.max(0, layoutItem.x);\n    layoutItem.y = Math.max(0, layoutItem.y);\n    if (layoutItem.x + layoutItem.w > config.cols) {\n        layoutItem.x = Math.max(0, config.cols - layoutItem.w);\n    }\n\n    // Parse to LayoutItem array data in order to use 'react.grid-layout' utils\n    const layoutItems: LayoutItem[] = config.layout;\n    const draggedLayoutItem: LayoutItem = layoutItems.find(item => item.id === gridItemId)!;\n\n    let newLayoutItems: LayoutItem[] = moveElement(\n        layoutItems,\n        draggedLayoutItem,\n        layoutItem.x,\n        layoutItem.y,\n        true,\n        config.preventCollision,\n        compactionType,\n        config.cols\n    );\n\n    newLayoutItems = compact(newLayoutItems, compactionType, config.cols);\n\n    return {\n        layout: newLayoutItems,\n        draggedItemPos: {\n            top: gridRelYPos,\n            left: gridRelXPos,\n            width: dragElemClientRect.width,\n            height: dragElemClientRect.height,\n        }\n    };\n}\n\n/**\n * Given the grid config & layout data and the current drag position & information, returns the corresponding layout and drag item position\n * @param gridItem grid item that is been dragged\n * @param config current grid configuration\n * @param compactionType type of compaction that will be performed\n * @param draggingData contains all the information about the drag\n */\nexport function ktdGridItemResizing(gridItem: KtdGridItemComponent, config: KtdGridCfg, compactionType: CompactType, draggingData: KtdDraggingData): { layout: KtdGridLayoutItem[]; draggedItemPos: KtdGridItemRect } {\n    const {pointerDownEvent, pointerDragEvent, gridElemClientRect, dragElemClientRect, scrollDifference} = draggingData;\n    const gridItemId = gridItem.id;\n\n    const clientStartX = ktdPointerClientX(pointerDownEvent);\n    const clientStartY = ktdPointerClientY(pointerDownEvent);\n    const clientX = ktdPointerClientX(pointerDragEvent);\n    const clientY = ktdPointerClientY(pointerDragEvent);\n\n    // Get the difference between the mouseDown and the position 'right' of the resize element.\n    const resizeElemOffsetX = dragElemClientRect.width - (clientStartX - dragElemClientRect.left);\n    const resizeElemOffsetY = dragElemClientRect.height - (clientStartY - dragElemClientRect.top);\n\n    const draggingElemPrevItem = config.layout.find(item => item.id === gridItemId)!;\n    const width = clientX + resizeElemOffsetX - (dragElemClientRect.left + scrollDifference.left);\n    const height = clientY + resizeElemOffsetY - (dragElemClientRect.top + scrollDifference.top);\n\n\n    // Get layout item grid position\n    const layoutItem: KtdGridLayoutItem = {\n        ...draggingElemPrevItem,\n        w: screenXPosToGridValue(width, config.cols, gridElemClientRect.width),\n        h: screenYPosToGridValue(height, config.rowHeight, gridElemClientRect.height)\n    };\n\n    layoutItem.w = limitNumberWithinRange(layoutItem.w, gridItem.minW ?? layoutItem.minW, gridItem.maxW ?? layoutItem.maxW);\n    layoutItem.h = limitNumberWithinRange(layoutItem.h, gridItem.minH ?? layoutItem.minH, gridItem.maxH ?? layoutItem.maxH);\n\n    if (layoutItem.x + layoutItem.w > config.cols) {\n        layoutItem.w = Math.max(1, config.cols - layoutItem.x);\n    }\n\n    if (config.preventCollision) {\n        const maxW = layoutItem.w;\n        const maxH = layoutItem.h;\n\n        let colliding = hasCollision(config.layout, layoutItem);\n        let shrunkDimension: 'w' | 'h' | undefined;\n\n        while (colliding) {\n            shrunkDimension = getDimensionToShrink(layoutItem, shrunkDimension);\n            layoutItem[shrunkDimension]--;\n            colliding = hasCollision(config.layout, layoutItem);\n        }\n\n        if (shrunkDimension === 'w') {\n            layoutItem.h = maxH;\n\n            colliding = hasCollision(config.layout, layoutItem);\n            while (colliding) {\n                layoutItem.h--;\n                colliding = hasCollision(config.layout, layoutItem);\n            }\n        }\n        if (shrunkDimension === 'h') {\n            layoutItem.w = maxW;\n\n            colliding = hasCollision(config.layout, layoutItem);\n            while (colliding) {\n                layoutItem.w--;\n                colliding = hasCollision(config.layout, layoutItem);\n            }\n        }\n\n    }\n\n    const newLayoutItems: LayoutItem[] = config.layout.map((item) => {\n        return item.id === gridItemId ? layoutItem : item;\n    });\n\n    return {\n        layout: compact(newLayoutItems, compactionType, config.cols),\n        draggedItemPos: {\n            top: dragElemClientRect.top - gridElemClientRect.top,\n            left: dragElemClientRect.left - gridElemClientRect.left,\n            width,\n            height,\n        }\n    };\n}\n\nfunction hasCollision(layout: Layout, layoutItem: LayoutItem): boolean {\n    return !!getFirstCollision(layout, layoutItem);\n}\n\nfunction getDimensionToShrink(layoutItem, lastShrunk): 'w' | 'h' {\n    if (layoutItem.h <= 1) {\n        return 'w';\n    }\n    if (layoutItem.w <= 1) {\n        return 'h';\n    }\n\n    return lastShrunk === 'w' ? 'h' : 'w';\n}\n\n/**\n * Given the current number and min/max values, returns the number within the range\n * @param number can be any numeric value\n * @param min minimum value of range\n * @param max maximum value of range\n */\nfunction limitNumberWithinRange(num: number, min: number = 1, max: number = Infinity) {\n    return Math.min(Math.max(num, min < 1 ? 1 : min), max);\n}\n","import { Directive, ElementRef, InjectionToken } from '@angular/core';\n\n/**\n * Injection token that can be used to reference instances of `KtdGridDragHandle`. It serves as\n * alternative token to the actual `KtdGridDragHandle` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const KTD_GRID_DRAG_HANDLE = new InjectionToken<KtdGridDragHandle>('KtdGridDragHandle');\n\n/** Handle that can be used to drag a KtdGridItem instance. */\n@Directive({\n    selector: '[ktdGridDragHandle]',\n    // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n    host: {\n        class: 'ktd-grid-drag-handle'\n    },\n    providers: [{provide: KTD_GRID_DRAG_HANDLE, useExisting: KtdGridDragHandle}],\n})\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport class KtdGridDragHandle {\n    constructor(\n        public element: ElementRef<HTMLElement>) {\n    }\n}\n","import { Directive, ElementRef, InjectionToken, } from '@angular/core';\n\n\n/**\n * Injection token that can be used to reference instances of `KtdGridResizeHandle`. It serves as\n * alternative token to the actual `KtdGridResizeHandle` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const KTD_GRID_RESIZE_HANDLE = new InjectionToken<KtdGridResizeHandle>('KtdGridResizeHandle');\n\n/** Handle that can be used to drag a KtdGridItem instance. */\n@Directive({\n    selector: '[ktdGridResizeHandle]',\n    // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n    host: {\n        class: 'ktd-grid-resize-handle'\n    },\n    providers: [{provide: KTD_GRID_RESIZE_HANDLE, useExisting: KtdGridResizeHandle}],\n})\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport class KtdGridResizeHandle {\n\n    constructor(\n        public element: ElementRef<HTMLElement>) {\n    }\n}\n","import { InjectionToken } from '@angular/core';\nimport { CompactType } from './utils/react-grid-layout.utils';\n\nexport interface KtdGridLayoutItem {\n    id: string;\n    x: number;\n    y: number;\n    w: number;\n    h: number;\n    minW?: number;\n    minH?: number;\n    maxW?: number;\n    maxH?: number;\n}\n\nexport type KtdGridCompactType = CompactType;\n\nexport interface KtdGridCfg {\n    cols: number;\n    rowHeight: number; // row height in pixels\n    layout: KtdGridLayoutItem[];\n    preventCollision: boolean;\n}\n\nexport type KtdGridLayout = KtdGridLayoutItem[];\n\n// TODO: Remove this interface. If can't remove, move and rename this interface in the core module or similar.\nexport interface KtdGridItemRect {\n    top: number;\n    left: number;\n    width: number;\n    height: number;\n}\n\nexport interface KtdGridItemRenderData<T = number | string> {\n    id: string;\n    top: T;\n    left: T;\n    width: T;\n    height: T;\n}\n\n/**\n * We inject a token because of the 'circular dependency issue warning'. In case we don't had this issue with the circular dependency, we could just\n * import KtdGridComponent on KtdGridItem and execute the needed function to get the rendering data.\n */\nexport type KtdGridItemRenderDataTokenType = (id: string) => KtdGridItemRenderData<string>;\nexport const GRID_ITEM_GET_RENDER_DATA_TOKEN: InjectionToken<KtdGridItemRenderDataTokenType> = new InjectionToken('GRID_ITEM_GET_RENDER_DATA_TOKEN');\n\nexport interface KtdDraggingData {\n    pointerDownEvent: MouseEvent | TouchEvent;\n    pointerDragEvent: MouseEvent | TouchEvent;\n    gridElemClientRect: ClientRect;\n    dragElemClientRect: ClientRect;\n    scrollDifference: { top: number, left: number };\n}\n","import { NgZone } from '@angular/core';\nimport { Observable, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\n/** Runs source observable outside the zone */\nexport function ktdOutsideZone<T>(zone: NgZone) {\n    return (source: Observable<T>) => {\n        return new Observable<T>(observer => {\n            return zone.runOutsideAngular<Subscription>(() => source.subscribe(observer));\n        });\n    };\n}\n\n\n/** Rxjs operator that makes source observable to no emit any data */\nexport function ktdNoEmit() {\n    return (source$: Observable<any>): Observable<any> => {\n        return source$.pipe(filter(() => false));\n    };\n}\n","// tslint:disable\n/**\n * Type describing the allowed values for a boolean input.\n * @docs-private\n */\nexport type BooleanInput = string | boolean | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n  return value != null && `${value}` !== 'false';\n}\n","// tslint:disable\nexport type NumberInput = string | number | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a number. */\nexport function coerceNumberProperty(value: any): number;\nexport function coerceNumberProperty<D>(value: any, fallback: D): number | D;\nexport function coerceNumberProperty(value: any, fallbackValue = 0) {\n    return _isNumberValue(value) ? Number(value) : fallbackValue;\n}\n\n/**\n * Whether the provided value is considered a number.\n * @docs-private\n */\nexport function _isNumberValue(value: any): boolean {\n    // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n    // and other non-number values as NaN, where Number just uses 0) but it considers the string\n    // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n    return !isNaN(parseFloat(value as any)) && !isNaN(Number(value));\n}\n","import { Injectable, NgZone, OnDestroy } from '@angular/core';\nimport { ktdNormalizePassiveListenerOptions } from './utils/passive-listeners';\nimport { fromEvent, iif, Observable, Subject, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport { ktdIsMobileOrTablet } from './utils/pointer.utils';\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = ktdNormalizePassiveListenerOptions({\n    passive: false,\n    capture: true\n});\n\n@Injectable({providedIn: 'root'})\nexport class KtdGridService implements OnDestroy {\n\n    touchMove$: Observable<TouchEvent>;\n    private touchMoveSubject: Subject<TouchEvent> = new Subject<TouchEvent>();\n    private touchMoveSubscription: Subscription;\n\n    constructor(private ngZone: NgZone) {\n        this.touchMove$ = this.touchMoveSubject.asObservable();\n        this.registerTouchMoveSubscription();\n    }\n\n    ngOnDestroy() {\n        this.touchMoveSubscription.unsubscribe();\n    }\n\n    mouseOrTouchMove$(element): Observable<MouseEvent | TouchEvent> {\n        return iif(\n            () => ktdIsMobileOrTablet(),\n            this.touchMove$,\n            fromEvent<MouseEvent>(element, 'mousemove', activeCapturingEventOptions as AddEventListenerOptions) // TODO: Fix rxjs typings, boolean should be a good param too.\n        );\n    }\n\n    private registerTouchMoveSubscription() {\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        this.touchMoveSubscription = this.ngZone.runOutsideAngular(() =>\n            // The event handler has to be explicitly active,\n            // because newer browsers make it passive by default.\n            fromEvent(document, 'touchmove', activeCapturingEventOptions as AddEventListenerOptions) // TODO: Fix rxjs typings, boolean should be a good param too.\n                .pipe(filter((touchEvent: TouchEvent) => touchEvent.touches.length === 1))\n                .subscribe((touchEvent: TouchEvent) => this.touchMoveSubject.next(touchEvent))\n        );\n    }\n}\n","import {\n    AfterContentInit, ChangeDetectionStrategy, Component, ContentChildren, ElementRef, Inject, Input, NgZone, OnDestroy, OnInit, QueryList, Renderer2,\n    ViewChild\n} from '@angular/core';\nimport { BehaviorSubject, iif, merge, NEVER, Observable, Subject, Subscription } from 'rxjs';\nimport { exhaustMap, filter, map, startWith, switchMap, take, takeUntil } from 'rxjs/operators';\nimport { ktdMouseOrTouchDown, ktdMouseOrTouchEnd, ktdPointerClient } from '../utils/pointer.utils';\nimport { GRID_ITEM_GET_RENDER_DATA_TOKEN, KtdGridItemRenderDataTokenType } from '../grid.definitions';\nimport { KTD_GRID_DRAG_HANDLE, KtdGridDragHandle } from '../directives/drag-handle';\nimport { KTD_GRID_RESIZE_HANDLE, KtdGridResizeHandle } from '../directives/resize-handle';\nimport { KtdGridService } from '../grid.service';\nimport { ktdOutsideZone } from '../utils/operators';\nimport { BooleanInput, coerceBooleanProperty } from '../coercion/boolean-property';\nimport { coerceNumberProperty, NumberInput } from '../coercion/number-property';\n\n@Component({\n    selector: 'ktd-grid-item',\n    templateUrl: './grid-item.component.html',\n    styleUrls: ['./grid-item.component.scss'],\n    changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class KtdGridItemComponent implements OnInit, OnDestroy, AfterContentInit {\n    /** Elements that can be used to drag the grid item. */\n    @ContentChildren(KTD_GRID_DRAG_HANDLE, {descendants: true}) _dragHandles: QueryList<KtdGridDragHandle>;\n    @ContentChildren(KTD_GRID_RESIZE_HANDLE, {descendants: true}) _resizeHandles: QueryList<KtdGridResizeHandle>;\n    @ViewChild('resizeElem', {static: true, read: ElementRef}) resizeElem: ElementRef;\n\n    /** Min and max size input properties. Any of these would 'override' the min/max values specified in the layout. */\n    @Input() minW?: number;\n    @Input() minH?: number;\n    @Input() maxW?: number;\n    @Input() maxH?: number;\n\n    /** CSS transition style. Note that for more performance is preferable only make transition on transform property. */\n    @Input() transition: string = 'transform 500ms ease, width 500ms ease, height 500ms ease';\n\n    dragStart$: Observable<MouseEvent | TouchEvent>;\n    resizeStart$: Observable<MouseEvent | TouchEvent>;\n\n    /** Id of the grid item. This property is strictly compulsory. */\n    @Input()\n    get id(): string {\n        return this._id;\n    }\n\n    set id(val: string) {\n        this._id = val;\n    }\n\n    private _id: string;\n\n    /** Minimum amount of pixels that the user should move before it starts the drag sequence. */\n    @Input()\n    get dragStartThreshold(): number { return this._dragStartThreshold; }\n\n    set dragStartThreshold(val: number) {\n        this._dragStartThreshold = coerceNumberProperty(val);\n    }\n\n    private _dragStartThreshold: number = 0;\n\n\n    /** Whether the item is draggable or not. Defaults to true. */\n    @Input()\n    get draggable(): boolean {\n        return this._draggable;\n    }\n\n    set draggable(val: boolean) {\n        this._draggable = coerceBooleanProperty(val);\n        this._draggable$.next(this._draggable);\n    }\n\n    private _draggable: boolean = true;\n    private _draggable$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(this._draggable);\n\n    /** Whether the item is resizable or not. Defaults to true. */\n    @Input()\n    get resizable(): boolean {\n        return this._resizable;\n    }\n\n    set resizable(val: boolean) {\n        this._resizable = coerceBooleanProperty(val);\n        this._resizable$.next(this._resizable);\n    }\n\n    private _resizable: boolean = true;\n    private _resizable$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(this._resizable);\n\n    private dragStartSubject: Subject<MouseEvent | TouchEvent> = new Subject<MouseEvent | TouchEvent>();\n    private resizeStartSubject: Subject<MouseEvent | TouchEvent> = new Subject<MouseEvent | TouchEvent>();\n\n    private subscriptions: Subscription[] = [];\n\n    constructor(public elementRef: ElementRef,\n                private gridService: KtdGridService,\n                private renderer: Renderer2,\n                private ngZone: NgZone,\n                @Inject(GRID_ITEM_GET_RENDER_DATA_TOKEN) private getItemRenderData: KtdGridItemRenderDataTokenType) {\n        this.dragStart$ = this.dragStartSubject.asObservable();\n        this.resizeStart$ = this.resizeStartSubject.asObservable();\n    }\n\n    ngOnInit() {\n        const gridItemRenderData = this.getItemRenderData(this.id)!;\n        this.setStyles(gridItemRenderData);\n    }\n\n    ngAfterContentInit() {\n        this.subscriptions.push(\n            this._dragStart$().subscribe(this.dragStartSubject),\n            this._resizeStart$().subscribe(this.resizeStartSubject),\n        );\n    }\n\n    ngOnDestroy() {\n        this.subscriptions.forEach(sub => sub.unsubscribe());\n    }\n\n    setStyles({top, left, width, height}: { top: string, left: string, width?: string, height?: string }) {\n        // transform is 6x times faster than top/left\n        this.renderer.setStyle(this.elementRef.nativeElement, 'transform', `translateX(${left}) translateY(${top})`);\n        this.renderer.setStyle(this.elementRef.nativeElement, 'display', `block`);\n        this.renderer.setStyle(this.elementRef.nativeElement, 'transition', this.transition);\n        if (width != null) { this.renderer.setStyle(this.elementRef.nativeElement, 'width', width); }\n        if (height != null) {this.renderer.setStyle(this.elementRef.nativeElement, 'height', height); }\n    }\n\n    private _dragStart$(): Observable<MouseEvent | TouchEvent> {\n        return this._draggable$.pipe(\n            switchMap((draggable) => {\n                if (!draggable) {\n                    return NEVER;\n                } else {\n                    return this._dragHandles.changes.pipe(\n                        startWith(this._dragHandles),\n                        switchMap((dragHandles: QueryList<KtdGridDragHandle>) => {\n                            return iif(\n                                () => dragHandles.length > 0,\n                                merge(...dragHandles.toArray().map(dragHandle => ktdMouseOrTouchDown(dragHandle.element.nativeElement, 1))),\n                                ktdMouseOrTouchDown(this.elementRef.nativeElement, 1)\n                            ).pipe(\n                                exhaustMap((startEvent) => {\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 (startEvent.target && (startEvent.target as HTMLElement).draggable && startEvent.type === 'mousedown') {\n                                        startEvent.preventDefault();\n                                    }\n\n                                    const startPointer = ktdPointerClient(startEvent);\n                                    return this.gridService.mouseOrTouchMove$(document).pipe(\n                                        takeUntil(ktdMouseOrTouchEnd(document, 1)),\n                                        ktdOutsideZone(this.ngZone),\n                                        filter((moveEvent) => {\n                                            moveEvent.preventDefault();\n                                            const movePointer = ktdPointerClient(moveEvent);\n                                            const distanceX = Math.abs(startPointer.clientX - movePointer.clientX);\n                                            const distanceY = Math.abs(startPointer.clientY - movePointer.clientY);\n                                            // When this conditions returns true mean that we are over threshold.\n                                            return distanceX + distanceY >= this.dragStartThreshold;\n                                        }),\n                                        take(1),\n                                        // Return the original start event\n                                        map(() => startEvent)\n                                    );\n                                })\n                            );\n                        })\n                    );\n                }\n            })\n        );\n    }\n\n    private _resizeStart$(): Observable<MouseEvent | TouchEvent> {\n        return this._resizable$.pipe(\n            switchMap((resizable) => {\n                if (!resizable) {\n                    // Side effect to hide the resizeElem if resize is disabled.\n                    this.renderer.setStyle(this.resizeElem.nativeElement, 'display', 'none');\n                    return NEVER;\n                } else {\n                    return this._resizeHandles.changes.pipe(\n                        startWith(this._resizeHandles),\n                        switchMap((resizeHandles: QueryList<KtdGridResizeHandle>) => {\n                            if (resizeHandles.length > 0) {\n                                // Side effect to hide the resizeElem if there are resize handles.\n                                this.renderer.setStyle(this.resizeElem.nativeElement, 'display', 'none');\n                                return merge(...resizeHandles.toArray().map(resizeHandle => ktdMouseOrTouchDown(resizeHandle.element.nativeElement, 1)));\n                            } else {\n                                this.renderer.setStyle(this.resizeElem.nativeElement, 'display', 'block');\n                                return ktdMouseOrTouchDown(this.resizeElem.nativeElement, 1);\n                            }\n                        })\n                    );\n                }\n            })\n        );\n    }\n\n\n    // tslint:disable-next-line\n    static ngAcceptInputType_minW: NumberInput;\n    // tslint:disable-next-line\n    static ngAcceptInputType_minH: NumberInput;\n    // tslint:disable-next-line\n    static ngAcceptInputType_maxW: NumberInput;\n    // tslint:disable-next-line\n    static ngAcceptInputType_maxH: NumberInput;\n    // tslint:disable-next-line\n    static ngAcceptInputType_draggable: BooleanInput;\n    // tslint:disable-next-line\n    static ngAcceptInputType_resizable: BooleanInput;\n    // tslint:disable-next-line\n    static ngAcceptInputType_dragStartThreshold: NumberInput;\n\n}\n","<ng-content></ng-content>\n<div #resizeElem class=\"grid-item-resize-icon\"></div>\n","\n// tslint:disable\n\n/**\n * Client rect utilities.\n * This file is taken from Angular Material repository. This is the reason why the tslint is disabled on this case.\n * Don't enable it until some custom change is done on this file.\n */\n\n\n/** Gets a mutable version of an element's bounding `ClientRect`. */\nexport function getMutableClientRect(element: Element): ClientRect {\n    const { top, right, bottom, left, width, height, x, y, toJSON } = element.getBoundingClientRect();\n\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 { top, right, bottom, left, width, height, x, y, toJSON };\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// export function isInsideClientRect(clientRect: ClientRect, x: number, y: number) {\n//   const {top, bottom, left, right} = clientRect;\n//   return y >= top && y <= bottom && x >= left && x <= right;\n// }\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// export function adjustClientRect(clientRect: ClientRect, top: number, left: number) {\n//   clientRect.top += top;\n//   clientRect.bottom = clientRect.top + clientRect.height;\n\n//   clientRect.left += left;\n//   clientRect.right = clientRect.left + clientRect.width;\n// }\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// export function isPointerNearClientRect(rect: ClientRect,\n//                                         threshold: number,\n//                                         pointerX: number,\n//                                         pointerY: number): boolean {\n//   const {top, right, bottom, left, width, height} = rect;\n//   const xThreshold = width * threshold;\n//   const yThreshold = height * threshold;\n\n//   return pointerY > top - yThreshold && pointerY < bottom + yThreshold &&\n//          pointerX > left - xThreshold && pointerX < right + xThreshold;\n// }\n","import { animationFrameScheduler, fromEvent, interval, NEVER, Observable } from 'rxjs';\nimport { distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators';\nimport { ktdNormalizePassiveListenerOptions } from './passive-listeners';\nimport { getMutableClientRect } from './client-rect';\nimport { ktdNoEmit } from './operators';\n\n/**\n * Proximity, as a ratio to width/height at which to start auto-scrolling.\n * The value comes from trying it out manually until it feels right.\n */\nconst SCROLL_PROXIMITY_THRESHOLD = 0.05;\n\n/** Vertical direction in which we can auto-scroll. */\nconst enum AutoScrollVerticalDirection {NONE, UP, DOWN}\n\n/** Horizontal direction in which we can auto-scroll. */\nconst enum AutoScrollHorizontalDirection {NONE, LEFT, RIGHT}\n\nexport interface KtdScrollPosition {\n    top: number;\n    left: number;\n}\n\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 */\nfunction incrementVerticalScroll(node: HTMLElement | Window, amount: number) {\n    if (node === window) {\n        (node as Window).scrollBy(0, amount);\n    } else {\n        // Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.\n        (node as HTMLElement).scrollTop += amount;\n    }\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 */\nfunction incrementHorizontalScroll(node: HTMLElement | Window, amount: number) {\n    if (node === window) {\n        (node as Window).scrollBy(amount, 0);\n    } else {\n        // Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.\n        (node as HTMLElement).scrollLeft += amount;\n    }\n}\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 */\nfunction getVerticalScrollDirection(clientRect: ClientRect, pointerY: number) {\n    const {top, bottom, height} = clientRect;\n    const yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;\n\n    if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {\n        return AutoScrollVerticalDirection.UP;\n    } else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {\n        return AutoScrollVerticalDirection.DOWN;\n    }\n\n    return AutoScrollVerticalDirection.NONE;\n}\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 */\nfunction getHorizontalScrollDirection(clientRect: ClientRect, pointerX: number) {\n    const {left, right, width} = clientRect;\n    const xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;\n\n    if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {\n        return AutoScrollHorizontalDirection.LEFT;\n    } else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {\n        return AutoScrollHorizontalDirection.RIGHT;\n    }\n\n    return AutoScrollHorizontalDirection.NONE;\n}\n\n/**\n * Returns an observable that schedules a loop and apply scroll on the scrollNode into the specified direction/s.\n * This observable doesn't emit, it just performs the 'scroll' side effect.\n * @param scrollNode, node where the scroll would be applied.\n * @param verticalScrollDirection, vertical direction of the scroll.\n * @param horizontalScrollDirection, horizontal direction of the scroll.\n * @param scrollStep, scroll step in CSS pixels that would be applied in every loop.\n */\nfunction scrollToDirectionInterval$(scrollNode: HTMLElement | Window, verticalScrollDirection: AutoScrollVerticalDirection, horizontalScrollDirection: AutoScrollHorizontalDirection, scrollStep: number = 2) {\n    return interval(0, animationFrameScheduler)\n        .pipe(\n            tap(() => {\n                if (verticalScrollDirection === AutoScrollVerticalDirection.UP) {\n                    incrementVerticalScroll(scrollNode, -scrollStep);\n                } else if (verticalScrollDirection === AutoScrollVerticalDirection.DOWN) {\n                    incrementVerticalScroll(scrollNode, scrollStep);\n                }\n\n                if (horizontalScrollDirection === AutoScrollHorizontalDirection.LEFT) {\n                    incrementHorizontalScroll(scrollNode, -scrollStep);\n                } else if (horizontalScrollDirection === AutoScrollHorizontalDirection.RIGHT) {\n                    incrementHorizontalScroll(scrollNode, scrollStep);\n                }\n            }),\n            ktdNoEmit()\n        );\n}\n\nexport interface KtdScrollIfNearElementOptions {\n    scrollStep?: number;\n    disableVertical?: boolean;\n    disableHorizontal?: boolean;\n}\n\n/**\n * Given a source$ observable with pointer location, scroll the scrollNode if the pointer is near to it.\n * This observable doesn't emit, it just performs a 'scroll' side effect.\n * @param scrollableParent, parent node in which the scroll would be performed.\n * @param options, configuration options.\n */\nexport function ktdScrollIfNearElementClientRect$(scrollableParent: HTMLElement | Document, options?: KtdScrollIfNearElementOptions): (source$: Observable<{ pointerX: number, pointerY: number }>) => Observable<any> {\n\n    let scrollNode: Window | HTMLElement;\n    let scrollableParentClientRect: ClientRect;\n    let scrollableParentScrollWidth: number;\n\n    if (scrollableParent === document) {\n        scrollNode = document.defaultView as Window;\n        const {width, height} = getViewportSize();\n        scrollableParentClientRect = {width, height, top: 0, right: width, bottom: height, left: 0, x:0, y: 0, toJSON: () => null};\n        scrollableParentScrollWidth = getDocumentScrollWidth();\n    } else {\n        scrollNode = scrollableParent as HTMLElement;\n        scrollableParentClientRect = getMutableClientRect(scrollableParent as HTMLElement);\n        scrollableParentScrollWidth = (scrollableParent as HTMLElement).scrollWidth;\n    }\n\n    /**\n     * IMPORTANT: By design, only let scroll horizontal if the scrollable parent has explicitly an scroll horizontal.\n     * This layout solution is not designed in mind to have any scroll horizontal, but exceptionally we allow it in this\n     * specific use case.\n     */\n    options = options || {};\n    if (options.disableHorizontal == null && scrollableParentScrollWidth <= scrollableParentClientRect.width) {\n        options.disableHorizontal = true;\n    }\n\n    return (source$) => source$.pipe(\n        map(({pointerX, pointerY}) => {\n            let verticalScrollDirection = getVerticalScrollDirection(scrollableParentClientRect, pointerY);\n            let horizontalScrollDirection = getHorizontalScrollDirection(scrollableParentClientRect, pointerX);\n\n            // Check if scroll directions are disabled.\n            if (options?.disableVertical) {\n                verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n            }\n            if (options?.disableHorizontal) {\n                horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n            }\n\n            return {verticalScrollDirection, horizontalScrollDirection};\n        }),\n        distinctUntilChanged((prev, actual) => {\n            return prev.verticalScrollDirection === actual.verticalScrollDirection\n                && prev.horizontalScrollDirection === actual.horizontalScrollDirection;\n        }),\n        switchMap(({verticalScrollDirection, horizontalScrollDirection}) => {\n            if (verticalScrollDirection || horizontalScrollDirection) {\n                return scrollToDirectionInterval$(scrollNode, verticalScrollDirection, horizontalScrollDirection, options?.scrollStep);\n            } else {\n                return NEVER;\n            }\n        })\n    );\n}\n\n/**\n * Emits on EVERY scroll event and returns the accumulated scroll offset relative to the initial scroll position.\n * @param scrollableParent, node in which scroll events would be listened.\n */\nexport function ktdGetScrollTotalRelativeDifference$(scrollableParent: HTMLElement | Document): Observable<{ top: number, left: number }> {\n    let scrollInitialPosition;\n\n    // Calculate initial scroll position\n    if (scrollableParent === document) {\n        scrollInitialPosition = getViewportScrollPosition();\n    } else {\n        scrollInitialPosition = {\n            top: (scrollableParent as HTMLElement).scrollTop,\n            left: (scrollableParent as HTMLElement).scrollLeft\n        };\n    }\n\n    return fromEvent(scrollableParent, 'scroll', ktdNormalizePassiveListenerOptions({capture: true}) as AddEventListenerOptions).pipe(\n        map(() => {\n            let newTop: number;\n            let newLeft: number;\n\n            if (scrollableParent === document) {\n                const viewportScrollPosition = getViewportScrollPosition();\n                newTop = viewportScrollPosition.top;\n                newLeft = viewportScrollPosition.left;\n            } else {\n                newTop = (scrollableParent as HTMLElement).scrollTop;\n                newLeft = (scrollableParent as HTMLElement).scrollLeft;\n            }\n\n            const topDifference = scrollInitialPosition.top - newTop;\n            const leftDifference = scrollInitialPosition.left - newLeft;\n\n            return {top: topDifference, left: leftDifference};\n        })\n    );\n\n}\n\n/** Returns the viewport's width and height. */\nfunction getViewportSize(): { width: number, height: number } {\n    const _window = document.defaultView || window;\n    return {\n        width: _window.innerWidth,\n        height: _window.innerHeight\n    };\n\n}\n\n/** Gets a ClientRect for the viewport's bounds. */\n// function getViewportRect(): ClientRect {\n//     // Use the document element's bounding rect rather than the window scroll properties\n//     // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n//     // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n//     // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n//     // can disagree when the page is pinch-zoomed (on devices that support touch).\n//     // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n//     // We use the documentElement instead of the body because, by default (without a css reset)\n//     // browsers typically give the document body an 8px margin, which is not included in\n//     // getBoundingClientRect().\n//     const scrollPosition = getViewportScrollPosition();\n//     const {width, height} = getViewportSize();\n\n//     return {\n//         top: scrollPosition.top,\n//         left: scrollPosition.left,\n//         bottom: scrollPosition.top + height,\n//         right: scrollPosition.left + width,\n//         height,\n//         width,\n//     };\n// }\n\n/** Gets the (top, left) scroll position of the viewport. */\nfunction getViewportScrollPosition(): { top: number, left: number } {\n\n    // The top-left-corner of the viewport is determined by the scroll position of the document\n    // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n    // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n    // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n    // `document.documentElement` works consistently, where the `top` and `left` values will\n    // equal negative the scroll position.\n    const windowRef = document.defaultView || window;\n    const documentElement = document.documentElement!;\n    const documentRect = documentElement.getBoundingClientRect();\n\n    const top = -documentRect.top || document.body.scrollTop || windowRef.scrollY ||\n        documentElement.scrollTop || 0;\n\n    const left = -documentRect.left || document.body.scrollLeft || windowRef.scrollX ||\n        documentElement.scrollLeft || 0;\n\n    return {top, left};\n}\n\n/** Returns the document scroll width */\nfunction getDocumentScrollWidth() {\n    return Math.max(document.body.scrollWidth, document.documentElement.scrollWidth);\n}\n\n","import {\n    AfterContentChecked, AfterContentInit, ChangeDetectionStrategy, Component, ContentChildren, ElementRef, EventEmitter, Input, NgZone, OnChanges,\n    OnDestroy, Output, QueryList, Renderer2, SimpleChanges, ViewEncapsulation\n} from '@angular/core';\nimport { coerceNumberProperty, NumberInput } from './coercion/number-property';\nimport { KtdGridItemComponent } from './grid-item/grid-item.component';\nimport { combineLatest, merge, NEVER, Observable, Observer, of, Subscription } from 'rxjs';\nimport { exhaustMap, map, startWith, switchMap, takeUntil } from 'rxjs/operators';\nimport { ktdGridItemDragging, ktdGridItemResizing } from './utils/grid.utils';\nimport { compact, CompactType } from './utils/react-grid-layout.utils';\nimport {\n    GRID_ITEM_GET_RENDER_DATA_TOKEN, KtdDraggingData, KtdGridCfg, KtdGridCompactType, KtdGridItemRect, KtdGridItemRenderData, KtdGridLayout,\n    KtdGridLayoutItem\n} from './grid.definitions';\nimport { ktdMouseOrTouchEnd, ktdPointerClientX, ktdPointerClientY } from './utils/pointer.utils';\nimport { KtdDictionary } from '../types';\nimport { KtdGridService } from './grid.service';\nimport { getMutableClientRect } from './utils/client-rect';\nimport { ktdGetScrollTotalRelativeDifference$, ktdScrollIfNearElementClientRect$ } from './utils/scroll';\nimport { BooleanInput, coerceBooleanProperty } from './coercion/boolean-property';\n\ninterface KtdDragResizeEvent {\n    layout: KtdGridLayout;\n    layoutItem: KtdGridLayoutItem;\n    gridItemRef: KtdGridItemComponent;\n}\n\nexport type KtdDragStart = KtdDragResizeEvent;\nexport type KtdResizeStart = KtdDragResizeEvent;\nexport type KtdDragEnd = KtdDragResizeEvent;\nexport type KtdResizeEnd = KtdDragResizeEvent;\n\nfunction getDragResizeEventData(gridItem: KtdGridItemComponent, layout: KtdGridLayout): KtdDragResizeEvent {\n    return {\n        layout,\n        layoutItem: layout.find((item) => item.id === gridItem.id)!,\n        gridItemRef: gridItem\n    };\n}\n\n\nfunction layoutToRenderItems(config: KtdGridCfg, width: number, height: number): KtdDictionary<KtdGridItemRenderData<number>> {\n    const {cols, rowHeight, layout} = config;\n\n    const renderItems: KtdDictionary<KtdGridItemRenderData<number>> = {};\n    for (const item of layout) {\n        renderItems[item.id] = {\n            id: item.id,\n            top: item.y === 0 ? 0 : item.y * rowHeight,\n            left: item.x * (width / cols),\n            width: item.w * (width / cols),\n            height: item.h * rowHeight\n        };\n    }\n    return renderItems;\n}\n\nfunction getGridHeight(layout: KtdGridLayout, rowHeight: number): number {\n    return layout.reduce((acc, cur) => Math.max(acc, (cur.y + cur.h) * rowHeight), 0);\n}\n\n// tslint:disable-next-line\nexport function parseRenderItemToPixels(renderItem: KtdGridItemRenderData<number>): KtdGridItemRenderData<string> {\n    return {\n        id: renderItem.id,\n        top: `${renderItem.top}px`,\n        left: `${renderItem.left}px`,\n        width: `${renderItem.width}px`,\n        height: `${renderItem.height}px`\n    };\n}\n\n// tslint:disable-next-line:ktd-prefix-code\nexport function __gridItemGetRenderDataFactoryFunc(gridCmp: KtdGridComponent) {\n    // tslint:disable-next-line:only-arrow-functions\n    return function(id: string) {\n        return parseRenderItemToPixels(gridCmp.getItemRenderData(id));\n    };\n}\n\nexport function ktdGridItemGetRenderDataFactoryFunc(gridCmp: KtdGridComponent) {\n    // Workaround explained: https://github.com/ng-packagr/ng-packagr/issues/696#issuecomment-387114613\n    const resultFunc = __gridItemGetRenderDataFactoryFunc(gridCmp);\n    return resultFunc;\n}\n\n\n@Component({\n    selector: 'ktd-grid',\n    templateUrl: './grid.component.html',\n    styleUrls: ['./grid.component.scss'],\n    encapsulation: ViewEncapsulation.None,\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    providers: [\n        {\n            provide: GRID_ITEM_GET_RENDER_DATA_TOKEN,\n            useFactory: ktdGridItemGetRenderDataFactoryFunc,\n            deps: [KtdGridComponent]\n        }\n    ]\n})\nexport class KtdGridComponent implements OnChanges, AfterContentInit, AfterContentChecked, OnDestroy {\n    /** Query list of grid items that are being rendered. */\n    @ContentChildren(KtdGridItemComponent, {descendants: true}) _gridItems: QueryList<KtdGridItemComponent>;\n\n    /** Emits when layout change */\n    @Output() layoutUpdated: EventEmitter<KtdGridLayout> = new EventEmitter<KtdGridLayout>();\n\n    /** Emits when drag starts */\n    @Output() dragStarted: EventEmitter<KtdDragStart> = new EventEmitter<KtdDragStart>();\n\n    /** Emits when resize starts */\n    @Output() resizeStarted: EventEmitter<KtdResizeStart> = new EventEmitter<KtdResizeStart>();\n\n    /** Emits when drag ends */\n    @Output() dragEnded: EventEmitter<KtdDragEnd> = new EventEmitter<KtdDragEnd>();\n\n    /** Emits when resize ends */\n    @Output() resizeEnded: EventEmitter<KtdResizeEnd> = new EventEmitter<KtdResizeEnd>();\n\n    /**\n     * Parent element that contains the scroll. If an string is provided it would search that element by id on the dom.\n     * If no data provided or null autoscroll is not performed.\n     */\n    @Input() scrollableParent: HTMLElement | Document | string | null = null;\n\n    /** Whether or not to update the internal layout when some dependent property change. */\n    @Input()\n    get compactOnPropsChange(): boolean { return this._compactOnPropsChange; }\n\n    set compactOnPropsChange(value: boolean) {\n        this._compactOnPropsChange = coerceBooleanProperty(value);\n    }\n\n    private _compactOnPropsChange: boolean = true;\n\n    /** If true, grid items won't change position when being dragged over. Handy when using no compaction */\n    @Input()\n    get preventCollision(): boolean { return this._preventCollision; }\n\n    set preventCollision(value: boolean) {\n        this._preventCollision = coerceBooleanProperty(value);\n    }\n\n    private _preventCollision: boolean = false;\n\n    /** Number of CSS pixels that would be scrolled on each 'tick' when auto scroll is performed. */\n    @Input()\n    get scrollSpeed(): number { return this._scrollSpeed; }\n\n    set scrollSpeed(value: number) {\n        this._scrollSpeed = coerceNumberProperty(value, 2);\n    }\n\n    private _scrollSpeed: number = 2;\n\n    /** Type of compaction that will be applied to the layout (vertical, horizontal or free). Defaults to 'vertical' */\n    @Input()\n    get compactType(): KtdGridCompactType {\n        return this._compactType;\n    }\n\n    set compactType(val: KtdGridCompactType) {\n        this._compactType = val;\n    }\n\n    private _compactType: KtdGridCompactType = 'vertical';\n\n    /** Row height in css pixels */\n    @Input()\n    get rowHeight(): number { return this._rowHeight; }\n\n    set rowHeight(val: number) {\n        this._rowHeight = Math.max(1, Math.round(coerceNumberProperty(val)));\n    }\n\n    private _rowHeight: number = 100;\n\n    /** Number of columns  */\n    @Input()\n    get cols(): number { return this._cols; }\n\n    set cols(val: number) {\n        this._cols = Math.max(1, Math.round(coerceNumberProperty(val)));\n    }\n\n    private _cols: number = 6;\n\n    /** Layout of the grid. Array of all the grid items with its 'id' and position on the grid. */\n    @Input()\n    get layout(): KtdGridLayout { return this._layout; }\n\n    set layout(layout: KtdGridLayout) {\n        /**\n         * Enhancement:\n         * Only set layout if it's reference has changed and use a boolean to track whenever recalculate the layout on ngOnChanges.\n         *\n         * Why:\n         * The normal use of this lib is having the variable layout in the outer component or in a store, assigning it whenever it changes and\n         * binded in the component with it's input [layout]. In this scenario, we would always calculate one unnecessary change on the layout when\n         * it is re-binded on the input.\n         */\n        this._layout = layout;\n    }\n\n    private _layout: KtdGridLayout;\n\n    get config(): KtdGridCfg {\n        return {\n            cols: this.cols,\n            rowHeight: this.rowHeight,\n            layout: this.layout,\n            preventCollision: this.preventCollision,\n        };\n    }\n\n    /** Total height of the grid */\n    private _height: number;\n    private _gridItemsRenderData: KtdDictionary<KtdGridItemRenderData<number>>;\n    private subscriptions: Subscription[];\n\n    constructor(private gridService: KtdGridService,\n                private elementRef: ElementRef,\n                private renderer: Renderer2,\n                private ngZone: NgZone) {\n\n    }\n\n    ngOnChanges(changes: SimpleChanges) {\n        let needsCompactLayout = false;\n        let needsRecalculateRenderData = false;\n\n        // TODO: Does fist change need to be compacted by default?\n        // Compact layout whenever some dependent prop changes.\n        if (changes.compactType || changes.cols || changes.layout) {\n            needsCompactLayout = true;\n        }\n\n        // Check if wee need to recalculate rendering data.\n        if (needsCompactLayout || changes.rowHeight) {\n            needsRecalculateRenderData = true;\n        }\n\n        // Only compact layout if lib user has provided it. Lib users that want to save/store always the same layout  as it is represented (compacted)\n        // can use KtdCompactGrid utility and pre-compact the layout. This is the recommended behaviour for always having a the same layout on this component\n        // and the ones that uses it.\n        if (needsCompactLayout && this.compactOnPropsChange) {\n            this.compactLayout();\n        }\n\n        if (needsRecalculateRenderData) {\n            this.calculateRenderData();\n        }\n    }\n\n    ngAfterContentInit() {\n        this.initSubscriptions();\n    }\n\n    ngAfterContentChecked() {\n        this.render();\n    }\n\n    resize() {\n        this.calculateRenderData();\n        this.render();\n    }\n\n    ngOnDestroy() {\n        this.subscriptions.forEach(sub => sub.unsubscribe());\n    }\n\n    compactLayout() {\n        this.layout = compact(this.layout, this.compactType, this.cols);\n    }\n\n    getItemsRenderData(): KtdDictionary<KtdGridItemRenderData<number>> {\n        return {...this._gridItemsRenderData};\n    }\n\n    getItemRenderData(itemId: string): KtdGridItemRenderData<number> {\n        return this._gridItemsRenderData[itemId];\n    }\n\n    calculateRenderData() {\n        const clientRect = (this.elementRef.nativeElement as HTMLElement).getBoundingClientRect();\n        this._gridItemsRenderData = layoutToRenderItems(this.config, clientRect.width, clientRect.height);\n        this._height = getGridHeight(this.layout, this.rowHeight);\n    }\n\n    render() {\n        this.renderer.setStyle(this.elementRef.nativeElement, 'height', `${this._height}px`);\n        this.updateGridItemsStyles();\n    }\n\n    private updateGridItemsStyles() {\n        this._gridItems.forEach(item => {\n            const gridItemRenderData: KtdGridItemRenderData<number> | undefined = this._gridItemsRenderData[item.id];\n            if (gridItemRenderData == null) {\n                console.error(`Couldn\\'t find the specified grid item for the id: ${item.id}`);\n            } else {\n                item.setStyles(parseRenderItemToPixels(gridItemRenderData));\n            }\n        });\n    }\n\n    private initSubscriptions() {\n        this.subscriptions = [\n            this._gridItems.changes.pipe(\n                startWith(this._gridItems),\n                switchMap((gridItems: QueryList<KtdGridItemComponent>) => {\n                    return merge(\n                        ...gridItems.map((gridItem) => gridItem.dragStart$.pipe(map((event) => ({event, gridItem, type: 'drag'})))),\n                        ...gridItems.map((gridItem) => gridItem.resizeStart$.pipe(map((event) => ({event, gridItem, type: 'resize'})))),\n                    ).pipe(exhaustMap(({event, gridItem, type}) => {\n                        // Emit drag or resize start events. Ensure that is start event is inside the zone.\n                        this.ngZone.run(() => (type === 'drag' ? this.dragStarted : this.resizeStarted).emit(getDragResizeEventData(gridItem, this.layout)));\n                        // Get the correct newStateFunc depending on if we are dragging or resizing\n                        const calcNewStateFunc = type === 'drag' ? ktdGridItemDragging : ktdGridItemResizing;\n\n                        // Perform drag sequence\n                        return this.performDragSequence$(gridItem, event, (gridItemId, config, compactionType, draggingData) =>\n                            calcNewStateFunc(gridItem, config, compactionType, draggingData)\n                        ).pipe(map((layout) => ({layout, gridItem, type})));\n\n                    }));\n                })\n            ).subscribe(({layout, gridItem, type}) => {\n                this.layout = layout;\n                // Calculate new rendering data given the new layout.\n                this.calculateRenderData();\n                // Emit drag or resize end events.\n                (type === 'drag' ? this.dragEnded : this.resizeEnded).emit(getDragResizeEventData(gridItem, layout));\n                // Notify that the layout has been updated.\n                this.layoutUpdated.emit(layout);\n            })\n\n        ];\n    }\n\n    /**\n     * Perform a general grid drag action, from start to end. A general grid drag action basically includes creating the placeholder element and adding\n     * some class animations. calcNewStateFunc needs to be provided in order to calculate the new state of the layout.\n     * @param gridItem that is been dragged\n     * @param pointerDownEvent event (mousedown or touchdown) where the user initiated the drag\n     * @param calcNewStateFunc function that return the new layout state and the drag element position\n     */\n    private performDragSequence$(gridItem: KtdGridItemComponent, pointerDownEvent: MouseEvent | TouchEvent,\n                                 calcNewStateFunc: (gridItem: KtdGridItemComponent, config: KtdGridCfg, compactionType: CompactType, draggingData: KtdDraggingData) => { layout: KtdGridLayoutItem[]; draggedItemPos: KtdGridItemRect }): Observable<KtdGridLayout> {\n\n        return new Observable<KtdGridLayout>((observer: Observer<KtdGridLayout>) => {\n            // Retrieve grid (parent) and gridItem (draggedElem) client rects.\n            const gridElemClientRect: ClientRect = getMutableClientRect(this.elementRef.nativeElement as HTMLElement);\n            const dragElemClientRect: ClientRect = getMutableClientRect(gridItem.elementRef.nativeElement as HTMLElement);\n\n            const scrollableParent = typeof this.scrollableParent === 'string' ? document.getElementById(this.scrollableParent) : this.scrollableParent;\n\n            this.renderer.addClass(gridItem.elementRef.nativeElement, 'no-transitions');\n            this.renderer.addClass(gridItem.elementRef.nativeElement, 'ktd-grid-item-dragging');\n\n            // Create placeholder element. This element would represent the position where the dragged/resized element would be if the action ends\n            const placeholderElement: HTMLDivElement = this.renderer.createElement('div');\n            placeholderElement.style.width = `${dragElemClientRect.width}px`;\n            placeholderElement.style.height = `${dragElemClientRect.height}px`;\n            placeholderElement.style.transform = `translateX(${dragElemClientRect.left - gridElemClientRect.left}px) translateY(${dragElemClientRect.top - gridElemClientRect.top}px)`;\n\n            this.renderer.addClass(placeholderElement, 'ktd-grid-item-placeholder');\n            this.renderer.appendChild(this.elementRef.nativeElement, placeholderElement);\n\n            let newLayout: KtdGridLayoutItem[];\n\n            // TODO (enhancement): consider move this 'side effect' observable inside the main drag loop.\n            //  - Pros are that we would not repeat subscriptions and takeUntil would shut down observables at the same time.\n            //  - Cons are that moving this functionality as a side effect inside the main drag loop would be confusing.\n            const scrollSubscription = this.ngZone.runOutsideAngular(() =>\n                (!scrollableParent ? NEVER : this.gridService.mouseOrTouchMove$(document).pipe(\n                    map((event) => ({\n                        pointerX: ktdPointerClientX(event),\n                        pointerY: ktdPointerClientY(event)\n                    })),\n                    ktdScrollIfNearElementClientRect$(scrollableParent, {scrollStep: this.scrollSpeed})\n                )).pipe(\n                    takeUntil(ktdMouseOrTouchEnd(document))\n                ).subscribe());\n\n            /**\n             * Main subscription, it listens for 'pointer move' and 'scroll' events and recalculates the layout on each emission\n             */\n            const subscription = this.ngZone.runOutsideAngular(() =>\n                merge(\n                    combineLatest([\n                        this.gridService.mouseOrTouchMove$(document),\n                        ...(!scrollableParent ? [of({top: 0, left: 0})] : [\n                            ktdGetScrollTotalRelativeDifference$(scrollableParent).pipe(\n                                startWith({top: 0, left: 0}) // Force first emission to allow CombineLatest to emit even no scroll event has occurred\n                            )\n                        ])\n                    ])\n                ).pipe(\n                    takeUntil(ktdMouseOrTouchEnd(document)),\n                ).subscribe(([pointerDragEvent, scrollDifference]: [MouseEvent | TouchEvent, { top: number, left: number }]) => {\n                        pointerDragEvent.preventDefault();\n\n                        /**\n                         * Set the new layout to be the layout in which the calcNewStateFunc would be executed.\n                         * NOTE: using the mutated layout is the way to go by 'react-grid-layout' utils. If we don't use the previous layout,\n                         * some utilities from 'react-grid-layout' would not work as expected.\n                         */\n                        const currentLayout: KtdGridLayout = newLayout || this.layout;\n\n                        const {layout, draggedItemPos} = calcNewStateFunc(gridItem, {\n                            layout: currentLayout,\n                            rowHeight: this.rowHeight,\n                            cols: this.cols,\n                            preventCollision: this.preventCollision\n                        }, this.compactType, {\n                            pointerDownEvent,\n                            pointerDragEvent,\n                            gridElemClientRect,\n                            dragElemClientRect,\n                            scrollDifference\n                        });\n                        newLayout = layout;\n\n                        this._height = getGridHeight(newLayout, this.rowHeight);\n\n                        this._gridItemsRenderData = layoutToRenderItems({\n                            cols: this.cols,\n                            rowHeight: this.rowHeight,\n                            layout: newLayout,\n                            preventCollision: this.preventCollision,\n                        }, gridElemClientRect.width, gridElemClientRect.height);\n\n                        const placeholderStyles = parseRenderItemToPixels(this._gridItemsRenderData[gridItem.id]);\n\n                        // Put the real final position to the placeholder element\n                        placeholderElement.style.width = placeholderStyles.width;\n                        placeholderElement.style.height = placeholderStyles.height;\n                        placeholderElement.style.transform = `translateX(${placeholderStyles.left}) translateY(${placeholderStyles.top})`;\n\n                        // modify the position of the dragged item to be the once we want (for example the mouse position or whatever)\n                        this._gridItemsRenderData[gridItem.id] = {\n                            ...draggedItemPos,\n                            id: this._gridItemsRenderData[gridItem.id].id\n                        };\n\n                        this.render();\n                    },\n                    (error) => observer.error(error),\n                    () => {\n                        this.ngZone.run(() => {\n                            // Remove drag classes\n                            this.renderer.removeClass(gridItem.elementRef.nativeElement, 'no-transitions');\n                            this.renderer.removeClass(gridItem.elementRef.nativeElement, 'ktd-grid-item-dragging');\n\n                            // Remove placeholder element from the dom\n                            // NOTE: If we don't put the removeChild inside the zone it would not work... This may be a bug from angular or maybe is the intended behaviour, although strange.\n                            // It should work since AFAIK this action should not be done in a CD cycle.\n                            this.renderer.removeChild(this.elementRef.nativeElement, placeholderElement);\n\n                            if (newLayout) {\n                                // TODO: newLayout should already be pruned. If not, it should have type Layout, not KtdGridLayout as it is now.\n                                // Prune react-grid-layout compact extra properties.\n                                observer.next(newLayout.map(item => ({\n                                    id: item.id,\n                                    x: item.x,\n                                    y: item.y,\n                                    w: item.w,\n                                    h: item.h,\n                                    minW: item.minW,\n                                    minH: item.minH,\n                                    maxW: item.maxW,\n                                    maxH: item.maxH,\n                                })) as KtdGridLayout);\n                            } else {\n                                // TODO: Need we really to emit if there is no layout change but drag started and ended?\n                                observer.next(this.layout);\n                            }\n\n                            observer.complete();\n                        });\n\n                    }));\n\n\n            return () => {\n                scrollSubscription.unsubscribe();\n                subscription.unsubscribe();\n            };\n        });\n    }\n\n\n    // tslint:disable-next-line\n    static ngAcceptInputType_cols: NumberInput;\n    // tslint:disable-next-line\n    static ngAcceptInputType_rowHeight: NumberInput;\n    // tslint:disable-next-line\n    static ngAcceptInputType_scrollSpeed: NumberInput;\n    // tslint:disable-next-line\n    static ngAcceptInputType_compactOnPropsChange: BooleanInput;\n    // tslint:disable-next-line\n    static ngAcceptInputType_preventCollision: BooleanInput;\n}\n\n","<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { KtdGridComponent } from './grid.component';\nimport { KtdGridItemComponent } from './grid-item/grid-item.component';\nimport { KtdGridDragHandle } from './directives/drag-handle';\nimport { KtdGridResizeHandle } from './directives/resize-handle';\nimport { KtdGridService } from './grid.service';\n\n@NgModule({\n    declarations: [\n        KtdGridComponent,\n        KtdGridItemComponent,\n        KtdGridDragHandle,\n        KtdGridResizeHandle\n    ],\n    exports: [\n        KtdGridComponent,\n        KtdGridItemComponent,\n        KtdGridDragHandle,\n        KtdGridResizeHandle\n    ],\n    providers: [\n        KtdGridService\n    ],\n    imports: [\n        CommonModule\n    ]\n})\nexport class KtdGridModule {}\n","/*\n * Public API Surface of grid\n */\nexport { ktdGridCompact, ktdTrackById } from './lib/utils/grid.utils';\nexport * from './lib/directives/drag-handle';\nexport * from './lib/directives/resize-handle';\nexport * from './lib/grid-item/grid-item.component';\nexport * from './lib/grid.definitions';\nexport * from './lib/grid.component';\nexport * from './lib/grid.module';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.KtdGridService"],"mappings":";;;;;;AACA;;;;AAIG;AAqEH,MAAM,KAAK,GAAG,KAAK,CAAC;AAEpB;;;;;AAKG;AACG,SAAU,MAAM,CAAC,MAAc,EAAA;AACjC,IAAA,IAAI,GAAG,GAAG,CAAC,EACP,OAAO,CAAC;AACZ,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;AAC/C,QAAA,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,OAAO,GAAG,GAAG,EAAE;YACf,GAAG,GAAG,OAAO,CAAC;AACjB,SAAA;AACJ,KAAA;AACD,IAAA,OAAO,GAAG,CAAC;AACf,CAAC;AAEK,SAAU,WAAW,CAAC,MAAc,EAAA;IACtC,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACvC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QAC/C,SAAS,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,KAAA;AACD,IAAA,OAAO,SAAS,CAAC;AACrB,CAAC;AAED;AACA;AACM,SAAU,eAAe,CAAC,UAAsB,EAAA;AAClD,IAAA,MAAM,gBAAgB,GAAe;QACjC,CAAC,EAAE,UAAU,CAAC,CAAC;QACf,CAAC,EAAE,UAAU,CAAC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